Mug with LED Touch Screen to Display Temperature
I like to drink tea very much , my friend give me Mug with LED Touch Screen to Display Temperature , so I like the idea , I thought if we make it in coaster to display the temperature of the cup of tea so I talk with my friend about the idea they told me if we make it as a colour changing by the temperature will be better than the degree , I find it is a great idea . I started to work on it and develop it , I found that I forget my cup of tea until it is cold , I want to make something remind me that the cup became cold , so I add buzzer to make noise when it is became cold.
For designing the machine, I used Fusion 360.
1- Started by drawing the top of coaster with Islamic pattern with tabs and T-Slots
2- Draw the five side of the polygon shape.
3- Draw the bottom part.
4- Extrude all the parts and insert the Arduino block into the file .
5- Assemble all the parts together to make sure the product will be connect successfully.
1- Exported the coaster parts (top-bottom-5 sides) to DXF files.
2- On Laser works software started to import the DXF files one by one , make the shapes will be cutting in layer with black colour modify the number of speed and power to be 15 speed and 70 power , the shapes will be engraved with red colour modify the number of speed and power to be 250 speed and 40 power.
3-then saved the RLD files for the Laser Cutter.
4- On the Machine, I set the focus and the origin , check the track then run the file , and the cutting process start on 3mm mdf wood , then I make it again on 3mm plywood because it is better in look .
5- sanding the top to became the patterns more clear .
6- Then assembly the fabricated parts together .
The Coaster after assembly the fabricated parts together.
The electronics circuit is illustrated by Tinker cad and then implemented using real components.
Here is the components list:
1- Inputs:
LM35
2- Outputs:
Buzzer
RGB LED
3- Others:
Arduino Uno (mainboard)
3 Resistors 220 ohm
Mini Breadboard
jumper wires (male-male, male-female)
software :
Arduino IDE
I put the LM35 sensor to feel the temperature for the cup of tea then changing the colour of RGB led , when the cup is hot the led will be red colour , when it is warm the led will change to green color , when it has been very cold the led will be blue , when it is blue the buzzer will make noise to get your cup because it is cold . so I put this components together with Arduino and mini breadboard.
Circuit wiring :
I connected LM35 sensor in breadboard , then for the right pin of LM35 connected jumper with ground in Arduino , the middle pin of Lm35 connected jumper with A0 in Arduino , the left pin of LM35 connected jumber with 5V in Arduino .
I connected RGB led to breadboard , the positive pin connected with jumper to ground pin in Arduino , put three 220 ohm resistor connected to the other three pins in led , then connected the B pin with a jumper to pin 6 in Arduino , connected the G pin with a jumper to pin 5 in Arduino , connected the R pin with a jumber to pin 3 in Arduino
Then connect the negative pin in buzzer to ground pin in Arduino and the positive pin to pin 7 in Arduino .
when I finish I found that the mini breadboard will be close to the bottom of coaster not the top , so Amani suggest to increase the tall of the jumpers by add jumper male , female between the led , LM35 and the bread board so we can put the LM35 sensor and the led on the wooden coaster top
The power source will be adapter:
9V 2A Adapter: for powering the the Arduino board from the Vin pin.
I tried 5V 2A Adapter first , the RGB led didn't light in the right colour , so I tried 9V 2A Adapter and it is work successfully.
I searched about the code on the internet , I found this website with the same idea :
the led , LM35 module :
https://vimeo.com/39159175?embedded=true&source=video_title&owner=1242907
the buzzer :
https://forum.arduino.cc/t/temperature-sensor-with-buzzer/680007
I started to code my Arduino with the code that will make the led change it's colour by feeling the temperature , the buzzer start work when the cup became cold.
code :
float tempC;
int tempPin = A0;
int redPin = 3;
int greenPin = 5;
int bluePin = 6;
int buzzer = 7;
int blueTemp = 0; int greenTemp = 0; int redTemp = 0;
void setup()
{
Serial.begin(9600); //opens serial port, sets data rate to 9600 bps
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(tempPin, INPUT);
analogWrite(greenPin, 0);
analogWrite(redPin, 0);
analogWrite(bluePin, 0);
delay(500);
}
void loop()
{
tempC = analogRead(tempPin); //read the value from the sensor
tempC = (5.0 * tempC * 100.0) / 1024.0; //convert the analog data to temperature
Serial.println((byte)tempC); //send the data to the computer
if (tempC > 0 && tempC <= 25) {
analogWrite(bluePin, 255);
analogWrite(greenPin, 0);
analogWrite(redPin, 0);
tone(7, 1000);
}
else if (tempC > 25 && tempC < 33) {
analogWrite(bluePin, 0);
analogWrite(redPin, 0);
analogWrite(greenPin, 255);
noTone(buzzer);
}
else if (tempC >= 33) {
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
analogWrite(redPin, 255);
noTone(buzzer);
}
delay(1000); //wait 200 ms before sending new data
}
First connected the Arduino to the bottom of the coaster with screws , then connected LM35 , RGB led , 3 resistor with mini breadboard , and connected them with the Arduino like the description we mention before .
then we test the circuit with this numbers :
when the temperature less or equal 25 C , the led became blue colour
when the temperature less 27 C more than 25 C ,the led became red colour
when the temperature more than 27 C , the led became green colour
After we test the circuit , I change the numbers for the colour of led , to be suitable with the cup of tea and add the buzzer to the circuit:
when the temperature more than zero less or equal 25 C , the led became blue colour ,the buzzer make noise.
when the temperature less 33 C more than 25 C ,the led became green colour , the buzzer with no noise.
when the temperature more than 33 C , the led became red colour , the buzzer with no noise.
yes , I listen to opinions from my peers , that it will be better to change colour of led instead of the degree of temperature appear on led screen , it will be more easier for the user , so I change it to RGB led instead of screen , Rehab from my group suggest that when the cup became cold , the coaster display a message asked the user if he want to heat it when the user accept the coaster heat the cup .
Amani my instructor suggest to put LM sensor place under the cup directly in the coaster instead of beside the led, it is very useful because and feel the temperature faster .
Osama from my group help me in 3D fusion , to make circular copy
I helped my peers with components like nano cable for Osama
Marwa helped me with RGB led
Rehab helped me with LM 35 to test if my component is damaged
I helped Aya becasue her leg was broken ,I take her components from Amani and send it to her .
The first time I test the code with the components "mini bread board and nano Arduino , something weird happen , the serial monitor read the temperature in negative numbers which was not logic , I wiring the circuit again with big bread board and Arduino uno , so it is work successfully and the numbers was real in serial monitor , so I discovered that the Arduino nano has problem and doesn't work .
when I start to make the code I searched about it in a lot of websites and found a lot of codes.
Amani helped me in writing the code successfully and I really want to take that chance to thank her and Ibrahim for the great support and the amazing dedication.
the RGB led chage color not in sharp way , when it moves from red to blue the led make purble colour degree so in the code I make when the color is red the another color in zero like that
else if (tempC >= 33) {
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
analogWrite(redPin, 255);
and make it with the another colours also
so the colour appear in three sharp tunes , red , green and blue.
I will make the coaster can reheat the cup of tea after getting cold , I will replace Arduino uno with arduino nano that work and reduce the height of coaster .
I will develop the Idea that the coaster change all his colour with temperature not just led , and printed it 3d like this Idea in the link :
https://www.instructables.com/Arduino-controlled-smart-coaster/
https://www.youtube.com/watch?v=d95qtKFhCnE