Driving a Stepper Motor Saved from an Old Printer © CC BY-SA

Disassemble an old printer (in this case a dot matrix) and drive the stepper motor(s) for linear motion or rotation. With Arduino.

  • 6,076 views
  • 0 comments
  • 32 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

I need some linear motion for a new project and I decided to disassemble an old dot matrix printer in order to reuse its stepper(s), by controlling them via a A4988 driver.

The printer was labeled Philips NIMS 1433 PLUS, but after some discussion on FB it turned out that the original model was Seikosha SP-1900 Plus or 2400.

FB user G. Toscano provided the picture below and the service manual in the attachment section.

Once I removed the cover, this was the situation:

There are two stepper motors, one for the printing head to move left and right, on a linear shaft, and one for the paper roll.

Power

From the service manual they seem to be fed with 24v. This is a voltage I decided to take directly from the power board of the printer, which splits the AC 220V in different voltages. This is part of the scheme of the power board:

From here we can infer which voltage must be present in the six areas of the power board:

However, by testing with a multimeter, outputs 1 and 2 did not provide any voltage, while output 6 provided 8.2 Volts. I am not enough good at reading circuits to understand if this was in some way intended in the scheme, or if the board is broken, whereas other suggested that it may depend on the fact that there is no actual load on the power board.

Later on, I decided to use the 8.2V output to power the Arduino.

The motors

I found a guide on Instructables in order to understand how to identify the wires connected to the two motors I found in the printer. The motors have six wires each, but we need to use only four of them.

To identify the different wires, and which ones I had to use, I had to test the resistance between the six wires.

We know that the motor has two coils; each coil is connected to three wires. Of those three, two are at the ends of the coil and one is at the middle. This means that the two wires that are connected at the ends will have a bigger resistance; those are the ones we need to use. After filling up a table with the resistance values, it's easy to determine which ones are the two couples of wires connected at the ends of the two coils, and those are the ones we need to connect to the A4988 driver.

The circuit

After testing the circuit (see the attached schematics) with an Arduino UNO and a breadboard, I went for a Nano. Everything is squeezed now on a 3x7 board, which is powered by the comparatively huge original printer power module (with a nice big I/O button).

This tutorial on Howtomechatronics, as well as this POLULU page explaining the use of the A4988, were the starting point for my final circuit and the code.

Further developements

The circuit is very basic. What I would like to add in the next steps is the Sleep control, which will let me save power, diminish the heat and unlock the motor. Different button inputs could be added through the Nano analog pins, with the appropriate resistors, in order to manually bring the head to the desired position (left and right control), start a movement routine, enable sleep mode and so on. Feedback to the user will be given through LEDs.

For this purpose I would use the ready-made control panel of the printer, which you can see in the following pictures:

In the service manual, we can see which connector wire goes to which lamp or button:

On top of this, I will probably try to attach a servo on the head, and an additional stepper (from the same printer) or a DC motor for a rotational movement.

I'll add all the documentation as soon as the project is finished.

Code

Short pattern for stepper motorArduino
This is a test pattern I used. Manually put the head in the middle while the power is off (motor disconnected), so you are (almost) sure the head will not hit the end of the rail.
// DIR = HIGH ----> HEADING RIGHT
// DIR = LOW  ----> HEADING LEFT
// 200 steps = one turn

const int stepPin = 6; //connected to STEP on the A4988
const int dirPin = 5; //connected to DIR on the A4988
 
void setup() {
  pinMode(stepPin,OUTPUT); 
  pinMode(dirPin,OUTPUT);
}
void loop() {

  delay(1000);
  digitalWrite(dirPin,HIGH);          // HIGH and LOW set the direction forward or backwards
  for(int x = 0; x < 100; x++) {      // 100 steps forward (half a turn)
    digitalWrite(stepPin,HIGH);       // one pulse (HIGH for 5 ms)
    delayMicroseconds(5000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(5000); 
    }

     delay(2000);

      digitalWrite(dirPin,LOW);       // Same as before, but reverse direction
  for(int x = 0; x < 100; x++) {
    digitalWrite(stepPin,HIGH); 
    delayMicroseconds(5000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(5000); 
    }
  
  delay(2000);
  
 digitalWrite(dirPin,HIGH);           //Pattern with a short segment back and forth
  for(int x = 0; x < 10; x++) {
    digitalWrite(stepPin,HIGH); 
    delay(10); 
    digitalWrite(stepPin,LOW); 
    delay(10);    }
 digitalWrite(dirPin,LOW);
  for(int x = 0; x < 10; x++) {
    digitalWrite(stepPin,HIGH); 
    delay(10); 
    digitalWrite(stepPin,LOW); 
    delay(10);    }
   digitalWrite(dirPin,HIGH);
  for(int x = 0; x < 10; x++) {
    digitalWrite(stepPin,HIGH); 
    delay(10); 
    digitalWrite(stepPin,LOW); 
    delay(10);    }
 digitalWrite(dirPin,LOW);
   for(int x = 0; x < 10; x++) {
    digitalWrite(stepPin,HIGH); 
    delay(10); 
    digitalWrite(stepPin,LOW); 
    delay(10);    }

     delay(2000);
     
 digitalWrite(dirPin,HIGH);             // Same as before, but faster
  for(int x = 0; x < 15; x++) {
    digitalWrite(stepPin,HIGH); 
    delayMicroseconds(5000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(5000);   }
 digitalWrite(dirPin,LOW);
  for(int x = 0; x < 15; x++) {
    digitalWrite(stepPin,HIGH); 
    delayMicroseconds(5000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(5000);  }
   digitalWrite(dirPin,HIGH);
  for(int x = 0; x < 15; x++) {
    digitalWrite(stepPin,HIGH); 
    delayMicroseconds(5000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(5000);   }
 digitalWrite(dirPin,LOW);
  for(int x = 0; x < 15; x++) {
    digitalWrite(stepPin,HIGH); 
    delayMicroseconds(5000); 
    digitalWrite(stepPin,LOW); 
    delayMicroseconds(5000);  }

    delay(5000);
  }

Schematics

Seikosha SP-2400 Dot Matrix Printer service manual
Original service manual as a reference
Circuit Diagram
Base circuit for controlling a stepper via the A4988 driver.
Dotmatrixsteppermotorcontrol schem smili8zy99

Comments

Similar projects you might like

Gesture Control Robot

Project tutorial by Raunak Oberai

  • 865 views
  • 4 comments
  • 8 respects

Matrix Orbital GTT TFT Thermometer

Project tutorial by MatrixOrbital

  • 1,746 views
  • 0 comments
  • 4 respects

Pathfinder

Project showcase by Maverick

  • 10,823 views
  • 7 comments
  • 76 respects

Micro Soldering Station

Project tutorial by Paulo Bruckmann

  • 10,339 views
  • 10 comments
  • 34 respects

Back Up SD File To Dropbox

Project tutorial by Andrei Florian

  • 2,912 views
  • 6 comments
  • 33 respects

Arduino-Powered Robot Controlled with The Tactigon

Project tutorial by the tactigon team

  • 607 views
  • 0 comments
  • 3 respects
Add projectSign up / Login