Haptics Project: CycleSense

by Louis Christiaens in Circuits > Arduino

86 Views, 2 Favorites, 0 Comments

Haptics Project: CycleSense

fietsersbond_WmSlJET.jpg

Problem Statement

In Flanders, 18% of displacements are done by bike, which is not surprising knowing that there are on average 2.19 bicycles per household [1], [2]. Use of the bicycle is good for the environment but of course also has an impact on traffic. In 2021 there were more than 10,000 total bicycle accidents, including 74 fatalities [3]. A year later, this number increases to 102 fatalities, representing 1/5 of all fatalities in 2022 [4]. This makes cyclists the second highest number of fatalities in traffic after automobilists.

In traffic, sound plays a crucial role in recognizing approaching danger. For these reasons, in France it is even forbidden to wear earphones or headphones in the car or on a bicycle [5]. Nevertheless, people with hearing damage and even those who are completely deaf are not forbidden to travel by bicycle. Unfortunately, there are no reliable statistics available in Belgium on the number of bicycle accidents directly attributable to poor hearing. This is because no unequivocal cause can be identified in many accidents, and hearing impairment is often not recorded as a factor. Yet it seems logical that there would be a correlation between the two. After all, people with hearing impairments cannot hear cyclists and vehicles around them and thus do not respond to ringing and honking. Consequently, they must rely on their other senses. Mainly sight and the perception of vibrations play an important role in this.

A survey shows that 12% of Belgians suffer from hearing loss and only one-third of these people wear hearing aids [6]. This percentage will only increase in the coming years, due to the growing population and aging population. In addition, people are more frequently exposed to harmful sounds or noise, and ear infections and other conditions cause a decline in overall hearing quality [6]. For people with hearing aids, the problem is still not solved because most hearing aids are not waterproof and therefore not resistant to rain and sweat. Therefore, due to the high price tags of hearing aids, it is not recommended to take the risk and play outdoor sports with them anyway. Moreover, people who do wear an aid while cycling may experience wind noise. This wind noise increases the faster you go, from 85 dB at 24km/h to as much as 120 dB at 45km/h [7]. By the way, given the popularity of electric bikes, it is not that difficult to reach these speeds, even for older people. This wind noise disturbs other sounds around the cyclist and makes other people incomprehensible.

If born deaf, you have a different frame of reference. For example, you do not know what the engine of a car or a bell sounds like, but you have learned to perceive and interpret road safety in a different way. Therefore, it could be argued that hearing persons with headphones miss essential information from their primary senses while this is not the case for deaf persons because they interpret situations as they should in everyday life. Yet this does not mean that the deaf are not in danger in traffic. A vehicle passing by unsuspectingly can cause shock and loss of balance. To anticipate this, the cyclist must constantly look around which in turn is exhausting for the back and neck [8]. For these reasons, innovative ideas are constantly being sought to improve everyone's safety.

 

State of Art

A first, although very simple solution, is to use "Deaf Cyclist" signs [9], [10] [11]. These can be found on clothing, backpacks, as stickers or as signs that can be attached to the bicycle saddle or carrier. These signs do not make the situation easier for the deaf but they do make other road users aware of the situation and can thus avoid certain inappropriate gestures or traffic aggression.

Other solutions include using rearview mirrors [12]. The disadvantage to this is that they are often very robust and large and distract attention from the road. Furthermore, people with hearing impairment must rely mainly on traffic lights, animated symbols and other signs or signals. It also helps to use colored markings or patterns on the road surface such as stripes or dots to clearly indicate the boundaries of the bike lane so that deaf people recognize their lane and stay in their own lane. Towards other road users, it is highly recommended to use clear hand signals to indicate their intentions such as turning or stopping. Finally, there are also maps and route planners that use visual communication, through colors and symbols, to guide deaf cyclists and plan safe routes. The foundation for all these tools, of course, begins with proper education about traffic rules and safe cycling techniques.

In a more technological context, there are modern devices for hearing aid users that take wind noise into account [7]. These include wind noise suppression that recognizes wind and reduces exactly that signal instead of muting all sound. Thus conversation and other sounds remain understandable and recognizable. There are also bicycle helmets with built-in warning lights that are controlled by a remote control mounted on the bicycle handlebars [13]. This allows the cyclist to indicate in which direction they will turn or when they will brake. Like the Deaf Cyclist signs, these provide communication from the cyclist to other road users, but not vice versa. Meanwhile, radar systems for cyclists also exist. One example is the Garmin Varia bicycle radar [14]. This radar warns cyclists of vehicles behind them up to a distance of 140 meters. The system is completely wireless and is integrated with a compatible bicycle computer. The Varia radar display can detect multiple vehicles simultaneously and indicates the speed at which they are approaching and whether or not they pose a danger. The taillight, linked to this system, also starts to light up brighter to warn approaching traffic behind the cyclist.

So there are various aids to make cycling easier for hearing-impaired and deaf people. Because of their hearing restrictions, they have to rely more on their other senses to assess different situations in traffic. The most important thing is to help these people maintain the correct position and make them aware of the traffic around them so that both their own safety and the safety of the rest of the road users can be ensured.

Supplies

Bill of Materials

  • 1 Arduino Micro
  • 1 Multiplexer TCA9548A
  • 2 Motordrives DRV2605L
  • 2 Ultasonic distance sensor HC-SR04
  • 2 Motors Drake MF
  • 33 Jumper cables
  • 3 Terminal Block Connector
  • 2 Breadboards
  • Arduino IDE software 
  • Battery Module with 9V Battery

Our Solution

HANDLE.png
INTEGRATING MOTOR.png
STEER.png
SENSOR CASE.png
INTEGRATION SENSOR.png
SADDLE.png

The solution we propose is also a radar system that will alert cyclists based on vibrations and help them maintain a safe position on the road.

The setup is very simple and goes as follows; Two ultrasonic distance sensors will be mounted under the saddle or on the bike's rack and a motor will be placed in each handlebar. Based on the readings from the sensors, the motors will react differently. If a trailing vehicle is to the right of the cyclist, the right sensor will measure and the right handle will vibrate. If the trailing vehicle is to the left of the cyclist, the left sensor will measure and the left handle will vibrate and if the trailing vehicle is right behind the cyclist, both sensors will measure and both handles will vibrate. The motors will also begin to vibrate louder as the person behind approaches, to give an indication of position and relative speed.

With these solutions we hope to ensure that the cyclists can fully focus on the road and not have to worry about what is happening behind them or what is approaching them. Suppose other cyclists or vehicles approach the cyclists then the hearing impaired are alerted and can safely adjust their position. If the right motor vibrates then they know to keep to the left of the road and vice versa. If both motors vibrate, the cyclists can decide which side to swerve to let others pass. Of course, to ensure the radar system works, cyclists must maintain a safe stance and keep their hands on the handlebars at all times.

To make the implementation a little more concrete, we designed a prototype of the handles and of the housing of the ultrasonic distance sensors. For the handle, it is important that there is contact between the vibrating part of the motor and the handle itself. The material used for the handle must conduct or transmit the vibrations well to the cyclist's hand. Therefore, it is recommended to work with metals instead of the traditional rubbers that are more likely to dampen vibrations. The small hole in wall of the handle is provided for the wiring of the motor. The idea is to run this wiring in parallel with the brake cables up to the arduino, which can be mounted centrally on the handlebar.

The housing of the ultrasonic distance sensors, as mentioned earlier, is attached to the saddle or possibly to the luggage rack. How it is attached does not matter. The housing primarily serves to protect the electronics from moisture, dirt and other environmental elements. Since the housing consists of two parts, it can easily be taken apart to repair or replace sensors, for example. There are also holes in the lid for the wiring of the sensors. Similar to the handles, the wiring will run parallel to the brake cables. The wiring thus runs across the frame to the arduino mounted centrally on the handlebars. The arduino should also be placed in some sort of case or box to protect it from various environmental factors as well.

These is are very simple examples to be able to imagine the system a little more concretely. These designs are very simple so they can certainly be modified and optimized. 



Understanding the Problem

First, it is essential to thoroughly understand the problem before devising a solution. Additionally, all existing solutions should be known. These aspects were already addressed in the Problem Statement and State of Art sections.

Selecting the Appropriate Arduino

Arduino Micro.jpg

When choosing the necessary components, it is important to know what is needed to create this prototype. Since this is a prototype, a simple Arduino Micro controller is chosen. This can be connected to a PC for programming with Arduino IDE software. The Arduino Micro is selected because it is inexpensive and has a very simple programming environment that is well-documented online. Furthermore, the Arduino Micro has low power consumption, which is advantageous when the controller is connected to a battery instead of a PC. Lastly, its compact size is ideal for mounting on a bike in the next design phase.

Selecting the Appropriate Distance Sensors

HC-SR04.jpg

There are various distance sensors on the market, but the HC-SR04 ultrasound distance sensor is ideal for this application. With a range of 4 meters, it is perfect for a bike application. Four meters gives the cyclist sufficient time to react to an approaching object. For future expansions of the prototype to larger distances on a larger scale, these sensors can be replaced with distance sensors with a greater range. However, this does not change the step-by-step construction of the product.

Selecting the Appropriate Motors

Drake-MF.png

To generate vibrations in the handlebar, two Drake MF or HF motors are used. These motors are very compact, simple, and inexpensive, and can achieve various frequencies through programming, allowing the vibration to intensify as the object approaches the cyclist. To connect multiple motors to the Arduino Micro, a multiplexer is needed.

Connecting the Arduino Micro

