Maker Pro
Maker Pro

Reversing polarity through signal from mouse switch

Status
Not open for further replies.

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
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:

upload_2020-7-22_12-48-45.png

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.
 

Bluejets

Oct 5, 2014
6,707
Joined
Oct 5, 2014
Messages
6,707
You will need more gear than you presently have there.
Is it important which way it travels to begin with...??
Latching will be required with each micro switch operating as a limit for a particular direction.
Then the motor needs to stop (perhaps only momentarily) before continuing on in the opposite direction.
What will be the initial start and eventual stop be comprised of.

Most of the above can be done with relays or solid state switches like mosfets etc. possibly h-bridge unit or even a small microcontroller if you are that way inclined.

Is any form of speed control required or were you planning to simply apply less voltage ..?
 
Last edited:

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
You will need more gear than you presently have there.
Is it important which way it travels to begin with...??
Latching will be required with each micro switch operating as a limit for a particular direction.
Then the motor needs to stop (perhaps only momentarily) before continuing on in the opposite direction.
What will be the initial start and eventual stop be comprised of.

Most of the above can be done with relays or solid state switches like mosfets etc. possibly h-bridge unit or even a small microcontroller if you are that way inclined.

Is any form of speed control required or were you planning to simply apply less voltage ..?

Thanks Bluejets. Please see my replies below:
- It doesn't matter which way it travels to begin with
- The initial start and stop would just be a matter of whether power is connected
- And for speed control, yes, simply apply less voltage
- It wold be good to keep it simple, which i'm assuming is relays/solid state switches as opposed to microcontroller

Would you be able to recommend what I need and how to connect? Thanks, cheers.
 

Alec_t

Jul 7, 2015
3,482
Joined
Jul 7, 2015
Messages
3,482
What are the voltage/current/rpm ratings of the mechanism ?
How long does it take to travel the 180° ?
 

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
What are the voltage/current/rpm ratings of the mechanism ?
How long does it take to travel the 180° ?
hi Alec_t

Voltage: 12V DC
Current: 0.03A
Torque: 3kg.cm
Travel time: about 8 seconds

Thanks, cheers
 

AnalogKid

Jun 10, 2015
2,843
Joined
Jun 10, 2015
Messages
2,843
What you have are essential pieces, but not everything that is needed. The two switches control whatever is doing the actual voltage reversal. One way or another, the basic method is a toggle function and a DPDT power switch function. These can be done with all relays, all electronic components, or a combination of the two. What is your skill set for assembling a circuit or wiring relays?

ak
 

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
What you have are essential pieces, but not everything that is needed. The two switches control whatever is doing the actual voltage reversal. One way or another, the basic method is a toggle function and a DPDT power switch function. These can be done with all relays, all electronic components, or a combination of the two. What is your skill set for assembling a circuit or wiring relays?

ak

hi AnalogKid, i have a little experience in wiring, albeit not relays:
- have done 2 or 3 of those kids experiment kits about 25 years ago.. it was really just following instructions on which ICs to put where and solder it
- recently done some basic soldering.. just putting a transformer in a box, connect fuses and plugs and sockets..

so really, far from advanced but ok with soldering..

But i'm happy to attempt at what people suggests.. thanks, cheers.
 

Bluejets

Oct 5, 2014
6,707
Joined
Oct 5, 2014
Messages
6,707
Any details on those micro switches...cannot see from the photo.
Do they have changeover contacts or are they either normally open or normally closed..?
 

Alec_t

Jul 7, 2015
3,482
Joined
Jul 7, 2015
Messages
3,482
From the mechanism details you have given, I don't think there's any risk of inertia causing the mechanism to come up hard against an end stop before it has had a chance to be reversed, and at 30mA current the motor is unlikely to be harmed by a sudden reversal. That simplifies things considerably. So a latching change-over switch (solid state or relays) triggered by the micro-switches will do the job.
 

AnalogKid

Jun 10, 2015
2,843
Joined
Jun 10, 2015
Messages
2,843
Any details on those micro switches...cannot see from the photo.
Do they have changeover contacts or are they either normally open or normally closed..?
They are SPST (NO) or SPDT limit switches.

ak
 

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
Any details on those micro switches...cannot see from the photo.
Do they have changeover contacts or are they either normally open or normally closed..?

Hi Bluejets, i managed to get the schematic diagram from the seller. The seller said the switch can be either NO or NC by changing the wiring so i think this means changeover contacts?

upload_2020-7-23_22-29-59.png
 

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
From the mechanism details you have given, I don't think there's any risk of inertia causing the mechanism to come up hard against an end stop before it has had a chance to be reversed, and at 30mA current the motor is unlikely to be harmed by a sudden reversal. That simplifies things considerably. So a latching change-over switch (solid state or relays) triggered by the micro-switches will do the job.

Hi Alec_t - any chance you can let me know what spec of the parts to buy and the wiring sequence? Sorry, i have no clue at all.. thanks, cheers.
 

Alec_t

Jul 7, 2015
3,482
Joined
Jul 7, 2015
Messages
3,482
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 :-
MotorReversal.png
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.
 
Last edited:

AnalogKid

Jun 10, 2015
2,843
Joined
Jun 10, 2015
Messages
2,843
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
MotorReverse-PB-1-c.gif
 
Last edited:

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
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.

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==

upload_2020-7-24_21-39-37.png
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.
 

Attachments

  • upload_2020-7-24_21-29-32.png
    upload_2020-7-24_21-29-32.png
    25.4 KB · Views: 6
  • upload_2020-7-24_21-32-37.png
    upload_2020-7-24_21-32-37.png
    82.5 KB · Views: 9

Alec_t

Jul 7, 2015
3,482
Joined
Jul 7, 2015
Messages
3,482
No.
a1 = 14,
a2 = 24,
b2 = 22.
The switch gets wired 'diagonally' for reversing; i.e. 12 connects to 24, 14 connects to 22.
The 'i' in my diagram is actually a + sign partly hidden.
The A1 coil is the 'reset' one to bring the contacts to the state shown in the datasheet.
Your chosen relay is a tad OTT for this project. Note that each coil draws 0.5A briefly.
 
Last edited:

crabtree

Jul 22, 2020
8
Joined
Jul 22, 2020
Messages
8
No.
a1 = 14,
a2 = 24,
b2 = 22.
The switch gets wired 'diagonally' for reversing; i.e. 12 connects to 24, 14 connects to 22.
The 'i' in my diagram is actually a + sign partly hidden.
The A1 coil is the 'reset' one to bring the contacts to the state shown in the datasheet.
Your chosen relay is a tad OTT for this project. Note that each coil draws 0.5A briefly.

Many thanks Alec_t. I gathered from the price of my chosen relay it's overkill for my circuit, it was what i could easily find that most closely matched the design you suggested. I'll try to look for one that's more fitting, cheers.
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
If you ignore the switches completely, any oscillator should work here as well, if you get it the right frequency, but you probably could involve the switches with the oscillator as well to make it not go out of synch.
 

Martaine2005

May 12, 2015
4,782
Joined
May 12, 2015
Messages
4,782
If you ignore the switches completely, any oscillator should work here as well, if you get it the right frequency, but you probably could involve the switches with the oscillator as well to make it not go out of synch.
Huh?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,476
Joined
Nov 17, 2011
Messages
13,476
As an alternative idea (not matching what you already have):
Use a single dual pole toggle switch and a disk with a cutout:
upload_2020-8-5_9-48-18.png
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.
 
Status
Not open for further replies.
Top