Output 0-20mA from an Arduino with ATMega328

In summary, the conversation discusses using an Arduino Duemilanove with ATMEga328 to input 0-20mA into a speed indicator. The output pins of the Arduino have a current range of 0-40 mA, so external hardware is needed to limit the current to 0-20mA. The input impedance of the speed indicator must be considered, and a resistor can be used to limit the current and output the desired voltage. The conversation also mentions the difference between series and parallel circuits in relation to current and the importance of accuracy in the output.
  • #1
Etude
28
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
  • #2
how are current, and voltage related?
how do series/parallel circuits affect current?
 
  • #3
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.)
 
  • #4
Thanx! :)
 
  • #5
More info on you speed indicator would be nice. Is it 0-20ma or 4-20ma?
 
  • #6
4-20 mA is acceptable - since it is the industry standard.
 

1. How can I output 0-20mA from an Arduino using an ATMega328?

To output a 0-20mA signal from an Arduino with an ATMega328, you will need to use a digital-to-analog converter (DAC) chip, such as the MCP4725. The DAC chip will convert the digital output from the Arduino to an analog signal that can be adjusted to range from 0-20mA.

2. What is the maximum output current that can be achieved with an Arduino and ATMega328?

The maximum output current that can be achieved with an Arduino and ATMega328 is typically around 40mA. This is the maximum current that can be sourced or sunk by the digital pins of the ATMega328.

3. Can I use a different DAC chip to output 0-20mA from an Arduino with ATMega328?

Yes, there are various DAC chips available that can be used to output 0-20mA from an Arduino with ATMega328. Some popular options include the MCP4728, DAC0808, and MAX521.

4. What is the resolution of the 0-20mA output from an Arduino with ATMega328?

The resolution of the 0-20mA output will depend on the specific DAC chip being used. However, most DAC chips have a resolution of 12 bits, which means they can output 4096 different levels of current. This results in a resolution of approximately 4.88 microamps per step.

5. Are there any limitations or considerations when using an Arduino and ATMega328 to output 0-20mA?

One limitation to keep in mind is the maximum output current of 40mA. If you need to output more than 40mA, you will need to use external circuitry to amplify the output signal. Additionally, the accuracy and stability of the output may be affected by factors such as the power supply voltage and temperature. It is important to carefully design and test your circuit to ensure the desired output is achieved.

Similar threads

Replies
7
Views
1K
  • Electrical Engineering
Replies
23
Views
5K
  • Electrical Engineering
Replies
32
Views
3K
  • Electrical Engineering
Replies
1
Views
1K
Replies
1
Views
690
  • Electrical Engineering
Replies
8
Views
901
  • Electrical Engineering
Replies
7
Views
3K
Replies
78
Views
8K
  • Electrical Engineering
Replies
24
Views
4K
  • Electrical Engineering
2
Replies
38
Views
3K
Back
Top