Electronics > Projects, Designs, and Technical Stuff

Constant current source adjustable by PWM

<< < (8/9) > >>

PCB.Wiz:

--- Quote from: delphes123 on June 09, 2023, 08:23:38 pm ---
Is 10 % of ouput 10mA +- 1 mA

Voltage with be variable due to constant current, but it is powered by 12 Volts initially

it will operate between 10 and 30 °c

Yes of course I can have a lookup table and calibration can be made for each.

--- End quote ---

Good, here are a couple of options. They assume you have access to the 12V and it is regulated.
Test is by a linear ramp, with 5ms == 5V and R1 is used as an ideal-load check, allows simple error as a difference plot I(R1)-I(R2)

First is a classic/simple PNP.NPN pair that gives nominal VBE compensation, but it cannot quite get to 0mA, min is around 100uA, due to Vbe effects. 100uA may be 'good enough' for your needs.

Second design splits the emitter resistor, and steers some base current to allow a reverse offset effect and that can get closer to 0mA
Here, I've adjusted it for a ballpark 12 bit ADC 1-LSB as a zero-point.

The error curves that you need to compensate, in a table, you can see in the graphs.
You should closely thermally couple the Q1.Q2, and Q1 needs to have decent HFE.

Addit : added a 5V bias version, does not need 12V connection, and the lower RE does not need a split to give ~5uA zero compensate.
Drive is divided by 2, to give some bias on R2, which also improves the Q1.C load-range to below 5V

delphes123:

Thanks alot I did simulation and it works, just last question remember V2 is from PWM (MCU) does it needs any filter on the output to drive transistor base ?

PCB.Wiz:

--- Quote from: delphes123 on June 10, 2023, 09:10:06 am ---
Thanks alot I did simulation and it works, just last question remember V2 is from PWM (MCU) does it needs any filter on the output to drive transistor base ?

--- End quote ---
Yes, I just left that off to allow simple ramp testing.
The 10k PNP base resistor can split to a double RC filter to suit your Pwm.
If you only slow change this, there is plenty of scope to filter.

delphes123:
@pcb.wiz

The first solution you give me works perfect as same as simulation you did , could you change V1 to 5 V for me and tell me what value of R4 need to be there ?

Thanks
Regards

PCB.Wiz:

--- Quote from: delphes123 on July 20, 2023, 07:27:18 pm ---@pcb.wiz

The first solution you give me works perfect as same as simulation you did , could you change V1 to 5 V for me and tell me what value of R4 need to be there ?

Thanks
Regards

--- End quote ---
#35 above already has a 5V sim, with other minor changes too. R4=3k3

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod