Repeating Timer Design Problem

Discussion in 'The Projects Forum' started by Vicente Pchara, May 30, 2016.

  1. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    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.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,524
    2,369
    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.
     
  3. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,791
    1,103
    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.
    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.
     
    Vicente Pchara likes this.
  4. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    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,
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,791
    1,103
    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.
     
  6. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    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.
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,791
    1,103
    I'd use the termination of the T2 count to start/reset the T1 count.
     
  8. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    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?
     
  9. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    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?
     
  10. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    *Can´t
     
  11. dannyf

    Well-Known Member

    Sep 13, 2015
    1,782
    360
    did you get the 8.3Hz.

    If you did, how did you know?

    if you didn't, what did you get?
     
  12. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    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.)
     
  13. dannyf

    Well-Known Member

    Sep 13, 2015
    1,782
    360
    Do you have the 8.3Hz signal?
     
  14. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    As i explained i dont have an osciloscope, and if i had this frequency i would have a different outcome.
     
  15. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    This is the formula from the datasheet:
    upload_2016-6-18_18-39-38.png
    What is your VCC?
     
  16. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
  17. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    The latest schematic shows a CD4093 being used for an oscillator. Oscillator frequency is dependent on VCC, VT+, and VT-.
    You saw this and changed 2.2 to 2.4??
    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.
     
  18. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
  19. Vicente Pchara

    Thread Starter New Member

    May 5, 2016
    22
    0
    Wow, that´s some complicated math for me, haha.

    I think i will just put a zener diode and work with 10V.
     
  20. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    The formula is already derived. You just need to plug in the appropriate values.
    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.
     
Loading...