# Motor Controller

47,899

200

18

A 6 motor controller board using LMD18200 chips.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## 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.

186 10K
90 15K
78 4.0K

## 18 Discussions

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

3 replies

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..

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

I guess it will need atleast 30amps

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

pls send me a circuit for controlling multiple stepper motors

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

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.
-=Andy

3 replies

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.

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

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

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

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