Page 1 of 1

Parallel manual switching with Motor shield

Posted: Sat Sep 16, 2023 1:12 pm
by PKa0Z
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?

Re: Parallel manual switching with Motor shield

Posted: Sat Sep 16, 2023 1:28 pm
by dastels
Is there a reason not to have the switches as inputs to the MCU board and have it trigger the solenoids as appropriate?

Dave

Re: Parallel manual switching with Motor shield

Posted: Sat Sep 16, 2023 1:31 pm
by adafruit_support_bill
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.

Re: Parallel manual switching with Motor shield

Posted: Sun Sep 17, 2023 12:51 am
by PKa0Z
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.

Re: Parallel manual switching with Motor shield

Posted: Sun Sep 17, 2023 8:09 am
by adafruit_support_bill
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.

Re: Parallel manual switching with Motor shield

Posted: Sun Sep 17, 2023 4:38 pm
by PKa0Z
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.