qioU3AWbqS

STC_Light Painting

 
Overview
  The project uses an STC15W104 microcontroller as the main control chip, and adjusts the light brightness by using a button-based timer to adjust the 25kHz pulse duty cycle. Links to the program and simulation will be provided at the end of this document.
  A lithium battery charging circuit was added, using a TP4054 charging circuit (tested with a yellow LED, it can achieve normal light-off upon completion of charging without a pull-up resistor). However, testing revealed that the TP4054 in this package generates significant heat under normal power; adding a pull-down resistor to the PROG port can reduce the charging current (roughly estimated, around 5KΩ is just right). The voltage is 4.2V upon completion of charging.
  The light uses 3528 high-brightness warm white LEDs with S8050 transistors, paired with two sets of LEDs, controlled by two I/O ports of the microcontroller. A 56Ω resistor is sufficient for the LEDs; the 200Ω resistor in the schematic is unnecessary. A software delay generates a PWM signal to control the duty cycle and adjust the LED brightness. A long press of the button turns on the LED and adjusts its brightness; a short press turns it off. Press and hold to the highest brightness setting, then the LED will turn off. Release the button to turn it on again and maintain the highest brightness. For detailed instructions, search for the Bilibili user "被玩疯的安培易爆" (The Ampere Explosion is Played Like Crazy).
  Finally, let's calculate the costs. First, color silkscreen printing and prototyping costs 30 yuan; LEDs, resistors, and capacitors (smallest selling unit) total 3.84 yuan; 5 Type-C female connectors cost 1.8 yuan; 5 STC15W104 microcontrollers cost 8.65 yuan; 5 TP4054 charging chips cost 2.05 yuan; and 5 S8050 transistors cost 1.15 yuan. Five sets total 47.49 yuan. Compared to the more complex external circuitry and touch chip dimming circuit, the total cost is significantly reduced... (It's recommended to buy from Taobao for even greater savings).
  As I'm not good at uploading programs to Gitee, both the program and simulation are uploaded to Baidu Cloud, and are permanently available.
    Link: https://pan.baidu.com/s/1WrjlLxNMpj4MnAjQDqkzEQ?pwd=Ampe Extraction code: Ampe
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-27 22:43:04

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号