GithubHelp home page GithubHelp logo

lastralab / wakeupdarling- Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 10.46 MB

Arduino based Coffee Machine Alarm

License: MIT License

C++ 100.00%
coffee-machine arduino alarm simulator coffee-machine-alarm wiring pin relay arduino-uno coffee

wakeupdarling-'s Introduction

WakeUpDarling!

Arduino + Coffee Machine Alarm

Prototype:
wakeup

The light bulb represents the Coffee Machine and the RTC module will send the time to the LCD display, then you can set the alarm.

PARTS I USED:

Arduino Uno

Real Time Module for Arduino

LCD 16x2

Wires

Resistors (220Ω, 1kΩ)

Potentiometer

Coffee Machine (light bulb in the simulator)

Diode (1N4001)

Transistor NPN (2222A)

Relay SPDT 5VDC

Soldering iron

Grounding Converters (2) like the one in the picture

31caoriq80l sy300

Once I had everything, I wired the coffee machine as the light bulb in the simulator.

screenshot 2017-02-13 10 51 39

Schematics View:

screenshot 2017-02-13 10 54 58

The Real Time module was wired as following:

screenshot 2017-02-13 10 59 11

Those Pins may vary on other Arduinos... just make sure you are wiring them to the SCL and SDA pins.

Code:

// WakeUpDarling!
// Dedicated to my wife.
// Author: Niam Moltta
// Downloaded from: https://circuits.io/circuits/3126865-wakeupdarling

#include <DS3231.h> //download if you don't have it yet.
#include <LiquidCrystal.h>

DS3231  rtc(SDA, SCL);
Time t;
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);


void setup()
{
  // Setup Serial connection
  Serial.begin(115200);
  pinMode(9, OUTPUT);
  digitalWrite(9, LOW);
  rtc.begin();

  //rtc.setTime(6, 59, 50);     // Uncomment this line to set the real time for the module, then comment it again after uploading.
  //<hour, minutes, seconds> (24hr format)
  //rtc.setDate(1, 1, 2017);   // Uncomment to set the date to January 1st, 2017 (optional, it won't be showed in the display unless you want it to)
}

void loop()
{
  t = rtc.getTime();
 
  lcd.begin(16, 2);
  lcd.clear();
  // Send time
  lcd.setCursor(1,0);
  lcd.print("Wake up Darling");
  lcd.setCursor(0,1);
  lcd.print(t.hour, DEC);
  lcd.print("hrs ");
  lcd.print(t.min, DEC);
  lcd.print("min ");
  lcd.print(t.sec, DEC);
  lcd.print("sec");
  delay(1000);
  
  //set alarm:
 
  if (t.hour == 7 && t.min == 0) //time to wake up
  {
    digitalWrite (9, HIGH); //turns on coffee machine
  }
  if (t.hour == 9 && t.min == 0) //you left before this time and forgot to turn it off... an accident can happen!...
  {
    digitalWrite (9, LOW); //turns off the coffee machine and saves the world.
  }
  
}

This is how it looks finished:


I used an old box to put it inside so water/dust wouldn't damage it.

Good coffee helps this project to work better ;)




l'astra lab icon



wakeupdarling-'s People

Contributors

molinainat avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

wakeupdarling-'s Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.