Motor Controller

48,452

203

18

Introduction: Motor Controller

About: Eric J. Wilhelm is the founder of Instructables. He has a Ph.D. from MIT in Mechanical Engineering. Eric believes in making technology accessible through understanding, and strives to inspire others to learn …

A 6 motor controller board using LMD18200 chips.

Step 1: Requirements

Determine your requirements. The LMD18200s can switch 3A at 55 V. The project, my undergraduate thesis, that used this motor controller board included 6 servo-motors that only required a couple hundred milliamps at 12 V.

The thesis was the design of a laboratory planetary rover to test new control algorithms at MIT's Field and Space Robotics Laboratory.

Step 2: Design the Circuit

Motor control is accomplished through pulse width modulation. Although PWM amps are slightly more complicated in both hardware and control, they are much more power efficient than linear amplifiers. A PWM amp operates by very quickly switching the current or voltage to a load between on and off states. The power supplied to the load is determined by the duty cycle of the switching waveform. Provided that the dynamics of the load are slower than the frequency of switching, the load sees the time average.

In this design, the switching frequency is approximately 87 kHz, which was tuned to the motors on the rover. The duty cycle is voltage controlled by setting the threshold of monostable oscillators driven by an astable oscillator. A digital to analog converter on the rover's computer controls the threshold voltage and thus the duty cycle of the amplifiers.

The PWM wave forms are generated by seven timers (each of the four 556's has two timers, and the eighth timer is unused). The first timer is set for astable oscillation, and switches between an on and an off state at 87 kHz. This 87 kHz clock signal is fed into the triggers of the other six timers, which are set to operate in monostable mode. When a monostable timer receives a trigger signal, it changes state from off (0 volts) to on (5 volts) for an amount of time set by the input voltage. The maximum time is approximately 75% the period of the astable clock signal and the minimum time is zero. By varying the input voltages, each monostable timer will generate a 87 kHz square wave with duty cycle between 0 and 75%. The LMD18200 chips act simply as digital switches controlled by the output of the timers and by the brake and direction digital inputs from the computer.

Step 3: Fabricate the Circuit Board

The circuit boards were fabricated through a chemical etching process. Using a standard laser printer, the circuit trace was printed onto watersoluble paper. The toner on this paper was transferred by heating to a composite copper and insulating material board. I used the fuser bar from a dismantled laser printer, but an iron can also do the trick. The remains of the paper were then washed away, leaving only the toner in the pattern of the circuit trace. Ferric chloride etched the exposed copper removing it from the board. The remaining toner was scrubbed off by hand using the green side of a sponge, leaving only the copper circuit traces.

Alternatively, there are kits available that make this process pretty easy.

Step 4: Solder in Components

Solder in all the components. Since it was only a single layer board, a few jumper wires were required.

Be the First to Share

    Recommendations

    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Barbecue Speed Challenge

      Barbecue Speed Challenge
    • Arduino Contest

      Arduino Contest

    18 Comments

    0
    Mystre
    Mystre

    14 years ago

    I would be helpfull if you included a PDF of the circuit and the PCB layout.

    0
    ewilhelm
    ewilhelm

    Reply 14 years ago on Introduction

    Agreed, but I lost the data I actually used to print my toner mask.

    0
    freecores
    freecores

    Reply 5 years ago

    thesis link is not working. can't view/download.

    0
    CBMashetty
    CBMashetty

    Reply 5 years ago

    thanks for making this nice instructables.can you post an instructable for homemade dc motor controller for electric bikes. I would be glad ,if so..

    0
    anuj1993
    anuj1993

    5 years ago

    Can someone help me with controlling a 600W 36V PMDC motor??

    I guess it will need atleast 30amps

    0
    T_Maine96
    T_Maine96

    5 years ago on Introduction

    I bought a useful circuit recently, a PWM from the weblink, I find it works great for motor control and (no offence) but it looks neater too.

    http://www.rmcybernetics.com/shop/PWM-OCm

    0
    raj007
    raj007

    12 years ago on Introduction

    pls send me a circuit for controlling multiple stepper motors

    0
    fjenett
    fjenett

    12 years ago on Step 4

    hey, thanks for that insttruction! do you think you could upload a better resolution circuit drawing? .. i can hardly read that text. thanks a ton. F

    0
    juggler
    juggler

    13 years ago on Step 4

    This is a great instructable, and I am trying to use these same H bridges with an arduino controller.
    Do you have any advice for me as to whether or not that will work?
    This is my first arduino project, and I may be biting off a large bite at first. I think I can do it, but am looking for some guidance as to where to connect the Pins on the arduino to the Hbridge. I have to use a heavy duty bridge since the motor I have is a 30VDC, 3Amp stepper.
    Thanks in advance for any help you might have to offer.
    -=Andy

    0
    ewilhelm
    ewilhelm

    Reply 13 years ago on Step 4

    Every time I've used beefy H-bridges for anything high-current, I've always ended up having to opto-isolate the H-bridges from the pulse generator. Maybe it's just bad luck on my part. I would think the Arduino should be able to handle connecting its digital outputs directly to the input on an LMD18200, for example. However, you're going to have to just try it out.

    0
    juggler
    juggler

    Reply 13 years ago on Step 4

    Thanks,
    It seems to be able to connect directly (although it seems at this moment that I may have fried something) but the motor just stutters back and forth.
    So at this point I am trying to figure out how to write the code to control the motor, since all the examples I can find use the built in stepper library which I think has the timing off slightly.
    does that sound right to you ?
    Maybe I am missing something.
    Thanks,
    -=Andy

    0
    ewilhelm
    ewilhelm

    Reply 13 years ago on Step 4

    It does sound like the timing is off; however, I was only ever controlling continuous DC motors, not steppers, with my setup.

    0
    engrmurad
    engrmurad

    14 years ago on Introduction

    stepper motorsas far as i know u r controlling motion by by LMD18200 chips....so u may suggest how can i control more then 6 motors...whats about the amps & volts..i have combined bipolar & cmos control circuitry
    with DMOS power devices on the same monolithic structure.I am telling about
    stepper motors

    0
    polymath
    polymath

    15 years ago

    Nice thesis, I've been wantimg to build some sort of a rover model as a project with my kid. This looks like it might work nicely

    0
    The_Fallguy
    The_Fallguy

    15 years ago on Step 2

    Can you upload a larger circuit diagram?