Bluetooth Mobile Remote Lamp with Weather Station
I have created an electronics project named Remote Lamp two years ago, as my new room lighting system with adjustable RGB, LEDs, and some joyful features controlled by a TV remote control. However, I decided to improve the mentioned project since it has irritating redundant wiring due to the LCD screen connections and deficiencies in the user interface due to the TV remote control. So, I took my nascent idea of remote control of my room lighting system and turned it into a mobile remote lighting system controlled by an Android application developed by me. And, to get rid of the redundant wiring and add more features with limited pins on Arduino Nano, I designed a PCB (Printed Circuit Board) named Mobile Remote Lamp with Weather Station V2.0, which includes all built-in component connections.
Inspect my previous project.
Step 1: Designing the Mobile Remote Lamp PCB
I designed a PCB for this project on KiCad, named Mobile Remote Lamp and Weather Station V2.0. All components and products I used in this project have built-in connections and pin outputs on the board. I used Arduino Nano as the center of the board due to its efficiency as compared to other alternatives. Check out the pin output instructions to see all supported components by the board.
You can inspect the board schematic on Schematics.
Pin Output:
Pins are representing Arduino Nano pin output for supported components on the board.
PCB Connector Components
HC-06 HC-06 Bluetooth Module
D4 --------------------------- TX
D5 --------------------------- RX
5V --------------------------- 5V
GND --------------------------- GND
BUS_1 I2C LCD Screen (BUS)
A4 --------------------------- SDA
A5 --------------------------- SCL
5V --------------------------- 5V
GND --------------------------- GND
DHT11 DHT11 Temperature and Humidity Sensor
D2 --------------------------- Signal
5V --------------------------- 5V
GND --------------------------- GND
L298N_1 L298N DC Motor Driver
A0 --------------------------- IN_1
A1 --------------------------- IN_2
A2 --------------------------- IN_3
A3 --------------------------- IN_4
Relay_2 2-Way Relay
D12 --------------------------- IN_1
D13 --------------------------- IN_2
5V --------------------------- 5V
GND --------------------------- GND
RGB1 RGB LED
D9 --------------------------- R
5V --------------------------- 5V
D10 --------------------------- G
D11 --------------------------- B
D4 5mm Yellow LED
D8 --------------------------- +
D3 5mm Blue LED
D7 --------------------------- +
D2 5mm Green LED
D6 --------------------------- +
D1 5mm Red LED
D3 --------------------------- +
J1 Connector (Spare Pins)
A6
A7
VIN
3V3
GND
Warning: Under the Relay_2 connector on the board, I connected A6 and A7 pins as the output pins; but they cannot be used as outputs due to the chip settings. So, I used the spare pins - 12 and 13 - on the J1 connector as the output pins for the 2-Way Relay Module, and therefore A6 and A7 pins on the Relay_2 connector became spare pins.
Soldering:
After the fabrication process and delivery of my PCB design, I soldered male and female connectors, 220 ohm resistors, LEDs, and an RGB on the board to attach all components properly.
Step 2: Developing an Android Application (Remote Lamp)
I wanted to control my lighting system and its joyful features using my mobile phone :) Hence, I developed an Android application named Remote Lamp with a user-friendly interface on MIT App Inventor 2. It transmits specific characters to the HC-06 Bluetooth Module for each command as explained in Commands. You can inspect the building blocks of the application by zooming in to the blocks figure.
You can download the application (Remote Lamp) on Google Play :)
For those who want to download directly on their phone, I leave the application.apk file in Downloads.
Commands:
- Clicking the Weather button, activate the Weather Screen - transmits 't'.
- Clicking Lamp (1) buttons, turn on or off Lamp (1) - transmits '5', '7'.
- Clicking Lamp (2) buttons, turn on or off Lamp (2) - transmits '6', '8'.
- Choosing options in the LEDs slider, turn on or off yellow, blue, green, red LEDs - transmits '0', '1', '2', '3', '4'.
- Choosing options in the RGB slider, change the RGB color as red, green, blue, yellow, purple, cyan, white, or off - transmits 'r', 'g', 'b', 'y', 'p', 'w', 'o'.
- Clicking Wheels buttons, turn right and left wheels or stop them - transmits 'a', 's', 'd'.
- Open the notification bar by clicking the Exit button:
- Clicking the Home Screen button, activate the Home Screen - transmits 'h'.
- Clicking the OK button, close the application and disconnect Bluetooth.
Step 3: Programming Arduino Nano
Download the required libraries:
LiquidCrystal_I2C | Download
DHT | Download
- Include the SoftwareSerial library to communicate with the HC-06 Bluetooth Module.
- Initiate the bluetooth module. Connect the defined RX pin (4) to the TX pin on the bluetooth module.
- Include DHT.h library.
- Define the dht object.
- Include LiquidCrystal_I2C and Wire libraries to run I2C module.
- Set the LCD address to 0x27 for a 16 chars and 2 line display.
- Define custom characters for the LCD.
- Activate the bluetooth module and initiate the DHT11 module.
- You do not need to take any further action to define SDA and SCL pins in Wire library due to embedded SDA and SCL settings on Arduino Nano.
- Define the home screen settings.
- Adjust the RGB color to white at the home screen initializing.
- In getDataFromDHT11() function, get weather information - temperature (celsius / fahrenheit) and humidity - using built-in functions.
- Wait until the DHT11 module is ready.
- If the Weather Screen is requested by a command ('t'), print the weather information generated by the DHT11 Temperature and Humidity Sensor.
- If the Bluetooth module is available and receiving characters from the Android application, execute the requested command depending on the received character.
- In the changeColor() function, adjust the color of the RGB LED using the analogWrite() function.
Bonus: By uncommenting the changeBluetoothSettings() function, change the Bluetooth module defaults settings using AT Commands - Name: Remote Lamp, Password: 1234, Baud Rate: 9600.
Features
Before trying the following features, pair the HC-06 Bluetooth Module with your phone to connect to the board (Mobile Remote Lamp with Weather Station V2.0) with the application (Remote Lamp).
1) Connect to the HC-06 Bluetooth Module.
2) Adjust the color of the RGB LED on the board.
3) Turn on or off yellow, blue, green, red LEDs on the board.
4) Turn on or off the Lamp (1).
5) Turn on or off the Lamp (2).
6) Activate the turning wheels attached to the L298N Motor Driver - right and left.
7) Activate the Weather Screen to display the weather information generated by the DHT11 Temperature and Humidity Sensor - temperature (in celcius and fahrenheit) and humidity.
8) Open the notification bar to close the application or return to the home screen.
Connections
Connect all supported components to the corresponding connector on the board (Mobile Remote Lamp with Weather Station V2.0).
Now, you can create your lamp design using the finished apparatus :)
I used a dilapidated flower pot from my previous project and affixed the board on it with the turning wheels by using a hot glue gun.
I connected bulb plugs to a 3-Way socket adapter and used my old phone battery charger to supply Arduino Nano on the same adapter.
To supply the turning wheels (attached to DC motors), I used a 9V battery.
Conclusion
After completing each step, I fastened the contraption to the ceiling and connected the power cable :)
Videos
Schematics
Code Files and Downloads
Bluetooth Mobile Remote Lamp with Weather Station
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(2)
- Engineer Sep 22,2021
- Kutluhan Aktar Dec 26,2020
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Kutluhan Aktar
- Joker Remote Hazardous Gas Station and Monitor For a long time, I wanted to create a unique device to observe the presence of varying hazardous gas...
- Darth Vader IoT Cryptocurrency Tracker and Display w/ Raspberry Pi Pico Instead of using a mobile or web application, I decided to develop a brand-new device to track and d...
- Bluetooth Mobile Remote Lamp with Weather Station I have created an electronics project named Remote Lamp two years ago, as my new room lighting syste...
- Multi-Model AI-Based Mechanical Anomaly Detector w/ BLE Mechanical anomaly detection is critical in autonomous manufacturing processes so as to prevent equi...
- AI-assisted Pipeline Diagnostics and Inspection w/ mmWave StorySince the beginning of the industrial revolution, accurate pipeline system maintenance has been...
- IoT AI-driven Smart Grocery Cart w/ Edge Impulse Especially after the recent success of Amazon Go cashierless convenience stores, there is a surge in...
- BLE Mobile Star Wars Remote Lamp w/ Weather & Gas Station As you may have seen, I have created a similar remote Bluetooth-enabled lighting system for my room....
- IoT Bookmark and Reading (Book Ratings) Tracker w/ Qubitro While reading books or comics, I am fond of recording my ratings on a daily basis to track any surge...
- Iron Man Walkie-Talkie (Two-Way Radio) for Texting w/ LoRa For a long time, I have wanted to experiment with LoRa (short for long-range), which is a spread spe...
- Jigglypuff IoT Carbon Dioxide and Dust Monitor (Tracker) w/ Telegram The dust density and the carbon dioxide (CO2) density affect my sleep quality and health detrimental...
- IoT Heart Rate (BPM) Monitor and Tracker w/ Tuya Smart Heart rate, or pulse, is the number of times your heart beats each minute (BPM). While the heart cir...
- Raspberry Pi Adjustable Air Quality Detector Running on GUI I had been working on a project with which I could collate air quality information from an MQ-135 Ai...
- WhatsApp Coronavirus Notifier Bot Running on Raspberry Pi First of all, I hope that you and your loved ones are safe and healthy during these unprecedented ti...
- WhatsApp Surveillance Video Camera with IR Proximity Sensor As you can see in my previous electronics projects, I am fond of developing web applications showing...
- Marvel and DC Weekly New Comics Release List Tracker I am a huge comic book fan and collect issues of my favorite titles every week. Therefore, I check w...
- Arduino-Based (ATmega32U4) Mouse and Keyboard Controller For a long time, I needed a simple device allowing me to send varying mouse and keyboard commands to...
- Bluetooth-enabled Snowman Weather and Air Quality Gift Card Although it is struggling for me to create a brand-new design while paying homage to the classic Chr...
- WhatsApp Halloween-Themed RFID Talking Doorbell w/ RGB Eyes Despite the fact that making a hilarious yet not deceitful joke with a jack-o'-lantern on Halloween ...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
129 0 0 -
DIY Laser Power Meter with Arduino
197 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
174 0 2 -