Current Measuring D4SV2 Driver concept

I made a PCB design for a D4SV2 driver that has two hall-effect current sensors to measure the total power draw of the light. It uses an ESP-01F that can connect to WIFI for easier data logging although I doubt the WIFI signal can make it out of the aluminum body of the flashlight. Between that and the likely multiple mistakes I made on the schematic I don’t plan on ever assembling one but I thought I would share it anyway.

PCB_top
The top of the board has the following ICs roughly clockwise from the top:

  • 3.3v buck converter for the ESP-01F
  • ESP-01F
  • OP-AMP
  • I2C thermometer
  • 10a CC FET
  • 100a Direct Drive FET

PCB_bottom
The bottom of the board has the following ICs:

  • 2x Hall Effect Current Sensor (Combined current measuring up to 60a)
  • I2C 2-channel ADC
2 Thanks

Regarding the wifi reception, what if an antenna was run up on top of the button board below the rubber switch cover?

Separate question: Why hasn’t USB-C has not been used for firmware updates or data collection? Would the necessary chips cause space issues? Seems like it would be a great feature if you didn’t need to use flash pads.

1 Thank

I had thought about running an antenna up to next to the optic but there are a lot of rules that come with adding a different antenna that I didn’t want to touch.

I’d imagine it’s hard to make a USB-C port that is accessible while the driver is installed in a light that doesn’t interfere with the battery.

Like laws regarding radio transmission? Seems like amazon sells a lot of stuff that is technically illegal on that front but I guess Hank is better safe than sorry.

There’s a gap in my knowledge I guess. Doesn’t USB-C have different pins for power and data? Why can’t those two functions be completely separate? To clarify, I was thinking of a charging port that doubles as a data port.

1 Thank

I was referring to rules about PCB design, like how close the antenna connector can be to other components on the PCB and the resistance of the trace that runs to the antenna connector. It all seems very finnicky so I ultimately gave up.

It might be possible, but to my knowledge there aren’t that many lights with usb charging and custom firmware to begin with

Ah ok, best practice/sound design not legal reasons. That makes more sense

Not yet! I was just wondering because I have this dream of the “perfect light” that allows deep firmware customization through a desktop application. Basically I envision a gui that allows you to tweak the firmware without having to edit code or flash hexes. No need to spend time counting blinks or clicks. Enter numerical values for stepped levels, disable modes or groups you don’t use, read the firmware version from a text readout. All changes would be done locally on the PC with a new hex being generated on Save and sent to the device on Export. I guess the product would be pretty niche but a guy can dream :smiley:

What was the purpose of measuring/dataloging the current in use ?
Also why use a hall sensor ? The regulated channel already have a sense resistor, and a very low resistance one could be added to the FET channel, like 0.5Ω, or do RdsON sensing but that might be a bit approximative.

1 Thank

Mostly as a test platform, I wanted to have a reliable way to test the current draw of a possible future 4x SFT40 or 4x XHP50 HI 3v D4SV2 with different batteries. That’s a long way in the future, though, as of now I don’t even have a D4SV2.

Actually, I didn’t even consider that. I liked the sound of “Hall effect sensing” though and this way I can measure standby current. Plus, it seemed reasonable compared to when I was looking at adding haptic feedback.