Polarity reverse with spst?

dl324

Joined Mar 30, 2015
18,329
There has been some discussion about the possibility of the supply being shorted with two independent switches. @crutschow's circuit doesn't consider that scenario.

The circuit you found does by using one control signal.

I suggested adding a flip flop to make the switch alternate action. One switch; no potential to short the supply.

What functionality do you want?
 

Thread Starter

flare09

Joined May 17, 2012
31
@crutschow I would love help putting together a bom if you're bored enough to help out! But i see dl324 pointed out there may be a short in there.

@dl324 I was enticed by the h bridge being able to supply appropriate current through the motors leads, but the fall back was still needing a dpdt to avoid a short. The functionality I need is one button causes clockwise rotation, another causes counter clockwise. I thought the circuit I found allowed 2 inputs, with an automatic decouple to avoid a short.

For further reference, I am using a single cell lipo. Specific chemistry is currently undecided, but it will likely be the 3.2v life. If I can find a reasonable source for Lto, itll be 5.7v. But realistically, 4.2V should be maximum supply. The motor is specd for 3v, 45mA, 200mA stall. So total max draw should be 3v, 300mA
 

dl324

Joined Mar 30, 2015
18,329
I thought the circuit I found allowed 2 inputs, with an automatic decouple to avoid a short.
It will run the motor one direction with a HIGH and reverse with a LOW. There is never a conflict because there's only one input.

If you use one SPST switch with a flip flop and the H bridge, you can reverse direction with each actuation of a single switch. No risk of a supply short under normal operation.

If the power source can be as low as 3.2V, you need to be picky if you go with MOSFETs. That's not an issue with BJTs.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,512
@crutschow I would love help putting together a bom if you're bored enough to help out! But i see dl324 pointed out there may be a short in there.
Yes, my circuit will short the supply if both buttons are pushed at the same time.
If that's a possibility then an added logic gate package will prevent that from happening, as shown below:
The CD4011 NAND gates prevent pressing both buttons at the same time from causing a short.
As can be seen the CW rotation has priority if both buttons are pressed (could be the CCW direction if that's preferred).

upload_2017-8-5_10-0-43.png
 

Thread Starter

flare09

Joined May 17, 2012
31
Is there a way to make it all stop with no input? The motor doesnt need precise control, but it needs to forward and reverse during input.

It will run the motor one direction with a HIGH and reverse with a LOW. There is never a conflict because there's only one input.

If you use one SPST switch with a flip flop and the H bridge, you can reverse direction with each actuation of a single switch. No risk of a supply short under normal operations.
What if I use a super simple code in an attiny, 2 analogue inputs, 2 pwm out directly to transistors. Both drain are separately tied to both motor inputs, as well as the base of two more transistors to provide appropriate grounding through the motor? One analogue input=one pwm out=one source and one drain open
 

crutschow

Joined Mar 14, 2008
38,512
Is there a way to make it all stop with no input? The motor doesnt need precise control, but it needs to forward and reverse during input.
If you look a the plot of motor current in my posts you can see that it is zero when no button is pushed
 

ian field

Joined Oct 27, 2012
6,536
Assuming something simple like a battery powered motor:

For the switching part, have you considered using two SPST switches connected as if they were a single DPDT switch? I think the only annoyance is that without a mechanical coupling of some sort the switches can get out of phase, but there should be no real ham in that happening. Indeed, with teh switches out of phase, you would have the off position.
Years ago someone asked me to repair a winch controller that did exactly that with 2 SPST push buttons.

Inactive with no buttons pressed, and also inactive with both buttons pressed - but you have to wire it up right.

You can get away with a single SPST switch if there's a + & - split supply.
 

MaxHeadRoom

Joined Jul 18, 2013
30,662
I must be missing something!, why go to all the trouble of building a solid state circuit etc just so you can use some existing switches you happen to have when all you need is a simple change over switch?:confused:
Max.
 

crutschow

Joined Mar 14, 2008
38,512
I must be missing something!, why go to all the trouble of building a solid state circuit etc just so you can use some existing switches you happen to have when all you need is a simple change over switch?:confused:
Max.
From his statement below I assumed the SPDT type switches would be too large.
unfortunately I have spst switches to work with, and they are the tiny tact buttons.
 

Thread Starter

flare09

Joined May 17, 2012
31
@MaxHeadRoom Yes I do seem to be all over the place. The design for the item allows for some shared space for a board with the battery (albeit not much) and 2 pushbuttons tethered remotely to this board, or the battery. A switch wouldn't be feasible to maintain the neccesarry aesthetics. This is somewhat of a couples project for my girlfriend, and i must stick with the designated confinement.

(After reading over that paragraph, the item in question is of course P.G. rated )

@ian field there is only space for one power source

@crutschow I am going to begin looking into components available for the second design. Does the voltage rating matter much? Just As long as Vth is low enough to trigger? And the fets are capable of the 300mA or so?
 

crutschow

Joined Mar 14, 2008
38,512
@crutschow I am going to begin looking into components available for the second design. Does the voltage rating matter much? Just As long as Vth is low enough to trigger? And the fets are capable of the 300mA or so?
The MOSFETs' Vth should be ≤2V maximum (the voltage where they just start to turn ON) and the voltage rating ≥ 1.5 times the supply voltage.
You want to look for an ON resistance that will drop only a small voltage @ 300mA, so likely no more than 0.1Ω per transistor.
 

Tonyr1084

Joined Sep 24, 2015
9,744
What about a D type Flip Flop? Each switch (S1 & S2) can drive "Set" and "Reset" high independently. If both switches are high then the motor sees two positives and won't run. Of course a D type FF can't handle the current for a motor, but a small transistor or MOSFET should be able to.

The trouble I can foresee is that with the FF you start the motor in one direction or the other, but then you haven't a way to turn it off except for holding set and reset both high. And I don't know off hand if that would draw significant current.

Here's where I'm going with this: (see the drawing below) Of course you'd need transistors to handle the motor current but the FF can easily drive a couple of FET's. I'll let you work that part out - I have some wood working to do.

Motor Reverse FF.jpg
 
Last edited:

Thread Starter

flare09

Joined May 17, 2012
31
Hey everyone, just thought I'd update.

After a few hours of filtering mouser and digikey pages, trying to decide on arrays and components, i decided to scrap the self made circuit, in an attempt to bring myself to a realistic goal and go with programming a picaxe and a single asic driver.

A 14m2, and an L9110H. I can't find a specific datasheet anywhere, but i believe the pinot should be the same as the available L9110 sheets.

My two buttons tied to anoluge input pins. 2 separate pwm outputs to the two direction pins on the ic. Motor hooked up to the output of that ic.

This allows for expansion on an led indicator I wanted to add, but wasnt sure how.

Thank you guys for your responsive brainstorming, I really appreciate all of your input!

Now if I can just get the picaxe forum to approve my member request...
 
Top