กลับไปหน้ารวมไฟล์
control-your-light-with-arduino-d1b3f9-en.md

1. Make the prototype

First: take the necessary parts and create the prototype on your breadboard as you see in the schematic below.

2. Write the code on Arduino

Second: write code! (see code below)

3. Make your box

Third: cut the plexiglass by a Laser Cutter.

After, decide where to collocate the Arduino with the Shield and the power supply, and then make one hole for the potentiometer and one for the lamp's cables. Paste all! Congratulations! You just made a domotic lamp with the Arduino! Good job guys! Implement code to improve the lamps with your ideas (for example add also a timer to regulate it)!

4. Some photos

Some photos of the final project.

EXPANDED TECHNICAL DETAILS

Home Infrastructure Automation

This project is a fundamental entry into high-voltage automation, allowing an Arduino to safely switch standard AC household lights.

  • Relay Driver Isolation: Manages a 10A 250V AC relay module. The Arduino controls the relay's electromagnetic coil via an opto-isolated trigger pin, ensuring that high-voltage spikes never reach the delicate microcontroller logic.
  • Multi-Input Control Logic: The firmware allows the light to be toggled via a physical button, an infrared remote IR sensor, or even a serial command from a PC, demonstrating a unified control hub architecture.

Safety Features

  • Flyback Diode Integration: Explains the necessity of the parallel diode across the relay coil to protect the switching transistor from inductive voltage kicks during the deactivation phase.

ข้อมูล Frontmatter ดั้งเดิม

title: "Control your light with Arduino"
description: "This project teaches how create a domotics lamp with your Arduino."
author: "Arduino_Scuola"
category: "Home & Automation"
tags:
  - "lights"
views: 11906
likes: 2
price: 1120
difficulty: "Intermediate"
components:
  - "1x Arduino UNO"
  - "10x Resistor 100 ohm"
  - "10x Resistor 220 ohm"
  - "1x 5 LDR"
  - "1x 10 10K trimmer"
  - "10x Resistor 1k ohm"
  - "10x Capacitor 100 µF"
  - "1x Arduino Proto Shield"
  - "1x IRF520 Mosfet"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "e18d29419fcfc5f058b6a0fb54c85b967650d6db258875dc83a4693860bb4995"
encryptedPayload: "U2FsdGVkX197rPFpQMdV8s3l23I5+655HvpWKpiKfOIPHDTBKwX5m150kK2s64BausgPDZep9eBAgghykcZEjV6YYmT0Dz/ApVZJG0q3cs0="
seoDescription: "Learn how to build a domotics lamp and control your light using Arduino in this step-by-step project."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/control-your-light-with-arduino-d1b3f9_cover.jpg"
lang: "en"