Let's Make Robots!

H-bridge using L298

Now that I have the rotary encoders working properly, it's time to think about the motor control circuit.  I have an Atmel AVR ATmega32 with three PWM outputs, of which I'll use two for motor control.  I'm planning a differential drive robot, that is, one with two drive motors, one for the left side and one for the right side.  I'll need forward and reverse directional control of both motors, as well as speed control via PWM. I have a couple of L298 H-bridge chips, so they'll do nicely.


I fitted a small finned heatsink, although the chip shouldn't get too hot. I had to spread out the pins in the front row to fit the 0.1-inch pitch Veroboard holes. There are eight protection diodes, four for each motor. The pale brown components are 0.1Ω resistors for current sensing (not used at present).  The motors connect to the board via three-pin Molex KK connectors.  I'll use the middle pin as a ground wire, to connect the motor cases to ground as a precaution against noise spikes.

The H-bridge has worked well so far, although I did make one construction error: a reversed diode!

Comment viewing options

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

That robo platform looks awesome, and I'm sure it was expensive.

I've built a hbridge-atmega8 board and a robot platform from scratch, you might want to see it:

The H-bridge: http://www.pocketmagic.net/?p=508

The platform: http://www.pocketmagic.net/?p=520 (at the bottom of the page).


Thanks for sharing, since this is a hobby of mine, I like to see various creations :)

Very interesting website. Keep up the outstanding work and thank you...

I've now got the H-bridge board mounted on the back of the Hitari Tumbler chassis:


I used M3 nylon PCB standoff pillars, and drilled a couple of extra holes in the chassis.  The battery isn't fixed down yet, but is in about the right place -- central, and as low as possible.

 I shall need to think of a name for this contraption fairly soon...

Looks like a pretty cool setup, hope it works well.