Hi... This seems like one of those basic electronics questions, but no matter how much I read articles on the web, I just can't sort it out.
I have a 12V 6W solenoid valve Info, and a float switch spec sheet. According to a warning from the switch manufacturer, "The magnetic reeds enclosed in our liquid level sensors are extremely reliable and long-lasting when utilized properly. Failures are nearly always a result of current overloading. Pumps, solenoids and many other devices that require control by a liquid level sensor carry "steady state" current ratings. These devices can draw ten times (or more) their steady state power ratings on start-up or shut-down. When the reeds inside our switches are exposed to this kind of "spiking voltage" they can overheat and become deformed. In some cases they may even weld together or break off, causing the switch circuit to remain closed (or open) regardless of the level of the float. Deformed reeds can also function intermittently, causing problems with troubleshooting. A 50 watt float switch can be destroyed by a pump rated at 6 watts and, unfortunately, it may take many cycles before the failure occurs."
It says to use relays, but I don't have a relay handy. I do have transistors, though, specifically MJE3055T and MJE2955T power transistors, so I thought I'd try to get it to work with that.
The first thing I notice is that the Vebo is 5V. Does that mean I should divide the voltage before even it gets into the base?
And then, I just can't make heads or tails out of calculating the base resistor. I'm hoping someone here might be able to help.
Ok, now I realized that my switch logic is inverted. I actually want the valve to open with the switch is open. So I modified the circuit you suggest as follows:
Connected +5V --> 220 ohms --> base
Connected ground --> float switch --> base
This seems to work, and makes sense to me, but I wanted to make sure I'm not doing something Very Bad(tm).
It's not Very Bad. The question is what is most common: float switch is closed or float switch is open? If the float switch is closed 99% of the time then you are wasting current through the path 5V --> 220 ohms --> float switch closed --> ground. As long as you don't mind wasting this current then it's OK.
RuggedCircuits:
The question is what is most common: float switch is closed or float switch is open? If the float switch is closed 99% of the time then you are wasting current
The float switch is mounted so it's normally closed. Measuring the current, I am using 8mA normally, which is the quiescent current of the voltage regulator I have in there producing the 5V for the base. Although I should probably go figure out a voltage divider, which can't be too hard.
The idea here is that the water keeps the switch closed when the water level is high enough, and then when it dips down, it engages the valve to provide more water.
I seem to remember reading your float valve's spec that you can just reverse normally-open vs. normally-closed just by mounting the unit upside down. Just a thought...
--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected