8zWUZ

ESP32 Intelligent LED

 
Overview
As luck would have it, I had a small desk lamp I bought on Taobao, but controlling the switch required manually plugging and unplugging the USB port, which wasn't very elegant for an embedded engineer. So, I used my Xiao Ai smart home system to achieve remote and local control of the lamp via an ESP32 microcontroller.
Hardware: 1. This bedside lamp only requires a simple 5V input to light up, so we can control the input power using a MOSFET circuit. 2. Since it's MOSFET-controlled, we can adjust the MOSFET's on/off state to adjust the lamp's brightness via PWM control. 3. Increasing or decreasing the lamp's brightness by repeatedly pressing a button seems simple, but... it's not elegant; therefore, we can use an encoder to increase or decrease the lamp's brightness.
Software:
1. There are multiple paths for ESP32 development, but based on the simplest implementation principle, I quickly implemented it using Arduino. 2. For smart home systems controlled by Xiao Ai, there are many development paths online; following the principle of simplicity, we implemented it using a third-party device from Diandeng Technology.
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 10:36:19

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号