Go Down

Topic: Output 0-20mA from an Arduino (Read 4441 times) previous topic - next topic


That will work. But you need a voltage , with the Ardiuno, you will need Digital to Analog circuit or PWM to voltage circuit.  Than that will work. And for op-amps, you need dual power supply to make it work more reliable


michael_x :
My initial idea was to use a rheostat and what you say does sound similar to that. Might as well give it a shot will I can get specs for the indicators.
Meanwhile, I found this.
Any Comments about this tranconductance circuit ?
Really appreciate the help!

It does not matter what resistance value Rload is, or how much wire resistance is present in that large loop, so long as the op-amp has a high enough power supply voltage to output the voltage necessary to get 20 mA flowing through Rload.

Same requirement. Rload of that circuit is equivalent to the internal resistance value of the speed indicator. If Rload is unknown then the minimum value for the op-amp power supply is also unknown. Have you considered taking a ohm meter and just read the speed indicator's resistance?



Any Comments about this

I'd rather feed the op-amp with a flattened PWM signal.

My brute approach to apply a PWM signal to your current sink just strong enough that 255 (= constant 5V) result in full scale and see what happens if you turn down the PWM dimmer, has the only advantage that you don't invest in hardware just to find out it does not work or is not required.

A mentality question, rather ;)


I did come across PWM to analog in a comunication book. In TV circuts, they have these circuits. They call Integrator.   I did a small simulation using Circuit Wizard, I use Virtual Pulse generator ( set the duty cycle ) and a virtual scope. The circuit I was testing was a Integrator. A RC circuit. I simply adjust the right R and the right C for a nice low ripple voltage. I test with 5 V @ 1 K Hz. The RC is 100 k - 0.1 uF. At 10 %, I measure about 1.5 V and at 90 %, I measured about 4.5 V. With the help of a op-amp use as a buffer, you got a crude "digital - Analog".  Since the frequency of a PWM is 490 Hz, I guess a RC of 100 K - 0.1 uF will work. At low %, you got a low voltage out, a high %, you got a higher voltage out.

As to help the OP, the output of that circuit going to a op-amp wired as Voltage - Current converter config, and you are in the game. Just experiments and see what happen. 

But, as retrolefty point out, the resistance of the "meter" has to be know. You have to do some reversed engineering - testing / measurements to find that out.  Just use V = R X I. That is a start.

The circuit is :

PWM in ---- Resitor -----  Vout

Go Up