Sean VroomGregory Markowski
Published

MEGR 3171 IOT Group Project 042 Live Beer Temperature Sensor

Ever wanted to make sure the beer in your refrigerator was cold? Look no further with the Argon inspired beer temperature sensor.

IntermediateFull instructions provided307
MEGR 3171 IOT Group Project 042 Live Beer Temperature Sensor

Things used in this project

Hardware components

Argon
Particle Argon
×2
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
Breadboard (generic)
Breadboard (generic)
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×2
ELEGOO 37-in-1 Sensor Module Kit V1.0
ELEGOO 37-in-1 Sensor Module Kit V1.0
Temperature Sensor and LCD 1602 Module were used
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Single Turn Potentiometer- 10k ohms
Single Turn Potentiometer- 10k ohms
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
Google Sheets
Google Sheets
Maker service
IFTTT Maker service

Hand tools and fabrication machines

Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires

Story

Read more

Schematics

display schematic

This the wiring diagram for the 16 pin LCD screen.

Temp Sensor Schematic

This is the wiring diagram for the temperature sensor.

Display Schematic

Wiring diagram for the 16 pin LCD screen

Temp Sensor Schematic

Wiring diagram for the temperature sensor

Code

Display

C/C++
This is the code for the 16 pin display
#include "application.h"

/*
  LiquidCrystal Library 
  The circuit:
 * LCD RS pin to digital pin D0
 * LCD EN pin to digital pin D1
 * LCD D4 pin to digital pin D2
 * LCD D5 pin to digital pin D3
 * LCD D6 pin to digital pin D4
 * LCD D7 pin to digital pin D5
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 * connect R/W (pin 5) to ground

 */

#include "LiquidCrystal/LiquidCrystal.h"

//pinout on LCD [RS, EN, D4, D5, D6, D7];
// pin nums LCD  [ 4,  6, 11, 12, 13, 14];
// Shield Shield [RS, EN, D4, D5, D6, D7];
// Spark Core    [D3, D5, D2, D4, D7, D8];
LiquidCrystal lcd(D0, D1, D2, D3, D4, D5);
int temperature;
int 2waycomm;
void temper(const char *event, const char *data )
{
    String pew = data;
    temperature = pew.toInt();
}


void setup() {
        Particle.subscribe("TempIOT042", temper, ALL_DEVICES);
  // set up the LCD's number of columns and rows: 
  lcd.begin(16,2);
  // Print a message to the LCD.
  lcd.print("Live Beer Temp:");
  
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):

  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(temperature);
  delay (1500);
  lcd.print("' Farenheight");
  Particle.publish("TempIOT042b", String(2waycomm), ALL_DEVICES);

}

temperature sensor

C/C++
This is the code that collects and converts temperature data, as well as recording it to google docs with IFTTT.
int analogvalue = 0;
double temp = 0;
int tims = 0;
void setup()
{
  Particle.variable("analogvalue", analogvalue);
  Particle.variable("temp", temp);
  Particle.variable("time", tims);

  pinMode(A0, INPUT);
  tims = 0;
}

void loop()
{ delay(1500);
  // Read the analog value of the sensor (TMP36)
  analogvalue = analogRead(A0);
  //Convert the reading into degree 
  temp = (analogvalue*-.08099688473520249+151.99688473520249); //To be accurate
  //temp = 69;
Particle.publish("TempIOT042", String(temp), ALL_DEVICES);
  delay(1000);
temp = 0;
tims = tits + 1000;
if(tims > 5000)
{
    tims = 0;
}


Particle.subscribe("TempIOT042b", String(temp), ALL_DEVICES);


}

void 2waycomm(const char *event, const char *data )
{
    String pew = data;
    temperature = pew.toInt();
}

Credits

Sean Vroom

Sean Vroom

1 project • 0 followers
Gregory Markowski

Gregory Markowski

0 projects • 0 followers

Comments

Add projectSign up / Login