Adding a LASER to my D4 (and CCT adjustment, and USBC charging, and UV, and RGB...)

26 posts / 0 new
Last post
tterev3
Offline
Last seen: 5 days 14 hours ago
Joined: 03/28/2014 - 11:22
Posts: 312
Location: NC, USA
Adding a LASER to my D4 (and CCT adjustment, and USBC charging, and UV, and RGB...)

Here’s my Emisar D4 that now has a green laser, adjustable CCT, USB-C charging, UV, RGB, and voltage/temperature monitoring:

(I had to temporarily program it with alternate firmware that just lit up everything for this picture, ha)

I’ve been carrying my D4v2 with USBC charging for a while and decided it was really missing one feature – I needed to upgrade to include a green laser like my smaller Min/Max lights. Once I got to the point where I was confident the laser would fit, I went a little crazy and decided to throw in every possible feature to make the swiss army knife of 18650 lights.

I started this by getting the USB-C port installed the same way I did in my last rechargeable D4 (although I did a much rougher job of the metal work this time):

On this build, I knew I wouldn’t have room on the driver for the charger IC like last time, so I put together this assembly to tuck the charger into a gap below the USB jack:

This is a sealed waterproof jack with the 5.1k resistors (for using USB PD sources), a TP4056 charger IC, decoupling caps, and the current set resistor. That whole assembly can tuck into the pocket I cut out in the LED shelf in the head, and it gets epoxied in place:

In the above picture you can also see the hole drilled for the laser assembly. I prepared the green laser diode and collimating optics the same way as in my Nitecore Tube green laser build. Then I took progressively larger drill bits to the LED board, TIR optic, and light head until the laser could fit.

Aside from the hole for the laser, the LED board was prepped in the same way as I did in my CCT-adjustable D4v2 with an XM-L RGBW, a 365nm UV emitter on a copper bridge, and MOSFETs for individual control of the white emitters. This one also has a thermistor added to monitor the LED board temperature:

The laser optical assembly was epoxied into the head along with the charging module like this:

The driver for this one was another one-off handmade PCB just like I did for the last two D4 projects. I cut out the 22mm circle from blank 1.6mm PCB material, and started with the 8 MEL7135 regulators for the white output that go on the bottom:

The regulators get soldered directly to a ring for the output and to ground around the outer edge of the board. The Vcc pin of each one is isolated from ground by a small cutout in the copper, to later be connected by small wire. Here you can also see the slot I cut out to be able to access the programming header:

On top of the driver there’s a PIC16F1575 on a small breakout board, and around it I laid out the other components, sketched the necessary cuts into the copper, and cut with a blade to isolate the segments:

The four regulators on top are for red, green, blue, and UV. The other circuitry on top is a boost regulator using the MT3608 which provides power to the laser diode. This is necessary because the green laser diodes need about 5V to operate. The laser output is regulated by a series resistor and I just set the output voltage of the boost converter to line up with the diode current I wanted. Here’s the top side with all components mounted:

And then I wired up all the parts on the driver:

At this point I had these two parts with a mess of wires (there were 18 in total that needed to be connected):

All the wiring to the charger, laser, and switch I had to do like this before installing the driver board:

And then I could thread the other wires in, install the driver, install the LED board, and terminate the remaining wires up top:

The optic had two holes drilled for the UV emitter and the laser:

And then it was on to firmware. Implementing the laser mode was simple since I had other lights that used this already. It is added as a secondary mode after UV (sort of the “utility” group), and this time I also added a triple-click shortcut to laser from off.

CCT adjustment I had also written before, although I had to modify it this time to use only two emitters instead of three. This light adjusts from 6500K to 3000K:

USB charging had been written previously as well, so once again it was just a matter of pulling all the code chunks together:

One last thing that was a bit tricky to include was the temperature regulation, which I did the same way as I had in my Skilhunt H03 mod. The issue was that with all these features, I had run out of I/O pins, so I had to do some pin sharing by making the “charge done” signal from the charger share a pin with the low-side enable on the thermistor divider. During normal operation, the firmware continuously monitors battery voltage and LED temperature and can reduce or cut the output as needed to maintain safety.

