Control module flashlight PWM [140019-I]

The assembly is initially designed to drive an leds flashlight or any other battery-supplied led lighting application with a PWM dimming. The module is designed for a 7.2V battery supply but the regulator can be supplied with a voltage of up to 14V. The electronics is controlled by an ATTINY45 microcontroller programmed through an in-system programming interface.
The assembly is initially designed to drive an leds flashlight or any other battery-supplied led lighting application with a PWM dimming. The module is designed for a 7.2V battery supply but the regulator can be supplied with a voltage of up to 14V. The electronics is controlled by an ATTINY45 microcontroller programmed through an in-system programming interface. The power consumption of the circuit has been minimized in order to preserve the battery life. A battery management function is integrated with a visually bicolour led visual indicator that operates in "flash mode" to optimize the power consumption: o " Green flashing " normal operation. o "Orange flashing" low battery. o " Red flashing " flat battery. The microcontroller cuts the lighting leds when it detects the battery is flat and will restart automatically once the battery is recharged. The light intensity of leds can be adjusted with a two positions switch. By default, a PWM value of 50% is applied on software start-up. Additionally, a push-button enables to switch the flashlight to flash mode in order to signal oneself on the roadside for example.
Diskussion (1 Kommentar)
Sunil_M vor 10 Jahren
Introduction:
This project is designed to control LEDs or any other application battery. The module is intended for a battery of 7.2V but allows the regulator to be supplied with a voltage of up to 14V.The circuit provides options for changing the intensity of the light as well as modes (flashing or steady)using Pulse width modulation. The device is also provided with a bicolor LED to indicate battery status
Circuit description:
The Control module Flash light has hardware and software components which interact with each other to provide accurate functioning of the device. The portability of the device is increased by the small size of the circuit that is provided by the use of SMD components.
Hardware:
The heart of the circuit is the ATtiny45 microcontroller which is an 8 pin IC, connected to its PWM output pin (Pin 5 of microcontroller) is the LED light. In order to control the intensity and mode of operation of the LED light, connected to the microcontroller ADC pin (pin 2) is a toggle switch to change the intensity of the LED light and a push button which when pressed the LED light mode switches to flashing.
The battery level is indicated by a bi-color LED connected to Pin 6 and pin 7 of microcontroller. The bicolor LED is controlled by the input voltage read on the ADC (pin 3) of microcontroller.
Software:
The software is written for ATtiny45 microcontroller using the Bascom AVR IDE and is configured to work at 8MHz internal frequency. The software contains two parts, then that controls the mode and intensity of the PWM LED and the other reads the battery voltage and provides battery status indication through a bi-color LED.
The ADC3 of microcontroller is read to get the status of the toggle switch and push button. The ADC value is scaled with 3.3V. The intensity and modes of operation of the LED Light are defined as follows:
The battery level is read through the ADC2 pin of microcontroller which in turn controls the output on the bi color LED as follows.
Operation:
The module is intended for a battery of 7.2V but allows the regulator to be supplied with a voltage of up to 14V. The supply voltage to the microcontroller is regulated by the use of ASM117 voltage regulator at 3.3V. Diode D1 (BAS70) and the voltage divider circuit are used between the supply voltage and the microcontroller ADC pin to provide a battery status voltage to the microcontroller pin.
Since the microcontroller operates at a voltage of 3.3V which is insufficient to drive to LED light, a MOSFET has been used to boost the power and to drive the LED.
On power up the microcontroller reads the status of the switches and sets the intensity of the LED light accordingly. It also reads the battery voltage and accordingly outputs the status on the bi-color LED.
dsc07450-0.JPG (99kb)
dsc07452-0.JPG (95kb)
140019-i-control-module-flashlight-pwm-project-0.jpg (251kb)
140019-I_Control module flashlight PWM_Top_Screen (15kb)
140019-I_Control module flashlight PWM_Top_Copper (17kb)
140019-I_Control module flashlight PWM_Bottom_Copper (11kb)
PCB Design_ 140019-I_Control module flashlight PWM (11kb)
Software (14kb)
Hex File (1kb)
Fuse Bit Settngs (25kb)
GERBER_140019-I_Control module flashlight PWM (13kb)
BOM List (16kb)
PCB Project (36kb)
Document (0kb)