|
||||||||
|
||||||||
|
DAN106 Interfacing the Dios to the SN754410 for bi-polar motor control By Michael Simpson
I recently put together a small CNC mill for building plastic enclosures and decided to experiment with interfacing the stepper motors to a couple of different micro controllers. For my experiments I decided to use a bipolar cause of the raw power that they have. The controller requirements are a bit more complex but after bit of testing it looked like the SN754410 Motor controller that I was familiar with could easily handle the bi-polar requirements. I had just recently done a paper on interfacing the SN754410 to DC motors and really liked this device. It can run 1 amp continually (per coil) and 2 amps peak. However the chips can be stacked for more current. They also have thermal shutdown and built in clamping diodes so unless you hook them up incorrectly they are kind of hard to blow. The stepper motors that I will be using need 2A at 7.5 volts. See Figure 1. I am currently using 2 controllers soldered together with a heat sink as shown in figure 2.
Figure 2
The Stepper motor I am using has 4 wires which make it very easy to Identify the coils. Just use a voltmeter to determine which leads are connected to which coils. Use schematic 1 to wire the motor controller to your microcontroller. I used a simple bread board for my connections
Figure 3 The hookup is really strait forward. The Motor power should be a separate power source than the one you are using to power the microcontroller. It should have enough voltage and power to supply the Stepper motors. Don't over drive them. The minimum voltage the motor controller can use is 4.5 volts. Anything less and it starts to act funny. If the motor controllers start shutting down a small muffin fan can me used to help dissipate some of the heat. With this method I was able to run a single SN754410 controller continually for hours with just 1 motor controller and no heat sink.
Schematic 1 The following is the truth table for getting the stepper motor to step. The two separate channels of the motor controller will energize the coils in both forward or reverse directions to move the motor.
One of the problems with stepper motors is knowing where you are when you stop stepping. You cant always start stepping at step 1 above or the motor will get out of sink. For instance if you move t 2 phase motor ahead 3 steps you must start on the third step to keep it synchronized. We will keep track of the position with the software with the phz variable. The following program sets up a couple subroutines that will allow you to step your motor forward or backwards a number of steps at a particular speed. Proagram (download it here) 'Demonstrates the use of a stepper motor and SN754410
motor controller A final note. If the motor does not move in the correct direction you can just reverse one of the coils and the motor will reverse. Parts
|
Copyright © 2001 - 2007 Kronos Robotics