I am pretty proud of the microcontroller utilization on this project – I used all 16 I/O pins and 99.5% of the 14KB of memory in the PIC16F1575.

So there you have it, the most full-featured D4 ever made: laser, CCT adjust, USB charging, RGB, UV, and voltage/temperature monitoring running on MELD UI. Thanks for reading!

Yokiamy
Yokiamy's picture
Offline
Last seen: 2 hours 6 min ago
Joined: 10/18/2016 - 15:47
Posts: 3005
Location: Netherlands

That’s insane! All that small custom stuff, respect.
Awesome!

chadvone
chadvone's picture
Offline
Last seen: 5 hours 41 min ago
Joined: 08/28/2015 - 23:48
Posts: 1992
Location: Iowa

Amazing.

SammysHP
SammysHP's picture
Online
Last seen: 6 min 12 sec ago
Joined: 06/25/2019 - 14:35
Posts: 862
Location: Germany

That’s the first time I’ve seen a custom PCB cut by hand! The complete assembly is just awesome!

dave1010
dave1010's picture
Offline
Last seen: 20 hours 30 min ago
Joined: 07/04/2017 - 02:38
Posts: 252
Location: Dorset, United Kingdom

This is just… wow. I am speechless…

Ok, how about adding:

  • power bank functionality to the USB-C port
  • an LDR to sense pocket activation and to program via a computer screen
  • fan for active heat dissipation
  • accelerometer for… I have no idea but I think you need one
goshdogit
goshdogit's picture
Offline
Last seen: 4 hours 21 min ago
Joined: 12/03/2015 - 21:28
Posts: 1342

Excellent work! I knew this was you as soon as I saw the thumbnail on r/flashlight. Thumbs Up

When is the group buy? Party

id30209
id30209's picture
Offline
Last seen: 10 hours 40 min ago
Joined: 05/17/2018 - 12:20
Posts: 1867
Location: Croatia

Absolutely mad!

WTB Titanium 4sevens 2xAA tube

MascaratumB
MascaratumB's picture
Offline
Last seen: 1 hour 17 min ago
Joined: 10/29/2016 - 12:12
Posts: 6553
Location: Portugal

And the tweezers fingers are back on business Big Smile

Impressive work! Shocked

rayman
rayman's picture
Offline
Last seen: 32 min 27 sec ago
Joined: 05/06/2019 - 02:01
Posts: 6
Location: Germany

Nice job, especially regarding the soldering Big Smile

My Lights (current EDC: Reylight Pineapple Mini Titanium)

djozz
djozz's picture
Offline
Last seen: 12 hours 21 min ago
Joined: 09/07/2012 - 17:04
Posts: 17867
Location: Amsterdam
Thumbs Up Thumbs Up Thumbs Up
godot
Offline
Last seen: 1 week 22 hours ago
Joined: 10/28/2017 - 23:07
Posts: 3
Location: Australia

Now this is cool!

RamBull
Offline
Last seen: 3 days 23 hours ago
Joined: 06/13/2021 - 13:20
Posts: 26

Sign me up, if ever you decide to sell these bad boys.

iamlucky13
Offline
Last seen: 3 days 17 min ago
Joined: 06/22/2018 - 09:18
Posts: 987
Location: USA

Your custom builds continue to inspire awe. I’m stunned just to see all these features together in one flashlight, but to squeeze it all into a D4 is amazing. Really great work!

Skylight
Skylight's picture
Offline
Last seen: 10 hours 42 min ago
Joined: 10/01/2018 - 04:49
Posts: 1032
Location: Europe

You really excelled yourself. Cool Crown I have never seen such a small charging circuit. I also admire your self designed and programmed driver PCB.

18 wires inside the D4 driver cavity must be a new record.

Firelight2
Firelight2's picture
Offline
Last seen: 41 min 3 sec ago
Joined: 04/08/2011 - 15:17
Posts: 4412
Location: California

