Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Constant Current

Status
Not open for further replies.

be80be

Well-Known Member
I found this circuit on here I added some changes. One a 120 ohm 1 watt resistor to insure that the 2n7000 doesn't see more then 200 mA maybe over kill but. The V+ will be 24 volts or less

The 1 ohm 1/2 watt will be read by the pic's ADC to set the output to 4 to 20 mA

Would this work **broken link removed**
The read resistor will be read with a Pic down the line

Thanks Burt
 
Last edited:
So the point of the circuit is just a current sink controlled by a PIC?

You have Q2 configured as a current limit (600mA with R2 = 1 ohm), so the 120R wouldn't be needed if you increased R2. Increasing R2 would also give you better resolution on your ADC reading of the current.
 
Then this should be better what I'm after is I want to control the current across the read resistor from 4 to 20 mA so i changed the 1 ohm to a 10 ohm and dumped the 120 View attachment 68937
 
You should calculate the values for the resistor to suit your application. Before working out the values though, it will help if you can define the following:
ADC reference voltage and bit resolution: e.g. 5V, 10 bits
Output current resolution: e.g. 100 levels from 4mA to 20mA
PWM resolution and frequency: e.g. 8 bits + N bits dither @ 60kHz
Output current change rate: e.g. don't care

From these values you can work out the resistor values and how the current limit circuit will be configured.

Assuming that you want an analogue output current, and not a switching PWM, you should put some low-pass filtering on the PWM before driving the transistor (e.g. a capacitor on Q3 base-collector).
 
The 250 ohm read resistor is fixed adc 10 bit 60 khz PWM is ok

I'm just playing with parts I have laying here
 
Well the value of the resistor affects the voltage across it; consequently the range of the ADC used will limit the sensitivity/accuracy of the current reading. e.g. with a 10R resistor, at 20mA that's 200mV, or 1/25 of the full scale range of the ADC operating at 5V. That's only 40 counts of the ADC, so that's <40 output current levels (unless you oversample the ADC).
 
Status
Not open for further replies.

Latest threads

Back
Top