IPhone remote controlled lamp

This project uses the iPhone and a raspberry pi to remote control the lamp. Both the iPhone and the raspberry pi are connected to the wifi router. The lamp on/off commands are sent from iPhone and received by the raspberry pi embedded system. Then the raspberry pi triggers the IO to control the lamp through a relay. The lamp can be replaced by other home appliances. The software is written in Python and it can be easily port to other devices.

IPhone remote controlled lamp

Step 1: System diagram

The system diagram is shown in this figure. The data flow is straightforward. The iPhone is connected to the wifi router wirelessly while the Raspberry pi is connected to the wifi router through a lan cable (this can change to wireless with a wifi adapter installed in the Raspberry pi). One of the Raspberry pi’s IO is connected to a relay board. Since the relay board control voltage is 5V and the Raspberry pi output voltage is 3.3V, a transistor is used to perform the voltage transition; the detail will be introduced in step 3. Then the lamp can be controlled through the relay board.

Both the iPhone and the Raspberry pi need to run a software for communication. In this project, Python is used as the programming language. In iPhone, Pythonista is installed and run the script, a UI is also designed. In Raspberry pi, a Python script is run automatically after booting the system. The communication is based on socket TCP mode.

Step 2: Electronics

IPhone remote controlled lamp Schemetic

Here are the electronics parts.

1. A Raspberry pi board

2. A relay board

3. A universal board for connecting the Raspberry pi and the relay board

4. A lamp

5. A wireless router

6. A USB charger for powering up the Raspberry pi

7. A transistor 8050

8. Two resistor (1K ohm)

9. Lan cable and USB cable and

10. Of course an iPhone as the remote control

For more detail: IPhone remote controlled lamp

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top