Home Creators Posts Import Register Favorites Logout

Content

The circuitry in this cheap but useful torch/flashlight is mostly what I was expecting, but with a twist.

It uses a strange charge control chip that needs a little external help to drive the LEDs. I think it just needs an inverter, but can also use spare pins on a microcontroller and very simple inverting software.

I'd guess something like this on a PIC microcontroller in the PWM loop.

btfsc gpio,1
bcf gpio,2
btfss gpio,1
bsf gpio,2

https://youtu.be/WVMYdgZIN1U

Files

Trashy big LED torch with intriguing charge control chip

This torch/flashlight is the sort that you'd probably find on eBay listed as 1 billion candlepower. It works, and the circuitry is what you might expect in a product like this. It does have one oddity. A charge control chip in a classic SOT23-6 package, but with the ability to drive a four LED charge status bar graph with a little help from the microcontroller. I've not seen a charge control chip like this, but a quick search for suitable keywords did not pull up a datasheet. Trying to work out how it controls the LEDs is an amusing mental challenge. The light itself is actually usable if you can forgive having to mince through other modes to turn the light off, but aside from its functionality it also has the useful aluminium core LED panel, a rectangular LED COB array and the little charge and control PCB. Here's a link to the item on AliExpress (not a sponsor). This is an affiliate link, but that will not affect the price you pay. https://s.click.aliexpress.com/e/_c4mW3CxP If you enjoy my videos and would like to support me with a dollar or two for coffee, cookies and gadgets to take apart, you can do so by supporting me on Patreon. I release videos without adverts for critique and feedback on Patreon as soon as they have been made. I also release Patreon-only backstage videos when I'm working on shows. https://www.patreon.com/bigclive Alternatively, for a single coffee contribution you can use PayPal:- https://www.paypal.com/paypalme/bigclive #ElectronicsCreators

Comments

Dave Curran

A lot of the new microcontrollers have those CCL (Configurable Custom Logic) logic blocks where you can set those pins to act like a logic gate, so it could have set that up to act as an inverter without needing any code when running. Amazing some of the clever things they think of to save a few pins.

Mike Page

Nice code, Clive. I wondered if XOR would be tighter but no!

Dustin S Cochran

Had an opening like this a couple days ago, when my mother broke the flashlight she'd just bought for $6...... unplugging the charging cord yanked the rear cover and circuit board out, breaking a wire in the process. When you said it the LED's were done weird, I was almost expecting them to be multiplexed with the main cobs.

Big Clive

Yeah, I considered other options, but four lines of code is nice and tight.

H_D

Is that Charlieplexing or something even weirder?

Big Clive

In a way it's slightly more complex than Charlieplexing which would have been able to control up to six LEDs individually if the charge chip had one more spare pin. This is a hybrid that applies logic to one of the two output pins to fake a third pin.