Configuring a CD4060 as a one-shot - Page 1
Forum section: electronics / projects

author: leonababy
author_rank: Regular Contributor
timestamp: April 17, 2022, 07:37:05 pm
content: I have a need for a one shot to create a 12ms pulse, every 16.67ms. Actually I need two of these, 180 degrees out of phase, meaning every 8.33 ms a 12 ms pulse is generated from each one, from two triggers that already exist. I do not need retriggering. The trigger never changes - it is a square wave with just less than a constant 50% duty cycle.I tried using an LS123 dual one shot, and had oscillation issues in a solderless breadboard setup. It would work, but only after waiting a few minutes for the oscillations on the input (B) (trigger) lines to go away. These are caused by the LS123 for reasons I do not understand. The LS123 draws 12 mA normally, and 14 mA while oscillating and waiting for it to "warm up". The rest of my circuit draws less than 1 mA, and I could not the LS123 to be reliable, so I chose to look at other one shots. The 221 and 4538 looked like candidates, but I realized I had CD4060's sitting on the shelf.I searched the internet, and could not find a similar goal of turning the 4060 into a one shot in the manner I desire. I have the 4060 working and creating the right width square wave at the output of Q8, now I just need to reset it when it hits the desired count - I need to reset it when Q8 goes high. Does the attached circuit look like it will work, putting Q8 and the input trigger into an RS flip flop? I suppose I can spend a few minutes and find out for myself, but I wanted to show what I am trying to accomplish and see what comments result.It may be another flavor of one shot would give me a dual package that works reliably and draws less power - I will have to use two 4060's, though they are low power.I should mention that I need perhaps +/-5% stability with temperature of the pulse width.Thank you in advance,Don

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2022, 07:47:49 pm
content: Another approach to stopping a CD4060 without a latch so it can be used as a one-shot is a diode from the chosen output to its /CLK pin, cathode towards /CLK. Pulsing RESET sets all outputs low, letting the oscillator and RC timing network free-run from the end of the reset pulse. When the chosen output goes high, it holds /CLK high inhibiting the oscillator and holding the output state till its next triggered.However, with the need for so much logic to generate your two delayed and timed pulses, have you considered using a low pin count MCU, and simple code in a loop to implement the required delays triggered from the squarewave edges? Just about any 8 pin PIC or AVR (and many others) could do the job in single package with minimal passives. The lowest cost of entry would be any ATtiny there's Arduino IDE support for, with an Arduino as the programmer.

author: Benta
author_rank: Super Contributor
timestamp: April 17, 2022, 08:23:47 pm
content: No need for all that. An MC14538 would solve your issue.Is this a one-off or for production?

author: leonababy
author_rank: Regular Contributor
timestamp: April 17, 2022, 11:34:58 pm
content: Thank you Ian. I noticed that some people constructed projects with such a diode, but did not stop to consider that may apply to my situation. I believe I understand the principle that you described, but I am not sure I can provide a suitable pulse at the right time.While I investigate that, can you say if you believe the latch method I showed will work? Leave it to me to choose a maximal approach. I would like to stay with discrete logic for now. I haven't coded since my 8080 days... one day I will get into the 2000s.Don

author: leonababy
author_rank: Regular Contributor
timestamp: April 17, 2022, 11:45:34 pm
content: Very limited production - five to eight units.All I have on the shelf is the LS123 and the CD4060. You appear to be of the opinion that a one shot might indeed work. There is an App Note that says something of the nature "A lot of designers complain of noise issues when using the LS123, but most of these are due to user error".I am open to buying some other one shots to try them, which I may do. I added a ceramic disc cap as the LS123 App Note suggests from Vcc to GND, and this improved performance from almost non functional to "works after 5 minutes, 99% of the time". As I said, this is on solderless breadboard. I used very short wires, tried to "star" GND. I don't know if the LS123 should work on a breadboard without noise problems. I have nothing connected to the outputs.Don

author: themadhippy
author_rank: Super Contributor
timestamp: April 18, 2022, 01:27:22 am
content: why not stay ole skool and just chuck a 4011 in

author: leonababy
author_rank: Regular Contributor
timestamp: April 18, 2022, 02:00:25 am
content: Well, I stayed old school, and there is good news and bad news. The circuit shown above worked as intended when I powered it up. It looked very stable.Except, I have a similar symptom as with the LS123 one shot - if I shut off power once it is up and running and let it sit for a minute, and repower, oscillations on the GATE signal appear. On GATE, which comes from an HCT74 flip flop, there is ringing on each falling edge of 440us which happens to be the width of a pulse that creates the GATE signal. Initially, I faulted the LS123 for "creating" the noise, but it looks almost identical with the 4060, and as is the same as the LS123 - if I wait for a few minutes it goes away and the signals become clean. These symptoms are the reason I moved away from the LS123.I may have a race condition. It is interesting that is disappears after a few minutes of operation. I thought upstream was solid prior to adding this "feature" of a custom pulse width but the symptoms are too similar and the duration of the ringing is too coincidental. My guess is the LS123 was not at fault, but rather something upstream that only shows up when a load is added. Thanks for the suggestions. Back to the drawing board.{edit} The LS123 App Note may have seen my type coming, citing the source of noise as frequently "design error"...Don

author: leonababy
author_rank: Regular Contributor
timestamp: April 18, 2022, 06:24:15 am
content: I tracked down the source of the oscillation in the circuit - it is the zero cross detector on my 120VAC mains. I changed recently from an off the shelf HCPL3700 ZCD chip to a bridge driving an optoisolator. I thought this was very stable and a nice narrow pulse compared to the chip, but it has a significant amount of jitter. There is 50+ Mhz noise on signals downstream when the problem occurs (!). So I have to go back to square one on the ZCD. That was a lot of chasing a rabbit down the hole. The LS123 might work just fine after I fix the ZCD.

author: Terry Bites
author_rank: Super Contributor
timestamp: April 18, 2022, 02:43:43 pm
content: The counter must reach your max count before you can use it as a oneshot- the count could be anywhere when power is applied something to allow for at power up.