You Are Here: Home » AVR ATmega Projects » Motor Projects » An AVR-Based Microstepping Bipolar Chopper Stepper Motor Driver (STMD)

An AVR-Based Microstepping Bipolar Chopper Stepper Motor Driver (STMD)




Features

  • Open Source – The schematic, parts list, and software are all freely downloadable!
  • Hobbyist-friendly – No surface mount parts means allows this drive to be easily repaired!
  • DMOS driver chips rated at 55V and 3 Amps.
  • Easy parts availability – Electronic parts are all available at Digikey. Just add your own heat sink and mounting hardware.
  • DIP Switch selectable modes of stepping:
    1. Full Step, Both Phases On
    2. Full Step, Wave Drive
    3. Half Step
    4. Quarter Step
    5. Sixth Step
    6. Eighth Step
    7. Tenth Step
    8. Twelfth Step
    9. Sixteenth Step (available on special request in place of Twelfth Step mode with a special version of firmware)An AVR-Based Microstepping Bipolar Chopper Stepper Motor Driver (STMD)
      • Optically isolated step, direction, & enable signals.
        These signals are ground referenced so no +5VDC is required – hook directly to your parallel port.
      • Selectable automatic idle current reduction to reduce motor heating.
        Motor current can be reduced if no steps are received for 3 seconds. Oscilloscope Image, 202 kb
      • DIP switch selectable motor test mode.
        Allows for testing of motor/drive/wiring without an externally generated step signal.
      • Motor braking can be activated when drive is disabled.
        Alternatively, motor braking can also be disabled such that the motor will freewheel when drive is disabled.
      • Motor current is adjustable by two potentiometers. (One for each motor phase)
        Fixed resistors may be substituted in place of the potentiometers for cost savings or increased reliability.
      • Removable screw terminals for all wiring connections.
      • Status LED flashes during normal operation to let the user know the microcontroller is running.
        Illuminates solid during a fault condition.
      • Quality double-sided printed circuit board with ground plane and silkscreen legend.
        Board size is 3.25″ x 4.30″ with mounting holes for #6 screws in each corner.

      Design & Configuration

      • An Atmel Mega48 running on its internal 8 MHz oscillator is the brain of the system. A 10 pin ISP connector is provided in the event the user would like to modify the open source firmware. The program memory is only about 40% full so there is plenty of room for an enterprising user to add to the custom features and functions. Normal operation of the microcontroller is indicated by flashing of the ‘alive’ LED once per second. If a fault condition is detected, the LED will be latched on until power is cycled to the board.
      • For power switching, National Semiconductor’s LMD18245T 3A, 55V DMOS Full-Bridge Motor driver chips are used. These driver chips are the most expensive part of the STMD as two of them are required per motor. Although these driver chips are rated for +55 VDC, allowance should be made for back emf from the motor. As such, I recommend a maximum of +45 VDC.
      • For flexibility, DIP switches are used to select the mode of stepping. As described below, eight modes of stepping are available.
        SW3SW2SW1Stepping ModeSteps/Revolution
        OffOffOffFull, Both Phases On200
        OffOffOnFull, One Phase On200
        OffOnOffHalf400
        OffOnOnQuarter800
        OnOffOffSixth1200
        OnOffOnEighth1600
        OnOnOffTenth2000
        OnOnOnTwelfth/Sixteenth*2400/3200
        *Sixteenth step mode requires a special firmware version which
        is available upon special request and also in the open source firmware.
      • SW4 in conjunction with JP1 and two pull-up/down resistors selects the method of motor braking.
        • SW4 off, JP1 on, pull-up resistor R10 populated – Motor braking active when drive is disabled.
        • SW4 on, JP1 on, pull-up resistor R10 populated – Motor is allowed to freewheel when drive is disabled.
        • JP1 off and pull-down resistor R11 populated – Motor braking always disabled.
        • All other combinations of SW4, JP1 and pull-up/down resistors are invalid and drive operation is undefined. DO NOT populate both R10 and R11!
      • SW5 is used to enable test mode. This allows the user to test their wiring and drive/motor operation with no external step signal. During test mode, the drive will internally generate a step signal to rotate the motor at approximately 1 revolution per second. The drive must be enabled and will respond to the direction pin. To enable the drive with no external enable signal, you can temporarily connect J1-3 (Com) to J3-1 (Opto Com) and J1-1 (+5Vout) to J3-4 (Enable). The motor will change directions if J1-1 (+5Vout) is connected to J3-2 (Direction).
      • JP2 is used to enable/disable automatic idle current reduction. When JP2 is on, idle current is reduced when no step signal has been received for 3 seconds. Full motor current is restored upon the next step signal. The amount of idle current reduction can be manipulated by changing R9 in the R8/R9 voltage divider. The default value of 1k allows for a 50% reduction. Using a 2k in place of R9 will allow for a 33% reduction.
      • Current Limiting is set by adjusting potentiometers R4 and R5. The resistance as seen from pin 13 to ground on each of the LMD18245T driver chips (test points 6 & 7) should be set to 18750/I where I is the maximum desired winding current. (Where this comes from?) R2 and R3 (6.2 kohm resistors) are in series with the potentiometer to prevent the motor current from being set higher the driver chip’s maximum rated load current. Potentiometers R4 and R5 should be set to identical values. Here is a picture (246 kb) showing how to adjust R4 when measuring from TP6.

      For more detail: An AVR-Based Microstepping Bipolar Chopper Stepper Motor Driver (STMD)

 

 

Leave a Comment

You must be logged in to post a comment.

Read previous post:
LCD Interfacing with AVR
LCD Interfacing with AVR

Interfacing LCD Display in 8bit Mode I’ve already discussed about the LCD display in a note here in this website....

Close
Scroll to top