The images below show the assembly and schematic of a Coffee Timer. This device allows an Android device to connect to it via Bluetooth. While connected the user can set a designated time for this device to turn the load of an outlet high. The load will stay high for 5 consecutive minutes then turn low. This implementation allows to power a coffee maker to make coffee up to 24 hours in advance.
Assembled device |
For this project a Bluetooth Multi-Sensor Development Board was used for testing and implementation. This board contains a Bluetooth Module to enable Bluetooth Low Energy. Attached to pin 26 on the board is a single LED, which then controls the load of the outlet. Included in this build is a USB-UART CP2104. This allowed to program the board. The board is embedded inside an outlet box. Inside the outlet box resides the outlet, which will power the board when connected to another outlet. The load of the outlet will not go high until pin 26 is toggled.
Schematic 1 | Assembly | |
Anaren Atmosphere IDE was used while writing the code for both the Bluetooth Multi-Sensor Development Board and the Android device. The code written to program the board was in the language C. To write the application for the Android device Anaren Atmosphere IDE has a Designer View, which allows for drag-and-drop programming. This source code is in JavaScript.
Algorithm |
When the application is launched on an Android device the current system time is taken and converted into Central Standard Time. The user then can enter which hour of the day they would like the outlet to turn on. This selection is made by selecting the hour they wish to have from a Combo Box on the user interface, which is in the 24 hour format. Another Combo Box is displayed to allow the user to select the minute the device should then be powered. This is in 15 minute time intervals. An example of a time selection could be 14:30, which is 2:30 pm. Once entered the software then computes the difference between the time entered by the user and the current system time. Once computed the device toggles a timer to decrement this difference every 15 minutes. When the difference is less or equal to 0, pin 26 is toggled. When toggled this triggers a different timer. This timer toggles pin 26 again after 5 minutes and resets the user interface.
I enjoyed working in the IDE Anaren provides. This allowed me to easily test and implement my ideas. The only troubles with this IDE was difficult to work with when using floating point arithmetic. Other than that I believe this is the best IDE when working with microcontrollers and Android devices together. If I had more time and was more familiar with Anaren Atmosphere I would have allowed the user to set up the time they wish the outlet be turned off. This would allow the user to use this outlet for more than just making coffee.
Last modified:Mon, Jan 23, 2023.