Secure Bluetooth Switch

Xavier Tuominen

Overview

For my project, I chose to develop a switch that can be controlled securely using a Bluetooth device. Since the microcontroller is near power, I chose to connect it to an AC-DC power supply.

General view Video

Hardware

For this project, I used the Silicon Labs BGM220PC22HNA microcontroller along with MikroElektronika Mikroe-1370 Relay Click extension board to control the light switch. The system is powered by CUI PSK-5D external power supply.

Assembly

Software

This project was developed using Simplicity Studio 5. The program first initializes the relays, GPIO, PRS, TIMER, and RTCC then starts Relay1 so the light can be controlled by a physical switch. The user is then prompted to hold the button enable bondings and if it is held then the user will be prompted to click the button if they want to erase previous bondings. Then a random passcode is displayed on Tera Term and the user is prompted to enter the displayed passcode on the Bluetooth device. If they match, the device will be bonded and can then control the switch by connecting and disconnecting.

Final Thoughts

The hardest part was figuring out what application of the microcontroller to use to control the Mikroe board, but once I did, it was not too difficult. Designing and finding uses for a microcontroller was enjoyable and plan to do it more.

Downloads


Last modified:Mon, Jan 23, 2023.

00039