This build is awe inspiring. Well done. Crown

Next stop: Now time to add aux LEDs inside the bezel and switch. Evil

furandchalk
furandchalk's picture
Offline
Last seen: 1 week 3 days ago
Joined: 02/18/2021 - 18:03
Posts: 5
Location: The Mojave

This is probably the coolest thing I’ve ever seen.

I’ve wanted a low power 520nm laser in a small flashlight for a while, but the closest I’ve found are the 532nm DPSS weapon lights.

Did you use another 30mW PLT5 diode?

tterev3
Offline
Last seen: 5 days 14 hours ago
Joined: 03/28/2014 - 11:22
Posts: 312
Location: NC, USA
furandchalk wrote:
Did you use another 30mW PLT5 diode?

Yes exactly. Those have made it way easier to make green lasers small compared to how it used to be with DPSS

Photon Master
Offline
Last seen: 2 days 12 hours ago
Joined: 04/07/2018 - 14:04
Posts: 748
Location: Mars

Wow super cool dude. I have a 1 watt pocket green laser and the beam is gorgeous.

You could also do a blue which don’t have as beautiful a beam but are a lot more powerful for burning things and lighting stuff on fire. I have a 6 watt

ChrisGarrett
ChrisGarrett's picture
Offline
Last seen: 4 hours 31 min ago
Joined: 02/12/2014 - 22:03
Posts: 925
Location: Miami, Florida

You guys/gals really crack me up and amaze me.

I knew a guy on AudioAsylum, who whenever he bought a new electric/electronic device, would completely disassemble it and see what was up and then he would put it back to together.

You all remind me of him.

Touche’.

Chris

Rayoui
Rayoui's picture
Offline
Last seen: 4 hours 4 min ago
Joined: 08/06/2019 - 00:38
Posts: 437
Location: Portland, OR

Absolutely incredible work!

Photon Master
Offline
Last seen: 2 days 12 hours ago
Joined: 04/07/2018 - 14:04
Posts: 748
Location: Mars

So I have an Emisar 9.3 light. When you turn it on, it’s the 9 primary diodes with the normal Anduril functionality. click-click-hold switches to the other 3. There are numerous combinations of LEDs to choose from.

It would be so sweet to have 3 lasers that activate for channel 2… I’d pay mad money for something like that

Again , what you did is amazing

tterev3
Offline
Last seen: 5 days 14 hours ago
Joined: 03/28/2014 - 11:22
Posts: 312
Location: NC, USA

I wanted to update my D4v2 to match this functionality, but I didn’t want to go through the same manual work again, so I’ve designed and ordered custom driver and LED boards that are being manufactured right now:

Having PCBs will make it feasible to build these for other people if there is interest, although I doubt there’s enough interest to make it worth setting up the machining operations so people would need to do the mechanical modifications themselves.

Photon Master
Offline
Last seen: 2 days 12 hours ago
Joined: 04/07/2018 - 14:04
Posts: 748
Location: Mars

Yeah I might be on board depending on price (: looks amazing, much more so than my 3 D4v2’s (:

Rayoui
Rayoui's picture
Offline
Last seen: 4 hours 4 min ago
Joined: 08/06/2019 - 00:38
Posts: 437
Location: Portland, OR

Very nice! Might give it a shot. Looks like a very densely packed board.

Firelight2
Firelight2's picture
Offline
Last seen: 41 min 3 sec ago
Joined: 04/08/2011 - 15:17
Posts: 4412
Location: California

I’d be very interested in purchasing the PCB and driver.

  • I would need the driver pre-assembled with all components.
  • For the PCB, I would also prefer to have all components preassembled, but if necessary I could install them myself.
  • If any drilling or dremeling is needed in the head, I can do that myself.

TDL
Offline
Last seen: 1 week 3 days ago
Joined: 11/04/2017 - 18:49
Posts: 7
Location: La Chorrera, Panama

Just excellent. I am impressed and this project gives me motivation to continue learning more about electronics and flashlights.