Friday, September 25, 2020

Min/Max light version 2



Here’s version 2 of my Min/Max light – a flashlight built from scratch with the aim of having the minimum size with the maximum functions. I shared version 1 here.


This time around I designed and built this light from the ground up instead of modifying an existing light. I included every feature I could think of for a small EDC light:

  • adjustable brightness
  • red, green, and blue color modes
  • ultraviolet
  • a green laser
  • USB-C rechargeable
  • temperature control
  • battery power instrumentation
  • a graphical color display
  • a tail switch as well as up and down switches
  • a touch sensitive panel
  • a tailcap magnet

and of course this includes all the functions of my previous MELD flashlights – strobes, configuration options, automatic shutdown, etc.


I managed to fit it into a final size of 51×30×17mm.





The structural parts are 3d printed in ABS. a central plastic frame holds all the electronics wrapped around the lithium battery, and there is a heatsink formed from a folded copper sheet that wraps around the right side.




To get this to fit into the smallest package possible, I put all the electronics including the emitters onto a single flexible PCB. This PCB is folded to cover 4 sides so that it can hold emitters on the front, a display on the side, switches, touch panel, laser, and charge jack on top, and a tail switch on the back.



This light does all the same stuff as my other MELD lights, with the addition of the green laser, USB charging, a third switch, and of course the color display. The the display always shows mode, LED temperature, battery charge status, drive current, and a remaining runtime estimate.


Here’s a video with details on the build process and demos of the finished light:



Sunday, September 20, 2020

Cheap action cam hacked into dash cam

 


I found this cheap GoPro clone action camera on eBay for about $20. The video resolution is clearly a blatant lie, but if you don't need very high def video it's a pretty capable device for the price. I thought it would do well as a dash cam, but it needed a few hacks first. 

With a combination of 3D print and 3D pen (in ABS) I made a simple magnetic mount to attach it to my rearview mirror. 

When the car powers up, it provides power to the camera (via micro USB), and the camera powers up by default. But it still required me to manually start the recording, and then to stop it and turn off the camera after turning the car off. I wanted to make this process completely automatic, so I opened the housing and probed some connections to find what I needed. Fortunately all the signals necessary were available on this one board on the top of the camera where the record button is:


After the scope showed that switch signals weren't scanned or multiplexed, it was easy to fake button presses just by directly connecting switch signals to GPIO lines. The added microcontroller would run from a switched 3.3V rail, so to safely sense the 5V external power, I added an N-channel FET to provide a pull-down signal when it was present. The added microcontroller is a PIC10F322 on a small breakout board:


The firmware is a very simple state machine that detects a bootup due to external power, and then provides switch inputs to start recording. If the camera is started up manually instead, the hack chip does nothing so that the camera can be used normally. While recording, it just waits until external power is removed (because the car has been turned off), records for a bit longer, then stops recording and turns the camera off. 

Here is the firmware: https://github.com/tterev3/dash-cam-controller/blob/master/dash%20cam%20controller.c

And here is a short demo video of the whole process: