Touch type red, yellow and green rotary flash lamp device
By using microcontroller intelligent control and capacitive touch sensors in LED flashes, the problems of high power consumption and inconvenient operation of traditional LED flashes are solved, and low power consumption, timing off and dynamic light efficiency are achieved, significantly extending battery life and reducing costs.
Patent Information
- Application Number
- CN202510195110.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-04-29
AI Technical Summary
Traditional LED flashes have problems such as high power consumption, inconvenient operation and complex implementation of dynamic effects of multi-color LED rotation.
Through intelligent control of microcontrollers, the circuit structure and software logic are optimized, and 3V battery powered, capacitive touch sensors and low-power microcontrollers are used to achieve low power consumption, timing shutdown and dynamic light effects.
It realizes low-power, user-friendly and low-cost decorative electronic lighting devices, significantly extending battery life, simplifying circuit design and suitable for large-scale production.
Smart Images

Figure CN119907161A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a decorative electronic lighting device, in particular to a red, yellow and green three-color rotating flash light device powered by a 3V battery, controlled by touch and having an automatic closing function. Background Art
[0002] Traditional LED flashlights are often controlled by mechanical switches, which have problems such as high power consumption and inconvenient operation. Although there are designs for touch-controlled LEDs in the prior art, they lack the combination of low power consumption and timed shutdown, and the implementation of the rotating dynamic effect of multi-color LEDs is complicated. Summary of the invention
[0003] The present invention realizes low power consumption, timed shutdown and dynamic light effect through single chip intelligent control, optimized circuit structure and software logic. The technical solution is as follows:
[0004] Power module: powered by 3V battery (CR2032 button battery or two AAA batteries), equipped with 10μF filter capacitor.
[0005] Touch detection module: capacitive touch sensor, implemented through the touch sensing pin of the microcontroller (such as the TCA interface of ATtiny85), with built-in software debounce algorithm.
[0006] Control module: low-power microcontroller (such as ATtiny series), configured with timer interrupt and sleep mode.
[0007] LED driver module: The red, yellow and green LEDs are lit in sequence in a rotating mode through a current limiting resistor (47Ω) connected in series with the GPIO pin.
[0008] The timing timer triggers an interrupt every 1 second, and after 30 times, the LED is turned off and the system enters sleep mode (power consumption < 1μA).
[0009] Innovation:
[0010] Touch and low power consumption collaborative design: wake up the sleeping MCU through capacitive touch, and achieve ultra-low standby power consumption in combination with timed shutdown. Dynamic light effect optimization: use GPIO sequential control instead of PWM dimming to simplify the circuit and reduce programming complexity.
[0011] Anti-interference design: Hardware RC filtering (10kΩ pull-up resistor + 100pF capacitor) combined with software signal smoothing processing improves touch stability. Energy-saving and efficient: Power consumption is less than 1μA in sleep mode, significantly extending battery life.
[0012] Through the above design, the present invention has significant market competitiveness in terms of low power consumption, user experience and cost control: User-friendly: Touch to start, automatically shut down without manual operation. Low cost: Simplified circuit design, suitable for large-scale production. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Circuit Schematic
[0014] Power supply part: the positive pole of the battery is connected to VCC, the negative pole is connected to ground, and a 10μF capacitor is connected in parallel.
[0015] Touch sensor: The touch electrode is connected to the PB0 pin of the microcontroller and filtered through a 10kΩ pull-up resistor and a 100pF capacitor.
[0016] Microcontroller: ATtiny1614, PB1-PB3 drive red, yellow and green LEDs respectively, each with a 47Ω current limiting resistor in series.
[0017] Figure 2 Workflow Diagram
[0018] Initial state: The MCU enters deep sleep mode.
[0019] Touch trigger: Capacitance change wakes up the microcontroller, starts LED rotation and timer.
[0020] LED control: Switches color every 0.5 seconds (red → yellow → green → red cycle).
[0021] 30 seconds timer expires: Turn off the LED and re-enter sleep mode. DETAILED DESCRIPTION
[0022]
Hardware Implementation
[0023] The ATtiny85 microcontroller in SMD package is selected, and its layout is compact to fit on a small PCB.
[0024] The touch electrode uses a copper foil with an area of 5×5mm and is placed below the surface of the shell.
[0025] The LEDs are arranged in a triangular layout to enhance the rotating visual effect.
[0026]
Software Implementation
[0027] #include<avr / sleep.h>
[0028] #include<avr / interrupt.h>
[0029] volatile uint8_t timer_count=O;
[0030] volatile uint8_t led_state=0;
[0031] ISR(TIMER0_COMPA_vect){
[0032] timer_count++;
[0033] if (timer_count>=30) {30 seconds have passed
[0034] PORTB&=~ ̄0x0E; turn off all LEDs (PB1-PB3)
[0035] timer_count = 0;
[0036] sleep_enable();
[0037] sei();
[0038] sleep_cpu();
[0039] int main(){
[0040] / / initialization
[0041] DDRB|=0x0E; / / PB1-PB3 are output
[0042] PORTB&=~0x0E; / / Initial turn off LED
[0043] / / Timer 0 configuration (1 second interrupt)
[0044] TCCR0A = (1 < < WGM01); / / CTC mode
[0045] TCCR0B = (1 < < CS02); / / frequency division 256
[0046] OCR0A=125; / / 16MHz / (256*(125+1))≈1Hz
[0047] TIMSK0|=(1<<OCIE0A);
[0048] Sleep mode configuration
[0049] set_sleep_mode(SLEEP_MODE_PWR_DOWN);
[0050] sei();
[0051] while(1){
[0052] if(touch_triggered()){ / / Detect touch (the specific function needs to be implemented according to the library)
[0053] sleep_disable();
[0054] timer_count = 0;
[0055] while(timer_count<30){
[0056] LED Rotation Control
[0057] PORTB=(PORTB&~0x0E)|(1<<(led_state+1));
[0058] led_state=(led_state+1)%3;
[0059] delay_ms(500).
Claims
1. A touch-type red, yellow and green rotating flash light device, characterized in that include: 3V battery power module; Capacitive touch sensor, used to wake up the microcontroller; A low-power microcontroller is configured to drive the red, yellow, and green LEDs to light up in sequence in response to a touch signal, and automatically shut down and enter sleep mode after 30 seconds.
2. The device as claimed in claim 1, wherein the LED driving circuit adopts GPIO direct drive, and each LED is connected in series with a 47Ω current limiting resistor.
3. The device as claimed in claim 1, wherein the single chip microcomputer timer interrupt cycle is 1 second, and the shutdown is triggered after accumulating 30 times.