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.

Variable voltage output

Status
Not open for further replies.

alexm1992

New Member
I am trying to create a circuit that allows automated, accurate variable output voltage from a range of ~1.5V-4V from a 5V supply.

The circuit must step down voltage from 4V at day one down to 1.5V, approx 90 days later, so its extremely gradual. The period in which each step occurs within 90 days is not too important, neither is the steps in voltage (however the smaller the resolution the better)

One way I though of doing this is by programming a microcontroller to output PWM. The output voltage would be controlled by the average of the duty cycle. Maybe a capacitor could be used to smooth out this signal into a constant analogue voltage?

Do you guys have any suggestions, I am a complete novice with little experience?
Thanks!
 
You could use a micro-controller to step through a digital potentiometer connected to the feedback of a switching regulator.
 
So 4V - 1.5V = 2.5V span. You could use a DAC like the real common DAC 0808 which is an 8 bit DAC. That should be able to get you 256 steps. Drive the DAC with a uC or a counter of sorts running real slow. I would think about using a uC. Something along those lines should work.

Ron
 
The best method to use will depend on how much current you need to draw from the regulated voltage. See post #4.
 
In terms of the application I'm afraid its top secret ;) - seriously

I think the digital POT is a nice idea, a friend of mine said it may be worth connecting this up to a voltage regulator to create a stable voltage, what do you think?
In terms of the current I am sourcing, not too sure yet, need to work this out.

Thanks for the help so far guys!
 
You could feed the pot voltage to the control terminal of a voltage regulator, such as the LM317, if you need some significant current. The output will be regulated to approximately 1.2V above the control terminal voltage.
 
In terms of the current I am sourcing, not too sure yet, need to work this out.
Will it be feeding other circuitry or a LED or a motor or something?
 
Hi,

What is the required resolution for each step?

For example, one step would mean 4.000v output at day 1, then at day 90 turn it down to 1.500 volts. That's very poor resolution.
Better is at day one 4.000v, at day 18 turn it down to 3.500v, then at day 36 turn it down to 3.000v, etc., until at day 90 turn it down to 1.5v. This gives us the following schedule
Day,Voltage
01, 4.000
18, 3.500
36, 3.000
54, 2.500
72, 2.000
90, 1.500

Note in the above the resolution is 0.5v, but also note that doing it this way means only the very last day gets 1.500v which may not be what you want.

Here is another similar schedule but with finer resolution:
01, 4.000
15, 3.583
30, 3.166
45, 2.750
60, 2.333
75, 1.917
90, 1.500

but note again that the only day that gets 1.500v is day 90.

Using a finer resolution of 2.5/90, we would see the next to last day have a voltage of 1.528v approximately, and then the 90th day would be 1.500v. So that finer resolution works better.

Is this what you want, or do you see any problems here or need a finer resolution that even perhaps varies hour by hour?

The required resolution to vary hour by hour would be 2.5/90/24 which comes out to about 1.1574 millivolts per hour and that means 2160 steps. The next to last hour would have a voltage of about 1.4988 volts and the last hour would have 1.5000 volts.
 
Last edited:
.......................................

The required resolution to vary hour by hour would be 2.5/90/24 which comes out to about 1.1574 millivolts per hour and that means 2160 steps. The next to last hour would have a voltage of about 1.4988 volts and the last hour would have 1.5000 volts.
Which, of course, could be done with a 12-bit DAC which would give a resolution of 1/4096.
 
I have acquired a DS1869-100+ digital POT. This gives me 64 uniform steps over a resistance range of 0-100Kohms. Mr Al, you are correct I wish for it to be at 1.5V exactly on the last day, so I will be using all 64 steps to maximise resolution. I suppose the next stage is to work out how these steps in resistance translate to voltage out, as I want a linear reduction in voltage over time.
 
Hello again,

Well the voltage division is quite simple really. With a pot we have two resistances, the upper resistance R1 and the lower resistance R2. The voltage out of the pot arm is:
Vout=Vin*R2/(R1+R2)

