Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help Needed: Designing a Long On/Off delay timer for controlling a relay

pogo44

Newbie
Joined
May 25, 2024
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
111
Hi everyone,

I'm working on my first ever circuit and PCB board for an automatic watering project that requires a long on/off time delay relay controller. I could really use some guidance from this knowledgeable community.

TL;DR: I'm working on a retro-style timer circuit using the CD4060 and NE555P. The CD4060 sets a frequency and divides it, with an output triggering and resetting the NE555. I need to ensure proper pull-down resistors and transistor interfaces to avoid false triggering and ensure reliable operation. Seeking advice on setup and improvements.

Project Overview:

Objective: To design an on/off timer circuit that can manage long on/off time delays.
Requirements:
On Time: Separately adjustable from the off time. Currently, I'm planning to set a frequency and use a binary ripple counter (CD4060) to divide it, effectively making the frequency much lower.
Off Time: Same approach as ON time.
Load: Capable of switching various voltages/currents. The relay will likely support 12V or the electric grid (230V in my case).
Accuracy: High accuracy isn't crucial, but I would like it to be repeatable. For instance, if I want an off delay of about 12 hours, I can set the approximate frequency required and select the correct output on the counter to divide it accordingly. A slight deviation of a few minutes is acceptable.
Interface: I plan to use an Excel sheet with pre-calculated capacitor/resistor values for certain frequencies. Would it be beneficial to use a potentiometer on the frequency circuit for fine adjustment?

Challenges I'm Facing:

