Introduction: Smarter Bicycle Helmet
I started the »instructable« for my son's school project. The project was to sell something interesting and so, the idea came up to sell smarter bicycle helmet.
The bicycle helmet is equipped with turn signal lights, which are controlled by the gesture of cyclist’s head. Therefore the cycler does not need to let go off the bicycle handlebar to point to the direction he wants to go making the cyclist a bit safer.
Switching on turn signal is done by swinging head two times to wanted direction. Switching off the lights is done by swinging head down or another two times to the same direction as was done to switching on. The cyclist know if turn signal light is on by a buzzer which plays a tone – left light makes slightly different tone than the right one. The buzzer on start-up also tells the cyclist if something went wrong or if start-up procedure of connecting all sensors has finished successfully.
The helmet itself is not changed: the whole electronics is just an upgrade and is embed onto.
The main part of feature is Arduino MicroPro with Gyro sensor and turn signal lights composed from six 5mm LEDs. The electronics is powered with small 500mAh Lipo battery.
Gyro module connection uses I2C bus, therefore it needs connection to SDA and SCL port (pin 2 and 3 on Micro Pro). It also needs connection to first interrupt pin (pin 7 on Micro Pro).
Pin 10 and 16 is used for switching Leds and pin 14 for enabling/disabling buzzer. For testing purposes Bluetooth module is used. RX pin from BT module is connected to TX0 pin on MicroPro and TX pin on BT module is connected to RX0 pin on MicroPro. The helmet sends its state through Bluetooth to for example to mobile phone.
From time to time gyro module needs calibration. To start it a micro key switch is used. It is connected to pin 4 on MicroPro.
Although connection is easy, getting output too. Filtering Gyro output is not (even an example of using Gyro, which can be found on the playground arduino page says that). More of that can be seen in the source code.
Used libraries and tutorials
- Basic information MPU-6050 Accelerometer + Gyro from https://playground.arduino.cc/Main/MPU-6050
- MPU6050 tutarial by “Arduino script for MPU-6050 auto-calibration”: http://42bots.com/tutorials/arduino-script-for-mpu-6050-auto-calibration/
- MPU6050 tutorial and information from Arduino forum https://forum.arduino.cc/index.php?topic=514498.0
- I2Cdev and MPU6050 library by Luis Ródenas from https://github.com/jrowberg/i2cdevlib
- EEPROM Arduino library
- My cycle helmet
- Arduino MicroPro (www.dx.com for 5.99$)
- Gyro module MPU6050 (www.dx.com for 2.86$)
- Battery protection board (www.banggood.com for 2.49$)
- 500mAh battery ( www.aliexpress.com for 4.86$)
- twelve yellow 5mm diameter LEDs (6 for each side). Each Led pulls 20mA of current at 1.8V (Ebay for 0.14$ for all)
- 6 resistors 82 ohms
- 2 N-Channel MOS-FET for powering Leds (e-bay AO3400 A09T 5.7A/30V SOT23 N-Channel MOSFET)
- 1 P-Channel MOS-FET for powering BlueTooth module (Optional)
- 4 resistors 10kOhm (1 optional)
- 1 resistor 100 Ohm
- Buzzer 5v (E-bay for 0.2$)
- 2 micro key switch (1 optional)
- BlueTooth module (optional)
I didn’t complicate with Led support: I made it from plastic I got in my warehouse and glued Leds with hot glue to supported plate. The Led support should be made from carton paper too.
Two Leds and 82 Ohm 1/4W resistor are connected in serial together. For one side I connect three such serial connections in parallel together. The Leds’ wires are connected to these parallel Leds. I calculated proper schema in the Online Led calculator (http://led.linear1.org/led.wiz). Anyhow you can change the number and the type of Leds as suits you. I use MosFets which I have them at home. They can hold up to 5.7A of current at 30V. I think they resist enough current J.
Support circuit board
Support circuit board is used to connect all other stuff together. I took SMB version of resistors and MosFets to create as small circuit board as I can do by myself.
I bought a Photo coated pertinax. I printed the circuit with laser printer on transparent foil. After 10 minutes of lightning with VTF bulb (Philips HPL-N 125W E27) I developed the board with 7% NaOH solution with water and etched with solution of 17% of HCl (30% hydrochloric acid), 17% of H2O2 (30% hydrogen peroxide) and 66 % of water (I bought all chemicals in a local drugstore).
With hot glue I glued to the support circuit board also battery shield. It is placed to pre-made hole in circuit board for charging LiPo battery using micro USB cable.
I put Battery shield board and Arduino MicroPro into thermo shrink tube to prevent any unwanted connections. In Arduino board I cut out holes for connectors which were the simplest as should be.
I soldered connection wires directly to the board without pre-drilled holes.
At the top of support board I glue little on/off switch. Also, with hot glue.
The support board is screwed to the helmet by two plastic M3 screws to the holes created with thicker needle. These two holes are the only deformation on helmet.
Bluetooth module is optional. It is used only for testing purposes. It sends Gyro data to Bluetooth receiver rather than to Serial window on PC. Some debugs are send too.
I use Android's Bluetooth Terminal HC-05 applet to read the helmet data.
Bluetooth module should be used for some other features (not implemented yet). In case to save helmet’s power the micro key switch is implemented into the connection board to switch off Bluetooth transmitter by one MOS-FET transistor.
The idea of other features is to send SMS with GPS coordinates to someone in case that cyclist falls from bicycle. The problem here (at least I see it) is that is hardly distinguish if cyclist is really falling. Such signals are very similar to some other situations therefore I was not implemented yet.
We have a be nice policy.
Please be positive and constructive.