My 2007 Honda CBR 1000RR has flush mounted turn signals which make it difficult for oncoming cars to see which way I am turning. This is especially difficult at 4-way stops when I want to turn left and the car across the intersection may think I'm going straight. With plenty of extra free time at the beginning of the pandemic , I decided to develop a solution. Many high-end cars such as Audi, Lamborghini, and Ford Mustang have dynamic turn signals and LED running lights which I decided to recreate for my motorcycle. With turn signals that face towards oncoming traffic, I could feel safer turning across traffic anywhere I go.
This was my first embedded project that communicated to devices over a data bus. I had to search through the datasheets and research in order to understand what an I2C address was and how to make each INA260 have its own address. I had to be cognizant of my limited code space and make functions that were dynamic and useful in multiple ways to achieve the functionality I was looking for without using up all the memory. Finally, I added Bluetooth functionality to control the lights through my phone using the Adafruit BlueFruit app. A significant amount of time was spent figuring out how much power was required for the microcontroller and how I could power the microcontroller using the motorcycle's power system and only supplying power while the motorcyle was on.
Adafruit INA260 High or Low Side Voltage, Current, Power Sensor |
Taking apart the front of my motorcycle.
Baking the headlights so I could pry the sections apart.
Installation of the LEDs in the headlights.
The INA260 is directly in line with the blinkers power line that indicates when the blinkers are in "Driving Lights Mode." If the blinkers are active, the driving light wire will receive zero current, then the system knows that the blinker is active without having to wait and detect an inconsistent signal.
Started the reassembling and running wires around the motorcycle.
Solder. Solder. Solder.
Wire LED power and microcontroller into motorcycle power system.
Demoing the new lights on my cycle.
Connecting to the Bluefruit app via Bluetooth Low Energy. The app can change the colors of the driving lights and turn signals.