# Polarity reversing by using laser sensor for signal

To edit this question I should add that I won't be using a switch I'm using a laser sensor so when a object passes in front of it the laser sensor will send the signal voltage.

I'll be using a laser sensor to send the signal when a object passes by, then that signal will go to "something" that will give my 12 V motor power then when the next object passes by the motor will be given reverse polarity to spin the opposite direction. Motor will also only be given power wile the object is in front of the laser sensor. It will be moving somewhat fast. I am not sure of speed yet.

I'm trying to come up with something that with the switch signal on, 12 V will be provided, switch signal off power off, then switch signal on the 12 V will switch polarity. I'm not even 100% sure how to explain what I'm needing here.

• signal on "A" 12 V positive and "B" 12 V negative
• signal off "A" and "B" off
• signal on "A" 12 V negative and "B" 12 V positive
• signal off "A" and "B" off
• repeat...
• First come in mind 3 position switch DPDT. Oct 1, 2021 at 19:12
• You should include all the added information (motor details, for example, along with about how long the motor is supposed to be on while the object is "in view.") The question of how long the beam is broken by the object isn't just germane -- it is central. But I see no such info, yet. Please expand the question with as much added information as possible. (I write, "as much as possible," because you've already shown, through comments, that leaving what's germane to your judgement alone isn't a safe bet.)
– jonk
Oct 1, 2021 at 19:39
• There’s probably some time delays and lockouts needed to make this work reliably. Feels more like a problem for a PLC to solve than anything a simple relay kludge could do. Oct 1, 2021 at 20:30

Are you familiar with DPDT switches? DPDT stands for double pole double throw.

• sorry i didn't ask my question correctly, ill be using a laser sensor to send the signal when a object passes by, then that signal will go to something that will give my 12v motor power then when the next object passes by the motor will be given reverse polarity to spin the opposite direction. Oct 1, 2021 at 19:23
• i should add that the motor will only receive power to it wile there is a object in front of the laser sensor... Oct 1, 2021 at 19:24
• OP is looking for off | forward | off | reverse | off | forward | etc., action. Oct 1, 2021 at 19:27
• So the DPDT switch needs an "off"position, and to be electronically controlled, from an optical sensor. It's still the answer. Oct 1, 2021 at 19:28
• "It's still the answer." Nope. SPDT can't do reversal and off. Oct 1, 2021 at 19:29

I'm not even 100% sure how to explain what I'm needing here.

Use a timing diagram!

              __    __    __    __    __    __
Switch     __|  |__|  |__|  |__|  |__|  |__|  |__
__          __          __
Output 1 ____|  |________|  |________|  |_______
__          __          __
Output 2 __________|  |________|  |________|  |__

Result       FWD O REV 0 FWD O REV 0 FWD O REV 0


One way is to use a stepping relay which switches state every time the coil is pulsed.

Figure 1. The pawl mechanism is advanced on every impulse of the relay coil. Image source: HomoFaciens.

simulate this circuit – Schematic created using CircuitLab

Figure 2. The circuit.

Figure 2a: Every time the switch is closed the relay will index. and the current through the load will alternate - forward, off, reverse, off, forward, etc. This circuit has a slight problem in that at the instant SW1 closes a brief pulse of current will flow in the previous direction until the relay changes state.

Figure 2b solves this by pulsing when the load is disconnected.

For this simple circuit you'll need to find a suitable relay with 2-poles and 2-way (changeover) contacts.

Response to updated question:

simulate this circuit

How it works:

• RLY1 repeats the sensor signal and its contacts can provide the current required by the motor (which the sensor can't).
• STEP RLY changes state every time the sensor turns off.
• RLY2 provides the 2-pole changeover contacts so an SPST step relay can be used.
• D1 - D4 provide snubbing to reduce wear on the various relay contacts. They should be rated for the maximum motor current.
• this looks good thank you for your help, i may go with a raspberry pi microcomputer... im learning as i go here Oct 5, 2021 at 22:58