284Views5Replies

Author Options:

Can i use an avr microprocessor to output a specific current? Answered

if anyone has some arduino code or something for an attiny 13 it would help alot!

Discussions

None
PaulMakesThings

8 years ago

For complex solutions like this I find it is often best to use IC's designed for the job since they are cheap and really simplify the task. Here is an example that may suit your needs:
http://www.maxim-ic.com/app-notes/index.mvp/id/921
One chip shown there is about $1.10 and the other is $1.70, and since the chip is built for the purpose it usually does a good job and eliminates some possibilities for error.

None
steveastrouk

9 years ago

Are you looking for a high efficiency circuit, or just something that works ? Steve

None
steveastrouk

9 years ago

Directly, it can drive a couple of standard LEDs - the kind that need a few mA to run. Otherwise, you would need to build something.

How much current did you want ?

Steve

None
steveastrouk

9 years ago

Use a PWM port, filter that to DC, then add a single op amp as a voltgae to current converter.

None
orksecurity

9 years ago

Not directly. You would have to build a digitally-controlled current regulator, and then use the AVR to control that.