Stepper control v3

From lechacal
Revision as of 18:09, 28 March 2019 by Administrator (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Arduino Stepper Motor Control Board - A4988 Driver - Manual Control - Arduino

For version 1.2 and below see this documentation
For version 2 see Stepper Control Board (A4988 driver)

The tiny stepper controller is a controller board for stepper motor. It can be controlled manually (potentiometer and switches) and programmed with Arduino IDE.

Get it Online

IMG 1895 small.png Detailed v3.0.png

Technical Specifications

Stepper Motor driver board: A4988
Microcontroller: Attiny84.
Input Power: 30Volts Maximum.
Power Socket: 2.1mm Jack. Center positive.
Motor connector: 4 way molex.
Size: 47x47mm

Manual Control ready with:

  • Potentiometer for speed.
  • Push button for single step increment.
  • Slider switch for direction selection.

Hardware Controls


Use digital input 1 in the sketch to control the direction.

#define Direction 1

In the default sketch the direction of motor spin can be controlled manually using the slide switch.

Push Buttons

Two push buttons are available. These can be used for any desired manual function such as speed up, move left, start, stop etc...

They are configured with digital input 0 and 2.

#define Button1 2
#define Button2 0

Step Resolution

Step resolution can be configured using jumpers.
By default the jumpers are off and this sets the lowest step resolution.

Auxiliary port

Digital I/O with FTDI layout compatibility is available for external use. This can be anything like I2C / Serial /external sensors/ external switch).

Default Sketch

The default sketch loaded in the Attiny84 is a basic sketch to control the motor manually. The potentiometer will be use as speed control.

Default v1.1.
Default v1.2.
Default v1.3.

A demonstration can be seen on this video

i2c Control

The two i2c pins of the Attiny85 are available on the board to be controlled from an i2c master.

This is a sketch for the Attiny85 for speed and direction control. Commands are as follow
"a" for direction 1 - e.g. Master will issue Wire.write("a")
"b" for direction 2 - e.g. Master will issue Wire.write("b")
"delay:" for speed control - e.g. Master will issue Wire.write("1500:")
":" for stopping the motor - e.g. Master will issue Wire.write(":")

Delay must be a number followed by a ":" which is the stop character. This number is the delay in microseconds between each steps.

Download Slave i2c Sketch.
Download Master i2c Sketch.

IMG 0407 small.jpg

Related Articles

IMG 1894 small.pngIMG 1895 small.pngIMG 1896 small.pngIMG 1897 small.png