# Simple Circuit - But i am stuck

Discussion in 'The Projects Forum' started by scollinguk, Oct 9, 2010.

1. ### scollinguk Thread Starter Member

Oct 9, 2010
34
0
Hi Everyone,

I have decided that it is time i start to learns how to do some basic electronics and i am (trying to) build a simple relay circuit.

This basis for it is i have a sump on my fish tank, a pump within it sends the water back up to the tank. I have a solenoid and float valve which closes the down tube if the water level gets too high and wanted to make a reverse to this so that the pump in the sump turns off if the water gets to low, but i wanted it to stay off for about 30 seconds even after the water level has gone past the float switch.

I have a circuit built at the moment which i have put below (sorry about the bad graphics, but just put it together in paint) but have found that the voltage after the capacitor is 0.74 when it is 8.8 before it.

Obviously this means that there isnt enough voltage to make the relay switch. Reading around it appears that it is normal for the cap to reduce voltage while charging but this doesnt ever seem to switch so i am not sure how to redesign the circuit to still do what i want.

Many thanks for any help you are willing to give to a newbie!

2. ### woodgoat63 New Member

Oct 9, 2010
2
0
Capacitors block DC. And you should have a free-wheeling diode across
that relay or your MOSFET soon to be history.

3. ### wayneh Expert

Sep 9, 2010
12,388
3,245
The MOSFET is backwards, S = source = ground or "-" in your circuit. And the D=Drain should be connected to the positive side, downstream of the relay, with the battery connected to the other side of the relay. That completes the "power" loop.

The Gate voltage controls the power loop, almost no current will flow thru the gate to the source. Charge the RC pair thru the switch. You don't need the diode there - the switch turns off any "backflow". When the switch goes open, the cap holds a charge on the gate until they both drain off thru the resistor and the relay will then open.

And put that diode around the relay, backwards, to protect the MOSFET from a spike when the relay current drops.

Last edited: Oct 9, 2010
4. ### marshallf3 Well-Known Member

Jul 26, 2010
2,358
201
Switch + & - terminals on the battery, switch G & S terminals on the MOSFET

5. ### scollinguk Thread Starter Member

Oct 9, 2010
34
0
Excellent, thanks guys!

I'll give it a go later on, didnt even think about reversing the flow in how to get it to work!

6. ### scollinguk Thread Starter Member

Oct 9, 2010
34
0
I just re-read all your posts and have done the below which i think matches the description but there are a few things i dont understand which means i have probably got it wrong.

My thinking is that its a complete circuit when the switch is closed but when its open the circuit isnt complete for the cap to send power through the relay? Do i need to put a line somewhere else to have a complete circuit when just the cap is powering the relay?

7. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Just to be sure we're on the same page: It appears that you want the relay to turn on when the switch closes, and turn off when it opens, after a delay. Is that correct?

8. ### scollinguk Thread Starter Member

Oct 9, 2010
34
0
Yes:

If we call the normal state of the relay 'state 1' and the state the relay when the coil is activated 'state 2'.

The relay in 'state 1' allows power to the pump in the sump, 'state 2' stops power going to the pump in the sump.

Water level gets low and closes the float switch, this completes the circuit and puts the relay into 'state 2' thus turning off the sump pump. The water (quickly) raises and the float switch closes. I would like to keep the relay in 'state 2' for a further 20-30 seconds after the float switch has turned to closed so that the water can get a bit higher then the float switch before the pump turns back on.

This is essentially to stop the possibility of the pump being turned on and off rapidly while the water level hovers around the same level as the float switch, the water level gets high quickly but low slowly so letting it get high means it will take few hours to go back down to the float switch.

This would hopefully mean that it only happens a maximum of once or twice a day and when i get home i can slow down the pump using the pumps controls.

i hope that makes a lot more sense now i have fully explained the project.

9. ### marshallf3 Well-Known Member

Jul 26, 2010
2,358
201
Still not right, the resistor needs to go between the gate and the positive side of the circuit, the source to the ground. You also don't want the cap in there as it will only let it turn on for a brief moment until the cap charges up and stops the DC flow, and I'd reduce that resistor way down to around 1 K or so.

The FET is turned on when + flows to the gate so this setup will always be on when the switch is on, put the switch in series with the gate resistor.

You also absolutely need a snubber across the relay coil. Use a rectifier that's good for 100V at 1A, cathode to the + end, - to the other end of the relay coil.

Last edited: Oct 10, 2010
10. ### marshallf3 Well-Known Member

Jul 26, 2010
2,358
201
My thinking is that its a complete circuit when the switch is closed but when its open the circuit isnt complete for the cap to send power through the relay? Do i need to put a line somewhere else to have a complete circuit when just the cap is powering the relay?

Didn't read this part. TO be honest I'm doing two other things at the moment so I'm distracted. I think I know what you're wanting to do, if I only had one of those writing tablets it would be easy enough to sketch.

11. ### scollinguk Thread Starter Member

Oct 9, 2010
34
0
Okay, so it seems like the fact i am using a battery is hindering this due to it being DC. I have looked through my box of bits and found an old US Robotics power adaptor rated at 10v AC 1000mA so i'll wire this into it.

12. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
I think you need something like this.

File size:
12 KB
Views:
38
13. ### marshallf3 Well-Known Member

Jul 26, 2010
2,358
201
No, you don't want AC, what's posted above will work with a slight delay before it turns on the relay as the capacitor charges.

14. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
The turn-on delay can be minimized by reducing the value of R3, although it will only be a few milliseconds as drawn. Relay response time will also be on the order of milliseconds. I included R3 to reduce the peak current through the switch. In retrospect, a better location for R3 would be in series with the capacitor.

15. ### wayneh Expert

Sep 9, 2010
12,388
3,245
Yup, thanks to Ron for taking the time to provide a picture of what we were trying to describe with 1000 words. He even included the 100 ohm resistor to limit the in-rush current when the switch is closed. Well done.

If you want a longer on time after the switch opens, just use a bigger cap as noted. You could even use up to a 10M resistor also if you really need a long delay. The AC idea is better forgotten. We'll pretend it never happened.

16. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
A PP3 9V battery probably won't last long in this application.

17. ### wayneh Expert

Sep 9, 2010
12,388
3,245
I think it's better where you have it, to protect the FET from the in-rush. No?

18. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Good point.

Apr 5, 2008
15,803
2,388
Hello,

@Ron H and wayneh
Would a schmit-trigger between the capacitor and FET be a good idea?
Now when the switch is opened the FET will go through a linear region (and get warm / hot).
It is uncertain when the relays will react now.

Bertus

Last edited: Oct 11, 2010
20. ### wayneh Expert

Sep 9, 2010
12,388
3,245
All true. I'm doing something similar (using an RC timer to throw a FET) but as you suggest, I run the RC voltage thru a comparator, against an arbitrary voltage reference, to control the FET at either full on or full off.

My assumptions here are that 1) the relay current is trivial compared to the FET capability, so heat is not a big concern and 2) the OP wants to keep it as simple as possible, at the risk of some inelegance. Pretty sure about #2 but it's worth validating assumption #1.

As you note, the relay response will be a bit random. This may not be a problem by itself but I can see where relay "chatter" could be a problem, as the relay sends a bouncing power signal to whatever it's controlling when it's near its switching point. A fast and sure switching would be better.