Introduction: Auto Coffee Machine Bluetooth Arduino + Android App

Picture of Auto Coffee Machine Bluetooth Arduino + Android App

Must of us know what is to be in a rush in the morning and don't have time to wait for the machine to get hot .

In this insctruables i will show how to make automatic coffee with android and arduino.

At the end of the tutorial you will have an android app working in bluetooth to make small/large coffee

and you can even send command by voice recognition !

Step 1: What We Need:

This tutorial does not required much the main will be the coffee mahine !

-Arduino uno

- Coffee machine i used this one, bough from second hand .


-Bluetooth module hc06 (HC05 should also work)

-Relay 4 channel as i have 3 button for the machine

-Iron solder

That's it if you already have the coffee machine it will be very cheap

Step 2: Opening the Coffee Machine

Picture of Opening the Coffee Machine

Here we have the most complicated part i will advice you to check the doc of your machine.

For the one i use you just need to detach the bottom with something tiny like a screwdriver.

Step 3: Soldering

Picture of Soldering

Now that the machine is open we gonna solder 2 cable under each button and connect it to the relay.

If you use an old coffee with one button it's the same process just use one channel relay.

Step 4: Arduino Side

Picture of Arduino Side

In this part we see of to connect the bluetooth module with arduino and the relay

The connection between the relay and arduino are:

IN1: None

IN2: PIN 11 small coffee

IN3: PIN 10 turn on machine

IN4: PIN 9 Big coffee


VCC= 5v




Step 5: The Code:

The code is simple it initiate a bluetooth connection then

If you send value 1 you make small coffee, value 2 big cofee

When you upload the code disconnect the bluetooth (remove the 5v wire) otherwise you will get error

For some reason when I put HIGH it turn off the relay , so if you have problems just try to inverse HIGH and LOW.

then a button is pressed to make the coffee and the machine turn off

check the code comment

<p>char junk;<br>String inputString="";</p><p>void setup()                    // run once, when the sketch starts
 Serial.begin(9600);            // set the baud rate to 9600, same should be of your Serial Monitor
 pinMode(10, OUTPUT);
  pinMode(9, OUTPUT);
 pinMode(11, OUTPUT);
}</p><p>void loop()
      char inChar = (char); //read the input
      inputString += inChar;        //make a string of the characters coming on serial
    while (Serial.available() > 0)  
    { junk = ; }      // clear the serial buffer
    if(inputString == "1"){         //in case of '1'
            digitalWrite(10, LOW);    //turn on machine
      digitalWrite(10, HIGH);
      delay(120000);                   //time to heat up 2mn (milli)
      digitalWrite(9, LOW);
      digitalWrite(9, HIGH);           //big coffee
      delay(30000);                      //coffee comes out
      digitalWrite(10, LOW);        //turn off machine
      digitalWrite(10, HIGH);  
    }else if(inputString == "2"){   //incase of '2'
      digitalWrite(10, LOW);          //turn on machine
      digitalWrite(10, HIGH);
      delay(120000);                        //time to heat up 2mn (milli)
      digitalWrite(11, LOW);
      digitalWrite(11, HIGH);          //small coffee
      delay(30000);                         //coffee comes out
      digitalWrite(10, LOW);           //turn off machine
      digitalWrite(10, HIGH);
    inputString = "";

Step 6: APP Inventor Android

Picture of APP Inventor Android

In order to control our coffee machine with our phone, we will create an app with MIT app inventor .

Only requirement a gmail acoount.

You can upload my app and modify it in the app inventor it is very easy to use but i will advice to check some tutorial before.

I add voice recognition so if you say "coffee" it will give you a big coffee

To be able to install the app you have to go to your phone setting (in security) allow unknown sources.

Important :

To send value from the bluetooth i used the object "send text" so it will send the number 1 or 2.

You can also use the "send byte number" but it use ASCII so in order to send 1 to the arduino you need to send the value 49

Pay attention to the difference .

Step 7: Conclusion

We are done !

We can now control our coffee machine with bluetooth. I am not very good in design so forgive me my coffee machine look bad but you can easily make a small box for the arduino and the relay to fit properly

In the future i will update the tutorial with a conveyor belt could be nice to be sure the cup is not missing !

Let me know if you have any idea of improvement .

If you liked this instrucable please vote !


About This Instructable




More by Thomas sxt:IOT Farm + Timelapse Cayenne Arduino/RaspberryCocktail Machine With GUI RaspberryAuto Coffee machine bluetooth arduino + android app
Add instructable to: