CD4017 and NE555 Light Chaser Circuit

 Author:   Posted on:   Comments
This is the classic circuit that uses NE555 timer and CD4017 counter to generate a sequence of pulses. If these pulses drive LEDs, a chaser can be built (also known as water flowing light). It can be used for entertainment purposes or for various light signaling. The following circuit uses 10 LEDs that turn on in a regular sequence. This is the maximum number of outputs. If you need less than 10 output channels, CD4017 features a reset pin that is connected to ground. The following output pin after the last used pin can be rewired to reset (after disconnecting it from ground). Thus, once the pulses sequence reaches the reset pin, CD4017 will start over again, limiting the number of output channels.

NE555 is configured as an astable multivibrator. Oscillation frequency is rather low for this application. It is determined by R1, R2+RV1 and C2. With the values used for this circuit, it can be adjusted between 10 and 65 Hz. The duty cycle is close to 50%. If you want to calculate it yourself, use this tool.
CD4017 and NE555 Light Chaser Circuit

Improved Arduino Code for Unipolar Stepper Motors

 Author:   Posted on:   Comments
A stepper motor is a brushless electric motor that rotates in small equal steps, as opposed to the continuous rotation of regular motors. It has the ability to rotate a predefined number of steps, being made of multiple coils that are energized in regular sequences by trains of digital pulses. Unipolar motors use two coils, each of them having a center tap. The center taps from both coils connect to a power line and the remaining four coil terminals are powered sequentially (5 wires).

A simple transistor driver, motor connections and driving methods were discussed in the previous post: Unipolar Stepper Motors: Arduino Code and Driver. Some basic C functions were provided there. But, those functions are too basic for most usage scenarios. The motor can be driven only in 4-step increments and you can't change rotation direction. In this post, I will explain further the driving methods and I will generate driving pulses programmatically, with the ability to move in 1-step increments and change the rotation direction.