Parts on Hand: I want to use the components I already have: NE555P, CD4060, 1/4W and 1/8W resistors, ceramic capacitors, transistors, etc. (I'll attach a photo of the labels on my component drawer. I have these parts because I enjoy fixing circuits with obviously broken/burned components.)
Avoiding Microcontrollers: I'd like to make this circuit without any microcontrollers, even though I know it would have been faster and easier.
Inexperience with Components: I have not used transistors or counters before, so I'm unsure if my current design would work. I haven't added any resistors to the transistors yet, but I know they are needed and plan to do so.
Resetting the Counter: I assume that directly connecting the output of my counter to itself to reset its count might cause issues and uncertainty. How would you go about fixing this? Should I use some sort of delay or an additional IC?
Any suggestions, schematics, or references to similar projects would be greatly appreciated. Thank you in advance for your help!


I CAN'T ADD PICTURES INTO THE POST, SO I WILL NAME THEM ACCORDINGLY IN THIS SHARE LINK
Link with pictures

Also, here is the KiCad project if it helps.
I tried to simulate it but was unsuccessful .
https://sf.solcloud.eu/d/9d19586b20d444fd948f/


Detailed Circuit Information:

Part 1: CD4060 Configuration





I'm using the CD4060 with the built-in oscillator to preset a frequency based on the amount of time I want the circuit to output the ON/OFF signal. The frequency is set with the RC part, and it requires a second resistor for reasons I haven't really looked into yet.

Once the frequency is set, it goes through the binary counter where I can divide it by choosing an output pin using the switch.

  • Issue: I directly connected the Qn output to the CLR pin to reset the count. I think I still need to add a pull-down resistor to prevent false triggering of the reset pin. Is this correct?
  • Uncertainty: I don't know whether the output Qn can even trigger its own CLR pin. In addition to triggering the clearing of the count, I want to use this momentary signal to trigger the NE555P in bistable mode to turn on its output with the help of a transistor.
  • Doubt: How could a logic signal possibly trigger a transistor? Should I be using an op-amp?



Part 2: Triggering the NE555




In this part, I'm trying to use the previously mentioned counter signal to pull the TR pin on the 555 low to trigger it. I'll ignore what this does to the ON part of the circuit until later on in the post.

  • AND Logic: Because I'm using the same signal that triggers the 555 to clear the counter, the AND circuit works as intended and only recognizes the 555 signal for now.
  • Cycle: After another cycle, we should get another signal from the counter, which should trigger the other transistor in the AND logic, sending a reset signal to the 555 timer.

Part 3: Tandem NE555 Timers



For the tandem part of the 555, once one of the 555s is triggered when the circuit is turned on while one of the physical buttons is held:

  • Output: The output turns on, sending power to the other 555 reset pin transistor and should be disabled for the duration of the first 555's cycle.






Summary and Key Points:

  • Pull-Down Resistor: Add a pull-down resistor to the CLR pin of the CD4060 to prevent false resets.
  • Transistor Interface: Use transistors to interface the CD4060 outputs with the NE555 timer’s TR and RST pins for reliable operation.
  • Debouncing and Filtering: Use capacitors to filter any noise from the CD4060 outputs before they trigger the NE555 timers.
I appreciate any feedback on whether this approach is correct and if there are any improvements I can make. Thanks!

Best regards,

Nik

[MODERATOR ACTION]
Embeeded external hosted project files into this thread
 

Attachments

  • forum post pictures.zip
    4.8 MB · Views: 32
  • timer.zip
    1.7 MB · Views: 37
Last edited by a moderator:
Yes I saw an article recommending to do long timing periods on a 555 with the help of the 4020/4040/4060 family of counters. Since you have oscillations in the 4060, it eliminates need for a separate timer IC (555).

While developing your circuit you don't want to watch for 12 hours to see if it operates. To start out you can choose a fast oscillation rate, then locate the output or outputs that divide the frequency by 2 enough times to perform as you desire. Reduce oscillation frequency at the same time you test On-Off times until you're confident it works as desired for 24-hour cycles.

A cheap easy way to calibrate the system each day is by a photosensor detecting sunrise or sunset.
 
Last edited:
Yes I saw an article recommending to do long timing periods on a 555 with the help of the 4020/4040/4060 family of counters. Since you have oscillations in the 4060, it eliminates need for a separate timer IC (555).

While developing your circuit you don't want to watch for 12 hours to see if it operates. To start out you can choose a fast oscillation rate, then locate the output or outputs that divide the frequency by 2 enough times to perform as you desire. Reduce oscillation frequency at the same time you test On-Off times until you're confident it works as desired for 24-hour cycles.

A cheap easy way to calibrate the system each day is by a photosensor detecting sunrise or sunset.

Using the 4060 for Long Timing Periods​

I agree that using the 4060 eliminates the need for a separate timer IC like the 555. Leveraging the built-in oscillator and the counter capabilities of the 4060 simplifies the design and reduces component count. This should make the circuit more efficient and easier to manage.

Testing with Fast Oscillation Rates​

Testing the circuit with a fast oscillation rate is a great idea to avoid waiting for long periods during the development phase. By locating the output that divides the frequency appropriately, I can quickly verify the functionality. Once the circuit performs as desired with a fast rate, I can then slow down the oscillation to achieve the correct timing for a 24-hour cycle.

Calibration with a Photosensor​

Incorporating a photosensor to calibrate the system based on sunrise or sunset is an innovative and practical solution. This method can help ensure the timer stays accurate over time without manual adjustments.

Summary​

  • 4060 for Timing: I will use the 4060 for its oscillation and counting capabilities, eliminating the need for a separate 555 timer.
  • Fast Oscillation Testing: I’ll start with a fast oscillation rate to quickly verify the circuit’s functionality and adjust the frequency as needed for long-term timing.
  • Photosensor Calibration: I’ll consider using a photosensor to automatically calibrate the timer based on natural light changes, ensuring long-term accuracy.
Thank you again for the excellent advice. These tips will certainly help streamline the development process and enhance the reliability of my timer circuit.
 
I'm not sure the photosensor is a viable solution, be cautious of using it for calibration. Simply, the day/night transition occurs on different times each day of the year and light sensing alone will not take into account the prevailing weather conditions. If all you need it to know when each day passes it may be enough but I wouldn't advise using it to calibrate a timer.

Brian.
 
I vaguely recall something from the CD4000 family with an oscillator and 14 bit counter meant for this kind of stuff. Maybe that is or isn't one of the ones mentioned, is or isn't (still or ever) a thing.

But if this is about the destination and not the scenic route, consider one of the pre built little micro boards if one suits your programming abilities (timer logic Is about my speed). Much variety out there.
 
If programming is your nemesis consider this for future designs :


This can easily create years of delay, or mS as you can see at link. And you can create
sequences triggered by V or pulse width or whatever you modify block code like state
of some pins.

If you run it on a Nano board its timing accuracy << .1%. If on a 8 pin ATTINY85
w/ just internal clock and user cal +/- 1% over T and V.


Regards, Dana.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top