Maker Pro
Maker Pro

Increase and decrease 0-10v output with momentary digital signal?

I'm trying to control a 0-10 volt output by holding a digital signal high or low. For example if I held input 1 high the output would ramp up from 0-10v depending on how long I held it high. If I held input 2 high the output would ramp down from 10-0v depending on how long I held it high. If I dropped either input low during the ramp it would stay there, for example it might stop at 4.5v if I held for only 3 seconds. If I held for 7 seconds it would go all the way to 10v vice versa. I would appreciate any help.

thanks
Matt:confused:
 
Hi,

there are a couple of ways: 1- analog, 2- digital
the analog method involves an opamp configured as an integrator. You'll also need a negative voltage for the ramp down portion.
If you are already have a microcontroller (you do mention digital signals) then you can use an output as a pwm, drive a transistor with collector resistor tied to +10V and an RC filter connected to the collector. Most small ucontrollers have PWM features that is easy to use.
Let me know which route you'd like to go.
 
I should have been more specific. The inputs I have will be from a momentary switch. So the longer the user holds it the farther it will ramp up or down depending on which switch they press. I wish I had a microcontroller but that's not the case. I have considered just using a plc which is more my familiarity but I wanted to explore putting together my own hardware. Thanks for your response.
 
The cmos 4192 is a decade up/down counter. You will need a pulse generator if you wish to the count to continue to change if the switch is held.

The output will need a resistance ladder to sum 1,2,4,8.
 
You are going to have to use an integrated circuit(s) (analog or digital) for this.

I assume you want the output to remain at the desired voltage (after releasing either pushbutton) for a very long time/indefinitely. in this case the integrator method using an opamp may not be a good solution, unless you are willing to regularly adjust the output voltage.

The 4192 solution by duke37 works fine, but you'll need to somehow tell it when to count up and when to count down. The push buttons would have to gate a clock to the up/down counter and at the same time set the up/down inputs. An easier approach with this counter is that you have a toggle switch that sets the direction and only one push button for the voltage ramp.

Tell us how are you going to use this feature? what is the application?
 
The 4092 has one input for up and another for down, this makes it simple. If you are satisfied with pressing a switch once for each step, then things are even simpler.

Should be 4192
 
Last edited:
ah, yes (it's been a while I used these). At first I thought there is a separate clock pin. So this makes it easier. The two buttons are tied in on one side and this goes to a clock source (555 or similar). the other end of one button goes to "up" and the other end of the other button goes to "down".

One problem remains though. How to prevent roll over ( overflow/underflow )? In other words, when counting up and output reaches 1111 it must stay there. similarly when counting down and reaching 0000 it should stay there.
 
Yes, you will need two comparators, one to isolate the up input when 1111 is reached and one to isolate the down input when 0000 is reached.. I have not studied the 4192 in detail but there are two cascade outputs which it may be possible to use.
 
how about a DS1809, originally from Dallas Semiconductor, now Maxim. This is a simple IC that does exactly what this discussion is all about. Here is the datasheet
http://datasheets.maxim-ic.com/en/ds/DS1809.pdf

this IC features a non-volatile functionality to remember the wiper position even when power is disconnected. This is all explained in the datasheet. Because this is a 5V device, an opamp with a gain of 2 (rail to rail output) will be needed bring the range to 0-10V. The opamp also serves as a buffer. For more current drive capability an audio amp with programmable gain can be used. Some of these actually work just like an opamp. Hope this helps.
 
Top