I purchased two 6V hobby motors and am trying to power them using my photon. I need to be able to turn them on and off, via analog or digital pads. I have tried a few methods, using H-Bridge to take 9V (from a battery) and convert it to 5 and use that method. I also have tried a few transistors , a 2N2222, and a few others. I followed a few schematics, including https://www.hackster.io/adi1690/particle-photon-motor-control-c1fa6d but I do not have that exact transistor and I could not get it to work.
Can someone help me with this? I am open to using 2AA to power motor separately, or a 9V.
The 2N2222 cannot carry a heavy current. What are your motor characteristics?
If the load current is smaller that the 2N2222 can handle (around 600mA), you can follow the hackster.io link provided.
Just be careful on the pin layout and don’t forget the 1N4001 diode.
To test the transistor part of your circuit, you can connect directly the R1 to GND or 3.3V, to simulate the ON/OFF. This can save your Photon in case of mistake in the wiring.
The SN754411NE should do.
The cd74hc4094e doesn’t appear to be a H-bridge but a shift register
I can’t find a datasheet for cpa0638
Are you designing a PCB or just trying a breadboard setup which eventually may be transfered to a proto or similar?
The reason for asking is, have you considered using a ready to go breakout motor driver like these
Hmm, not sure what you mean with "an hbridge 9v battery"
Do you mean an H-bridge which can take 9V and a 9V battery?
If so, that's all you need to drive a 9V motor, but for a 6V motor you should not use a 9V battery since the H-bridge will just "forward" that as is to the motor.
And if you only use an H-bridge, you'll still need a fly-back diode, which often are already present on these controller boards.
BTW, I couldn't say yes to this part
An H-bridge does consist of at least four transistors
Nope they are no voltage regulators. If you need one of those you’ll have to add that extra.
But the same would be true for your own transistor circuit unless you want to burn the voltage on a series resistor
So I need hbridge, external battery, diode and motor. Is there a schematic you know of ?i have a hbridge one I found online but im unsure where the diode would come into play in the schematic