Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: Noob in need of help! (Weekly alarm)  (Read 2208 times)

0 Members and 1 Guest are viewing this topic.

Plecc

  • Guest
Noob in need of help! (Weekly alarm)
« on: February 02, 2010, 12:30:44 PM »
Hi all,

I'm in the process of building a type of water filter known as an algae scrubber, for my aquarium.
and would like to create a small circuit to indicate when cleaning is required.
I have good soldering skills and can etch my own PCB's but have a very limited knowledge of electronics.

Ideally i would like a circuit that runs on a pair of AA's or a 9v cell, with a slow blinking green LED to indicate activity and sufficient power.
A constant red LED that is illuminated every 7 days to indicate required maintenance.
And a reset switch, to reset the sequence after maintenance.

Any ideas how i could create this circuit?

Thanks,
Plecc.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Noob in need of help! (Weekly alarm)
« Reply #1 on: February 02, 2010, 20:10:28 PM »
Hi plecc,

Recently, chriswms had design an 8-hours delay (4 hours ON and 4 hours OFF). Look here, it will help you: http://pcbheaven.com/forum/index.php?topic=745.0. He wanted to have accuracy so he used a crystal oscillator.
I would not suggest to use a crystal oscillator even if you need A LOT of divisions. Let me give you an example:

The 7 days are: 60*60*24*7 = 604800 seconds.

You make an 1Hz (approximately) oscillator with the 555 timer. The output of the 555 (pin 3) goes to the first 4060 binary counter. The Q14 of this counter, will be low for 213 seconds, and high for 213 seconds, this means 8192 seconds low and 8192 seconds high. You want 604800 seconds low and then high. So, you put another 4060 to further divide this signal. From this second 4060 divider, you will use the output #6. From this output, you get 524288 seconds low and 524288 seconds high. The 524288 are 6 days, 1 hour and 360minutes (and some seconds).

Now you need an oscilloscope. You NEED to accurately set the clock from the 555 timer. If you set the oscillator at 1.15356 Hz, you will finally get the exact 7 days low/7 days high signal at the output.
For your calculations, you can convert the input frequency to seconds of delay using the formula: SEC = HZ x 219. Eg, 1.15356 x 219 = 604797.66528 seconds, (that you really need).
You can calculate the error (if the oscillator is not exactly 1.15Hz) using the same formula. If for example the oscillator is 1.2Hz (instead of 1.15): SEC= 629145.6 seconds, and that is 7 days and 6 hour.... You understand how difficult is to set. If yo can tolerate such an error, then this is a nice solution.


------- OR --------


You can have instead of the lazy 555 inaccurate timer, a crystal oscillator. The post i gave you before has some nice 2Hz timers using 32768 crystal and 4060 divider/counter (http://www.reuk.co.uk/Making-Very-Accurate-Timers.htm). This is a very VERY accurate 1Hz, as the crystal needs of no calibration and oscilloscopes like the 555. What you do then, is to connect this 2Hz signal to the circuit i described you above. Be carefull, as now you need to get the output from the second 4060 from the output #7 (and not #6 as before). The output will be low for 6 days, 1 hour and 360minutes (and some seconds) (as i described you before), but this will be ALWAYS the same, ALWAYS every this interval. This is something that the 555 cannot achieve.

You may ask me now "ok, why not using another crystal that will give me the appropriate frequency for 7 days?".
I am not sure of which crystals are sold. The 32768Hz crystal is a standard number and exists because it can be divided by powers of 2 and result into an integer. You need to do a research yourself to find something more appropriate