Go Down

Topic: two pwm channels, for 5-12v and 0-100mA output (Read 1 time) previous topic - next topic


I want to use two pwm channels, one to adjust voltasge range on an output for 5-12v and another to adjust current output of 0-100mA.

Any thought how I can do this and get a stable output?

I want analog output by the way

Am I on the right track with the lm334z/nopb?


Am I on the right track with the lm334z/nopb?

Nope that's  Voltage Reference


I want to use two pwm channels, one to adjust voltasge range on an output for 5-12v and another to adjust current output of 0-100mA

That is an imposable thing to do. You can have a variable voltage that will supply current according to the resistive value of the load. OR you can have a constant current supply that alters the voltage so that a set current is flowing.
To have both operational at the same time you would have to some how magically control the impedance of the load.

PWM works like this:-


ok so I can regulate current with lm334z


I need something to deliver a voltage range of 0-12v we'll say.  This can go on the control pin of the lm334z.

So can't I have pwm output 0-5v, step it up to 0-12v, and use D/A conversion?  And then use this to apply Vcc pin on lm334z?

Is that how I do it?




I also have doubts that it will work, but it should be possible. They have been making power supplies that have adjustable voltage and current controls for years, The first one I used was in the late 60's

I know of several currant limiting circuits, some are easily adjustable with a variable resister. The trick would be getting the computer to control it, and figuring out what size components to use. They usually are set to control max I, so that the circuit doesn't smoke to much.

Ive never worked with one but a digital potentiometer might work. 

The voltage going to the current limiter could easily be controlled.

There are limits that can be explained by ohms law ie put 10 volts across a light bulb turn the maximum current down. The light bulb will dim, and so will the voltage. You just can't get around V=IR:

Here is one such circuit that could do the job of a current limiter.


We see these requests from time to time and it is hard to tell often if one is asking for adjustable voltage with an adjustable maximum current limit, or if they wish for an adjustable constant current mode with an adjustable maximum voltage output limit. All is possible, but as GrumpyMike said you can't have it all, all the time.  ;)



hmmm for that digital potentiometer I would probably be looking in the range of 0-100 ohms, for the control pin of the lm334z, then if I were to use something like the following:

Which would drive the voltage to the Vcc pin of the lm334z, which in turn would be limited by pwm #2 hooked into the digital pot and into the control pin of the lm334z.

Am I to understand there'll be issues with drift here perhaps?  I do not care if there is some drift with the voltage but I would like to keep tight control over the current..

Go Up