I would like to create a control system for my shower sump on my sailboat. It's a very simple project, but I am new to adruino so I would like to get some advice. I want to delay the activation of the discharge pump on my shower sump to avoid short cycles which are hard on the pump. And, I would like to run for a few seconds after the switch shuts off to prevent false triggers as the boat moves around. Pretty basic needs.
Here are the requirements for the project:
Reliability of the electronics in a high humidity environment
Be able to fire a 12v relay and read a switch position as either open or closed. (RLS125 Relay)
Preferably be able to run everything on 12v.
Have very low standby power so as not to drain the battery needlessly. The pump only runs a few times a day.
Be able to program from Macintosh (I believe all board can do this, but thought I would throw it in there)
I was able to find the PDF which shows the external circuit to fire a 12v relay at 500ma.
What model of Adruino board should I purchase? There are so many options it seems that I don't know which one would be most appropriate for my project. How do folks mount the external little relay components?
Thanks for any help you can provide. I am new to this development environment, so all feedback is welcome.
Hi,
DISCLAIMER: Mentioning stuff from my own shop... (But that's what I know the best...)
I would suggest an opto-isolated relay board like: THIS:
I would locate it near the existing pump wiring. I would consider spraying it with clear acrylic and maybe putting it in a plastic bag if it is an a real high humidity environment. I would power that relay board with a small 12V to 5V regulator that is dedicated to only it.
See the Arduino Power info on the ArduinoInfo.Info WIKI HERE: in particular see the part about optically isolating relays HERE:
Then I'd suggest a regular low-cost arduino board: UNO or an open-source copy like THIS:
You can over time add some functions to that Arduino and locate it near the chart table or other protected location.
BTW, the easiest to get 12V to 5V adapters today are those that have USB outputs from a "cigarettelighter" plug. You can hack one..
The Arduino can run from 12V to it's external power connector. Consider adding a couple of capacitors near to the connection to onboard 12V, like 1000uF at 35volts or more, and .1uf at 100V or more. This helps protect against voltage surges onboard, especially if the engine starter runs on that same 12V battery.
Then in that SpareOnboardTime you can write code 8)
I was doing some research and was looking at the Uno R3 board as shown here...
And this relay...
The relay you show draws 80ma. So, I believe it would be too high for an uno r3? What benefits do you receive from having an optically isolated relay versus traditional relay? Lastly, what are the standbye power for these adruino board? I'm not seeing any specs on that. I would want one with low draw if possible.
Lastly, how do people connect wires to these boards? Do they sell some sorta cables that plug into the male and female ends that you can cut and splice?
The relay you show is the same as the one I showed.
The relay you show draws 80ma.
Those relays draw that much from the 5V power supply, not from Arduino. The actual signal current to actuate the relay is about 2ma.
There is some cabling stuff on the ArduinoInfo.Info WIKI HERE:
If the relay board was powered by a separate small 5V supply driven from 12V near the shower area, then simple twisted pair wire back to the Arduino would be OK. Many people use CAT5 network cable for things like this. It has 4 pairs of wires and can carry some small power as well as signals.
Thanks Terry! Great info on the cables! I see how things work now.
So, when they say "driver current", can that be provided by the adruino boards or must you connect to a separate source of power? Or, it sounds like maybe you can do either? I guess your point is that if the board becomes too far from the relay that only the signal wire should be run?
American_Greenz:
Thanks Terry for your research! That's about .6 Amps each day (24hrs). That's not too bad.
John
If you are concerned about the power draw of the arduino you can wire up a relay to power up the Arduino based on a seperate input (say the water pump that control the shower turning on) - therefore the Arduino would only run when the shower supply was running (as an example) - i am pretty sure you would have a float switch on the sump - have that activate the relay to power up the arduino when needed (when the arduino powers up - it powers up another relay to manage its own power at that point)
Lastly have a look at some of Nick Gammons stuff - he has a series of fantastic articles on low power modes for Arduinos (most require custom boards/breadboards
I thought of that, but part of the shower sump control is to have it run 2-3 seconds after the switch shuts off. This would prevent the sloshing water from "bumping" the switch and jogging the pump.
I appreciate the link! I'll check out that material.
I thought of that, but part of the shower sump control is to have it run 2-3 seconds after the switch shuts off. This would prevent the sloshing water from "bumping" the switch and jogging the pump.
I appreciate the link! I'll check out that material.
John
Thats the secret - you have two relays - the first is powered by the switch turn on of the supply pump, this starts up the arduino, the 2nd relay is energised by the arduino itself to supply its own power, once the power goes off from the supply pump - which you sense with a simple voltage divider, then you set a countdown timer on the arduino - say 5 secs to keep the sump pump running - at the end of that - it turns off the output that is energizing the 2nd relay and shuts itself down until the cycle starts again.
You are a genius! I wasn't thinking as creatively as you. I get it now. I can have the float switch start the board and then have the board fire a relay to latch power back to itself. That should work and save me 18 amps per month idling.
If you only need the pump to run on for a few seconds, you could achieve that using a 555 timer to turn off a self-energizing relay. You could achieve the same thing using a microcontroller, but it feels like overkill for such a simple requirement.
PeterH:
If you only need the pump to run on for a few seconds, you could achieve that using a 555 timer to turn off a self-energizing relay. You could achieve the same thing using a microcontroller, but it feels like overkill for such a simple requirement.
I've tried a "delay on" relay. But, the circuit would short cycle due to water sloshing since it would only pump water until the level came down to barely disengage the switch. I also need a delay off circuit to pump the water level below the switch height so there's no pressure on the switch. I couldn't figure out a way to do that with these timer boards.
The low tech approach would be to either put some hysteresis in the float switch so that it pumped down below the 'on' threshold before it switched off, or use a timer to run the pump on for a defined period after the float switch switched off. This still seems like a problem that could be solved by a relatively simple analog circuit based on a couple of timers and a relay.
PeterH:
The low tech approach would be to either put some hysteresis in the float switch so that it pumped down below the 'on' threshold before it switched off, or use a timer to run the pump on for a defined period after the float switch switched off. This still seems like a problem that could be solved by a relatively simple analog circuit based on a couple of timers and a relay.
Dont use the float switch - use the on signal from the supply pump to energise the timer. Then set it to run for (say) 10 seconds after the supply has finished (or however long it takes to completely empty the tank) Most pumps will not have an issue with running dry for a short period of time.