** Disclaimer, I fully recognize that this project is over kill and is more of a because I can thing than a because I should **
One of my winter projects was the construction of an auxiliary fuel tank for my motorcycle. The tank adds 4 gallons of fuel and increases my range to about 400 miles (in theory…). One of the issues I noticed when I started mounting the tank to the bike is that it overhangs the rear tail light by a fair bit. Ideally I would have preferred to shift the tank forward to decrease the overhang and reduce the cantilevering, but if I did that I wouldn’t be able to get the seat on/off.
In order to compensate for the reduced visibility of the lights, I decided to mount an led light strip to the tank itself. These are cheap (~$11 on amazon) and I had one on the previous top box mount, so there is already a connector spliced into the wiring harness for it so this was kind of a no-brainier.
It probably would have been sufficient too, but then I started thinking about the Pelican case top box that is going to mount on top of the tank. Pelican cases have this removable plate centered under the handle that’s intended to be used as a custom name plate. I started wondering if I could fabricate a light that would go in that slot and act as kind of a third light/cyclops light that are now on all cars.
I took some measurements, did some research and decided it should be possible. This is when things started to get out of control… If I can put LEDs in there, why settle for just a brake light? I could use RGB LEDs and have turn signals too. My bike was made in 1997 and doesn’t have hazards / 4-ways. Why not add that capability while I’m at it? But how am I going to connect all of this to the bike? The top box needs to be removable, and I don’t want to drill any more holes in it that I have to (It already has 12V connected to it). Well, I’ve got a bunch of WROOM32 modules left over from a previous project, they support Bluetooth…
A bit more research, some circuit design, some cad models, and a bit of 3D printing later. I have a light module that has 36 SK6812MINI RGB LEDs, and two board based on the WROOM32 that will connect to each other over Bluetooth.
Light Board and Case Renderings
The module on the bike side connects to the existing connector for the LED light strip, it also outputs a mating connector. This allows the module to monitor the light inputs form the bike, and drive the LED light strip. This allows the light strip to implement the hazard capability too. I might have added a 6-axis gyro/accelerometer (MPU-6050) to this board as well for some future upgrades (apply brake lights on deceleration from engine braking, turn the 4-ways on if the bike tips over, etc).
The module in the top box connects to the bike module and creates the necessary serial data to program the array of LEDs. These LEDs use a fairly standard interface so thankfully there were libraries available and I didn’t have to start from scratch with those as they’re fairly picky about timing. Because the place I get the circuit boards from does batches of three, I created one board that could serve both functions depending on which parts were populated in order to reduce cost.
I built the module with a digital input that I could wire a switch to for the hazard function, however I didn’t really have a good plan for where to mount the switch. It occurred to me that since I already have the Bluetooth connection, I could write an app for my phone that would connect and not only allow me to turn on the hazards, but also monitor the inputs/outputs for testing and debugging. And while I’m at it, I can add a flood (white) mode and it might as well yell at me when I leave the turn signals on for too long… (I may have a feature creep problem)
I have a Bluetooth remote mounted on my handlebar that I’ve setup to do various things on my phone (easier/safer than trying to operate the touch screen while riding) and I’ve setup one of the buttons to be the hazards, we’ll see how that works for now. I may add a real switch later.