Maker Pro
Maker Pro

using microcontroller as current generator load

rinchan6

Aug 27, 2013
42
Joined
Aug 27, 2013
Messages
42
Hi guys, i currently have a circuit that generates 4 to 20mA current using a simple op-amp and 24vdc as supply. My instructor gave me a microcontroller as a load and said i need it to be programmed. I know a little programming but i have no idea how it is done. The controllers ic code is MEGA328P. Any ideas?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
You can't use the micro as a load.

You convert the 4-20mA current into a voltage suitable for the integrated ADC of the micro, e.g. 1V...5V by passing the current through a resistor. The ADC within the micro converts this voltage to a digital value you can further process.
 

rinchan6

Aug 27, 2013
42
Joined
Aug 27, 2013
Messages
42
But what will be the point of making a current generator? I could have fed the voltage directly to the micro.
 
Top