FearOfTheDark's Modified Light for the 10th Annual BLF/OL Contest

31 posts / 0 new
Last post
FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel
FearOfTheDark's Modified Light for the 10th Annual BLF/OL Contest

I am so happy that another BLF competition has started. Cool
I have a project that I have been putting off for a long time. So I hope the competition will give me the necessary motivation to start (and complete) it soon.

One of my favorite headlamps (Nitecore HC90) was destroyed by water ingress which caused corrosion on the circuit. I tried to fix it without success. I also contacted the manufacturer and asked to buy spare parts but they no longer have spare parts for this discontinued model.

Since I love this flashlight and don’t want to throw it away, I decided to build a new circuit that would support the three RGB LEDs as well as the main white LED.
I don’t believe that I will be able to restore the magnetic slide switch, but I want to maintain the stepless ramping for the white LED.

For those who are not familiar with the model, here is a brief description from the Nitecore website:

The corroded board and some of my tries to fix it :

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Final look and video from the stairs

View post on imgur.com
Hoop
Hoop's picture
Offline
Last seen: 1 day 17 hours ago
Joined: 12/20/2012 - 05:33
Posts: 1295
Location: land jurisdiction

Looks like a good project FearOfTheDark. Thumbs Up

Maybe you could implement linear dimming work with a slide potentiometer.

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Hoop wrote:
Looks like a good project FearOfTheDark. Thumbs Up

Maybe you could implement linear dimming work with a slide potentiometer.


This is a good idea but it will not be waterproof and water caused this whole mess in the first place Smile
FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

I have completed the board with the positive pole and a microswitch.

Instead of the USB charging socket, I inserted a switch boot. Under the boot, I placed a board with an electronic switch on one side and a spring on the other. I had to sand the board so that it would sit exactly in place like the original board.


FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

The work on the circuit board: I sawed and sand the Protoboard to fit exactly like the original one

MtnDon
MtnDon's picture
Offline
Last seen: 29 min 1 sec ago
Joined: 08/27/2015 - 18:25
Posts: 4379
Location: Canuk in NM

Nice!

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Continuing the work on the board: adding a copper contact for the negative pole (lamp body)

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Soldering the 8 current regulators to the Protoboard:

These 8 thin wires are part of the next step I started working on but haven’t finished yet and will share next time…

Hoop
Hoop's picture
Offline
Last seen: 1 day 17 hours ago
Joined: 12/20/2012 - 05:33
Posts: 1295
Location: land jurisdiction

Wow. I wasn’t expecting this!

lumenzilla
lumenzilla's picture
Offline
Last seen: 1 day 9 hours ago
Joined: 06/09/2015 - 04:18
Posts: 1070
Location: Java

I believe this will be good Thumbs Up

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Thanks guys.
Hope it will be good.

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

“Dead bug” soldering the MCU (The wires may be familiar to you):

MtnDon
MtnDon's picture
Offline
Last seen: 29 min 1 sec ago
Joined: 08/27/2015 - 18:25
Posts: 4379
Location: Canuk in NM
Smile Thumbs Up
The Whispering ...
Offline
Last seen: 2 hours 40 min ago
Joined: 06/25/2018 - 21:36
Posts: 93
Location: Florida

Nice work so far, can’t wait to see the finished product. What firmware are you going to use? Anduril for the stepless ramping?

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel
The Whispering Gallery wrote:
Nice work so far, can’t wait to see the finished product. What firmware are you going to use? Anduril for the stepless ramping?

Thanks, I wrote my own FW.
Actually that’s why I only started making progress with the HW in the last few days, I was busy writing the code.
I did not find any existing FW for controlling four LEDs (RGB+W)

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

I haven’t updated on my progress in the last few days because after soldering almost the whole circuit I couldn’t get it to work Sad
I had to desolder all components and wires and repeat everything, step by step, until I realized that the problem is probably with the current regulators.
I couldn’t figure out which of the components is defective so I will replace them all.

MtnDon
MtnDon's picture
Offline
Last seen: 29 min 1 sec ago
Joined: 08/27/2015 - 18:25
Posts: 4379
Location: Canuk in NM
FearOfTheDark wrote:
I haven’t updated on my progress in the last few days because after soldering almost the whole circuit I couldn’t get it to work Sad

