Hello!
I'm working on a project that triggers 12v solenoids with the Motor Shield v2. I may also want the solenoids to be triggerable with a manual switch
Is there any problem with adding a manual switch in parallel with the shield output? Or is it ok to have 12v from the supply on the outputs when the H-bridge is off?
Parallel manual switching with Motor shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 14834
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Parallel manual switching with Motor shield
Is there a reason not to have the switches as inputs to the MCU board and have it trigger the solenoids as appropriate?
Dave
Dave
- adafruit_support_bill
- Posts: 87347
- Joined: Sat Feb 07, 2009 10:11 am
Re: Parallel manual switching with Motor shield
Not a good idea to have 12v going directly to the motor outputs of the bridge. It is too easy to create a situation where you are shorting the power supply to ground via one of the legs of the H-Bridge.
You could use a single-pole double-throw switch to disconnect from the shield entirely. Wire the common pin to the motor, one pole to the shield output and the other pole directly to the power supply.
You could use a single-pole double-throw switch to disconnect from the shield entirely. Wire the common pin to the motor, one pole to the shield output and the other pole directly to the power supply.
- PKa0Z
- Posts: 3
- Joined: Sat Sep 16, 2023 1:08 pm
Re: Parallel manual switching with Motor shield
The application is to control Kato model railroad turnouts with the motor shield, and I was wondering if it would be possible for the operator to also use the special manual switches that came with the turnouts.
In both cases the solenoid would only energized momentarily, but I take the point about the risk if both the bridge and the manual switch happen to be triggered at the same time.
If I want to provide manual control it might indeed be easiest to rig some ordinary switches as inputs to the Arduino.
In both cases the solenoid would only energized momentarily, but I take the point about the risk if both the bridge and the manual switch happen to be triggered at the same time.
If I want to provide manual control it might indeed be easiest to rig some ordinary switches as inputs to the Arduino.
- adafruit_support_bill
- Posts: 87347
- Joined: Sat Feb 07, 2009 10:11 am
Re: Parallel manual switching with Motor shield
The Kato turnouts use a bidirectional solenoid which is basically two solenoids joined back-to-back. I can see now why you wanted to use an H-Bridge to reverse it.
You could use your Kato switches via the Arduino. You would connect the power supply cable to GND and VCC on the Arduino, then connect the two turnout control wires to two digital pins with pulldown resistors. You would get a pulse on one or the other pin when you toggled the switch.
Not sure how long the pulse would be. But you would probably want to use interrupts to make sure you don't miss it.
You could use your Kato switches via the Arduino. You would connect the power supply cable to GND and VCC on the Arduino, then connect the two turnout control wires to two digital pins with pulldown resistors. You would get a pulse on one or the other pin when you toggled the switch.
Not sure how long the pulse would be. But you would probably want to use interrupts to make sure you don't miss it.
- PKa0Z
- Posts: 3
- Joined: Sat Sep 16, 2023 1:08 pm
Re: Parallel manual switching with Motor shield
Good idea Bill, if I want to preserve the original feel I might try to use the Kato controllers as inputs to the Arduino.
I have the motor shield working to control the Kato turnouts using a DCC-EX (Arduino-based) command station. At $5 per turnout, the motor shield is relatively cost-effective and stacks right on top of the command station.
I have the motor shield working to control the Kato turnouts using a DCC-EX (Arduino-based) command station. At $5 per turnout, the motor shield is relatively cost-effective and stacks right on top of the command station.
Please be positive and constructive with your questions and comments.