Coffee Machine Water Auto-Refill Upgrade

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,982 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

Automatic Coffee Machine

Project tutorial by Thomas sxt

  • 20,533 views
  • 7 comments
  • 19 respects

Connected coffee machine

Project in progress by Bert

  • 3,359 views
  • 0 comments
  • 4 respects

Motion Sensor Water Gun

Project tutorial by Team Engineering Is Easy

  • 11,896 views
  • 3 comments
  • 24 respects

Water Quality Monitoring and Notification System

Project showcase by emmanuel ani

  • 50,625 views
  • 38 comments
  • 112 respects

How To Use DS18B20 Water Proof Temperature Sensor

Project showcase by Team IoTBoys

  • 35,433 views
  • 11 comments
  • 15 respects

Water Quality Monitoring System

Project tutorial by Hao Jie Chan

  • 28,794 views
  • 35 comments
  • 59 respects
Add projectSign up / Login