PWM to const current

atferrari

Joined Jan 6, 2004
5,012
Hy, Any Other duty cycle is suffice. Must the load have a pulsed current
To the OP
While I am not the most qualified to assist you with the electronics (albeit I built some application demanding control of current in diverse ways) I can see that you are not giving the whole picture in one single post.
 

LesJones

Joined Jan 8, 2017
4,511
In post #40 you say " Must the load have a pulsed current " How can we answer that question when you will not tell us what you are trying to achieve and what are the consraints on the design. You are the only one that can answer that question. Your original question is basically ohm law. As Bob points out in post #7 for 10 mA through a load of 1 meg ohm requires a voltage of 10000 volts. With only 5 volts available the maximum load resistane for a current of 10 mA is 500 ohms. The only solution is to use a DC to DC step up converter from 5 volts to 10000 volts. So even if the converter was 100% efficient it would require 20 amps from your 5 volt supply. Is your 5 volt supply capable of providing thet current ? If the answer is no. (Unless the duty cycle of the output current waveform is less than about 4% assuming your 5 volt supply can provide 1 amp.) Even when you solve the power problem you need to design a constant current circuit. that can have have over 10000 volts across it's output device that can be switched on and off at the rate you require.

Les.
 

Alec_t

Joined Sep 17, 2013
15,119
From your limited answers so far it seems you want any load less than 500 Ohms to be driven with 10mA amplitude pulses.
1) Is that correct?
2) Are those loads purely resistive?
3) What is the pulse frequency?
4) How accurate does the 10mA need to be?
 

BobTPH

Joined Jun 5, 2013
11,516
Why is anyone trying to continue to help here when it is clear that the thread starter is either unable or unwilling to describe the problem he is trying to solve?

The fact that he originally said the load was 1K to 1M Ohm and now says it is 1 to 500 Ohm shows just how clueless he is.
 

WBahn

Joined Mar 31, 2012
32,848
Replace the input series resistor and capacitor from the controller with a pot so you can set the input voltage to the op-amp input. That will set the current.
View attachment 318836

Thanks, But Is there any way I can control/vary automatically the op-amp input from controller ? Because if I change the Rload the ammeter reading as you can see 15.4 varies significantly
You have the 400 Ω load connected to -12 V.

Notice that the meter is showing 15.4 mA flowing OUT of the collector of the Q1.

The puts 6.2 V across Rload, putting the collector at -5.8 V.

The transistor is in reverse operation, which means that it will act like an NPN transistor, but with poor (and poorly characterized) performance. But you are probably still getting most of the current through RS.

Because current is flowing upward through RS, the inverting input of the opamp has a negative voltage on it (which the LM358 may not handle well). Assuming it does, the opamp is going to try to rail the output at the positive supply (though it can only get to about 3 V). If we assume that the transistor will behave like a normal NPN, even in reverse operation, that would put the base at about -5.1 V, putting about 8.1 mA of current through it. That would then need the remaining 7.3 mA flowing upward through RS, which would put the top of it at about -3.1 V. It's very difficult to guess what the actual output of the opamp will be, and hence what the current through RS will be, but this is the basic consequences of connecting you 12 V source incorrectly and then not paying attention to what the meter is actually telling you.
 
Top