Maker Pro
Maker Pro

Reversing polarity through signal from mouse switch

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,615
Joined
Nov 17, 2011
Messages
12,615
you probably could involve the switches with the oscillator as well to make it not go out of synch.
Reminds me of syncing a TV signal by use of Hsync and Vsync signals :).
The oscillator would be a tad slower than required for the motor to travel back and forth. Power supply to the motor would be routed through the limit switches and a few diodes for decoupling. When one of the limit switches is actuated, the power path for the respective direction is interrupted by the switch, the motor stops. Once the oscillator reverses, power for the reverse direction is enabled by the diodes.
 

John Canon

Jun 1, 2022
63
Joined
Jun 1, 2022
Messages
63
As an alternative idea (not matching what you already have):
Use a single dual pole toggle switch and a disk with a cutout:
View attachment 48949
Wire the switch and the motor such that the motor turns clockwise with the switch in the left position (as shown), anti-clockwise with the switch in the right position. See image. Attach the disk to the motor axle. Make the cutout as big as you want the motor to travel.
With the position of disk and switch as show, this is how it works:
Motor turns clockwise, bringing the left edge of the cutout towards the switch. Once the edge has reached the switch and toggled it into th eright side position, the motor reverses, turning the disk anti-clockwise. The game repeats once the right edge of the cutout reaches the switch and toggles it to the left.
I can't imagine any cheaper yet versatile solution.

This is like the life-size cardboard figures that would wave their arm all day using 2 d-cell batteries. They would use a motor or a magnet to move against gravity or a spring. At the end of each swing a lever would move to release the power and start over. They could also be smaller figures or signs for the sales counter.
Also, I really enjoyed your lessons about DPDT and 3PDT relays for reversing DC motors. I used to build custom relay logic panels for HVAC and for intercom communications. Believe it or not, I have seen H-bridge circuits but never had the need to build one. I just may try it one day.
 

bigkim100

Apr 17, 2013
224
Joined
Apr 17, 2013
Messages
224
Hi Alec_T, thanks heaps for the diagram and components recommendation. I searched for a 2 coil DPDT latching switch, and the closest one i found was one from TE with part number RT424F12: https://www.mouser.com/ProductDetail/TE-Connectivity-Schrack/RT424F12?qs=KKrrU%2BaSadLDrcKb/O0/fA==

View attachment 48893
Would you mind checking if my mapping of the wiring is correct?
s in your diagram = A1 on RT424F12
i in your diagram = A3 on RT424F12
r in your diagram = A2 on RT424F12
a1 in your diagram = 12 on RT424F12
+ve in your diagram = 11 on RT424F12
b1 in your diagram = 12 on RT424F12
a2 in your diagram = 22 on RT424F12
-ve in your diagram = 21 on RT424F12
b2 in your diagram = 24 on RT424F12

Is this correct? Many thanks.
Wghat is the resistor placed across the motor do???
Hi Alec_T, thanks heaps for the diagram and components recommendation. I searched for a 2 coil DPDT latching switch, and the closest one i found was one from TE with part number RT424F12: https://www.mouser.com/ProductDetail/TE-Connectivity-Schrack/RT424F12?qs=KKrrU%2BaSadLDrcKb/O0/fA==

View attachment 48893
Would you mind checking if my mapping of the wiring is correct?
s in your diagram = A1 on RT424F12
i in your diagram = A3 on RT424F12
r in your diagram = A2 on RT424F12
a1 in your diagram = 12 on RT424F12
+ve in your diagram = 11 on RT424F12
b1 in your diagram = 12 on RT424F12
a2 in your diagram = 22 on RT424F12
-ve in your diagram = 21 on RT424F12
b2 in your diagram = 24 on RT424F12

Is this correct? Many thanks.
 

bigkim100

Apr 17, 2013
224
Joined
Apr 17, 2013
Messages
224
Here's one way you could do it, using a dual-coil DPDT latching relay controlled by the normally-open contacts of the limit switches :-
View attachment 48872
The resistors and capacitors are for suppressing any arcing at the switch contacts.
Resistors are 1/4W. Caps are film type. If the motor running current is 30mA the relay switch contacts should be rated to switch DC of at least 100mA.
Thank you Alec...cheers!!
 

bigkim100

Apr 17, 2013
224
Joined
Apr 17, 2013
Messages
224
Here is a circuit from another question last December. For your use, the two switches (NO contacts) are wired in parallel in the place marked SW1. When either switch closes, the circuit reverses.

The circuit is based on an impulse relay that performs the toggle and latch functions. This link is to a fairly beefy unit that probably draws more power than the motor, although it is energized for very brief periods. It is included here as an example, not a recommendation of a specific part.

https://media.digikey.com/pdf/Data Sheets/Tyco Electronics P B PDFs/S89 90_DS.pdf

ak
View attachment 48874
Thank you Analogue...cheers!!
 

CircutScoper

Mar 29, 2022
299
Joined
Mar 29, 2022
Messages
299
Hi guys, I'm a newbie in both this forum and electronics so please pardon me if i'm using the wrong terms and if my descriptions below is a bit off/confusing.

