Stepper Motor control by NE555 timer chip.

 

NE555

 

These notes are complementary to two YouTube videos – especially the second one.

 

First video: https://youtu.be/RAtC-oBI3mE

 

In this first video, we presented a very simple approach to understanding an utterly basic problem we had: i.e. how to make a stepper motor revolve in one direction at a designated range of speeds. It was found it quite difficult to discover an on-line explanation easy enough for us to understand. We did not want to use Arduino, let alone more sophisticated computer software. We wanted just to press a switch, and have a stepper motor rotate as smoothly as possible, and at a constant speed – until we decided to change it to another speed, at which it would also continue to rotate steadily, &c.

 

It may be that we didn’t search the ’net assiduously enough – we are no longer young, and our attention span was never very great – but we couldn’t find the sort of entry-level information we needed. But happily, a colleague gave us the info., and all was well. Indeed, we thought that info. might be appreciated by other YT users, and so the above video was made.

 

Inevitably, a follow-up became necessary:

 

Second, new video: https://youtu.be/XrizHAodv_k

 

Because this second video included a couple of simple circuits based on the NE555 timer chip, this web-page was quickly written, so that anyone interested could copy down the diagrams to try themselves. It would be rather pointless to describe the YT video, since a picture is worth a thousand words (or two thousand if I’m writing them!), so we will now immediately switch to ‘YT Explanatory Mode’.

 

Firstly, welcome if you have come here from the above YT video! Secondly, there are some obvious - and not so obvious - errors in the video commentary, and the whole thing has been done very simply and some important factors have been omitted or glossed over. Sorry; very slapdash of me. For example, it is not made clear that when the LED lights up, the capacitor is NOT discharging through the LED. The repeat cycling of the timing capacitor is handled internally by the chip itself. The NE555 contains around 20 transistors, several diodes and doubtless other stuff as well, and is quite capable of looking after itself! 8^)   The supply voltage can be anything from 4.5V to about 15V. The 555 can switch very slowly indeed, maybe once every several minutes; but on the quicker side, I understand it will switch at up to 100,000 times per second: 100 KHz. We have used a range from a few hundred Hertz up to ~25 KHz. Another fault in the video comes when we claim that the LED is flashing about 8 or 10 times per second, when it appears to be on all the time. From this, we have learned that the persistence of vision of our video camera is considerably less than that of the human eye!

 

Our lash-up employs the astable mode of the 555. In this mode, it continually re-sets itself, a necessity for generating pulses at a constant rate. There is also a monostable and a bistable mode; these I have not studied.

 

Another important thing not dealt with, is the duty cycle of the pulses. Ordinarily, the 555 will produce a square wave with a duty cycle of about 50% - that is, the output is high and low for approximately the same time, as shown below.

 

50% duty cycle

 

 

However, it is easy to induce the 555 to produce a duty cycle anywhere between two or three per cent, and 95% or even more, as below.

 

very short duty cycle

 

Here, the duty cycle has been made very short, by putting a 1N4148 diode in parallel with R2 (see below). The 555 output pin (pin 3) is only high for a comparatively short time – the chip is ‘off’ for most of the time. The reason we mention this only now, is because it may be that a short duty cycle is preferable for the operation of a microstep driver such as the M335. But our video was never intended as a ‘run-down’ on the subject – we are totally unqualified, and besides, the stepper motor did all we wanted with a ~50% duty cycle. Indeed, in the first video, we fed the driver with an alternating square wave voltage and it worked fine, as it did even an alternating sine wave! This was not mentioned for simplicity’s sake.

 

Here is the basic circuit, which may be found in quite a variety of configurations online & on YT. It was drawn in Photoshop, and you can of course download it if you wish.

circuit 01 R1-R2-C

 Note that the pins are not in the correct order, but this makes it far easier to take in the circuit. Many versions omit the 10nF capacitor from pin 5 to deck; this is a decoupling capacitor, and it might as well go in as they are only 5p each if you buy 10 of them. Again, the 47µF electrolytic is also a decoupling capacitor and evens out any small variations in supply voltage, should there be any. The chip would almost certainly work just as well without it; but again, they are only 6p each in tens – depending, of course, on where you buy them! (See foot of page.) I have no idea actually how the 555 works, but the principal frequency-determining components are R1, R2 and C. R1 has less effect, as far as I can make out, but should not be less than 1000Ω. So we stuck in a 10KΩ and worked from there.

 

final circuit

In order to get a suitable range of frequencies, we jiggled around with R2 and C, ending up with the values as shown. R2 ended up as two resistors in series, one variable. Again, there is probably an optimum ratio between R2 and C. A big C and a little R2 might be worse (or better) than a little C and a big R2; but since it worked as is, we didn’t look into that.

 

final final final circuit

 

You might want to go back to a certain speed after using another; so some sort of indicator was very desirable. The above primitive approach was used. A little of the output was taken and rectified with a Germanium diode. This would charge up the 10nF capacitor on the right to a certain rather small voltage – hence the use of a Germanium diode, rather than the ubiquitous 1N4148 silicon diode. Probably a Schottky diode would be better? I don’t know. At any rate, a very little current would give a full scale reading on the meter, adjusted by the preset resistor in series with it. Unfortunately, the response is extremely non-linear:

 

meter reading vs rpm

 

Still, it’s better than nothing; and in the application for which we first lashed up this thing, we actually wanted close control at low revs, so the non-linearity was an advantage.

 

Hoping that these notes have been of some use, and the best of luck in your various projects!

 

Postscript. The total cost of the components was extremely small; the NE555s are 25p each; the 1MΩ anti-log pot was a whopping Ł1.68; the 100KΩ 20-turn preset was 37p. The resistors were 1p each and the capacitors 6 or 8p apiece. The old 100 µA meter was bought at an amateur radio rally for Ł1. It is indeed ironic, that if you wanted to make the whole thing properly, it would have to go into a box, with sockets & plugs &c., and the cost of the finished unit would far exceed that of its contents!

 

And in conclusion, if you are located in the U.K. (or indeed anywhere else), may I unreservedly recommend the supplier of electronic components &c., that I most often use myself? Their range is very large; their prices are extremely competitive; & their quick despatch is exemplary. Yes, they also accept PayPal!

 

http://www.bitsbox.co.uk/

 

 

 

Page written 12th/13th August 2016.