The idea: building an automatic food (two types of food) and water dispensing system for my Guinea pig using an Arduino Mega 2560 board.

Required components:

- 1 x Arduino Mega 2560

- 1 x motor shield – I used an old version of Adafruit Motor Shield v1.2, but any other motor board will do the job as long as you can connect 2 x servo motors and 2 x stepper motors to it

- 2 x servo motor

- 2 x stepper motor

- 1 x relay

- 2 x water level sensor – I used this type http://g02.a.alicdn.com/kf/HTB1WoDUHVXXXXaaXFXXq6... but any other model will do

- 1 x RTC module – I used this type http://www.arduiner.com/2179-thickbox_default/ds1...

- 3 x big push button

- 5 x small push button

- 1 x 7 segments 4 digits LED display – I used this type http://thomas.bibby.ie/wp-content/uploads/2015/10...

- 2 x NC solenoid valve

- 1 x air suction pump

- 1 x water pump

- Soldering iron, wires, bolts and nuts, plywood, pliers, handsaw, plastic containers, etc.

Optional components:

- Silver (Ag) rods used as water level probes

- Hot glue gun

- PCB for building the Relay, RTC, water sensors, LED display and push buttons modules

- Guinea pig


UPDATE - 23.05.2016

Having tried different water bottle types and manufacturers, no matter what I did the water kept dripping, as the nozzle is not tight enough. Also, when my Guinea pigs knocked the bottle, and in turn that activated the relay, due to EMI (Electro Magnetic Impulse) interference, sometimes the Arduino board would get "confused" and feeding would activate at the wrong time. The RTC would get messed up as well, and the displayed time was wrong.

The improved version (as seen in the short video above)...

- Removed the high and low water level sensors

- Removed the mechanical relay

- Removed the water pump

- Removed the air suction pump

- Removed the manual water dispensing button

- Removed the second food dispensing button

- Added a knock (vibration) sensor - http://www.aliexpress.com/item/Free-shipping-Norma...

- Added an optical relay - http://www.aliexpress.com/snapshot/7371934648.html...

The water goes from the water tank to the bottle nozzle, with the NC solenoid valve in the middle (controlled by the optical relay). The vibration sensor will activate the optical relay which will open the solenoid valve accordingly. I had no problems with water dripping since.

Step 1:

Background information


There are two types of food I want to dispense, once a day, at a certain hour (9am by default), from some plastic containers. The Real Time Clock (RTC) module will keep the current time, which will be displayed on the LED display. If required, either food can be dispensed manually by pushing their respective button.

The food is dispensed with the help of 4 motors (2 for each type of food): 2 x stepper, 2 x servo. The motors are driven by the Adafruit Motor Board, which is supplied with 8v from a separate power adapter.


The water level (LOW level) will be checked once a day, at the same time as the feeding time. If necessary a relay will activate a valve system that will fill the water bottle up to the HIGH water level, using the water stored in a plastic container. A pushbutton will allow to manually topping up the water – up to HIGH level if button is released, or continuously and ignoring the HIGH level sensor reading while the button is being kept pressed.

The Water valve system

The water bottle works on the principle of gravity and vacuum, which will prevent the water from dripping thru the nozzle at the bottom. Therefore no air should get into the bottle thru the insertion points of the sensors or the water inlet (water pump). When the water pump is active, the existing air in the bottle should be allowed to escape at the top, so that no pressure is applied onto the nozzle forcing the water to drip. An air vacuum pump will suck the air at the top, basically creating some negative pressure which will prevent the water from dripping thru the nozzle. When the water filling is not active, two normally closed (NC) valves will make sure that no air will get into the system (1 valve on the water inlet, and 1 valve on the air outlet).

Therefore the water valve system is composed of 2 x NC valves, 1 x water pump, 1 x air suction pump, all connected to the same relay, and supplied with 12v from a separate power adapter.

<p>This is cool , but your Guinea Pig cage is too small and does not have enough ventilation. Research the cages and make your piggy one. She /He will be much happier in a big cage, then with your automatic feeder. </p>
Awesome work!!
<p>This looks really cool! Let me know when you add the rest of the information, if you would. I'm curious to see the details!</p>
<p>Hey <a href="https://www.instructables.com/member/seamster" style="">seamster</a>, thanks for your interest. Just to let you know that I've added the instructions and the code.</p>

About This Instructable




Bio: Passionate about computers and stuff :-) https://ie.linkedin.com/in/hamiltonniculescu
More by Studvio:Arduino Bluetooth (Android) Drummer Arduino GPS speedometer with a ks0108 - 128x64 GLCD (display) Arduino - Guinea Pig automatic food and water dispenser 
Add instructable to: