I am trying to make an H-bridge with two NPN and two PNP transistors to drive a motor which works fine on the 5 V Arduino. I have a schematic in the picture. When I use a simple code to have pin 9 HIGH and pin 8 LOW, the motor doesn't do anything. The transistor which I circled green is getting very hot. Is there something wrong with the schematic or code? Or is it my wiring?
I know people use diodes as well, but in my case the motor doesn't work, so the diodes aren't the problem.
This is my code:
void setup()
{
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
digitalWrite(8, LOW);
}
LOW
. – Edgar Bonet Aug 26 '18 at 10:20