Coffee Machine Water Auto-Refill Upgrade

Everybody hates it when they want the drink a cup of coffee and the water tank is empty. Here is the solution!

  • 1,015 views
  • 0 comments
  • 2 respects

Components and supplies

About this project

Everbody knows this kind of problem: you want to drink a cup of coffee and the water tank is empty!

Here is the soultion: we took some Arduino Nano boards to read in the values from the sensors and switching our relay. For more details, please refer to the code and the schematic.

I set the level to advanced because of two reasons:

1.) I opened the coffe machine to get acess to the sensor, which reads out if the tank is empty.

2.) We had to do a lot of mechanical stuff and to work with water isn't easy since you don't want any of it to leak out.

Here you can find some pictures an da video of how it looks like and how it works:

the end result!

Code

the codeC/C++
int count = 0;     
int zeit = 350;// 600 = 1min //60= 6sek/ 10 = 1sek

   
bool pumpen = 0;




void setup() {


  pinMode(10 , OUTPUT); // Relais fr Pumpe
  digitalWrite(10,0);
 // pinMode(11,OUTPUT); // Nur zum Test als VCC fr einen Schalter
  attachInterrupt(digitalPinToInterrupt(2),TankEndlage,RISING);//Schalter fr Tank entnommen?
  attachInterrupt(digitalPinToInterrupt(3),Sensor,RISING); // Sensor von der Kaffeemaschine
}


void wait()
{
  delay(100);
  count++;
}

void loop() {


  if(digitalRead(3)==1 && digitalRead(2)==0)
  {
    delay(1000);
    if(digitalRead(3)==1)
    {
       pumpen=HIGH;
    }
   
  }

  while(count<zeit && pumpen==HIGH && digitalRead(2)==LOW)
  {
    digitalWrite(10,1);
    wait();
  }
 
  //Rcksetzen wenn while nicht mehr erfllt ist
  count = 0;
  pumpen= LOW;
  digitalWrite(10,0);
 

  
  
}

//Interruptroutinen der Sensoren/Schalter
void Sensor()
{
  delay(1000);
  if (digitalRead(3)==1)
  {
      pumpen= HIGH;
  }

}

 void TankEndlage ()
{
  pumpen=LOW;
 // digitalWrite(10,0);

} 

Schematics

The schematic
I needed this much volts , because the valve for the water needed more than the +12V which where printed onto the spec.
The sensor is like mentioned before the same as the coffee machine uses.
Img e0017 g0ilxnds74

Comments

Similar projects you might like

Stringent, the $15 Wall Plotter

Project tutorial by Fredrik Stridsman

  • 13,195 views
  • 14 comments
  • 85 respects

Arduino LCD Video Game

Project tutorial by xXarduino_11Xx

  • 307 views
  • 0 comments
  • 5 respects

Cocktail Parasol

by alain_haerri

  • 3,131 views
  • 7 comments
  • 13 respects

Automated Projector Controller

Project tutorial by Kulwant singh

  • 927 views
  • 0 comments
  • 10 respects

Strandbeest Rocket Launcher [Fireworks]

Project showcase by Jeremy S. Cook

  • 1,788 views
  • 0 comments
  • 7 respects

Clean Water AI

Project tutorial by Clean Water AI

  • 5,388 views
  • 1 comment
  • 36 respects
Add projectSign up / Login