Electronic – Arduino high voltage analog out

analogarduinoautomotive

I am looking for the best way to provide an analog output from an Arduino to control the blend and mode doors in my truck's HVAC system.

They both take a straight "12V" signal from the control unit ("12V" because it is more like 12-14V depending on whether or not the truck is running.)

The control unit uses a simple 10k potentiometer for each of these, as a voltage divider, thus giving a variable voltage between 0 and "12V". The wiper of the blend door potentiometer goes through an 82k resistor, and the wiper of the mode door potentiometer goes through a 3k resistor (I'm not sure if that matters, but if possible, I'd like to match this setup.)

Things I have looked at:

  • PWM using MOSFETs – These would have to be high side switches, and I admit I am not skilled enough to be able to pick out components for this. If there is a turnkey high side switching solution that will allow me to use PWM through an RC filter, that would be great. I think this would be the simplest answer, and use the cheapest components.

  • Digital potentiometers – again, there is a wealth of these out there, all with different specs, most of which don't seem to support more than 5V. I think potentially this one might work: MCP41HV31-103E/ST-ND

So my question is:

I have an Arduino Nano, and I need it to output an analog signal between GND and a reference voltage (in this case 12V to 14V), what is the best way of doing that?

Edit: Additional information, I have found schematics for both the actuator, as well as the control interface:

Actuator information

Controls information

Best Answer

Jack Creasey definitely has a point, you don't know much about the input you are trying to drive. However, I think it is a safe bet to say the actuators are not current-driven; their input seems to have a 100 kOhm resistor in series, which would result in minimal currents and low reliability for current-controlled inputs.
That being said, two other approaches could very well be worth a try. Both were briefly discussed in the comments before:

MOSFET as low side switch, RC-Filter

schematic

simulate this circuit – Schematic created using CircuitLab

The input marked with "Arduino PWM" can be birectly connected to any Arduino pin with PWM capabilities. The output ("to climate control") should either replace the middle pin of the potentiometer, or, if you are sure that the input is voltage-controlled, directly to the control input your actuators.

The left part of the shown circuit amplifies (and inverts) the PWM signal from your Arduino to 12V.
Thr right part is a simple RC low pass filter, which turns the fast-switching PWM signal into a mostly stable voltage. Basically, the part of the signal which consists of higher frequencies is rejected and only the low frequency is allowed to pass (therefore "low pass filter"). To learn more about how this works and how to calculate it exactly, have a look at this or any other tutorial.

The circuit is not perfect, though. If the output is loaded (e.g. by the climate control), the output voltage might drop significantly. However, this should not be the case due to small input current of your actuator's control input. Also, the two stages are not buffered, meaning the low pass filter will slightly load the left circuit part (therefore the resistor choice: R3 (10 kOhm) should be much larger than R2 (1 kOhm) to make the effect imperceptible).
As noted in the comments, a n-channel MOSFET should be used instead of a BJT, because the BJT will always have a Vce(sat) of around half a volt (which limits the minimal output voltage). The suggested IRLZ34n has a Rds(on) of 35 mOhm, which results in a minimal output voltage of practically zero.

RC-Filter, Non-inverting amplifier

schematic

simulate this circuit

The external wiring of the second circuit is identical to the first one.

Even the idea behind the circuit is similar: here the PWM signal is transformed into an analog voltage first, then amplified. Since amplifying analog voltages with transistors only is quite tricky, we use an operational amplifier (op-amp) instead. The circuit is known as "non-inverting amplifier", since the output voltage follows the equation . Again, there are tons of tutorials available online, here's the first one I found.
The op-amp should be a rail-to-rail type (meaning the output voltage swing includes both the negative and positive supply rail, GND and 12V in this case) and needs to be suited for supply voltages of at least 12V, the more headroom the better.

This circuit overcomes the problems noted for the first one (the two stages are buffered and the output is low-impedance) at the cost of higher complexity.
If you need voltages higher than 12V, you can of course adjust the gain by choosing other resistors. For example, you can trim the circuit to output up to 14V, but keep in mind that in that case if the supply is only 12V, the output will clip and you will reach the maximum output voltage (12V) at ~4.3V input.


I'm quite confident that you can manage to solve your problem with the knowledge about the circuits shown above, especially if what you wrote in your comment to Jack Cearsey's answer holds true. In that case, you should connect the output of the shown circuits directly to the control input of the actuators.

Please let us know which solution worked for you, and which one didn't (and why), so that others can benefit from it as well.