MCU control Contant Current Source

Status
Not open for further replies.

VictorPS

Member
I need to design a constant current source/ or current limitter, from a fix 24V, control current from 0 to 0.5A max.

I need it control by PIC MCU, any idea on how to do it?

Currently, what I think off is using I2C + Digital Pot + Mosfet.

Any other suggestion?
 
You don't need a digital pot, although that is one solution, all you need is a D2A, and a simple R2R ladder would be fine (and cheap).

Even cheaper, you could use PWM, there are application notes at MicroChip about using PWM as an analogue output.
 
You also need to decide how to maintain the current constant.

Either via active feedback loop where PIC reads the actual load current value and compensate, OR via analogue control where the PIC generates a fixed voltage reference proportional to the required current and the hardware compares this reference with the actual load current and control the current accordingly.
 
Sorry, is my fault not state clearly, let me add on more info.

That constant current is use to control LED, a light source for camera, so I cannot use PWM which flickering, so a linear constant current must use. (as I know, may be there is other method)

Also, I may need to control at least 4ch, and max up to 32 ch, each channel is different brightness/ current source.

My idea is use V to I , so choose to use MOSFET or BJT as current control.
The input V can be DAC, but DAC is not cheap, so I choose D-Pot.

The resolution I need is about 8bit, or 256 steps.

I will consider Nigel Suggestion, using R2R, generate using 8bit shift register like CD4094, with this, I can have many ch too.

Thank you,
 
Last edited:
Why would you need 32 channels for a camera light source? PWM is fine for cameras, you just use a frequency much higher than the shutter speed. PWM is going to be simpler to implement than a mosfet controlled current source. For PWM all you need is a single resistor for each LED to limit current, and a then you change the PWM to lower the light level from it's max limit.
 
it is use for industrial machine, for vision inspection test, each test need at least 4 channel light source at different angle, for quad test, it will need 16channel.


For knowledge, how to generate high freq PWM for multiple channel? I am using PIC MCU, or any external PWM generator IC I can use to generate very high Freq PWM?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…