cheap simple tiny48 stepper motor driver

May 13, 2009 at 7:59 pm (Uncategorized)

The idea of this project is to create cheap and simple bipolar stepper motor driver with current chopper. The design is nothing new and is used in most of today’s drivers (very similar to internals of popular l297/l298 pair), the difference, however, is in the price.
This board is my first SMD project (first SMD design and my first SMD soldering). I managed to solder all of the parts without the need of any expensive equipment(old soldering iron with blunt tip  and chinese tweezers). So if you have never soldered SMD, this is a good project to start (just make sure you get a good tweezers and thin enough solder).

board_tiny48_stepper L297 is replaced by using dirt cheap microcontroller (ATTINY48 – cca 1,6€) , two lm358 dual op-amps (cca 0.15€ each) and couple of discrete components -> much cheaper than overpriced l297 (8€).
The power part consists of logic level mosfets and power diodes to protect them from power spikes. Mosfets can be replaced with any other logic level mosfet, as long as they can handle enough current. I chose NTD3055L104G (12A, 60V) mostly due to its price (0,44€).
The driver can produce full (with two energized coils at the same time) or half steps and is capable of following frequencies up to around 30 kHz. Power part should be able to handle up to around 3A without additional cooling and up to 10A (MOSFETs are rated 12A so high currents should be used with caution) with heat sinks placed across MOSFETs and power diodes.
Current limiting is done via current chopper, consisting of sensing resistor and two op-amps. In first stage of op-amp sensed voltage is amplified app 10x times. Second stage is used as a voltage comparator. The desired current is set via potentiometer acting as a voltage divider. If recommended 0.1 ohm resistor is used than 1V on the pot should correspond to app 1A on coil. Logical AND gate is not used, as it is realized in microcontroller’s firmware.
Current sensing resistors should be 0.1 ohm with power rating at least 2,5W (5W recommended), however different value can be used.schematic_tiny48_stepperPCB is designed for toner transfer (or other homemade techniques) and is single sided with minimum trace width 0.16mil. All the bridges are done via 0ohm 1206 resistors. Most of the components are SMD (resistor 603, capacitors 1206 (603 fit as well), with exception of microcontroller (so it can be programmed of board) and power resistors.

Source code is completly written in C and compiled using WinAVR (gcc).

Note that is project was made mostly for my education and as a fundation for next stepper controller (rev2) wich will include microstepping and fixed frequency current chopper.

Download project files:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: