[SOLVED] Very low frequency oscillator / timer

Status
Not open for further replies.

qbone

Member level 3
Joined
Jun 2, 2009
Messages
58
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Lyngby, Denmark
Activity points
1,778
Help - Very low frequency oscillator / timer (<1Hz)

Hey guys.
I need to make oscillator / timer that toggles a relay every 5 sec, so that would make it 0,2Hz
I feel I have searched high and low for a solution, but I just can't get any of them to work properly, either they dont oscillate/toggle or they are oscillating too fast - like never under 1Hz.
I have tried the design with an astable made from a 555, but I got really inconsistent timings from that, it was like 6 sec HI, 3 sec LO, 8 sec HI, 9 sec LO, 3 sec HI, 5 sec LO - Just really random it seemed.
Then I moved on to try making the circuit with an astable multivibrator made from two BC547, but that either stalled or oscillated way to fast, same did the relaxation oscillator made from 74HC04 and 74HC132.

Maybe it all comes down to me choosing the wrong values, but if someone could help me out, it would be very much appreciated!

- - - Updated - - -

Oh yeah, because it need to toggle a relay every 5 sec, I need a 50% Duty cycle
 

You are using the wrong values, it should be quite easy to do. It sounds like you are tryig to get an equal on and off period, the easiest way to do this is to use a flip-flop circuit. This is a circuit that changes state on each (going high or going low) edge in the waveform you feed it. So if you make the oscillator twice the frequency you need, that is 0.4Hz, using a 555 or a transistor multivibrator, then use it to clock D-Type flip-flop with its -Q output linked to it's D input, it will give an exact square wave at 0.2Hz out.

There is another alternative, you can use a cheap microprocessor such as a PIC10F200 and make the timer in software. This is a one component solution because these devices have built in oscillators which are factory calibrated for accuracy. You can make a 5 second timer accurate to a few seconds per day for the same cost as a few resistors.

Brian.
 
betwixt proposed good solutions, cheper and easily available.
why are you going to difficult qbone.

- - - Updated - - -

if you are not familiar with PIC you can use any other smaller version controller
 

Oh how I wish I could use a PIC, but I dont have a programmer

I tried making the circuit with this design: **broken link removed** and got it working, except, the charge time is so slow that it have a "limbo" state or how to call it.

Your design idea is great betwixt, I did consider this, but wanted a design that didnt require much space (like two ICs), but thats the best way to go about it it seems.
 

I have tried the circuit you suggest Betwixt, but I am getting some erratic behavious from the LM555.. It's output pulse arent ocnsistent and its screwing a little with the flipflop.
The values I have chosen are: RA = 118kΩ and RB = 23,7kΩ (Both 1% resistors), and C = 22uF (Tantalum).
Should any of those values cause problem?
The design is straight from page 7 on Nationals datasheet.

- - - Updated - - -

It seems the erratic behaviour is cause by the Flip flop, I am getting short extra pulse when I connect the 555 output to the FF input, and I have no idea why ?

The FF I use is a 74HC74, I have connected Q\ to D and S and R to HI.
 

The values look good, it should oscillate at 0.396Hz.

I suspect the problem lies in the power line, do you have decoupling capacitors across the supply line and ground? You should have at least a 10uF capacitor and 100nF capacitor in parallel. The 555 is famous for for drawing fast current spikes form the supply which make it noisy for the other components if you don't use a nearby decoupling capacitor.

Brian.
 
Reactions: qbone

    qbone

    Points: 2
    Helpful Answer Positive Rating
Making very long time constants with analog SSI is difficult,
especially if you want repeatability / accuracy. The high
resistor values are subject to bias / leakage current in the
other elements, etc. Sticking to a more reasonable values
set and using a post-counter is the way to go. You can get
some pretty high single chip counts (14 bit in CD4000?) and
can cascade.
 
Reactions: qbone

    qbone

    Points: 2
    Helpful Answer Positive Rating
Usually large value capacitors are not very accurate and prone to leakage. It is hard to get a stable, predictable output over time and temperature.

I suggest you use something like CD4060 or 74HC4060. This is a very common IC with a built-in oscillator and several counter stages. You can use ceramic capacitors to tune your frequency (much higher than you need, since ceramic capacitors usally don't have large values but are very stable and reliable) and then take your output from one of the last counter stages.
 
Reactions: qbone

    qbone

    Points: 2
    Helpful Answer Positive Rating
I would still opt for a 10F200 micro. It has only 8 pins, a built-in precision oscillator and can drive much higher output current than a 4046. You even get three spare pins for other uses, perhaps different frequencies, a reset, a 'hold' or similar funtions. Cost is only about 0.5 Euros.

Brian.

- - - Updated - - -

I would still opt for a 10F200 micro. It has only 8 pins, a built-in precision oscillator and can drive much higher output current than a 4046. You even get three spare pins for other uses, perhaps different frequencies, a reset, a 'hold' or similar funtions. Cost is only about 0.5 Euros.

Brian.
 
Reactions: qbone

    qbone

    Points: 2
    Helpful Answer Positive Rating
Yeah, we persuaded the boss to invest in a pic programmer, we have ordered the Olimex PIC-MCP-USB, it lookes to be pretty decent and support alot of different types of pic processors, so we also ordered 10x PIC10F220 (Just for the extra options).

Thanks alot for your help
 

555 timers are for hobbyists. and with very low freq, as stated above requires more expensive caps ( read low leakage)
You can use line freq, signal 50 or 60Hz and count down by 1024 with a 10 bit counter or 0.05 /0.06Hz respectively.

Or watch xtal oscillator and counter to get any /2 ratio in your range.

or use your 555 timer if you must.... and choose 0.5Hz and 2^N counter to determine clock and binary counter part.

Or for $4 get it all in a 8 pin DIP https://www.intersil.com/content/dam/Intersil/documents/fn28/fn2866.pdf (design timer from uS to days...per square wave.

For 50 cents you can choose any "ripple counter" with 10 ,12 or 14 stages to reduce clock from any hex inverter RC clock or use ceramic, crystal tuning ,fork watch smd part for pennies and get more accuracy. so 14 stage, N = 16384 cycles so 0.5Hz input clock needs to be 16384 * 0.5Hz = 8192 Hz.

https://www.digikey.ca/scripts/dksearch/dksus.dll?vendor=0&keywords=ripple+counter pick anyone in stock. 4020 or 4040 are cheap & dirty. but practically obsolete if you can program anything. Time well wasted... I mean spent learning uC tools to make better products.
 
Last edited:
Reactions: qbone

    qbone

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…