Output 0-20mA from an Arduino with ATMega328

  • Thread starter Thread starter Etude
  • Start date Start date
  • Tags Tags
    Arduino Output
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
5 replies · 10K views
Etude
Messages
28
Reaction score
0
Hi! I am using a Arduino Duemilanove with ATMEga328 for my project.

I need an input of 0-20mA into a speed indicator. I know that the Ardunio pins have a current output of 0-40 mA and was wondering if I could use one of the pics to input 0-20mA into the speed indicator. I know that directly connecting the pin will give me 0-5V so I need some external hardware. Right? However, I have no clue how to do this. Can someone please help ? The current has to be variable from 0mA (or close to 0) to 20mA.
 
Engineering news on Phys.org
how are current, and voltage related?
how do series/parallel circuits affect current?
 
This will depend on how accurate you want the output - but a relatively low tech system should work. What is the input impedance of the speed indicator?
Since it takes a current input it should be pretty low, so possibly just by adding a resistor ( to limit the current ) and if the Speed Indicators input impedance is constant over the range of 1 -20 mA input you should be able to directly output the 0-5V Output to the Indicator.
Drive 1mA,10mA and 20mA current into the Indicator and measure the voltage needed to back calculate the impedance.
The sum of the added resistor and Indicator should come to 250 Ohms total. ( I'll bet just using a 270 Ohm Resistor will do the trick out of the box - this will limit the current to below 20mA- if you can compensate the difference in the program.)
 
More info on you speed indicator would be nice. Is it 0-20ma or 4-20ma?
 
4-20 mA is acceptable - since it is the industry standard.