How to control an H-bridge from Arduino

General Robotics Forum - All aspects of robots and their applications. 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
How to control an H-bridge from Arduino Damien 07-31-2008
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Damien on July 31, 2008, 8:49 pm
I bought a LMD18200T H-Bridge but do not understand how to manage the
connections from an Arduino. I am using an Arduino Wee which runs at
3.3V and offers digital output and PWM.

What are the minimum required connections for this H-Bridge?

http://www.acroname.com/robotics/parts/R27-18200.pdf

The following seems straightforward:

Pin 2: Output 1 -> voltmeter (eventually to DC motor)
Pin 10: Output 2 -> voltmeter (eventually to DC motor)
Pin 6: PWR Supply -> 8V power supply
Pin 7: Ground -> Ground from power supply
Pin 3: Direction Input -> Arduino digital output HIGH

I also tried:

Pin 4: Brake -> digital LOW
Pin 5: PWM Input -> Arduino analog output (value 255)

I didn't do anything with the "Bootstrap" pins.

One part I don't understand is the PWM Input. Is that required? Is
3.3V sufficient?

Any clarity you can lend to this would be appreciated. I was not able
to find anyone documenting this H-Bridge wiring to an Arduino.

Thanks,
Damien
(U. Penn, Philadelphia)

Posted by Gordon McComb on July 31, 2008, 9:35 pm
The PWM pin is how you turn the chip on and off. Nuttin' works without
it.

PWM is a digital signal, so you just want to connect it to a PWM output
of the Arduino, saving the analog outputs for something else. Looking
(briefly) at the spec sheet for the 182000 you want a TTL-level (or
better) signal for PWM. If the Arduino Bee only puts out 3.3V there you
might opt for a level shifter. Most any CMOS gate chip running at Vcc
will trigger HIGH on a 1V or higher, and will output Vcc.

My advice is to Google around to find some circuits for a Basic Stamp,
OOPic, or other controller that use this chip. That will provide a
baseline for you.

Finally, bear in mind that the LMD18200T is a DMOS device, meaning it
requires Vs of at least 10 volts, and preferably 12, before it comes
alive.

-- Gordon


Damien wrote:
>
> I bought a LMD18200T H-Bridge but do not understand how to manage the
> connections from an Arduino. I am using an Arduino Wee which runs at
> 3.3V and offers digital output and PWM.
>
> What are the minimum required connections for this H-Bridge?
>
> http://www.acroname.com/robotics/parts/R27-18200.pdf
>
> The following seems straightforward:
>
> Pin 2: Output 1 -> voltmeter (eventually to DC motor)
> Pin 10: Output 2 -> voltmeter (eventually to DC motor)
> Pin 6: PWR Supply -> 8V power supply
> Pin 7: Ground -> Ground from power supply
> Pin 3: Direction Input -> Arduino digital output HIGH
>
> I also tried:
>
> Pin 4: Brake -> digital LOW
> Pin 5: PWM Input -> Arduino analog output (value 255)
>
> I didn't do anything with the "Bootstrap" pins.
>
> One part I don't understand is the PWM Input. Is that required? Is
> 3.3V sufficient?
>
> Any clarity you can lend to this would be appreciated. I was not able
> to find anyone documenting this H-Bridge wiring to an Arduino.

Posted by Damien on August 2, 2008, 3:50 pm
Thanks for the good advice. My main problem was that I was using less
12V.

That's too much power for this motor, so it looks I chose the wrong H-
Bridge. The L293D looks promising, and more popular:
http://www.me.umn.edu/courses/me2011/robot/technotes/L293/l293.pdf


Damien

wrote:
> The PWM pin is how you turn the chip on and off. Nuttin' works without
> it.
> PWM is a digital signal, so you just want to connect it to a PWM output
> of the Arduino, saving the analog outputs for something else. Looking
> (briefly) at the spec sheet for the 182000 you want a TTL-level (or
> better) signal for PWM. If the Arduino Bee only puts out 3.3V there you
> might opt for a level shifter. Most any CMOS gate chip running at Vcc
> will trigger HIGH on a 1V or higher, and will output Vcc.
> My advice is to Google around to find some circuits for a Basic Stamp,
> OOPic, or other controller that use this chip. That will provide a
> baseline for you.
> Finally, bear in mind that the LMD18200T is a DMOS device, meaning it
> requires Vs of at least 10 volts, and preferably 12, before it comes
> alive.
> -- Gordon
> Damien wrote:
> > I bought a LMD18200T H-Bridge but do not understand how to manage the
> > connections from an Arduino. I am using an Arduino Wee which runs at
> > 3.3V and offers digital output and PWM.
> > What are the minimum required connections for this H-Bridge?
> >http://www.acroname.com/robotics/parts/R27-18200.pdf
> > The following seems straightforward:
> > Pin 2: Output 1 -> voltmeter (eventually to DC motor)
> > Pin 10: Output 2 -> voltmeter  (eventually to DC motor)
> > Pin 6: PWR Supply -> 8V power supply
> > Pin 7: Ground -> Ground from power supply
> > Pin 3: Direction Input -> Arduino digital output HIGH
> > I also tried:
> > Pin 4: Brake -> digital LOW
> > Pin 5: PWM Input -> Arduino analog output (value 255)
> > I didn't do anything with the "Bootstrap" pins.
> > One part I don't understand is the PWM Input. Is that required? Is
> > 3.3V sufficient?
> > Any clarity you can lend to this would be appreciated. I was not able
> > to find anyone documenting this H-Bridge wiring to an Arduino.


Posted by Wayne C. Gramlich on August 3, 2008, 1:19 am
Damien wrote:
> Thanks for the good advice. My main problem was that I was using less
> 12V.
>
> That's too much power for this motor, so it looks I chose the wrong H-
> Bridge. The L293D looks promising, and more popular:
> http://www.me.umn.edu/courses/me2011/robot/technotes/L293/l293.pdf

Please note that the SN754410 is a direct functional replacement
for the old trusty L293D. It has a higher current capacity to
boot.

-Wayne

Posted by Gordon McComb on August 3, 2008, 4:48 pm
Wayne C. Gramlich wrote:
> Please note that the SN754410 is a direct functional replacement
> for the old trusty L293D. It has a higher current capacity to
> boot.

And cheaper. A buck and a half at Jameco. That's half or less than what
most places are asking for the L293D.

For the OP, there are plenty of tutorials for using the Arduino and
L293, and interfacing and programming for the 754410 would be identical.

-- Gordon


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy