Smarter Bicycle Helmet

2,231

23

6

Intro: 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 composition

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

Material used

- 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)

Led diodes

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

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.

Share

    Recommendations

    • Tiny Home Contest

      Tiny Home Contest
    • Audio Contest 2018

      Audio Contest 2018
    • Metalworking Contest

      Metalworking Contest

    6 Discussions

    0
    None
    jonidb2003

    Question 5 weeks ago on Introduction

    Hi Andre, I trying to create a similar project for nephew who is starting this journey with the Arduino boards, we have a question... how did you used the following variables "stateLR" ,"sigTime" and " intTime " because the are not listed in the code? also why did you use arduino micro pro instead of for instance nano?

    thank you

    2 more answers
    0
    None
    Andreo31jonidb2003

    Answer 4 weeks ago

    Hello.

    Sorry for slow reply.

    As you saw in source code
    the part where "stateLR" variable is used is commented out. I leave that part
    of code in the ZIP to see my first implementation. So it is not used any more.

    Both “intTime” and “sigTime”
    variables are used to control how much time the helmet is moving – in other
    words to get the movement speed. Too slow movements have longer movement times,
    on the other side, too fast movements have too short movement time. I want to
    filtered out movements which are not caused by intentionally helmet movements.

    "intTime" is used
    to remember when the whole gesture is started. For example, the time when you
    start swinging the helmet to enable left direction. The whole gesture time (two
    swings) needs to be done in MAXINTTIME_d.

    “sigTime” is used to know in
    which time one single signal is done. For example: one swing to the Left without
    swinging back – so the time when helmet is moving from center to the left
    position.

    Nano or Micro Pro: I do not know. That time I already
    have Micro Pro at home, so I just use it. I think you should use Arduino Nano
    as well. Take care only for TX, RX, SDA and SCL pins. TX and RX are used for
    Bluetooth, SDA and SCL for Gyro. Other pins are not so relevant.

    Have a nice "arduino" :-)

    0
    None
    jonidb2003Andreo31

    Reply 4 weeks ago

    Andreo, that was very helpfull thanks a lot... :)

    0
    None
    Andreo31

    7 months ago

    Thank you for comments.

    To market this stuff is another story. Too much bureaucracy, especially since the items are under GPL license...

    0
    None
    Tanzer26

    7 months ago

    You should be marketing this to one of the helmet manufacturers. I am really impressed with the movement based control.

    0
    None
    jessyratfink

    7 months ago

    Super clever to require more than one movement to turn on the signals. Well done!