In mid December last year I put together a switch conditioner circuit to address the issue I had with the Exposure Strada light I was using on my MTB. I ran it on the bike until the end of March 2018 when the evenings had enough daylight not to need lights.
So how did it perform? The weather in the UK at the beginning of 2018 was cold, wet and even a couple of weeks of snow. Throughout the three months of use in the cold and rain it worked reliably. I had no more issues with either the switch not responding or going into flash mode, in a fact it eliminated all the issues I had previously. It’s still running on the CR2025 battery that was fitted in December and that battery wasn’t new.
The original version was assembled on an SMD-to-DIP adapter PCB and was a bit of a hack. Since it worked so well I designed a PCB for it which has the same profile as the CR2025/2032 battery holder. The photo below shows the new PCB below next to the original hack. Since I had 10 boards made I assembled the first one for testing before making up a second to go on the bike.
The PCB was designed using EasyEDA and I had 10 boards manufactured by JLC PCB for $2 + shipping which worked out at about £6.00 for the boards shipped to the UK.
The new PCB has been profiled to fit under the coin cell battery holder and has an ICSP header so the PIC micro-controller can be programmed on the PCB.
The assembled PCB was sprayed with conformal coating to protect from moisture and fitted into the same case I used for the original circuit. Cable ties provide strain relief, the pink foam stops it moving inside the case, and some silicone grease was used between the case and cover.
You can find the schematic and PCB Gerber files along with a link to order your own boards from JLC PCB below. The MPLABX source code and HEX firmware file is also available on the easyEDA site.