PIC12F752 Based High Power LED Flashlight
Created: Mar 09, 2017
No description available.
Portable flashlight is one of the earliest devices that utilize LEDs. LEDs are preferable than incandescent bulbs since they have longer lifespan and better efficiency. There are many LED-based flashlights available on the market these days. However, majority of these flashlights just use a simple circuit design with a resistor that limits the current that flows through the LEDs. This kind of design contributes to poor LED performance and wastes a lot of energy. In this design, an MCU is used to control an LED-based flashlight so that it could have greater lumen output and longer battery life.
This high power LED flashlight is based on a PIC12F752 microcontroller, As shown in the circuit, the PIC12F752 microcontroller’s PWM signal output controls the MCP14628 MOSFET driver. The MCP14628 drives the FDS9926A N-channel MOSFETs that limit the amount of current passing through the CREE XM-L LED. The operational modes of the circuit is determined by the multiple hall effect sensors. A magnetic selector ring is used in the flashlight. Five AH180-PL-A magnetic hall effect sensors are used to determine the position of the magnetic ring. The AH180-PL-A has a single open-drain output. When the AH180-PL-A senses a magnetic flux density larger that its operate point, its output turns ON. The output is turned off when the magnetic flux density becomes lower than its release point. As shown in the circuit, the outputs of the AH180-PL-A sensors (U5-U8) with a resistor ladder are connected to the ADC pin (RA1) of the PIC12F752 microcontroller. When U8, U7, U6, or U5 senses the magnetic ring, the voltage drop across the ADC pin (RA1) is 0V, 1.25V, 2.5V, or 3.3V, respectively. These voltage levels are used by the PIC12F752 as a reference for the operational mode. If U9 senses the magnetic ring, it turns OFF the flashlight.
Aside from the magnetic hall sensors, the design also uses a thermistor to monitor the temperature of the LED for fail-safe operation. A 50mΩ current sense resistor is also used to monitor the current passing through the LED. The whole circuit is powered by four AA ultimate lithium batteries connected in series that must be capable of supplying 7.2V. The MCP1703 LDO regulator regulates the 7.2V into 5V to power the PIC12F752 microcontroller and the MCP14628 MOSFET driver. The FDS9926A MOSFET IC supplies the LED direct from the 7.2V battery through a synchronous buck regulator network. But of course, controlled by the PIC12F752 microcontroller for maximum efficiency.