Connect with us

Reversing polarity through signal from mouse switch

Discussion in 'General Electronics Discussion' started by crabtree, Jul 22, 2020.

Scroll to continue with content
  1. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    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.
     
  2. Bluejets

    Bluejets

    4,614
    977
    Oct 5, 2014
    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: Jul 22, 2020
  3. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    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.
     
  4. Alec_t

    Alec_t

    2,936
    799
    Jul 7, 2015
    What are the voltage/current/rpm ratings of the mechanism ?
    How long does it take to travel the 180° ?
     
  5. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    hi Alec_t

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

    Thanks, cheers
     
  6. AnalogKid

    AnalogKid

    2,476
    714
    Jun 10, 2015
    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
     
  7. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    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.
     
  8. Bluejets

    Bluejets

    4,614
    977
    Oct 5, 2014
    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..?
     
  9. Alec_t

    Alec_t

    2,936
    799
    Jul 7, 2015
    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.
     
  10. AnalogKid

    AnalogKid

    2,476
    714
    Jun 10, 2015
    They are SPST (NO) or SPDT limit switches.

    ak
     
  11. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    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
     
  12. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    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.
     
  13. Alec_t

    Alec_t

    2,936
    799
    Jul 7, 2015
    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: Jul 23, 2020
  14. AnalogKid

    AnalogKid

    2,476
    714
    Jun 10, 2015
    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: Jul 23, 2020
  15. crabtree

    crabtree

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

    Attached Files:

  16. Alec_t

    Alec_t

    2,936
    799
    Jul 7, 2015
    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: Jul 24, 2020
  17. crabtree

    crabtree

    8
    0
    Jul 22, 2020
    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.
     
  18. ratstar

    ratstar

    482
    18
    Aug 20, 2018
    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.
     
  19. Martaine2005

    Martaine2005

    3,314
    907
    May 12, 2015
    Huh?
     
  20. Harald Kapp

    Harald Kapp Moderator Moderator

    11,164
    2,550
    Nov 17, 2011
    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-