Controlling SSR Output Voltage with Arduino PWM?

Hi All –

My application requires precise control of voltage between 0-10V (I have an air pressure regulator that responds linearly to input voltage between 0-10V and provides 0-1PSI). I first tried using the following digipot: MCP41010-I/P. I burned a couple up and soon realized it was only rated to control up to 5V output, and I was applying 10V to it.

I asked if a digikey tech could help me find a through hole digipot good for controlling 0-10V with decent resolution (256 taps is about what I need). They said digikey does not carry a digipot that fit my requirements.

I was direct by the Digikey tech to buy the following solid state relay for my application: CLA274-ND, and control it with PWM output from my Arduino. I connected pin 1 to 10V, pin 2 to an Arduino PWM pin, pin 3 to ground, and I am measuring the output voltage on pin 4 (which will be connected to the air pressure regulator). I seem to be getting non-linear output from the SSR with linear PWM input from the Arduino. Any thoughts? Did the tech steer me wrong in this application?

Greetings,

There’s approximately 3.14159 bajillion ways to conjure up a variable voltage, each with its own mix of advantages and disadvantages for any particular context. While we here at DK can offer suggestions, it’s ultimately your call as to which avenues you might want to pursue, based on your specific needs.

Some things you’d likely want to be accounting for might include the amount of current drawn by the controlled load, as well as the degree of linearity and control bandwidth required along with any noise/signal quality constraints.

Use of an SSR driven by a PWM output as suggested is not an inherently bad idea; to the contrary it brings an isolation capacity to the table which might be very useful or appropriate. It’s an open-loop approach however, so any nonlinearities that are present in the chain can’t be dealt with well.

You could make a variable voltage by using an analog output on your Arduino, driving an external DAC from a digital serial output, or by filtering a PWM waveform, and a simple op amp circuit could then be used to scale that variable output to whatever range you like. Need more current than a cheap op amp can deliver directly? An NPN transistor could be used as a buffer to increase output current capacity. Things still not linear enough? Consider taking feedback for the opamp from a sensor measuring the ultimate quantity of interest; an op amp’s open-loop gain can squish a crooked transfer function almost perfectly straight, but in trade the extra floppiness one introduces by including more and more stuff within the feedback loop expands the potential for the system to go unstable and start oscillating.

The possibilities are broad; getting a comprehensive idea of what you need to achieve is the first step in ruling out those that carry limited possibilities of success.

1 Like