The 4093 is a quad NAND gate with Schmitt trigger inputs, and the 4020 is a binary counter.
The leftmost NAND gate is a cheapie square wave oscillator, with a frequency of a couple of Hz. It clocks the 4020 counter. The output of the least significant bits of the counter look like this:
With NANDing the outputs together, you can see that the upper PNP transistor will turn on when the counts are "1" and "3", while the lower one will turn on when the count is "5" and "7". Of course, the counter just recycles and counts 0 to 7 over and over, so your LEDs will keep flashing until power is removed.
And by the way, an 8-pin PIC is good for this kind of thing, too.
If this is too complex, feel free to post questions.
Thanks chris - thats just the sort of thing I am looking for although just realised that its not quite what I am after. Its really
LED1 on off on off off off off off LED2 off off off off on off on off
For the circuit above I presume it would need a 5v supply for the chip. Is it possible to alter the speed of the oscillater by adjusting the cap/resistor?
Regarding the 4020 you talk about. All the counters I have seen have Q1 but then its Q4, Q5 ...etc so you don't have Q1, Q2, Q3. Looking at the logic of the module using Q1, Q4 and Q5 would not produce the same table.
Hi, Rob. The only difference between your sequence and mine is on startup. Yours starts with LED1 ON, and mine with it OFF. Once it gets going, it's the same.
I'm afraid I was a little sloppy in relying on the 4020 pinout from memory. I mixed up the 4020 and 4040. In fact, as you said, Q1 through Q3 on the 4020 are internal, and don't have pins. You could multiply the clock rate by 8, and replace Q1 above with Q4, Q2 with Q5, and Q3 with Q6. Either that, or you could use the CD4040, or MC14040, which is what I guess I meant. Q1 thru Q3 are available on that IC.
And yes, the oscillator frequency on the 4093 is dependent on the values of R and C. As a very rough rule of thumb, the oscillation frequency will be about 1/(R * C) +/-50%. You can play with it to get it tweaked in by putting a 100K resistor in series with a 500K pot, but it seems the frequency will be somewhat temperature dependent. If you need an accurate clock frequency that's stable over time, try a 555 -- your accuracy will basically be that of the cap.
The 4017 *pin* numbers are given outside the box, and the count numbers are given inside the box. For example, when the count is 4, pin 10 will be + and LED2 will be on.
Use whatever you want to make pulses for the counter input - a 555, or the 4093 already mentioned.
You said "I am looking to build a small unit which will power some 12v LEDs." There's no such thing as 12v LEDs. Typical red LEDs are ~1.8v. What LEDs will you be using? With the circuit above, you can run red LEDs - if you are using something different like white LEDS, the 1K resistor value will need to be changed.
Any binary counter should be OK -- no problem with the 4024 if you've got it, it'll be just fine.
You might want to look at Ed's idea, too -- it will also work well, and would be less expensive if you happen to have a 555 and a few diodes in your junkbox.
His note about 12V LEDs is also worth mentioning. There are some 12V lamps that are made with LEDs, and they have built-in resistors. If you're just using a plain LED, be sure to add a series resistor.
Oh, and also make sure you put a 10K resistor in series with the 100K pot if you're using the 4093 oscillator. That will give you a 10:1 adjustment range. CMOS outputs don't like driving large capacitive loads.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.