Coffee Maker Arduino
Have you ever wished you didn't have to make you're own coffee? When you get up in the morning, don't you wish the coffee maker would make coffee its self? Well now you can make that happen.
With this simple project, you can turn you're boring old Coffee maker into an automatic one.
Using a light sensor, we will be commanding our Coffee maker to make us Coffee as soon as it senses day light.
All you need is a few supplies, a coffee maker, and some wiring.
Supplies
For this project you will need the following items:
-Screw Driver
- Coffee Maker
- Alligator clips
- Hot Glue gun
For setting up you're circuit you will need:
- Breadboard
- Arduino
- Relay
- 1k Resistor
- Photo Sensor
- 13 wires
Take Apart Coffee Maker
First we will need to connect the Coffee Maker to the Arduino. To be able to do that we also need to take apart the Coffee maker and expose its breadboard. This can be done with a basic screwdriver. Uncrew certain parts of youre coffee maker so that you have access to its breadboard
Set Up the Circuit
Connect Arduino to Coffee Maker
Reasemble the Coffee Maker
Finished Product: Code:
int lightpin = A0; //this is the pin that the photo resistor reads
int lightvalue;
int threshold = 700;//if the photo resistor reads this value it will turn on the coffee maker
int CM = 13;//this is the pin for the relay
void setup()
// put your setup code here, to run once:
{ Serial.begin(9600);//tells the serial moniter what frequency to read it at
}
void loop()
// put your main code here, to run repeatedly:
{
lightvalue = analogRead(lightpin);//this reads the photo resistor
if (lightvalue>threshold)//this means that if the light value is higher than the threshhold then it will turn on the coffee maker
digitalWrite(CM, HIGH);//this turns on the relay
else
digitalWrite(CM, LOW);//this turns off the relay
Serial.println(lightvalue);//this prints the photo resistor value to the serial monotor
delay(1);//this delays it one milisecond