NPN Transistor H Bridge Bi-Directional DC Motor Control - Help!

I've been working on this project for a while now, but wasn't sure on how to go about it. I've done some extensive research and come to the conclusion that I could use an H Bridge to control my DC motor both ways.

I am not only using what I've got laying around, but I'm also doing this as a project to learn and grow from since it's my first official project.

I had first set up my ATTiny and connected one pin to the motor directly and then connected it to ground. I was able to read a switch to set the motor pin high and it spun just as expected. This was just to verify that the ATTiny could indeed power the motor as well as to verify that the motor was good.

Here are some details on the H Bridge setup:

NPN PN2222 General Transistors x4

Voltmeter readings:

Input to collector: 4.21v
Input to base: .86v
Output from emitter: .17v

I'm sitting here scratching my head wondering why the voltage is dropping so drastically... I had some 1k resistors hooked up, but I scrapped them to see if the output would change.

I'm not sure if the input to the base is not high enough to allow current to flow through, but it seems to be enough to power the DC motor, so I'm just not sure what to make of it.

Hopefully someone here can show me my mistake and help me correct this. :)

Tags: ATTiny, Arduino, Bridge, H, ISP

Views: 284


Reply to This

Replies to This Discussion

If your motor is small enough to be driven directly, you can use two outputs from your ATTiny to reverse the motor. If you connect the motor between two output pins you can drive the motor in one direction by putting one pin high while the other is low. Reversing which is high and which is low will reverse the motor. Both pins in the same state will make the motor stop.

It is unusual to build an H-bridge with BJT's, MOSFETs are the preferred active device in these circuits. At the very least, you will need to put some resistors in series with the base of each grounded emitter transistor to limit the base current. On the grounded emitter transistors you will only need 1V to drive that transistor into saturation. On the Vcc Collector transistors, you will need to exceed Vcc by at least .5V (probably more) to keep them in saturation or reduce the collector voltage by that much. The Vcc collector transistors will self regulate to some degree, since the Emitter-Base voltage will drop as the transistor approaches saturation, the emitter voltage in reference to ground will never exceed about Vcc-1V which should allow the motor to run but not at full speed. If you run the ATTiny on 5V and use a 3V motor, this could work okay. ATTiny claims to handle 40mA per output (200mA max total device current) so if your motor is less than that, you're all good.

hello Adan Salinas ,

i am tried to analyze the circuit in the tagged reviews. i am posting a virtual board circuit. here it is works for both forward and backward motor movement. 


Latest Activity

Shannon Bradley and Marcelo Rodrigues are now friends
Terry Renner is now a member of GarageLab (arduino, electronics, robotics, hacking)
Andy S posted a discussion

Arduino MEGA boolean?

Hi everyone,been banging my head against the wall a few days now.i have a small project, where i…See More
Bobby Marshall posted a video


Meet the S.E.L.F.I.E., the "The Self Enhancing Live Feed Image Engine". Find out how it works:
GarageLab posted a blog post
pj jones posted a status
"Designing an Home Automation Project"
Profile Iconpj jones, Robert Kribel and Lars Goldschlager joined GarageLab (arduino, electronics, robotics, hacking)
Fontaine Pierre commented on GarageLab's blog post Tutorial: Using GPS Shield as an Anti-Theft Device
"Hi, Is it possible to make a car tracker with this GPS + GSM shield to send a message if limits…"
Apr 11
GarageLab posted a blog post
Apr 11
Profile Iconeslam mohamed haredy, Wesley Castillo and Lise Pape joined GarageLab (arduino, electronics, robotics, hacking)
Apr 10
Terry Dark left a comment for Beula Isaac
"Hi Beulah, Greetings from down under (Australia) Please tell me about yourself and your interests…"
Apr 9
Terry Dark and Beula Isaac are now friends
Apr 9
GarageLab posted blog posts
Apr 9
GarageLab posted a blog post

Festo's BionicKangaroo gets the hop on energy-efficiency

The BionicKangaroo features pneumatic actuators that provide the jumping power and at the same time…See More
Apr 7
Profile IconAnthony Parker, John Nicosia and Tom Devey joined GarageLab (arduino, electronics, robotics, hacking)
Apr 7
wani sageer posted photos
Apr 6
GarageLab posted a blog post

Using a 3D Printer to Draw Tattoos: InkD

 It’s one thing to allow a professional tattoo artist to ink your arm. It’s another thing…See More
Apr 4
GarageLab posted a blog post

Dispensing Solder Paste With A 3D Printer

There’s a strange middle ground in PCB production when it comes to making a few boards. Dispensing…See More
Apr 3
Duong Nguyen is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 3
GarageLab posted blog posts
Apr 1

© 2014   Created by Marcelo Rodrigues.

Badges  |  Report an Issue  |  Terms of Service