Repeating Timer Design Problem

Thread Starter

Vicente Rodrigues

Joined May 5, 2016
22
Hello, i have being working in a design to create a repeating timer with variable time for my aquarium. What i want is an analog timer where i can set a different time spam on T1 and a locked T2. The times can vary from 0-180sec for T1 and 15-30Min to T2.
I want to implement a model of aquaponic´s filtering system in my aquarium to manage some experiments with flow and dirt removal/clogging.

My design so far is based in 3 Cmos: 4020, 4093, 555.
I thought to use a 4093 as a Monostrable timer for T1. 555 for a multivrator to generate a pulse for 4020 which will set T2. In this scenario the Monostable timer can be adjusted with the help of a potentiometer to set T1 independently of T2. One future idea is to change 4020 with 4060 so I could get rid of 555. The problem I am facing with this is that my monostable timer first set does not fully charge the capacitor, so only in the second cycle the T1 timer actually have a steady timing. Also, I am not sure why but in my Proteus simulation the state of my 3rd Nand gate gets grey, leading to a indefinite state in 4020 reset and the start of counting before the end of T1, this occurs only in first cycle.

This can be set very easily with a microcontroller, but for sake of parts and knowledge i want to try to make this with analog. Also, managing analog real-time time set with microcontroller can be tricky with potentiometer, which would lead to a complex case of HMI.

Yes, i have seen thehttp://www.zen22142.zen.co.uk/schematics, but believe me, the ones that could work for me just did not work in my proto board. I am not sure why. For instance,http://www.zen22142.zen.co.uk/ronj/rt7.html, could have made this very simple, but i tried with 4093 and could not make it to work no matter how hard i tried. Also i could not simulate this in Proteus, maybe because the capacitance limit of Proteus.

If you have any ideas on design or directions I would thank you from the bottom of my heart. Seriously, I have spent too much time in this project so far, and it became personal, haha.
 

Attachments

MaxHeadRoom

Joined Jul 18, 2013
30,562
Also, managing analog real-time time set with microcontroller can be tricky with potentiometer, which would lead to a complex case of HMI.
.
With a μp it should be a simple task, also a digital clock and also it could be a small key pad input rather than pot for time and possibly a display of time?
But there is normally no problem inputting a pot into a μp.
Max.
 

Alec_t

Joined Sep 17, 2013
15,105
Welcome to AAC!
Can you clarify: you want a repeating timer with a period T2, during which the output is 'on' (logic high) for time T1?
I don't think much of that linked circuit. I tried an LTspice sim of it and it seems flakey. There are better/simpler circuits.
The problem I am facing with this is that my monostable timer first set does not fully charge the capacitor, so only in the second cycle the T1 timer actually have a steady timing.
I wouldn't have thought that matters for an aquarium application? It's a feature of many timing circuits when a cap has to charge initially from zero volts.
 

Thread Starter

Vicente Rodrigues

Joined May 5, 2016
22
Thank you very much for your replies.

First, as i stated a microcontroller would involve extra stuff and i don´t want to use them now.

Second: The application can be described like that: Repeating cycle timer. T1 (time relay ON) that varies from 0-180 sec. T2 (Relay OFF) for 15 or 30 minutes. The idea is to control the quantity of water that will get elevated from the aquarium to the aquaponic growing bed with enough flexibility to change overtime the amount of water i need to displace. What happens is that the mechanics of aquaponics in this scale are sensitive so i want to tune the stuff as i can experiment. As i already have Cmos I’m heading this way.

Best regards,
 

Alec_t

Joined Sep 17, 2013
15,105
180 secs is a bit of a stretch for a simple RC circuit if you want consistent timing, because you need high resistor and capacitor values. A high value cap may have significant leakage current, comparable to the charging current. Personally, I'd use a respective 4020 or 4060 to define both T1 and T2, clocked by respective single-gate 4093-based oscillators.
 

Thread Starter

Vicente Rodrigues

Joined May 5, 2016
22
That´s a good idea Alec_t, will try it out and repost. Just one question, how will i trigger the first to start counting? I mean, maybe i may need more stuff just to set the first 4020 or 4060 that will start the T1 instead of T2. Well aiway, will try that in Proteus.
 

Thread Starter

Vicente Rodrigues

Joined May 5, 2016
22
Hi, well i tried for some two hours but i could not resolve the logic´s. It seems that is not possible to interrupt one counter as the other starts and then repeat the cycle. Any ideas?
 

Attachments

Thread Starter

Vicente Rodrigues

Joined May 5, 2016
22
So, i did a prototype: Two 4060 with RC oscillators. Works great, i just can make my head around the oscillator math. I´m using Hz=1/(R*C*2.4) and divide by the 4060 counters, but i the results do not confirm with the prototype. Example, i´m using 0.43u C and a 1.06M R to get a 8.3 hz and divide by the greatest counter in 4060 (16384), and i get in reallity 14.99 minutes, not the suposed 32min. Any ideas?
 

Thread Starter

Vicente Rodrigues

Joined May 5, 2016
22
Thanks for the reply.

Well, i dont have an osciloscope. What i do have is an arduino based system to track the on/off-time. So i´m making my calculations based on the math and trial and error. So let´s clear up. My english is little rusty.

My set-up now is 0.43u C and a 1.06M R. With this setup i should have 8.3Hz -by the above math- and this frequency divided by 16384 is around 32minutes.

Istead i´m getting 15minutes (actually 14.99).

I´m thinking the problem is the Hz=1/(R*C*2.4) formula. As i have looked around it maybe that this is not the correct one for this kind of oscillator, so i´m asking. (maybe this formula only works with NAND gate oscillators.)
 

dl324

Joined Mar 30, 2015
18,221
The latest schematic shows a CD4093 being used for an oscillator. Oscillator frequency is dependent on VCC, VT+, and VT-.
Hi, i saw f ≈ 1 / 2.2 * R1 *CX at VCC = 10V
You saw this and changed 2.2 to 2.4??
I have a vcc of 12

I´m not sure how to make this calculation, could you please explain
You just plug in values and do the math. Unfortunately, threshold voltages are only given for VCC=5,10,15V and there are min/typical/max values so there will be a range of frequencies possible. You also need to consider the tolerance of the R and C.
 

dl324

Joined Mar 30, 2015
18,221
Wow, that´s some complicated math for me, haha.
The formula is already derived. You just need to plug in the appropriate values.
I think i will just put a zener diode and work with 10V.
You could try scaling the 10V values. It requires trial and error to get a specific frequency. If you don't have an oscilloscope or frequency counter, you need to devise some other way to measure frequency; e.g. dividing the frequency until you get to something you can time with whatever you have available.
 
Top