Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Complex (Sort of) timer circuit using relays...

Status
Not open for further replies.

Electric Rain

New Member
Ok... I'm having a small problem... I need to make something that will carry out some commands based on two inputs, and I've done much work on paper and in my head trying to think of a way to do it using relays.

The whole circuit needs to run on a timer, when the timer turns on, the circuit will activate. I'm going to use it in a small tank of water. I have a circuit that will work as the switches for this project. One sensor will be at the bottom of the tank, the other will be near the top. Only one wire will run from them, as the ground will be connected to the bowl itself because it will be metal. This circuit will activate a relay when the water hits the bottom sensor, and a different relay when it hits the top one.

So, I need the circuit to do this: When it turns on, if the bottom or the bottom and the top relays are active, then "Device 1" needs to activate, until the relay(s) is/are no longer active. Then, "Device 2" needs to activate then deactivate when both relays are active again. However, if when it turns on, neither relay is active, then it simply activates device 2, until both relays are active.

The relays can be SPST, SPDT, DPDT, DPST, latching, normally open, normally closed, anything they need to be. As long as they're 12V relays.

It sounds simple, but if you start trying to figure it out on paper, you're going to go... wow... shoot... wait... but if I... no... because it's not as simple as it sounds. :lol: I had some trouble with this little thing and I thought I had it at one point, 'till I went over it again and said... no...no...no...no..no..no!

I can explain it in non-electronic terms too. When the timer turns on, I need it to drain the water using a small 12V pump I found, (if there is water in it) then I need it to fill it back up using a small 12V valve I found.

Thanks for the help if anyone is going to give it. :)

Rain
 
I assume that the timer is on only long enuf to latch the relays. The top and bottom switches are both closed when the tank is full and both open when the tank is empty. Initially, both switches are closed & the tank is full. When the timer activates, RY2 activate. RY2 applies 12 volts to the coil of RY1 which causes it to latch on and start the pump. When the lower switch opens, RY1 drops out and the pump stops.

Now, when the timer activates, we want to open the valve but both switches are open. I don't know how to activate a relay with an open switch except to use a transistor. In this case, 12 volts is applied to the gate of Q1 thru RY1 and the contacts of RY4, turning it on and latching RY3. RY4 is activated also, connecting the gate to the upper switch. When the upper switch closes, the gate voltage is shorted to ground and Q1 turns off, turning off RY3 and RY4.
 

Attachments

  • relay_ckt_496.jpg
    relay_ckt_496.jpg
    25.8 KB · Views: 898
Huh... well, I'll try it out in the program I have that lets me simulate schematics with it. Not sure if it will work with a transistor, but I'll try it out some how and see how it works, then let you know. Thanks a lot for the schematic, did you hand draw that? It looks hand drawn but it looks REALLY good. The only thing that makes it look hand drawn is the blurriness around the drawing. That is what writing looks like when it's scanned. One more thing, what should the transistor be? Thanks again.

Rain

Edit: No... no it can't be hand drawn... the text is too computer-like. What is it?
 
So, even something this cheap would work? **broken link removed** :lol: Oh, one more thing... the timer is going to be one of those 24 hour timers that uses those little clips for the on and off triggers. This, https://www.allelectronics.com/cgi-bin/category.cgi?category=search&item=TMR-11&type=store is what I'll be using. So, where am I supposed to connect that in the schematic and what should the off clips be set for? Right after the on clips or do I need a delay of some kind? Thanks a lot. This should be all of the information I should need. :)

Rain
 
The 2N7000 should be OK unless you are using honking big relays. The timer is an AC switch; I assumed the timer would turn on the 12 VDC, so you will need a 120 VAC relay to turn on the 12VDC. You can set the off time right after the on time because the float switch ends the sequence. If the on time is too long, the next sequence will start.
 
Alriiiight! :) Thanks a lot Russlk. You've been a great help to me. I see nothing else I should need help with now. Thanks again. 8)

Rain

Edit: er... wait, one more thing just out of curiousity, what are the 1K pull-up resistors for in the schematic?

Edit 2: Oh yeah, couple more things. One, the switches are actually going to be relays. I have a circuit that will turn on a relay when it detects water. Float valves are too much. So, do I have to use a NC or a NO SPST relay for the switch? Two, will this circuit also work when it starts up and the lower relay is on and the upper relay is not?
 
Pump and valve control

Hi Rain,

I think this circuit may be useful.
 

Attachments

  • drawing6.gif
    drawing6.gif
    9.5 KB · Views: 918
Alright, I'll simulate this one and see how it works. Since it only uses digital parts. Thanks IRQ57. I'll let you know how it works.

Rain
 
It does help. It's a great starting point. :D But there's a couple flaws. I'm sure they can be worked out though. And, like I said, it's still a great help. :wink:

The first flaw is simply that the circuit repeats. Meaning that when both switches are closed, the pump will be on. Period. The other thing, is that when the circuit gets to the point where both switches are open, (Tank is empty) and the valve needs to turn on to let the water in, the valve shuts off as soon as the bottom switch closes. We need it to shut off when BOTH switches close. The problems in this schematic leads me to believe that I'm going to have to use latching relays. :roll: I don't know where, how, or how many... but I think with the kind of logic involved here, we have no other choice. What do you guys all think? :?

Rain
 
Pump and Valve Control

Hi Rain,

Is this circuit better?
 

Attachments

  • pump_and_valve_control.gif
    pump_and_valve_control.gif
    8.8 KB · Views: 602
Aww... thanks IRQ57. :) You didn't have to revise it like that. I'll test it and get back with you soon okay? Thanks a lot. :wink:

Rain
 
:oops: Sorry about that. I would have posted much earlier, but I've been kinda busy lately.

Anyway, I put that circuit into the program; it doesn't seem to work at all. I tried all of the switch combinations. I only got a small, quick flash of one of the LEDs. It was a while ago, so I don't remember which one or what the switch combination was. But, if you need that info, I can get back to it.

If you want, I can post the schematics so you can see that I didn't mess up. I checked it many times and see nothing wrong with the first or second circuit. But I may be missing something.

I use Circuit Maker 2000 to simulate the schematics. You can download a 30 day free trial to work with the simulation yourself.

But, I'm only saying all of this if you are going to continue to help me. If you don't want to, that's fine. I understand, it's not like you're being paid. :lol: And you're doing all of the hard work, I'm just copying your schematics and simulating them only to tell you that something's wrong... so I just want to thank you. See you. :D


Rain
 
Water Tank Level drain circuit

I found this circuit some time ago on the net. Hope it is of some use to you!
 

Attachments

  • water-1.jpg
    water-1.jpg
    11.8 KB · Views: 151
  • water-2.jpg
    water-2.jpg
    17.3 KB · Views: 135
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top