The following project is a digital clock that supports alarm and timer features. The project also has an OLED-Display which shows the current time and ambient air temperature and relative humidity for 1 second for each of the information. The OLED Display can change the state based on the mode activated from the device that is connected to the board via Bluetooth. The user can set up an alarm for every day. When the current time equals to the alarm time, the display goes into freezing mode showing the user's preferred time while the LED starts to blink for one minute. If the user sets up a timer, instead of showing the current time/air temperature and humidity, the display shows the running time count meanwhile blinking the LED. After the user's preferred time has reached, the OLED display goes back to the normal mode showing the real time and the air temperature and humidity. Note that time on the screen is based on military-time standard and the temperature degree is in degrees Celsius.
General view | Video | |
This project was developed by using the BGM220 Explorer Kit which is a small form factor development and evaluation platform for the BGM220P Wireless Gecko Bluetooth Module. The BGM220 is focused on rapid prototyping and concept creation of IoT applications. It features a USB interface, an on-board SEGGER J-Link debugger, one user-LED and button, and support for hardware add-on support that allows developers to create and prototype applications.
Besides the BGM220 board, there are a sensor and an OLED-Display attached to it mounted on a cutom board following the mikroBUS pinout. To measure the temperature and humidity, I used SI7021 temperature and humidity sensor with the humidity range of 0-100% RH. The SI7021 works with a voltage supply from 1.9V-3.6V. The information is displayed to the user using an OLED LCD Display SSD1306 which works with a voltage supply of 3.3V-5V. The 'sandwich' can be powered from a micro-USB connector either using three AA batteries or connecting directly to a plug adapter with 5V output.
I also attached a pin on the other side of the board with a magnet and hanger, so the user can attach it to any metal surface or hang it anywhere.
This project was developed by using a C programming language on Simplicity Studio embedded development environment. When the program runs, it updates the temperature and humidity information in every 2 seconds because I wanted it to be a fast-responsive project to the exterior changes. The time updates every one minute, however, it displays the time for every 2 seconds. I left appropriate comments, so it should be easy to read and understand the code.
To set up time or timer the user can use Silicon Labs EFR Connect mobile application. The LED will switch on after establishing a Bluetooth connection and keep the solid light until the Bluetooth connection closes. The EFR Connect will show all of the attributes of the board right after it establishes a Bluetooth connection with the board. The user can read data for the temperature and humidity (these are read-only attributes) as well as write data for the time, alarm, and timer. The application reads and writes data immediately, so it is up to the user to set up the actual time with the precision of seconds. All attributes that the user can enter have their user-description which the user will see after establishing a Bluetooth connection. For example, if the user does not know which format should be used for setting up the actual time, alarm, or the timer, the attribute shows the field entry format: "H H M M", or "M M S S", where H, M and S stand for hours, minutes and seconds, respectively. It is important to see the user description because the time should be entered with spaces within numbers (for example 13:13 as "1 3 1 3").
It was enjoyable for me to work with BT modules and do some programming in C language. I am sure this course gave me even more skills in programming which can be useful in my personal career.
Last modified:Mon, Jan 23, 2023.