Maker Pro
Maker Pro

Noob seeking circuit advice - if 0v then 2.5v otherwise 0-5v

glyndavidson

Jul 25, 2018
6
Joined
Jul 25, 2018
Messages
6
Hi all,

I have a 0-5v variable signal. I'm looking for a device that can perform some logic operations. Basically, I want to create a circuit that passes the variable signal without modifying it, except when 0v is received I want to output 2.5v instead.

To give you some background info...

In simple terms, I'm using a potentiometer to control a motor via a controller.
2.6-5v turns the motor in one direction.
0-2.4v turns the motor in the opposite direction.
At 2.5v the motor stops.
This is being operated via radio control.

The problem is that when you turn off the radio control, the motor controller receives 0v which makes the motor go full speed in reverse (and has caused a number of "accidents"). Instead, when the remote is switched off, I want the motor to stop too.

In my mind, it's a simple logic gate that says:

If inputA == 0v Then
output 2.5v
Else
output inputA
End

But I don't know how to achieve this with electronic components.

Thanks all in advance for any advice
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
Why don't you simply turn the motor circuit on and off from the transmitter then it is safe.
 

glyndavidson

Jul 25, 2018
6
Joined
Jul 25, 2018
Messages
6
That is essentially what I'm trying to achieve. Except that instead of having a switch on the transmitter, I want it to be automatic, i.e. as soon as no input is being received from the transmitter then turn off the circuit.

Actually, I think I could achieve that with a simple AND gate?

Circuit on/off switch is 48v (low amps)
"Throttle" is 0-5v

Is there an AND gate that I could add as a switch to the existing circuit on/off switch?

If Circuit==48v AND Throttle>0v Then
Output 48v
Else
Output 0v
End
 

Bluejets

Oct 5, 2014
6,920
Joined
Oct 5, 2014
Messages
6,920
Many transmitters have a fail safe option where the receiver will go to a pre-set setting ( almost anything you want) once signal is lost.
As an example in modern gear is the return-to-home feature.
Might get you started on the right track with that in mind.

I'll include a link to a video where this was done using a $60 transmitter.
Might be a cheapie but I've used a couple of them now with good results.

 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
You could use an analogue switch such as the DG419 which is 2 switches with a common output. The enabled switch depends on the state of a logic input. You could then use one switch for normal operation and the second to supply 2.5V to the motor controller when the input is 0V. You may need some extra circuitry to achieve the logic switching. The 2.5V could be just a potential divider on+5V supply.
Follow the attached link for its datasheet.

http://www.farnell.com/datasheets/2...363.36129247.1532527292-1348248471.1485605443
 

Kabelsalat

Jul 5, 2011
182
Joined
Jul 5, 2011
Messages
182
The problem you have is doable using opamps, logic gates and discrete components. The problem with "0 volts" is that it is hard to detect excactly 0 volts (*). But if you have access to a negative voltage supply, then you can easilly make a opamp scmith-trigger to detect a voltage close to 0V.

If you want to save space on pcb maybe an analog muxer is way to go. Othervise, voltage follovers with a couple of serie resistor in feedback loop may be "disabled" simply by adding a bjt betwen the serie resistors - just remember to select enough voltage because when one such stage is disabled, it still have output impedance.

* You probably don't want it anyway since you're using a potmeter as input source.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
Having had a further think, the problem is not as simple as at first seems. Every time your motor control goes to 0V in normal circumstance, what ever method you use to prevent the motor running when no signal is received from the transmitter, will be invoked.
How are you receiving the transmitter output?
 

Bluejets

Oct 5, 2014
6,920
Joined
Oct 5, 2014
Messages
6,920
No one likemy suggestion or is the op talking about some strange rc unit from planet Zork?
 

glyndavidson

Jul 25, 2018
6
Joined
Jul 25, 2018
Messages
6
Thanks all for your advice. Have solved the problem with an Arduino and DAC breakout board.
Your idea does sound like the easiest though Bluejets and I've ordered the USB cable so that I can see if I can program a failsafe. In the meantime, the Arduino seems to be working fine though and will give me more options in the future. Thanks again everybody.
 
Top