Electrical – build a constant current supply


I have the following problem: I wish to build a microammeter/milliammeter that will interface to an Arduino. Sparkfun sells an ACS712 breakout board with an op-amp and two pots for calibration.

Suppose I'm running a 5V Arduino UNO or equivalent. I want, say, 100uA to be full range. So I need a 100uA constant-current source to use for calibration. I've read the various answers to other constant-current questions, but they are unsatisfactory. For example, an answer that explains that the output voltage will double if the load doubles doesn't help much, because the only voltage I have available is 5.0V. Or perhaps 5.2V or 4.95V. So I need a reference that will provide me with 100uA, that will allow me to tweak the gain of the breakout so that I get a reading of, say, 1000 units on the 10-bit ADC. The ACS712 has a resistance of 1.2m ohms (yes, milli, not meg), so unless there is an external current limit, the power supply would self-destruct or the chip would vaporize. It would be nice if it were independent of the power supply voltage, but I could save the calibration voltage, which I can read, in the EEPROM and adjust according to Ohm's Law, although I'd rather avoid that.

Sparkfun also has a voltage reference chip, the TL431, whose datasheet shows a constant-current sink (see Figure 21 on page 7). Would this create the constant-current reference I need?

Note: my goal is to have six ranges on my ammeter. To do this, I am considering the brute-force approach of buying six ACS712 breakouts, calibrating each of them at 10uA, 100uA, 1mA, 10mA, 100mA and 1A, and feeding them into A0..A5. If I choose 1000 units as my calibration point, then overrange is going to be >1000. So all I need to do is read analog inputs until I get one that is <=1000 and thus my meter becomes autoranging. But without a set of six constant-current sources I have no way to calibrate.



Best Answer

I need a 100uA constant-current source to use for calibration

To calibrate it, connect one current-sensing pin to ground on a power supply. Connect the other current-sensing pin via a precision resistor to a suitable voltage on the power supply. Maybe consider 10 volts as the excitation voltage.

10V across a resistor of 100 kohm produces 100.0000 uA. Even if you added the 1.2 milli ohms into the equation the current would be 99.999999 uA.

All you need next is a precision voltage source of 10V so buy a voltage reference chip with as much accuracy as you can afford.