Very frustrating. I’ve run into that and now am certain to test the operation many times as assembly progresses. Keep up the good work. Smile

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

So it turns out I was just unlucky twice and two defective regulators managed to get into my component pool. I have to stop ordering components from AliExpress Facepalm

After I replaced all the regulators I encountered the same problem again – changing the PWM did not affect the LED and it illuminates constantly in low brightness , even with a cycle time of 0.

I turned to the BLF experts for help, but the solutions they offered me did not solve the problem:
I added a capacitor to filter the noise on the ATtiny’s voltage and even lowered the ATtiny’s frequency.
Unfortunately, lowering the frequency to 128KHz locked the ATtiny to burn and before I realized it, I changed to my second ATtiny and destroyed it too.

I was very desperate because I had no more ATtinys left to replace and I was already considering abandoning the project.

Finally, after some online research, I found a tip to change the frequency of the ISP’s clock and I was able to burn to the ATtiny again but I still haven’t solved the problem with the regulators.

I decided to desolder all the regulators from the circuit again and check them one by one until I found the faulty component and threw it away.

After all this struggle I soldered the working regulators back to the circuit for the third time and now it finally works properly.

bobvoeh
bobvoeh's picture
Offline
Last seen: 9 hours 55 min ago
Joined: 09/21/2021 - 23:29
Posts: 465
Location: Florida, United States

Frankenheadlamp! Love it. Can’t wait to see how this turns out.

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

After I finished with the regulators, I removed all the LEDs I solder for debugging the circuit and FW.
I permanently connected the resistor and capacitor. I had to sand down the capacitor to fit it in the narrow space between the board and the lid

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel
bobvoeh wrote:
Frankenheadlamp! Love it. Can’t wait to see how this turns out.

Thanks bobvoeh,
Unfortunately, it takes a lot more time than I planned

MtnDon
MtnDon's picture
Offline
Last seen: 29 min 1 sec ago
Joined: 08/27/2015 - 18:25
Posts: 4379
Location: Canuk in NM
FearOfTheDark wrote:
Unfortunately, it takes a lot more time than I planned

Doesn’t most things? Wink Looking good.

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel
MtnDon wrote:
FearOfTheDark wrote:
Unfortunately, it takes a lot more time than I planned

Doesn’t most things? Wink

Indeed, especially hardware projects

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Just before I put everything together, I wrote a FW that turns on the LEDs randomly to make sure everything works as expected

 

MtnDon
MtnDon's picture
Offline
Last seen: 29 min 1 sec ago
Joined: 08/27/2015 - 18:25
Posts: 4379
Location: Canuk in NM
Thumbs Up
wcddesign
Offline
Last seen: 1 week 4 days ago
Joined: 11/25/2021 - 21:49
Posts: 90
Location: United States

Oh I hope I’ve learned enough by next year to write my own firmware. This looks great.

FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

The last steps always take the longest. But, the deadline is approaching so I have to move forward with the project.

I soldered all the wires, to the button and to the colored LEDs.
I also glued the rubber to protect the button.
Unfortunately the original wire for the main LED is too short and I can't close the light so I have to replace it to complete the light.

Meanwhile I ran it with the random FW to make sure everything works.

 



FearOfTheDark
Offline
Last seen: 21 hours 44 min ago
Joined: 12/19/2020 - 16:39
Posts: 95
Location: Israel

Before the end of the competition, I disassembled the LED and r reflector to replace the wire. I soldered a new longer wire and closed the headlamp.
Apart from the new button instead of the charging socket, it is not possible to tell that the entire internal circuit has been replaced.

MtnDon
MtnDon's picture
Offline
Last seen: 29 min 1 sec ago
Joined: 08/27/2015 - 18:25
Posts: 4379
Location: Canuk in NM
Thumbs Up
MascaratumB
MascaratumB's picture
Online
Last seen: 7 min 54 sec ago
Joined: 10/29/2016 - 12:12
Posts: 7357
Location: Portugal

Wow, this was a modification deeper than it was expected Wink
I’m glad it worked out well and that you solved it! The learning curve surely rose in this project!
Well done Thumbs Up