6
\$\begingroup\$

I need to build a programmable current source from a 8051 microcontroller.

It needs an output current from 0 to 10mA maximun.

How do i go about doing this? what circuits do i need to build?

I was going to do a 20 steps - with 0.5mA so from 0 to 10mA is 20 steps.

\$\endgroup\$
2
  • \$\begingroup\$ What is the voltage range, or load resistance range? \$\endgroup\$
    – Adam Davis
    Nov 18, 2009 at 4:49
  • \$\begingroup\$ what kind of accuracy do you need? \$\endgroup\$
    – Jason S
    Nov 26, 2009 at 5:51

2 Answers 2

2
\$\begingroup\$

Here's an example that goes from -15V to +15V with +/- 18mA, so unless you need higher or lower voltages it should do the trick with two chips and a handful of passives. It provides a great deal of resolution and stability, and requires positive and negative supplies, so it may be overkill.

If you let us know what voltage range you're looking for, though, a simpler circuit may better fit the bill.

Here's another option, 100mA and 9V: http://www.discovercircuits.com/DJ-Circuits/100ma-current-source.htm 1 chip, two fets, and a handful of components.

\$\endgroup\$
2
\$\begingroup\$

One cheap solution is to create a PWM signal, filter it with a RC cell, and then feed it to a voltage-to-current converter. In the simplest case, this can be a transistor with a resistor in the emitter, and the load in the collector. But you can also use an op amp for this. Since you only need a 20-step scale, this may be enough for you.

A better but more expensive solution is to connect a DAC to 5 of your digital outputs, and feed the output of the DAC to a voltage-to-current converter as before. I think there are even some DACs which directly control their output current. Since you only need 5-bit resolution, you can even build a R-2R DAC yourself, as described here.

In the end, the optimal solution depends on your project's constraints (time? price? size?).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy