NPN H-Bridge

This subject comes up too often and nothing ever gets done (on account of fragile egos and hurt feelings, subject-changing, sabotage, and so on.)

In a recent subject, I tried taking a guy's side in this matter, but I became the worst person in the world for doing so.
Arduino, H-bridges, and the Madness of Crowds: More hate, more vituperation, more character assassination, and hysteria, hysteria, hysteria (Oh, Yes); but nothing in the way of critical thinking and/or logical problem solving.

So, here's an all-NPN h-bridge that works. Having a little fun while I exorcise the Demons of Ignorance, happy in my chore - pounding a stake into the heart of hysteria.

It's not a panacea nor is it supposed to be a panacea. It's good for this, running some horrible little Mabuchi motor or whatever. Do I have to make it run a little car? (If you have demonstrated "doer credentials" you can dare me to.)

Let the haters hate, let the carpers carp.

// hbtool_01

byte A_Dir = 8;
byte B_Dir = 9;
byte A_Spd = 10;
byte B_Spd = 11;
byte motoff = 13;

void setup ()
{
  pinMode (A_Dir,OUTPUT);
  digitalWrite (A_Dir,LOW);
  pinMode (B_Dir,OUTPUT);
  digitalWrite (B_Dir,LOW);
  pinMode (A_Spd,OUTPUT);
  digitalWrite (A_Spd,LOW);
  pinMode (B_Spd,OUTPUT);
  digitalWrite (B_Spd,LOW);
  pinMode (motoff,OUTPUT);
  digitalWrite (motoff,HIGH);
}

void loop()
{
  // running DIRection A
  digitalWrite (motoff,LOW);
  digitalWrite (A_Dir,HIGH);   // enable A
  analogWrite (A_Spd,50);
  delay (2500);
  analogWrite (A_Spd,100);
  delay (2500);
  analogWrite (A_Spd,250);
  delay (2500);
  digitalWrite (A_Spd,LOW);
  digitalWrite (A_Dir,LOW);    // DISable A !! or Die! ?
  digitalWrite (motoff, HIGH);
  delay (1500);
  // running DIRection B
  digitalWrite (motoff,LOW);   // enable B
  digitalWrite (B_Dir,HIGH);
  analogWrite (B_Spd,50);
  delay (2500);
  analogWrite (B_Spd,100);
  delay (2500);
  analogWrite (B_Spd,250);
  delay (2500);
  digitalWrite (B_Spd,LOW);    // DISable B !! or Die! ?
  digitalWrite (B_Dir,LOW);
  digitalWrite (motoff, HIGH);
  delay (1500); 
}

Only the inquiring mind solves problems.

I bid you Peace!

In a recent subject, I tried taking a guy's side in this matter, but I became the worst person in the world for doing so. Arduino, H-bridges, and the Madness of Crowds: More hate, more vituperation, more character assassination, and hysteria, hysteria, hysteria (Oh, Yes); but nothing in the way of critical thinking and/or logical problem solving.

The internet provides a forum where people can showcase their personalities and lives in general, for better or worse. As to your H-bridge, one issue that might be present is that the base current for the direction transistor appears to have to flow thru the motor windings and brushes. This plus back emf from the motor windings may impact keeping that transistor fully turned on.

zoomkat:
one issue that might be present is that the base current for the direction transistor appears to have to flow thru the motor windings and brushes. This plus back emf from the motor windings may impact keeping that transistor fully turned on.

If the battery/motor voltage was not present then it would try to run from base current, as you say, since it's (DIR) emitter follower - it's a buffer, not a switch.
With everything connected as it ought, base current is "mouse nuts".

You did it perfectly. (of course)
EDIT Just wondering, which Arduino do you have?

Isaac96:
You did it perfectly. (of course)
EDIT Just wondering, which Arduino do you have?

A) It's not perfect. It's a mean to an end.
B) Here I used a "Roboduino Duemilanove". I like the FTDI deal.

Yeah, FTDI is nice. But what about using the 16u2 as a HID device?

If its one thing I've learned about H-bridges, don't waste time trying to re-invent something that is fickle with technical problems at the hobbyist level. Just buy them as pre-packaged IC's so all you need to do it connect a few signal wires and resistors to them.

There more commonly sold as half-bridges and under the category of internal switching.

The BTN7960 is a very popular model, its simple and has very high current if required.

harddrive123:
If its one thing I've learned about H-bridges,...

Yes, everyone knows "whatever" from all of the other h-bridge subjects that you've trolled.
Thanks for trolling, troll.