Arduino Board_bb5.jpg

After selecting the appropriate materials to build the prototype (steps 2-4), everything needs to be connected. Start by properly connecting the Arduino Micro to the breadboard:

  • Connect GND to ground (-, black) on the board.
  • Connect 5V to 5V (+, red) on the board.

Connecting the Multiplexer

Multiplexer.jpg
Arduino Board_bb4.jpg

Next, connect the multiplexer to the breadboard and the Arduino:

  • Connect GND to ground (-, black) on the board.
  • Connect UIN to 5V (+, red) on the board.
  • Connect A0, A1, and A2 to GND to set the address to 0x70.
  • Connect SDA of the multiplexer to the SDA pin (e.g., digital pin 1) of the Arduino.
  • Connect SCL of the multiplexer to the SCL pin (e.g., digital pin 2) of the Arduino.

Connecting the Motors

DRV2605L.jpg
Arduino Board_bb3.jpg

To connect the motors to the breadboard, the multiplexer, and thus the Arduino, motor drivers are needed. For this prototype, two DRV2605L motor drivers are chosen. Connect them as follows (repeat these steps for both motor drivers and motors):

  • Connect GND to ground (-, black) on the board.
  • Connect VIN to 5V (+, red) on the board.
  • Connect SDA of the motor driver to the SDA pin (e.g., SDA1 for motor 1 and SDA2 for motor 2) of the multiplexer.
  • Connect SCL of the motor driver to the SCL pin (e.g., corresponding with SDA, SCL1 for motor 1 and SCL2 for motor 2) of the multiplexer.
  • Connect INT to pin 13 of the Arduino.
  • Connect the motor to the breadboard.
  • Connect the + of the motor to the + of the motor driver.
  • Connect the - of the motor to the - of the motor driver.

Connecting the HC-SR04 Ultrasound Distance Sensors

Arduino Board_bb2.jpg

After connecting the motors, the final step in building the prototype is connecting the ultrasound distance sensors:

  • Connect GND to ground (-, black) on the board.
  • Connect VCC to 5V (+, red) on the board.
  • Connect the Trig pin of sensor 1 to a digital pin of the Arduino (e.g., D7).
  • Connect the Echo pin of sensor 1 to another digital pin of the Arduino (e.g., D8).
  • Connect the Trig pin of sensor 2 to another digital pin of the Arduino (e.g., D9).
  • Connect the Echo pin of sensor 2 to another digital pin of the Arduino (e.g., D10).

Connecting the Entire Setup to the PC

Connecting with pc.jpg
Total Breadboard 2.jpg

After building the board with the Arduino, it must be connected to a pc to upload the code to the Arduino and provide power to the setup. The code is provided in the Code Snippets section, where it is also explained step by step.

Testing the Prototype

First, test the prototype in a simple way to see if all built-in functions work. Test if the left and right sensors both separately make the motors vibrate. Check if the vibration intensifies as the object gets closer to the sensor. Finally, check if both motors vibrate when both sensors are activated.

Testing on a Bicycle

Battery Module.jpg
Arduino Board_bb.png

In the final step, the prototype can be tested on a bicycle. Since the PC can no longer serve as a power source, an external battery must power the Arduino. The Battery Module with 9V Battery can serve as an external power source.

  • Connect the + with VI from the Arduino.
  • Connect the - with to ground (-, black) on the board.

Then, mount everything on the bike's handlebar with the sensors under the saddle, and testing can begin. The implementation on the bike is shown in Step 1: our solution.

Code Snippets 1

Code snippet 1.png

The first part of the Arduino code includes libraries and defines some variables. The Wire and Ultrasonic libraries are included. Additionally, PWM13 and the trigger and echo pins for the ultrasound distance sensors are defined. In the next step, both sensors are defined, and the necessary code for the multiplexer and motor drivers is added. Lines 15 to 24 contain code needed for further implementation (see Code Snippets 3 and 4). Line 25 defines the number of ports used by the multiplexer.

Warning:

The minimum frequency is 35Hz, but 50Hz is chosen to provide a margin. The maximum frequency is 300Hz. These values are the limits for the Drake MF motor.

Downloads

Code Snippets 2

Code snippet 2.png

The 'void setup' function is used to initialize all components. The PWM signal is configured, and the motor drivers are initialized.

Code Snippets 3

Code snippet 3.png

In the 'void loop' function, variables are calculated and computations are performed. In Code Snippet 4, the conditional statements are defined. First, both sensors read the distance to an object. Lines 43 to 46 define the frequencies used for the motors based on the object's distance. To track the object's distance from the sensors, the code prints these distances in centimeters.

Code Snippets 4

Code snippet 4.png

The first 'if' statement checks if the distances from both sensors are between the origin and the limit. If this condition is met, both motors will vibrate. 

