Introduction
The Bike Box was a Fall 2016 senior year design project at LSU, as a team effort between myself and four electrical engineering majors, Boston Hock, Timothy O’Young, Jacob Primeaux, and Mike Tran. This section outlines the project as a whole, its various subsystems, and the results. As the only computer engineering major on the team, I handled all matters pertaining to system logic, communication, microcontroller design and programming, and app development. For more information on these roles, see the Microcontroller and Bluetooth or Android App sections.
Objective Statement
"The purpose of the Bike Box is to keep cyclists safe on the road, especially at night. To accomplish this goal, the Bike Box will serve as a central hub for many different components that will improve visibility, detect approaching cars, and even offer power alternatives that will keep the device running longer. The rider decides what modules to connect based on his or her preferences, and the modules are integrated seamlessly through a combination of physical controls on the bike and a comprehensive smartphone app."
Engineering Requirements
- The rear sensor will detect vehicles 60 meters away.
- The rear sensor will work in nighttime conditions.
- The rear LED panel will generate 20 lumens of brightness, while the headlight will generate 300 lumens.
- The security module alarm will sound if the bike is in motion for at least 3 seconds while armed.
- The main hub will have 8 ports for various modules and systems.
- The battery will have a lifetime of at least 6 hours on full load without power alternatives.
- A smartphone will establish two-way communication with the microcontroller at all times.
- The pedal generator will provide 4 watts of power while a rider pedals at 4.5m/s.
- The solar panel will produce 1 watt of power in clear weather conditions.
- The device will have an IP rating of at least IP55.
- The central hub will be sold for $150.
- The Bike Box with all of its components will be sold for $400.
Central HubThe central hub is designed to serve as a bridge between all modules, while also providing logic, power management, and Bluetooth connectivity. Using an ATMega1284P 40-pin DIP microcontroller chip, the central hub’s printed circuit board provides such functions as powering the security module alarm, generating pulse-width modulated 5-volt signals to dim the headlight, detecting when modules are plugged in, and communicating with a Kedsum HC-06 Bluetooth module through serial TX/RX pins. The main PCB also includes power circuitry which charges the main batteries by regulating whichever power alternative is generating the most power at any given time, either the solar panel or pedal generator, even when the device is powered off. While powered on, it provides the appropriate voltages for all internal components and external modules. The hub connects to outside modules and power sources through 8 waterproof connectors. Specifics on my role as the microcontroller developer (such as coding and related hardware selections) can be found here. ![]() |
SecurityThe security module uses an ADXL335 accelerometer and 5-volt buzzer to alert people nearby when the bike is being stolen. It is the only module that connects to the central hub from inside by header pins rather than externally through one of the waterproof connectors. This is done to make disabling the security module impossible by merely disconnecting it. Even turning the Bike Box off or cutting power will not disable the security module, as the microcontroller activates a relay on the PCB when the alarm is set, enabling backup power from two 3.7-volt lithium ion polymer batteries. The accelerometer sends readings along each axis as 3 analog inputs to the microcontroller, which uses a constant sample rate to calculate the average change in acceleration over time. If any of these values are above the threshold determined during calibration, the alarm sounds. ![]() |
Battery and Power GenerationPower is provided to the central hub through a charge controller connected to a set of four 3.7-volt lithium ion batteries, creating a 14.8-volt pack. These batteries can be charged using a wall charger, but power can also be generated using two Bike Box modules, a radial pedal generator and a solar panel. The Boss Buck solar panel operates at 18 volts and can provide over 1.26 watts of power in ideal conditions. It is small enough to mount to the top of the central hub enclosure. The pedal generator makes use of magnets and coils to produce electricity from the bike’s natural motion without being a hassle for the user. ![]() |
Rear SensorTo detect approaching cars, a 5-volt Arduino-compatible rear sensor was constructed using a HB100 microwave sensor with additional filtering circuitry. It emits a 10.525 GHz signal and measures the resulting Doppler shift. The frequency of the 0-4V output changes depending on the speed of nearby objects, with higher frequencies indicating faster speeds. The microcontroller estimates the frequency of the digital input and uses an averaging filter to determine whether a car is approaching. It responds by activating the hazards on the rear LED panel to warn the driver. ![]() |
Rear LED PanelA 3D-printed enclosure in the rear of the bike houses a circuit board that integrates both the rear sensor and three sets of LEDs that act as blinkers. The blinker panel runs at 12 volts and can signal a right turn or left turn using a toggle switch on the handlebar or be controlled through the Android app. ![]() |
HeadlightThe headlight was built from a 3-watt, 194-LED bulb with focusing lenses and a reflector, inside a custom enclosure designed in Fusion 360. The headlight provides 350 lumens of brightness and can be toggled on and off using a physical switch on the central hub or through the app. ![]() |
Android Application
The Android app is compatible with all Bluetooth-enabled Android smartphones running version 1.7 and higher, and automatically connects to the Bluetooth module once it has been turned on and is within range. When disconnected, the app continues to search for the Bike Box until it finds the Bluetooth module or the app is closed. Settings for each module appear when the module is plugged in and disappear when they are unplugged.
Some basic features of the app include turning the headlight on and off, adjusting headlight brightness, toggling the blinkers, activating hazard lights, and changing the blink speed. The security section of the app can only be accessed by a user-defined PIN verified by the microcontroller over Bluetooth. From here, the user can arm or disarm the alarm, change alarm sensitivity, and set alarm duration. All app events including the reception and transmission of custom Bluetooth code strings can be viewed from the Developer Console.
Specifics on my role as the application developer can be found here.
Testing
Each module passed individual testing before being brought together for a final breadboard test. After construction of individual circuit boards, each also module successfully tested on their own. However, when integrating all components, issues surfaced with the waterproof connectors, which did not provide proper a conductive path between the modules and the main circuit board. Even after working through connector problems and all components worked effectively together, eventually power and grounding issues surfaced as well. In one instance, a short of the 12-volt supply to ground caused the damage of several components, including the microcontroller and 9-volt regulator. These components have since been replaced. Although valid readings from the rear sensor have been read through the Android app, the module has since stopped providing output, and will not be integrated.
Results
By the end of testing, all modules and components with the exception of the rear sensor are operational. However, not all modules met expectations. Below is an analysis of the requirement outcomes:
- ✘ Requirement not met. The sensor did detect approaching objects, but could not be optimized before malfunctioning.
- ✔ Requirement met. The sensor readings were not affected by nighttime operation.
- ? Unable to determine. Insufficient tools for determining lumens.
- ✔ Requirement met. The amount of time taken for the alarm to sound varies widely. However with adjustment of threshold values, the alarm will sound well within 3 seconds.
- ✔ Requirement met. The main enclosure has 8 waterproof ports for attachments.
- ✔ Requirement met. The battery lasted over 6 hours at full load.
- ✔ Requirement met. Once connected, the smartphone app maintains its connection until the app closes or the Bike Box is turned off.
- ✘ Requirement not met. The pedal generator generates power, but does not provide enough to meet the requirement, and needs a boost converter to properly integrate into the system.
- ✔ Requirement met. The solar panel produces 1.5-watts of power
- ✘ Requirement not met. The waterproof connectors did not provide a water-tight seal.
- ✔ Requirement met. Estimates indicate that the main hub can be sold for $140.
- ✔ Requirement met. Estimates indicate that the entire set of modules can be sold for $400.





