Output 0-20mA from an Arduino with ATMega328

  • Thread starter Thread starter Etude
  • Start date Start date
  • Tags Tags
    Arduino Output
Click For Summary
An Arduino Duemilanove with ATMEga328 can output a variable current of 0-20mA for a speed indicator, but requires additional components to manage the voltage output. Directly connecting the Arduino pin will yield 0-5V, necessitating a resistor to limit current and accommodate the speed indicator's input impedance. The total impedance, including the added resistor, should ideally be around 250 Ohms, with a 270 Ohm resistor likely sufficient for limiting current. It's important to clarify whether the speed indicator requires a 0-20mA or a 4-20mA input, as the latter is a common industry standard. Understanding the relationship between current and voltage, as well as circuit configurations, is crucial for accurate implementation.
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.)
 
Thanx! :)
 
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.
 
Thread 'I thought it was only Amazon that sold unsafe junk'
I grabbed an under cabinet LED light today at a big box store. Nothing special. 18 inches in length and made to plug several lights together. Here is a pic of the power cord: The drawing on the box led me to believe that it would accept a standard IEC cord which surprised me. But it's a variation of it. I didn't try it, but I would assume you could plug a standard IEC cord into this and have a double male cord AKA suicide cord. And to boot, it's likely going to reverse the hot and...

Similar threads

Replies
7
Views
2K
  • · Replies 23 ·
Replies
23
Views
7K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
78
Views
9K
  • · Replies 24 ·
Replies
24
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K