Posts: 16
Joined: Tue Jul 31, 2012 10:57 pm

stepper motor driver

Sat Dec 01, 2012 9:55 am

A wee "not yet complete" but "works enuf to say it works" project.

I have to drive a couple of stepper motors to accurate X an Y movements.

The hardware for the X Y was a "Parker" Linear Actuator 803-1436A - Check Google - (Second hand).
I used two ebay "3A Single Axis Stepper Motor Driver Controller Board" (my ebay number was 300690042128) which is a single channel TB6560 controller.

This board is opto isolated and can run on the GPIO directly - I just keep the wires short and my fingers crossed ;-) So no need for level convertors.

The board also has microstepping (nice smooth motor motion) and a current control (so you can use keep the noise down when working late at night - actually it is so you can correcly drive the different makes/models of stepper motors.

The motors I use are beefy as I have to move some heavy-weight plate about. NEMA 23s from LIN Engineering. 4 wire/2 phase. 1.8 degrees per step.

The software base came off this site. I cant remember the ffile but the comments at the top were
// How to access GPIO registers from C-code on the Raspberry-Pi
// Example program
// 15-January-2012
// Dom and Gert

I used the GPIO7 and 8 they used and added GPIO 24 and 25 for the 2nd axis.

When I get the code slightly more polished I will put it somewhere. The test/debug code is nothing startling it allows simple n/s/e/w (using unix vi "hjlk" characters) plus a liot of bits and pieces to allow me to control the stepper frequency from the keyboard (up/down/left/right). Nobody would want to do it the way I did. I am old and fat with lots of grey hair and do things my way ;-)

Anyway the wee ebay boards and the pi go together well.

The only health warnings I would give
The stepper motors have HUGE power when they through the linear screws. Take care with bits of your body and have a decent emergency stop about.
Dont unplug the motor cables (probably any cables) when the kit is live. It will just cost you money and probably not win you much

The wee control board needs 5v and gpio7 to pul and gpio8 to dir. The "-enable" line was left floating and appears to be actively pulled down. The "pul" line is the control, the "dir" line is CW or CCW.

What else can I tell you.

User avatar
Posts: 12746
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: stepper motor driver

Sat Dec 01, 2012 10:00 am

That stepper motor looks like a serious bit of kit!

Posts: 16
Joined: Tue Jul 31, 2012 10:57 pm

Re: stepper motor driver

Sat Dec 01, 2012 4:21 pm

24volt 2.something amp, it carries its armour plating about with it!

It is a SPOTS machine for target shooting. It moves a multi-spot set of aiming marks so that each one moves to the same place. This allows club shooters on NSRA 10 spot bulls to shoot "international" type competition. Because it is at the dirty end of a range with lots of high-speed lead it has to be well protected. Mine carries the protection around with it.

The wee ebay boards can be used to drive things with much less muscle, and the fact it is opto isolated and runs on 3.3v with pull-down input means there is less of an issue with buffer boards etc.

I am moving to one of the China 3+4 axis controllers (similar input to the 1 axis board, but I am not yet happy.

Posts: 5
Joined: Sat Dec 01, 2012 6:53 pm

Re: stepper motor driver

Sat Dec 01, 2012 7:30 pm

Hi - looks pretty stonking what you've done, and seems like a good alternative driver to the L298.

Quick question...have you noticed any delays or loss of synchronisation between your steppers by controlling the system with the RPi?

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: OutoftheBOTS and 15 guests