Bike Eye


  • Detect cars behind cyclist and alert them audibly and visually
  • Provide a cheaper alternative to cycling radars like Garmin Varia™


  • Tested an ultrasonic rangefinder, but its range was too limited
  • Decided to use an ESP32 camera board with a machine learning model to detect cars
    • Programmed in C++ using ESP-IDF
    • Code based off of TensorflowLite image classification and Espressif SD Card examples
    • Initial version of firmware only collects photographs and saves to SD card
    • Collected about 1100 images to train ML model
  • Case designed in Onshape, 3D printed in PLA
    • Velcro used to attach electronics
    • Powered by Li-ion battery

Future work

To complete this project, I will need to:

  • Add TensorflowLite model to firmware
  • Create alert system
    • Buzzer, if loud enough, or display mounted to handlebars
  • Expand case
    • I think a larger battery will be necessary
  • Road-test completed device and collect more photos for continued training
Bike Eye on my bike
Example image taken by Bike Eye
Bike Eye attached to my bike
Initial ultrasonic rangefinder prototype
ESP32 camera board, with Li-ion battery
Internal electronics attached to case front piece
Front and back pieces of enclosure
Completed Bike Eye case

RGB Handlebars


  • Make cyclist more visible to cars by adding lights on the sides of the bike
    • Makes the shape of the bike more defined than if there were only lights on the front and back
  • Look cooler than a single color light
  • Have a long-lasting battery


  • Initial design used an RGB pattern LED in a long tube
    • Tube contains two AAA batteries to provide 3V to the LED
    • LED diffuser sticks out from handlebars to be more visible
      • Latched pushbutton underneath turns the light on/off
    • Electronics connected with thin magnet wire
  • Second design was more compact and customizable
    • Includes nickel-sized PCB with light circuit
      • PCB milled at home on CNC machine
      • ATTINY 45 microcontroller runs an RGB LED
        • Microcontroller programmed in C++ without Arduino framework
        • Custom light patterns can be added 
      • Pushbutton toggles light on/off and changes light pattern 
    • Powered by two coin cell batteries that together provide ~3V 
    • Case is 3D printed, with an unscrewable top for accessing the internal circuit


  • The first prototype was very reliable
    • Used for almost a year before the diffuser broke off
  • Second design was more fragile
    • If bike is leaned against a wall, the pushbutton is crushed 
  • Both designs are not bright enough to be seen during the day
    • Both designs are clearly visible at night
    • A higher power LED might be visible in the daytime, but would also draw more power
  • This project improved my skills significantly
    • I got better at milling PCBs by adjusting my workflow and finding better cutting tools 
    • I created the Clothespin PCB Probes in order to program the PCB, and they have been useful for other projects