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.
Cheers Chris
R
Rob Convery
snip
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?
R
Rob Convery
Sorry - read it through a second time and reslised this does flash as expected. Looked at the specs for the 4039 and it looks like it does accept
12v without much problem. So the only question is about adjusting the time of the flash
R
Rob Convery
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.
Any ideas?
(Was looking at this one -
formatting link
C
Chris
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.
Here are the data sheets:
formatting link
formatting link
Good luck Chris
E
ehsjr
Use a 4017 (it's an easy to understand decade counter) and diodes, like this:
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.
Ed
J
jasen
you could, but a 555 is all you need.
connect some out-to-ground and the others +12-to-out.
Bye.
Jasen
R
Rob Convery
Thanks for all your help. Going to go with a 4.7uF cap and a 100K pot which should give me a range from 2.5Hz and up
Only query was the chip - the 4024 does what I need I think which is the 7 bit counter rather than the 4020 which is 14-bit.
C
Chris
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.
Good luck Chris
C
Chris
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.
Cheers Chris
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.