The key hardware required for this little project is an Arduino Uno microcontroller board that enables you to control the lamp. Wiring diagram for the same is shown in Fig. 1.
Regulated 5V DC from the Arduino Uno’s onboard linear voltage regulator powers the HC-05 compatible Bluetooth module. The module communicates with the Arduino through its Tx and Rx lines that are connected to pins 2 and 3 of the Arduino board, respectively.
Pin 9 of the Arduino drives the white LED light source LED1 through the S8050 high-current transistor T1. The 1-kilo-ohm resistor R1 is the base resistor of driver transistor T1.
When the Arduino board is powered through its DC input jack (see Fig. 2), the DC voltage appears at its Vin pin through M7 (1N4007) silicon diode that is connected in series with the positive rail. This voltage is used to power the white LED light source. There is an inherent voltage drop of around 700mV, though.
Likewise, the 700mA (IC max) small-signal transistor S8050 has a VCE(SAT) close to 500mV (IC=500mA, IB=50mA). Therefore, the white LED light source receives a slightly lower operating voltage than the input 12V DC. However, this is not a big issue because almost all 12V DC white LED modules work well with 9V DC onwards.
The Arduino sketch (code) given below is based on RemoteXY Library. Its latest version can be downloaded from https://remotexy.com/en/library and installed in the Arduino IDE. The steps for installation can be found in the link https://remotexy.com/en/help/how-install-library/
* Project: Bluetooth LED Desk Lamp v1
* Hardware: Arduino Uno & HC-05 Compatible
* Android App: RemoteXY (http://remotexy.
* Arduino Library: RemoteXY 2.4.6
* Software Platform: Arduino IDE 1.8.13
(Win10x64) & Android 10
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600
#pragma pack(push, 1)
uint8_t RemoteXY_CONF =
#define PIN_SLIDER_1 9
pinMode (PIN_SLIDER_1, OUTPUT);
Once the hardware setup is complete, the Android application RemoteXY can be downloaded and installed in the Android OS, which will manage the connection between the Arduino and the smartphone. RemoteXY is a bit different from similar Android applications for Arduino you may be familiar with.
You do not have to connect to the Internet to link your smartphone and Arduino setup with Bluetooth. The software has all the needed instructions and the user interface (slider). The Arduino setup smoothly sends the interface and configurations data to the RemoteXY app in your smartphone and then the smartphone app interprets the interface offline without the need to connect to the Internet!
RemoteXY Android app can be downloaded from this link.
Follow the steps below for proper operation of the lamp:
- Power the Arduino setup using a 12V DC adaptor.
- Start and run the smartphone RemoteXY application.
- Turn on Bluetooth connectivity.
- Press the new connection ‘+’ button in the top panel of the application as shown in Fig. 3.
- In the window that opens, select ‘Bluetooth’ connection.
- Select your HC-05 device.
- In the new window, enter password 1234 (or 0000) to establish the connection.
- Start controlling/regulating the brightness of the LED light source with the slider!
Fig. 4 shows the screenshot taken by the author during testing of the prototype with an Android smartphone (Nokia 5.3/Android 10).
If there is a connection problem, you might get error message: “The connection is established, but the device does not respond: Time out error: no response!” If you receive this message, recheck your Arduino setup (hardware and software) and/or the smartphone’s Bluetooth connectivity.
The author built his quick prototype using an Arduino prototype shield (for his convenience). The white LED module is in fact a pair of 12V DC cool daylight-white LED plates (x3 lamps per plate) wired in parallel. Its total current consumption, as observed by the author, is 200mA at 12V DC.
To obtain HC-05 compatible Bluetooth module you may check this link.
For the 12V white LED module check this link.
Download Source Code
The author’s project works quite well but has not passed the prototype stage yet. Any additional ideas will be appreciated!
T.K. Hareendran is an electronics designer, hardware beta tester, technical author, and product reviewer