1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Question Limit switches and IBT2 - what circuit to interrupt?

Discussion in 'Motor actuators and drivers' started by Ronan Design, Sep 22, 2021.

Tags:
  1. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    104
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    843Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I'm working on my budget 2DOF project on the (SMC3 firmware) + 2x IBT2 drivers + PGSaw motors. I decided to put limit switches to the frame, so motor arms couldn't crash into a frame if soft limits failed or hall sensors detached or anything else. I use 2 x micro limit switches. They are quite small and cheap (Ali) - see image. They are rated 5A on 125/250V, but I wasn't sure I can put the main motor current through 2 of these (for each motor), so I interrupted the PWM leads to Arduino pins 9/10, thinking "no PWM - no movement". Wrong. After I cut any of the switches, the motor does 2-3 random small movements in one direction. So what line can I put these on, what should I interrupt to immediately stop the motor upon hitting the end switch?

    [​IMG]
    My connection is like this:
    [​IMG]
    Maybe I should cut +5V to IBT2's instead? Or something else? I can only cut one line per IBT2, so can't cut 2 or 3 of them together.

    My version of the rig works, but I would like to have a real protection from crashing it in case of any failure.
  2. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    pull the 5v to the ibt2 and see if it shuts down quick enough
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You could use a suitable spec relay so the limit switches then in turn trigger the relay to cut the power on both motors on the PSU side.
  4. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    104
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    843Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I was thinking of that, but not sure it's fast enough. I was hoping somebody knows that already. I do have end switches mounted on foam panels 2cm thick, to give the arm some room to stop...

    I do have suitable relays in my Arduino related stash. Just thought things could be simple. I'll see if cutting 5V to IBT2 is fast enough, if not I can do the relay dance.
  5. iLLuac4

    iLLuac4 Active Member

    Joined:
    Jun 19, 2019
    Messages:
    127
    Balance:
    865Coins
    Ratings:
    +52 / 0 / -0
    My Motion Simulator:
    2DOF
    It could be like kill switch of the main power. I have used one for building kill switch. The only problem is that the switch is nor momentary switch. Maybe some kind of on/off switch would be better.
    Relay module I have used: [​IMG]

    Attached Files:

  6. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    104
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    843Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Perfect, thanks! That was a great idea. I have 2 of those lying around. Just connected it to each motor lead - to Normally Open. I connected 5V and GND from Arduino, then my end switches which are Normally Closed to short IN and GND on the relay. Voila! When I plugin in Arduino, both relays open and light up (red and green), but if I trigger any of the 4 end switches, power shuts off instantly and motor stops immediately.
    • Like Like x 1
  7. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    You might be able to add a resistor to the position pot and force the actuator backwards if it hits the limit switch !

    Just a thought

    (A resistor in parallel will reduce the resistance)
    • Like Like x 1
  8. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    104
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    843Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I think it's good enough. It's duplicating both FlyPT Mover CMC3 software limits anyway. If it hits the switch it must be something really wrong: like hall sensor or magnets detaching from the motor etc. In that case if it just stops - it's good enough for me.