ARDUINO > ARDUINO PROJECT 3. HOW TO USE BUTTONS, LEDS AND EEPROM WITH ARDUINO
ARDUINO PROJECT 3. HOW TO USE BUTTONS, LEDS AND EEPROM WITH ARDUINO PDF Print E-mail
(1 vote, average: 5.00 out of 5)

Arduino LogoI made this rather simple circuit to give some coding guidance to a friend starting with Arduino. It is a part of a more complex project he want to make that controls the fill up and level of multiple water tank network placed at various places in a building. Basically this little project demostrates how to use push buttons as inputs, LEDs as outputs, eeprom storage and conditional commands.

So this little prototype does the following:

- Indicates 3 water levels  (min-mid-max) using 3 LEDs. (Normally an LCD display is used).

- To read the level there are 3 buttons. One for each level. (Normally you would use a magnetic floating element that activates 3 reed  sensors.
The floater should terminate its travel in front of min and max reed sensor).

- When MAX level is reached pump signal (led pin 13) is deactivated. Water pump is reactivated when water drops back to MID level.

- The circuit also features an Auto/Manual operation button and each corresponding warning light LED.
At AUTO mode the pump stops when maximum water level is reached. Warning LED is off.
At MANUAL mode the maximum level check is overridden and the water pump keeps working. Warning LED is ON.
AUTO/MAN status can be toggled at any water level.

Bellow you can see the circuit I made on breadboard recreated visually with the help of the very nice and helpful Fritzing project.

Circuit on breadboard with Fritzing

Here is the video of the circuit above in real operation.

Download code

 

Add your comment

Your name:
Subject:
Comment:

Anti-spam: complete the taskJoomla CAPTCHA
Comments (7)
great vid
7Saturday, 05 April 2014 13:19
pj
Great Video and interesting subject. I am hoping to do the same soon. I am still in the design stage (I am up to design number 3 !) for 3 tanks and a sump filter.
I am going to have water-top-level-sensors, water-bottom-level-sensors, water-temperatur-sensors and hygrometer-sensors (to see if my plants are too dry).
I am going to have 5 pumps and two mixer-pumps.
I think I might have a RPi and an arduino MEGA and an external Eeprom, not 100% sure yet.
Thanks
pj
Reply to Peter South
6Sunday, 15 December 2013 19:18
George Mentzikof
You will have to invert the output logic for the pump pin (where 0 to 1 and opposite). Study the code and you will find it yourself.
Reply to Andrew Don
5Sunday, 15 December 2013 19:08
George Mentzikof
If the logic suites you I bet you can. You would need a AC load driver shield to connect to output pin to drive the pump on off. That would be with relay or solid state relay.Be careful with AC voltage and amberes of the pump you are going to drive to select proper shield! WARNING AC HIGH VOLTAGE KILLS! MAKE SURE TO TAKE ALL PRECAUTIONS AND ASK HELP FROM A EXPERIENCED TECHNICIAN IF YOU HAVE ANY DOUBTS.
Code
4Friday, 13 December 2013 22:56
George Mentzikof
Can I change this code to drive my sump pump when the water level reach to max level?
sump
3Tuesday, 10 December 2013 07:43
George Mentzikof
Can I use this for sump pump controller?
Reply to Shanen
2Sunday, 17 November 2013 20:40
George Mentzikof
The file is compressed with 7zip. Decompress and use Arduino IDE to read it, although you can open it as text also...
Pump LEDs and EEPROM for Arduino
1Saturday, 16 November 2013 23:22
George Mentzikof
Hi, I loved this project! I downloaded the code but can't open it. Can you email me a text version please? Thank you so much shahen90065@yahoo.com
What do you want from my site?