Cat fountain pump control - looking for advice

Hi All,

I have a water fountain for my cat (fountain pictured below) which I would like to control via either a simple pressure mat, a cat-friendly switch, or an Arduino. I'm familiar with Arduinos but have pretty limited knowledge of electronics, so I'd like to take this as an opportunity to learn.

Fountain

The fountain has a simple 12V water pump which simply sits at the bottom center and is mechanically attached via rubber suckers.

A cable then exits the fountain assembly and terminates in a male barrel jack which plugs into a 240v > 12v adapter with a female barrel connector.

Arduino control

In the case of Arduino control I'm presuming I would need a relay (happily I have a few of these Sparkfun relay PCBs built up). However I'm not sure what's the most efficient way to wire everything up; presumably the neatest thing would be to power the Arduino and the fountain via the 12V supply. Either that or power the Arduino via battery but let's go with mains > 12V for now.

In my head I am taking a male 'generic power supply' adapter like those seen on the left here:

and soldering two cables to that (before shrink wrapping them), and connecting these to some kind of circuit board/breadboard.

Then I am tapping off the 12V rail once for the Arduino voltage in and once for the pump (via the relay). Ground goes to a generic ground rail that will be used for the whole board (right?).

Great so now I have power to my Arduino but the pump is dead.

I need to wire the relay's ground to my ground rail, and the Arduino's 5V output to the relay's VIN.

Then I need to wire an Arduino logical output to the relay's 'controller' in.

So my question is: is it safe to connect the relay's (5V) ground connection, and the pump's (12V) ground connection to the same rail, or do I need to have some kind of protection in there?

That's the only question I can think of for that scenario. Presumably the only other thing is whatever sensor I use to detect the cat which could be IR or pressure mat or motion sensor or whatever.

I know an Arduino is probably overkill here (and I really can't afford more gear) but it would be nice to know how much the cat drinks each day and / or control the thing remotely to encourage her to come near it and drink.

(btw at the bottom of this post I have a screenshot of what I currently imaging the layout/circuit diagram would look like for this).

Switch control

But for argument's sake, what would I need to make this with the bare minimum parts? Presumably the most basic thing would be an insulated pressure mat switch that closes the 12v connection when the cat steps on it? How would I add a delay to it (maybe put a capacitor after the switch?)?

Any and all advice welcome and appreciated :slight_smile:

The fountain:

The PSU:

The Sparkfun relay PCB:

A sketch of what I think this would look like in Fritzing (my first time doing this so be gentle!)

I am not quite sure where you plan on getting your Vin for the Arduino. It looks like it is from the same supply as the motor which would burn the processor.

The Uno board can take 12V. It has an onboard voltage regulator but that is via the barrel jack not Vin which has to be 5 V.

Apart from that, is the PSU for the cat fountain 12 V DC smoothed? If not power your Uno from something else.

If in fact the 12V PSU is only being used to drive the motor via the relay that is OK.

You relay board probably runs on 5V, though the coil on the relay may use more power than is available from the Uno hence the transistor on the board.

The ground of the Uno and the relay board need to be connected.

Low voltage pir relay should do everything.

http://www.ebay.com.au/itm/PIR-Detector-Motion-Sensor-Wired-for-Burglar-Alarm-System-Home-Securtity-12V-DC-/370959272329?pt=AU_Home_Personal_Security&hash=item565ee54989

Thanks for the answers! Missed them at first as I didn't have notifications on.

I am not quite sure where you plan on getting your Vin for the Arduino. It looks like it is from the same supply as the motor which would burn the processor.

The Uno board can take 12V. It has an onboard voltage regulator but that is via the barrel jack not Vin which has to be 5 V.

Sorry that was actually meant to be going into the Uno's barrel jack but Fritzing doesn't let you connect a wire to that.

Otherwise I was going to use a step down voltage regulator?

Apart from that, is the PSU for the cat fountain 12 V DC smoothed? If not power your Uno from something else.

This I don't know but will check.

If in fact the 12V PSU is only being used to drive the motor via the relay that is OK.

If say I put a VREG in series with the 12V input to the Arduino, and connected them to the same ground, would that work?

bluejets:
Low voltage pir relay should do everything.

http://www.ebay.com.au/itm/PIR-Detector-Motion-Sensor-Wired-for-Burglar-Alarm-System-Home-Securtity-12V-DC-/370959272329?pt=AU_Home_Personal_Security&hash=item565ee54989

Thanks! I may well end up just doing that :slight_smile:

Hallo!

The Uno board can take 12V. It has an onboard voltage regulator but that is via the barrel jack not Vin which has to be 5 V.

Please note, that this is not true.
The Vin has the voltage regulator too.
The difference between the input via barrel jack and Vin is: The barrel jack has a diode in series. This is some kind of reverse-voltage protection (the "Vin" does not have this).

If you connect 5 Volts to Vin your board may not work properly because the voltage regulator "wants" 6 to 7 V minimum to be able to regulate to 5 V.
You can connect 5 V (only) to the pin labeled "5 V".

Udo

double check the relay. it looks like you are connecting the NO to the motor and the NC to the power supply and leaving COM unconnected.

uxomm:
Hallo!

Please note, that this is not true.
The Vin has the voltage regulator too.
The difference between the input via barrel jack and Vin is: The barrel jack has a diode in series. This is some kind of reverse-voltage protection (the "Vin" does not have this).

If you connect 5 Volts to Vin your board may not work properly because the voltage regulator "wants" 6 to 7 V minimum to be able to regulate to 5 V.
You can connect 5 V (only) to the pin labeled "5 V".

Udo

Ok so I if I understand I can power the Arduino with 12V via the pin (as long as my PSU is smoothed DC?).

dave-in-nj:
double check the relay. it looks like you are connecting the NO to the motor and the NC to the power supply and leaving COM unconnected.

So am I right in thinking I need to swap the wires I have connected to NO & NC?

And if I understand you right, I should have my Arduino 'control' signal connected to the left-most connection on the Relay (in the breadboard-style image)? But in that case what would I connect to Coil 1 & Coil 2? I figured if I used the arduino/switch to apply 5V to one side of the coil, and attach the other to ground, I can control it that way?

On the power, if you connect to Vin or barrel jack, you can use 12V but it does need to be DC (it need not be for the motor) and it could do with some kind of smoothing.

The motor may put spikes in the line. You could get around that with a smoothing capacitor and a flyback diode on the motor.