Camera splitter

Thread Starter

brianium

Joined Aug 26, 2020
13
Hi,
I was unable to purchase the required circuit so I needed to figure out how to build it. I have been experimenting with this circuit for a while and have tried a few different alternatives with varied results. I'm close to the desired result using mosfets and a NAND gate, however I'm hoping to simplify and increase the circuit's reliability using an op-amp. The goal is to run a forward or a reverse camera depending on the direction of the brushed electric motor. The signal is piggybacked off the two power cables from the speed controller. The signal is 0.5V to 3.5V dc when in reverse and -0.5V to -3.5V when in forward. The negative forward signal needs to be cancelled out for the desired output but i'm not sure if R6 energises M1 to switch the signal on when the input voltage is negative or low side. LTSpice is giving strange and varied test results, so I'm not sure if I've got the circuit right or am operating LTSpice rightCamera splitter.png. My questions are, will this circuit give the desired outputs? and is there a more readily available op-amp that will perform the desired function with the same connection, than the AD8691? as I can't get that one in Australia. Thank you in advance
 

Thread Starter

brianium

Joined Aug 26, 2020
13
Some background to my struggle:

I originally tried to amplify the signal with a Mosfet but could not find the right value for K so the calculations did not work.

Also I noticed that simulating using mosfets as a switch, LT spice allows the voltage signal to pass when the Mosfet is in reverse polarity, which I thought was not possible due to the resistance of the Mosfet.

When I use NFET in real life to use the Mosfet to switch the motor signal, I ran the output of that into a PFET with 5V connected to the source. The output of the PFET mirrored the motor voltage signal which was 0.5V to 3.5V depending on the motor control setting. This produced an unsatisfactory input for the NAND Gate. What was strange was that when this signal was run through another NFET the output when tested against 5V+ source was 4.8V. I can use this through another PFET for the NAND Gate signal but it is overly complicated and I think will lead to problems. I've abandoned that design.

Brian
 

AnalogKid

Joined Aug 1, 2013
8,675
What are the relationships among 0v, Motor0v, and GND? They must be referenced together somehow or there is no return path for the control signals. If these three signals are equivalent, and your intent is to switch power between two cameras that run on a single +5 V supply (you don't actually say), then two of the MOSFETs can be eliminated.

ak
 

AnalogKid

Joined Aug 1, 2013
8,675
Also I noticed that simulating using mosfets as a switch, LT spice allows the voltage signal to pass when the Mosfet is in reverse polarity, which I thought was not possible due to the resistance of the Mosfet.
A power MOSFET has an intrinsic zener diode across the drain and source. The zener voltage is greater than the max Vds specified for the part, so it never should conduct in the zener mode. However, like all zener diodes, it will conduct in the other direction just like a power diode. So for an n-channel device, if the source voltage exceeds the drain voltage by about 1.0 - 1.5 V (lotsa variability here), the intrinsic zener diode will be forward-biased and conduct. This is why reverse-polarity protection circuits have two MOSFETs in series back-to-back (actually, source-to-source). Linear Technology has lotsa power control parts that use this configuration.

In your case this is not a problem. If 0v = GND, then M2 and M3 can be eliminated. With this change, M4 now drives the rear camera and M5 the front.

NOTE: the 8691 is not rated for 7.4 V operation. And if it were, the output would go too high for a 5 V CMOS input and destroy the NAND gate. Is it possible to power the 8691 from the +5 V?

Consider 1/2 of an LM393 for the comparator, and the other half for the logic inverter. This eliminates the CMOS gate altogether.

ak
 
Last edited:

Thread Starter

brianium

Joined Aug 26, 2020
13
What are the relationships among 0v, Motor0v, and GND? They must be referenced together somehow or there is no return path for the control signals. If these three signals are equivalent, and your intent is to switch power between two cameras that run on a single +5 V supply (you don't actually say), then two of the MOSFETs can be eliminated.

ak
Here is a table with the measurements. The 7.4V is a 2s lipo, the 5V is BEC output from the 7.4V lipo, the 0.5 to 4V (sorry I accidentally wrote 3.5V in the original post) is from the main motor wires from the speed controller.
As you can see from the chart, the only unique voltage signal is between the blue and yellow wires (all other combinations the brake function will switch the reverse camera circuit on which is undesirable).
BTW sorry about the delayed response as I'm on break at work.
 

Attachments

AnalogKid

Joined Aug 1, 2013
8,675
The Fets I have will be perfect for that circuit: SI2304DS n-channel mosfet.
Uh, nope. As in your original schematic, the output FETs are p-channel.

Also, note that there is no hysteresis around the input comparator. As is, the circuit requires a quick and clean transition across GND. Hmmm ...

OK, here is a re-worked schematic that has 100 mV of hysteresis at the input comparator. When transitioning from a negative voltage to a positive voltage, the trip point is approx. 0.1 V; when transitioning from positive to negative, the trip point is very near GND.

To do this, the input signal moved to the inverting input of the comparator, so the output camera assignments has to change places.

ak
Camera-Power-Sw-1.gif
 
Last edited:

Alec_t

Joined Sep 17, 2013
11,728
For future reference, there are several problems with your post #3 sim.
1) The default MOSFETs rarely work. Right-click on their symbols and select a proper model from the pop-up list.
2) The default digital logic gates operate on 0-1V logic signals. Right-click to change their properties.
3) The multiple grounds mean that your '+5V' rail is actually +12.4V.
4) Spice doesn't like zero Ohm resistances (as used e.g. in your voltage sources).
 

Thread Starter

brianium

Joined Aug 26, 2020
13
Uh, nope. As in your original schematic, the output FETs are p-channel.

Also, note that there is no hysteresis around the input comparator. As is, the circuit requires a quick and clean transition across GND. Hmmm ...

OK, here is a re-worked schematic that has 100 mV of hysteresis at the input comparator. To do this, the input comparator is now inverting, so the output camera assignments has to
Here it is ready for PCB, way simpler than what I was trying to do. Thank youCam Comparator.png
 

AnalogKid

Joined Aug 1, 2013
8,675
Relocate the decoupling capacitor so it is as close as possible to the IC power pins.

Good technique not daisy-chaining pins.

ak
 
Top