Let's Make Robots!

Help with H-Bridge

 Hello, I need some help to reduce the chances of burning my precious Arduino/apartment.
 
I managed to build and test this H-bridge made out of transistors on a breadboard, and to my surprise everything worked perfect, I was able to use PWM to adjust speed and drive the motor back and forth.
 
 My question is, will I create a short if the two inputs receive signal at the same time?  right now they alternate between HIGH and LOW or  0 and higher numbers with the analogWrite or digitalWrite functions.  I ask because I might want to vary speeds according to a sensor or similar and at some point current could flow through both inputs?
 
Also I want to build a  shield with two of these H-bridges to control two motors,  what other considerations should I have?
 
 
Thanks! 
 
note: this diagram shows the transistors from below. 
 
first two are PNP, the other four are NPN 

 driver2.jpg
 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
brunoxyz's picture

I think they are cold, so I guess I'm OK..       yeah, I have to get a better battery. probably four rechargeable AA. 

ignoblegnome's picture

Setting both inputs high should not be dangerous.

If you set both inputs high while the motor is turning, it should act as a sort of electronic 'brake' for the motor. If you apply both inputs high while the motor is not turning, it won't do anything.

This sort of electic braking is not usually required for small robots, as the weight of the robot stops the motors pretty quickly when they are not being driven.

Integrating two h-bridges into a circuit to control two motors is very common.

Other considerations: Make sure the transistors you are using are rated for enough current for your motors. If you pull too much current, you will fry your transistors. Small transistors like the 3904 and 3906 don't handle much current. Larger transistors and heat sinks are needed for driving bigger motors.