I'm trying to create an 180 degrees oscillating base, which once power is connected, it will continually oscillating from left to right.

I've found the pre-made part for which has a "base" with motor and two mouse switches on either side. But i have no idea how to wire it:

View attachment 48859

I think, i need a circuit, where, it will reverse the polarity of power to the motor, when the oscillating "base stick" hits the left or right most position, triggering a signal from the mouse switch.

Hope this makes sense and would appreciate any recommendations/guidances.

Many thanks.
No need for fancy (and expensive) latching or impulse relays. An ordinary relay can latch itself with the help of a couple diodes.

TEMPM.GIF
 

Mouthpear

Jul 20, 2020
14
Joined
Jul 20, 2020
Messages
14
Betcha' the diode is cheaper.
Well the diode and DPDT relay together are about the same as a TPDT relay. Also it is much easier to understand. Plus the diode needs to be installed somehow. On paper yeah it sounds and looks good, but in implementing it you have to either solder it & heatshrink or use some type of connector. While a single diode may be dirt cheap you most likely have to buy in bulk which nullifies that. 5.99 for 100 pack 4007 diodes on amazon plus 8.00 bucks dpdt relay and socket (oh and plus whatever connection type you have to use) vs a $12 TPDT relay and socket.
 
Last edited:

CircutScoper

Mar 29, 2022
299
Joined
Mar 29, 2022
Messages
299
Well the diode and DPDT relay together are about the same as a TPDT relay. Also it is much easier to understand. Plus the diode needs to be installed somehow. On paper yeah it sounds and looks good, but in implementing it you have to either solder it & heatshrink or use some type of connector. While a single single diode may be dirt cheap you most likely have to buy in bulk which nullifies that. 5.99 for 100 pack 4007 diodes on amazon plus 8.00 bucks dpdt relay and socket (oh and plus whatever connection type you have to use) vs a $12 TPDT relay and socket.
Digikey will sell you 1 for $0.21. But if you can only buy them by the bag, take this one from the same bag you pulled the one from that protects switch contacts from coil kickback. As for mounting it, it could be simply connected between the unused NO contact and common terminals of the CCW limit switch. No heatshrink needed. And unless you just plain can't solder, no heatsink is needed either.TEMP.GIF
 
Last edited:

Mouthpear

Jul 20, 2020
14
Joined
Jul 20, 2020
Messages
14
"Digikey will sell you 1 for $0.21" You forgot shipping. Basically comes out to the amount I gave.

ScreenHunter 0121 2022-10-03 23.56.jpg

"it could be simply connected between the unused NO contact and common terminals of the CCW limit switch."

What "unused" NO contact? What purpose would that have to connect it to something that is unused? What would you connect it with?

" And unless you just plain can't solder,"

Many people don't. Plus soldering makes it harder to reconfigure if needed.

"no heatsink is needed either." Not covering electrical connections is a bad practice/habit to get into. Do you often leave wiring uncovered?

BTW why did you say it twice?
"No heatshrink needed. And unless you just plain can't solder, no heatsink is needed either." Filler?
 

Mouthpear

Jul 20, 2020
14
Joined
Jul 20, 2020
Messages
14
Digikey will sell you 1 for $0.21. But if you can only buy them by the bag, take this one from the same bag you pulled the one from that protects switch contacts from coil kickback. As for mounting it, it could be simply connected between the unused NO contact and common terminals of the CCW limit switch. No heatshrink needed. And unless you just plain can't solder, no heatsink is needed either.View attachment 56441
The relay already has a built in diode. Why buy a bag when it already has it?

OOPS! Link the wrong Relay. Only $11.99. That's only 1.60 more but still less and it has indicator/flyback diode already.

uxcell HH53P DC 12V Coil 3P3T 11 Pins Electromagnetic Power Relay Green LED with Socket
 
Last edited:

Mouthpear

Jul 20, 2020
14
Joined
Jul 20, 2020
Messages
14
Hi guys, I'm a newbie in both this forum and electronics so please pardon me if i'm using the wrong terms and if my descriptions below is a bit off/confusing.

I'm trying to create an 180 degrees oscillating base, which once power is connected, it will continually oscillating from left to right.

I've found the pre-made part for which has a "base" with motor and two mouse switches on either side. But i have no idea how to wire it:

View attachment 48859

I think, i need a circuit, where, it will reverse the polarity of power to the motor, when the oscillating "base stick" hits the left or right most position, triggering a signal from the mouse switch.

Hope this makes sense and would appreciate any recommendations/guidances.

Many thanks.
What did you end up going with?
 

Mouthpear

Jul 20, 2020
14
Joined
Jul 20, 2020
Messages
14
Digikey will sell you 1 for $0.21. But if you can only buy them by the bag, take this one from the same bag you pulled the one from that protects switch contacts from coil kickback. As for mounting it, it could be simply connected between the unused NO contact and common terminals of the CCW limit switch. No heatshrink needed. And unless you just plain can't solder, no heatsink is needed either.View attachment 56441
Tested all your circuits and none of the three worked (Top are yours). They don't latch and worse they short out. What do you think could be the problem with your circuit?

When I use a diode to make a latching relay, I use the bottom circuit (mine).

 
Top