Stepper Motor Control Using PIC16F84A & ULN2003 – v1.5 – TEC 585


This is a very simple circuit and  its code (PIC Assembly)

Here are EAGLE3D images of the board (TOP & Bottom)


Notice how good looking this board is. Compare it with the ugliness of my  first (embarrassing) board.

Due to the gear used in the university lab, I had to increase the width of the tracks to 50 mils, and make big fat Pads. I had to Edit the libraries of every component to make big Pads, as when I used the standard ones and etched the board, I totally ate away the pads copper when I drilled. Actually, fine tracks aren’t that much of a problem, but PADS are.

Note to self: Don’t be afraid to super-size.

The one without varnish is the second one, but then I did one more iteration (I was wrong in the tactile switch) and got a last one which was varnished.

The tactile/push-buttons that were available didn’t have their library in Eagle, so I had to create them (it’s .3 inches long and .2 inches wide). I had some problems doing that, but I was helped on the ETO forum. (Thanks Inquisitive).

You’ll notice on the TOP view that there are some missing parts.

You can download the whole project (.rar archive containing Eagle schematics & custom libraries + board files + .asm source code): HERE

The two ports are pulled high via a 10K resistor (9.8K on the actual board), and each sequence is launched as soon as we pull the pin down (held down).

PORTB is configured as output, RB0 through RB3 go into a ULN2003 7 Darlington Array, outputs of the ULN go to the stepper motor.