I was drinking hot coffee. First I burned my mouth on it. Then I forgot about it and it cooled down to room temperature. With a sore mouth and cold coffee I realized that I had failed to drink a cup of coffee. Then I asked myself: Could I, without any knowledge about Arduino, make a device solving this problem for me?
Challenge accepted!
How about creating a coaster with a temperature sensor making it possible to set the "too hot" and the "too cold" temperatures and then a red, green and blue LED displaying in what range the temperature is. The device should have a buzzer giving a sound when the temperature reached the drinkable temperature.
That was the basic idea but how should I make it easy to configure this device? Since Arduino comes with USB why not create a user interface on the computer that communicates with the coaster making it possible to configure it from there? When the configuration program starts it should establish the communication with the coaster and read the current values such as temperature etc. It should be possible to change the settings and these changes are then sent back to the coaster where they gets stored in the EEPROM.
First I bought a book about Arduino. I bought Arduino for dummies by John Nussey. In that book he suggested buying a starter kit. I bought a starter kit. Most starter kits comes with temperature sensors and LEDs and what not. I made many of the exercises in the book. Then I was ready for my own project. In small steps I created the circuit on the breadboard. I found information about how to use the TMP36 temperature sensor with Arduino and a sketch.
In the book there where exercises about how to use a piezo element (the buzzer). I combined the buzzer with the temperature sensor setup. Then I added the LEDs. At that point the raw circuit was finished.
Then I started working on the configuration program. For this I downloaded a community edition of Visual Studio and then from scratch I created the User Interface. This is the toughest part of the project. There are far more complex things going on in the configuration program compared to the Arduino. I will talk more about this on the software tab of this project.
Then it was time to put this together. For this purpose I decided to buy a smaller Arduino Nano so that the coaster could be thinner and a much nicer design.
When all the electronic parts for the coaster arrived I could start creating the housing for the coaster. I decided to make the coaster with my 3D printer. I would make in ABS plastic that can handle the temperatures of hot beverages and as an added bonus I can acetone smooth the surface of ABS plastic so that the coaster could get that shiny look. For this part I launched Fusion 360 and then I generated STL files that I sliced in Cura and printed on a Tevo Black Widow.
Here is a link to the Fusion 360 project. I also included STL files in the hardware section.
When I finished printing the coaster, it always takes a couple of times before you nail it. There is often that things do not fit into each other. For example I could not the Arduino to fit. The Arduino I bought had tabs so that it could be used in a breadboard but I cut these off with a side cutter so that it would fit.
Then it was time to assemble the thing.
I had ordered a 50 mm buzzer that I had to cut a little in the edges to get into the housing. The temperature sensor is in the middle of the coaster and it has a little feather that pushes up against the bottom of the cup. I used double sided tape for the buzzer to stick the buzzer to the coaster. The LEDs of the Arduino was shining though the plastic a little but I used black tape to hide them. I used shrink tubes to avoid shortcuts inside the coaster.
Then I screwed the coaster together and placed little rubber feeds on top of every screw. It looked nice indeed.
But is it working? It is! There are a few caveats though. One for example that I had not realized. Most people drink cold coffee! It sounds awful and it is but it is THE TRUTH. I had so many people trying the device with cold coffee and then it is not working properly? Huh, Jens what is up with this? Well, your coffee is cold how help that?
Another thing is ridiculously insulated cups. It will not work either. Then we have cups with almost no bottom. All the mass and hence heat is much higher up. Before the beverage heated the bottom the top is cold.
It works but it works for a "sensible" cup and it IS individual what settings suits you the best. That said, I made attempts to fulfill the "psychological" requirements but that is challenging, especially for almost cold beverages.
That is it. I mastered this, and I managed to make a device that helps me. That is all there is to it challenge accomplished!
The sketch to load into the ArduinoIn the software section of this post you will find the program I made for the Arduino. When the temperature is rising the coaster will blink the LED of the current range. When the temperature stabilizes the LED will stop blink.
The coaster works internally with Celcious. The configuration program can convert this on the fly to Fahrenheit.
The configuration programI made the configuration program in c# in Windows in Visual Studio 2017 community edition. The program will start the serial communication with the coaster and parse the values sent. When changing a range the configuration program writes a string to the serial interface with the new value. These are the 'commands' the coaster understands:
- 'tt:' top temperature. After colon enter the top temperature in decimal with a dot as decimal separator. Temperature in Celsius.
- 'bt:' bottom temperature. After colon enter the bottom temperature.
- 'pt:' play top temperature sound. Enter 0 or 1.
- 'pb:' play bottom temperature sound. Enter 0 or 1.
- 'dc:' display Celsius. Enter 0 or 1.
The coaster sends a string of values each 450 milliseconds:
- it: input temperature
- tt: top temperature setting.
- bt: bottom temperature setting.
- dc: display Celsius setting.
- at: average temperature
- pt: play sound when transition from top temperature to drinkable temperature.
- pb: play sound when transition from drinkable to too cold temperature
As you might understood from the cup I work for a Translation Agency. :)
Best Regards,
Jens Malmgren
Comments