So you see it is quite simple. If you are using a +5v reference then you want to drop 1v all the time first so you add another resistor we'll call R3 in series with the pot. That resistor adds to the upper resistor so we get:
Vout=Vin*R2/(R1+R3+R2)

but since R3 is fixed we always loose some voltage, and we want to choose that value so that we loose 1.000 volts.

I am assuming that your 'pot' works like other pots but if not we can modify this. If you post a spec sheet we can take a look.
 
The end-to-end resistance tolerance on that device is +/- 20% (which is typical of digital pots) so if you want to adjust the initial voltage with a resistor in series as MrAl noted you should use a trimpot.
 
Thanks so much. I have attached the spec sheet for you to look at.

Forgive my lack of knowledge but what is a trimpot? Is this in place of the DS1869-100+ digital POT?
 

Attachments

  • ds1869.pdf
    131.3 KB · Views: 231
Hello again,

Ok good. So as Carl noted the tolerance on the resistance is plus or minus 20 percent, which means for a 100k pot it could be anything form 80k to 120k, so you should use another standard type pot to adjust the top end voltage. A trimpot is just a potentiometer with a screw adjustment rather than a knob.
Since you want to start at 4v and end at 1.5v, you'll also need a trimpot at the bottom of the digital potentiometer also. You'll have to adjust that for 1.5v out at the low setting of the digital pot which may or may not be the actual bottom of that pot (we may want to stop before that).
You should also use a voltage follower op amp section to buffer the output of the pot because it will load very easily. Additional buffering may be needed based on what you have to actually drive with this circuit, you'll have to specify that too.

So you could connect the trimpot in series with the digital pot, then cycle the digital pot up to the max setting, then adjust the trimpot for a 4.000v output from the wiper of the digital pot. At the same time you adjust the lower trimpot for 1.5v out at the top but more about this later. Once that is dont you could consider it calibrated.

To use this then the procedure would go as follows...
1. Turn on the power.
2. Cycle the pot all the way up to max (unless it was done at the finish of the last usage).
3. Connect the circuit to be used with this to the output.
4. Start the timing circuit.

Because there are two trimpots it may make adjustment a little difficult because the best adjustment would come by changing the pot setting for each adjustment. The difficultly lies in the fact that both trimpots will affect each other, and if we dont use the full range of the pot we have to calulate the bottom remainder resistance in with the lower trimpot.

For example, we need 90 days, and 64 doesnt divide by 90 very well. But if we use 60 steps, then all we need to do is step once every 1.5 days (that's one and a half days which is 36 hours. If you really do want to use all 64 steps though then you'd have to step once every 33.75 hours. That's not exactly impossible.

Now back to the adjustments...
We want the top setting of the pot to output 4.000v and the bottom setting to output 1.500v. A simpler way to adjust would be to use a 4.000v reference at the top end and hope that the pot internally can reach all the way up to that voltage. If not, we'd have to adjust that voltage first, then adjust the lower trimpot.

If we use two trimpots then we have to adjust the top pot a little at the max setting of the digital pot, then adjust the bottom setting at the min setting of the digital pot, and this would take at least about 8 seconds between adjustments which is not easy to deal with. That's why it is probably better to use a reference for the top of the pot and a trimpot at the bottom. We could then adjust the reference for 4v and then adjust the bottom trimpot for 1.5v out at the min digital pot setting, then check the upper digital pot setting and adjust the 4v reference if needed. The bottom voltage will change a little but it shouldnt be too much. Check it again to make sure though.

So the basic circuit is not that complicated but the adjustment procedure will be a little tricky.
 
Great advice guys, It is very clear! It is exam time at the moment (in fact I have one in a couple of hrs!!!) but after the 22nd I shall draw up a circuit diagram with the advice given. Would you mind if I shared this with you to check over?

I will let you know how it goes!
 
Hi,

Sure, it will be nice to see what you come up with.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top