The second 'if' statement ('else if') checks if the distance measured by sensor 1 is between the origin and the limit. This code will only be executed if the first condition is not met. 

The third 'if' statement ('else if') checks if the distance measured by sensor 2 is between the origin and the limit. This code will only be executed if the previous conditions are not met. 

The frequency of the vibration depends on the distance from the object to the sensors, as defined in Code Snippet 3. The 'TCA9548A(ports[])' function is responsible for triggering the correct motor.

Video Recording

https://youtu.be/_Q2oywOECm4

References

[1]         ‘Vlaming fietst en wandelt meer, elektrische fiets wordt steeds…’, www.vlaanderen.be. Accessed: May 16, 2024. [Online]. Available: https://www.vlaanderen.be/mobiliteit-en-openbare-werken/onderzoek-verplaatsingsgedrag-vlaanderen-ovg/onderzoek-verplaatsingsgedrag-vlaanderen-6/vlaming-fietst-en-wandelt-meer-elektrische-fiets-wordt-steeds-populairder-cijfers-van-analyserapport-onderzoek-verplaatsingsgedrag-6-beschikbaar

[2]         ‘Fietsbezit’, www.vlaanderen.be. Accessed: May 16, 2024. [Online]. Available: https://www.vlaanderen.be/statistiek-vlaanderen/mobiliteit/fietsbezit

[3]         ‘Kerncijfers van de fiets_NL.pdf’. Accessed: May 16, 2024. [Online]. Available: https://mobilit.belgium.be/sites/default/files/documents/publications/2023/Kerncijfers%20van%20de%20fiets_NL.pdf

[4]         ‘Verkeersongevallen | Statbel’. Accessed: May 16, 2024. [Online]. Available: https://statbel.fgov.be/nl/themas/mobiliteit/verkeer/verkeersongevallen

[5]         Y. Stroosnijder, ‘Doof en veiligheid in het verkeer’, Doof. Accessed: May 16, 2024. [Online]. Available: https://www.doof.nl/samenleving-maatschappij/doof-en-veiligheid-in-het-verkeer/

[6]         ‘Cijfers en feiten over gehoorverlies in België’, Amplifon. Accessed: May 16, 2024. [Online]. Available: https://www.amplifon.com/nl-be/nieuws-en-blog/cijfers-en-feiten-over-gehoorverlies-in-belgie

[7]         ‘Veilig fietsen met gehoorverlies | Lapperre’. Accessed: May 16, 2024. [Online]. Available: https://www.lapperre.be/nl/magazine/gehoor-and-gehoorverlies/veilig-fietsen-met-gehoorverlies/

[8]         S. Prendergast, ‘I’m deaf but it doesn’t stop me cycling’, The Guardian, Apr. 15, 2016. Accessed: May 16, 2024. [Online]. Available: https://www.theguardian.com/environment/bike-blog/2016/apr/15/im-deaf-but-it-doesnt-stop-me-cycling

[9]         C. Brewer, ‘DeafBikeSigns’. Accessed: May 16, 2024. [Online]. Available: https://www.deafbikesigns.com/

[10]      ‘Cycling tips | Hobbies’. Accessed: May 16, 2024. [Online]. Available: https://www.ndcs.org.uk/information-and-support/parenting-and-family-life/hobbies/cycling/

[11]      ‘Limited Hearing Bordje (voor doven en slechthorenden)’. Accessed: May 16, 2024. [Online]. Available: https://webshop.fietsvakantiewinkel.be/limited-hearing-bordje-voor-doven-en-slechthorenden

[12]      T. M. B.- https://www.themediabay.be, ‘Beste fietsspiegel kopen 2024: top 10 achteruitkijkspiegels fiets’, Reisroutes. Accessed: May 16, 2024. [Online]. Available: https://www.reisroutes.be/blog/reisinfo/beste-fietsspiegel-kopen/

[13]      ‘NIUAWASA fietsachterlicht - draadloze afstandsbediening voor fietshelm, knipperend, 6 modi, waterdicht, USB-oplaadbaar, knipperend achterlicht : Amazon.com.be: Sport en buiten’. Accessed: May 16, 2024. [Online]. Available: https://www.amazon.com.be/-/nl/NIUAWASA-fietsachterlicht-afstandsbediening-USB-oplaadbaar-achterlicht/dp/B0CDWRBPMC/ref=asc_df_B0CDWRBPMC/?tag=begogshpadd0d-21&linkCode=df0&hvadid=658112689368&hvpos=&hvnetw=g&hvrand=1639736805784202715&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=1001130&hvtargid=pla-2202250718630&psc=1&mcid=128c78f1b2b13a2693476ffdbb1bc628

[14]      Garmin and G. L. or its subsidiaries, ‘Varia fietsradar’, Garmin. Accessed: May 16, 2024. [Online]. Available: https://www.garmin.com/nl-NL/p/518151