My Haptics Project

by r0850637 in Workshop > Cars

86 Views, 1 Favorites, 0 Comments

My Haptics Project

651736f9958f4d4ac42eeb21_image (2).png
figure 1.png
Schermafbeelding 2024-05-22 130314.png

Problem stament

On today's roads, "blind spots" pose a serious danger to both drivers and fellow road users. These areas, where the driver's vision is limited, have already led to many road accidents, sometimes with serious consequences. For example, figures requested from mobility minister Lydia Peeters show that the number of blind spot accidents in Flanders will have increased by 35% in 2022 compared to 2021 [1]. An important aspect of blind spot accidents is the fact that older vehicles and trucks are often not equipped with advanced warning systems that modern vehicles do have. One of the most important aspects of these systems is the ability to immediately alert the driver to the presence of another vehicle or other road users in the blind spot. This lack of warning systems in older vehicles and trucks contributes to the persistence of blind spot accidents on our roads [2].

Thus, a significant number of vehicles on the road, especially older models and trucks, lack crucial safety features such as blind spot warning systems. These systems are designed to alert drivers to the presence of vehicles or other road users in the blind spot. The lack of this technology in old cars contributes to an increased risk of road accidents and injuries. This affects not only the drivers of these vehicles, but also other road users, such as cyclists and pedestrians. Figure 1 shows a marked increase in the number of blind spot accidents involving a vulnerable road user, especially a pedestrian, cyclist or moped rider. In 2022, that number was almost double that in 2020, which were very worrying figures. This involved more than 212 accidents in 2022 both between vulnerable road users and motorised vehicles, as well as between motorised vehicles. In about two-thirds of this number, the victims were weak road users, which was a 25% increase compared to 2021 [3]. The consequences of dead-angle accidents range from property damage to serious injuries and even fatalities, making it an urgent problem that needs to be addressed.

Figure 1: amount of dead angle accidents

Unfortunately, blind spot accidents do not only occur in Flanders, but are a frequent cause of casualties all over the world. Recent statistics presented in the Traffic Safety Facts Report of the National Highway Traffic Safety Administration (NHTSA) reveal an alarming picture of the road safety situation in the United States over the past year. More than 6.1 million traffic accidents occurred during this period, with a large proportion due to blind spot accidents. This contributed to the loss of nearly 43,000 lives due to fatal accidents. Besides this terrible number of deaths, about 2.5 million people suffered injuries as a result of these accidents [4].

One promising solution to this problem is to implement haptic technology in vehicles that do not include blind spot warning systems, hopefully reducing the number of accidents that way.



State of Art

Recent technological advances in modern vehicles provide a solid basis for addressing the blind spot problem in older vehicles. A common system implemented in new cars uses radar technology to detect both vehicles and vulnerable road users who may be in a vehicle's blind spot. This system includes sensors on both sides of the vehicle, positioned at the level of the rear bumper, with a detection range that extends from the wing mirror to about four metres behind the rear bumper [5].

In a more advanced approach, as offered by BMW with their Side View Assist (SVA), ultrasonic sensors are used to assist the driver in traffic situations with limited visibility, such as heavy city traffic. The system automatically adjusts the detection range based on vehicle speed, alerting the driver to other road users within a speed range of 25 to 80 km/h and at a distance of 5 metres or less [6].

For older vehicles and trucks, which lack such advanced systems, alternative solutions are being sought. One example is the use of blind spot stickers, like in Figure 2, on vehicles heavier than 3,500 kg, as required in France. These stickers, although passive, serve as a warning to other road users and are designed to draw attention to the vehicle's potential blind spots [7].

Figure 2: blind spot sticker


Besides the use of blind spot stickers, customised mirror systems have also been designed for trucks and buses. These vehicles often have different types of mirrors in addition to the mandatory main mirror, which can increase the driver's field of vision in blind spots when correctly positioned. This principle can also be applied to older vehicles by positioning additional mirrors on top of the side mirrors to improve visibility in specific blind spots. However, a disadvantage of this is that the mirrors become larger, which can result in obstructed vision behind these mirrors [8].

Often, blind spot accidents are also caused by driver distraction while checking the side mirrors. One solution to this is the implementation of digital side mirrors, where traditional mirrors are replaced by cameras and the image is displayed on a screen inside the vehicle itself. This reduces the effort needed to check the side mirrors and allows the driver to stay more focused on the road [9].

Supplies

Schermafbeelding 2024-05-22 122452.png

In the picture above, the Bill of Materials (BoM) is shown.

Our Solution

solution.png

One promising solution to the problem, already described in the problem statement, is to implement haptic technology in vehicles that do not include blind spot warning systems. By using haptic feedback, such as vibrations in the steering wheel, drivers can be immediately alerted when a vehicle or another road user is in their blind spot. However, the implementation of vibration in the steering wheel is already used in modern vehicles. For example, active lane assist at Audi uses steering wheel vibration if the driver unintentionally deviates from the lane [10]. This subtle but effective form of feedback can attract the driver's attention without causing the driver to lose sight of the road, thus reducing the risk of blind spot accidents.

So our aim is to equip old cars with sensors that can detect other road users if they are in the two blind spots on the side of the car, and then signal the driver of the car using vibrations in the steering wheel. Here, the measuring range is adjusted depending on the speed at which the car is travelling, represented here by a potentiometer. If the driver is in a built-up area or on smaller motorways, the measuring range of the sensors decreases as in these situations no other road users will be heading towards the blind spots at high speeds. On the other hand, the measuring range of the sensors increases when the car is on the motorway, where the possibility of another car approaching at very high speeds is

much greater. Early detection of the driver may therefore be desirable in this situation. By using the potentiometer, this speed is simulated to give the driver timely warning of other road users depending from one traffic situation to another.

Finally, it is also important to note that a car has two blind spots on the side and so it must be clearly communicated to the driver whether the other road user is on the left or right side of the car. Therefore, the driver will feel two momentary vibrations if the other road user is on the left, and three momentary vibrations if on the right. It is irrelevant to have the left half of the steering wheel vibrate if the other road user is on the left and likewise for the opposite situation, because not every driver keeps both hands on both halves of the steering wheel for an entire car journey and thus might not feel some of the vibrations. Hence, short-term vibrations are opted for all over the steering wheel.

Step by Step

Step 1: “Define the problem”

First of all, it is desirable to find a contemporary problem that can be solved using haptic technology. The problem we are going to solve is the fact that old cars are not equipped with technology capable of detecting other road users if they are in a blind spot of the car. A more detailed explanation of the problem is described in the problem statement.

Step 2: “Choose the suitable Arduino

Choosing the right Arduino depends on the specific requirements of each project. In our case, the Arduino Micro is a good choice. It is cost-effective and compact, facilitating integration into older vehicles. Despite its small size, the Arduino Micro offers a comprehensive range of input/output pins: 20 digital I/O pins, 7 of which can be used as PWM outputs and 12 as analogue inputs

Step 3: “Choose the suitable distance sensors

The HC-SR04 ultrasonic distance sensor is suitable for signalling other road users in a car's blind spots. They are easy to use, have a fast response and are cost-effective. With a measurement range of 2 cm to 400 cm, they are optimal for encompassing a car's blind spots. Because these sensors use ultrasonic measurements, they are less sensitive to colour and transparency of the object compared to optical distance sensors, resulting in more stable measurements under different conditions.

Step 4: “Choose the suitable motors”

In our application, two Drake LF motors are more than enough. They are easily available at a reasonably cheap price. Their range in frequency (10 Hz - 300 Hz) is sufficient to make a driver pay attention using vibrations in the steering wheel. They are very compact and consequently easy to implement in a car steering wheel.

Step 5:  Connect the Arduino micro

To correctly connect the Arduino Micro to the breadboard, the following steps should be followed:

·      Connect the 5V pin of the Arduino Mirco to the positive (+) red line of the breadboard. This supplies a 5V power supply to all the pins on this side. This can be used as a power source for the various components.

·      Connect the GND pin (ground) to the black line (-) of the breadboard (GND). This can be used as ground for the various components.

 

Step 6: “Connect the multiplexer”

To properly connect the multiplexer to the breadboard, follow these steps:

·      Connect the -pin to the 5V of the Arduino Micro.

·      Connect the GND-pin (ground) to the ground of the Arduino.

·      Connect the SDA pin to digital pin 2 of the Arduino micro

·      Connect the SCL pin to digital pin 3 of the Arduino micro

·      The analog pins of the multiplexer (A0, A1, and A2) are connected to the ground of the Arduino Micro.

o  These analog pins are connected to the ground to fix the address of the multiplexer to 000. This is a precautionary measure to prevent interference and avoid potential errors due to unintended selection of other channels.

Step 7: “Connect the motordrives and motors”

To properly connect the motor drivers (DRV2605L) to the breadboard, the following steps should be followed:

·      Connect the -pin to the 5V of the Arduino Micro.

·      Connect the GND-pin (ground) to the ground of the Arduino.

·      Connect the SCl pin to the SC1 pin of the multiplexer

·      Connect the SDA pin to the SD1 pin of the multiplexer

·      Connect the INT pin to pin 13 of the Arduino Micro. A PWM signal can be generated by the Arduino Micro via this pin.

·      Connect the terminal block connector 3 pin, to which the Drake LF motor attaches, to the "+" and "-" of the motor drive (DRV2605L)

In our application, we use two motors, each driven by a separate motor drive. Connecting the second motor drive follows the same procedure as for the first, the only difference being that the SCL and SDA pins are connected to the SC2 and SD2 pins of the multiplexer, respectively.

Step 8: “Connet the potentiometer”

To properly connect the potentiometer to the breadboard, the following steps need to be taken:

·      Connect one outer pin of the potentiometer to the ground (GND) of the Arduino Micro.

·      Connect the other outer pin of the potentiometer to the 5V pin of the Arduino Micro.

·      Connect the middle pin of the potentiometer, providing an analog output value, to the A5 pin (analog input) of the Arduino Micro.

Step 9: “Connect the distance sensors”

To correctly connect the HC-SR04 Ultrasonic Sonar Distance Sensors to the breadboard, the following steps should be followed:

·      Connect the -pin to the 5V of the Arduino Micro.

·      Connect the GND-pin (ground) to the ground of the Arduino.

·      Connect the Trig pin to the digital pin 5 (~5) of the Arduino Micro

·      Connect the Echo pin to digital pin 6 (~6) pf the Arduino Micro

In our application, we use two HC-SR04 Ultrasonic Sonar Distance Sensors. To connect the second distance sensor, the same steps are followed as for the first one, except that the Trig and Echo pins are connected to digital pins 10 and 11, respectively, of the Arduino Micro.

Step 10: “Connect the complete setup to the PC”

To power the Arduino, an external 9V battery was used. This battery is connected to the -pin of the Arduino Micro and to the ground of the Arduino Micro. This by using a battery connection clip. The USB C-port on the Arduino Micro can be used to connect to a computer if needed, but also as a power supply. This makes it possible to upload the sketch and communicate about the current status of the components via the serial port.

Step 11: “Test the prototype”

After completing all the previous steps, the prototype can be tested using the written programme in Arduino. Further explanations can be found in the code snippets.

Step 12: “Implement the motors in the steering wheel of the car”

Design mounting points on the steering wheel for the motors. Ensure that the motors keep the steering wheel well-balanced and that there is sufficient space for other components such as airbags.

Step 13: “Implement the arduino in the dashboard”

Create or install mounting points for the Arduino. Ensure they are securely fastened and do not come loose due to vibrations while driving.

Step 14: “Provide good wiring between the Arduino and distance sensors”

Run the wiring from the motors to the power and control modules. Use slip rings to enable electrical connections without hindering the steering function.

Step 15: “Implement the distance sensors at the desired locations on the car”

Implement the sensors at the desired locations in the car to fully cover the blind spots.

Code Snippets

The code is divided into three phases. In the first phase, the configuration of various components is set. Then, in the "void setup()" phase, the code is executed once upon starting or resetting the Arduino. This is where the initial configuration of the program and the Arduino board is established. Finally, there is the "void loop()" phase, which is executed repeatedly and is used to control actuators and sensors.

Set Up of Different Components

code snippet 1.png

Lines 5 – 7: Setup of the communication link with the DRV2605 motor controller

Here, we want to establish an I2C communication link with the DRV2605 motor controller. By using the slave address 0x5A, the Arduino communicates with the device via the I2C protocol. The mode settings register address (ModeReg) of the DRV2605 is set to 0x01, indicating that the first register of the DRV2605 is selected for further configuration and communication.

Lines 10 – 11: Setup of the communication link with the multiplexer

This code initializes the communication link for a multiplexer with the slave address 0x70. The Arduino uses this address to communicate via the I2C protocol. It is also indicated that two ports of the multiplexer are in use, namely port 1 and port 2. These ports are represented in an array {1, 2}. The DRV2605 motor controllers are connected to these ports of the multiplexer, as specified in the code.

Lines 18 – 21: Setup of the potentiometer

Since a potentiometer is being used here, the analog pin must first be initialized. The potentiometer is connected to the analog pin A5 of the Arduino. The variable val is declared to later store the value of the potentiometer.

Lines 23 – 33: Setup of our HC-SR04 ultrasonic sensors

Connect the ultrasonic distance sensor to the Arduino using two digital pins. The trig pin, which is the pin that sends the ultrasonic signal from the sensor, and the echo pin, which receives the ultrasonic signal back from the sensor. Indicate which pins these are connected to on the Arduino. Then, two variables are declared for each sensor. "Duration" is used to store the time before the ultrasonic signal is received back. "Distance" is also declared to store the calculated distance to an object. For this, the time is converted to an actual distance value.

Lines 35 – 40: Here we declare a number of values

Set both a minimum and maximum value for frequency and distance range. This is done by declaring these values as integers.

Void Setup

code snippet 2.png

Lines 43 – 46

  • Wire.begin(): This starts the I2C library and initializes I2C communication, enabling the Arduino (I2C master) to communicate with I2C slave devices.
  • Serial.begin(9600): This starts serial communication at 9600 bits per second, allowing the Arduino to send and receive data via the serial port.
  • pwm13configur(): This function configures a PWM (pulse width modulation) signal on pin 13 of the Arduino. We use this signal to control the motors.

Lines 48 – 55 → Initializing the multiplexer. Here, we have a for-loop that iterates over all the ports defined in the “ports” array during the setup phase.

  • TCA9548A(ports[i]): This selects the port of our multiplexer.
  • InitializeDRV2605: This initializes the DRV2605 motor controller connected to the selected port of the multiplexer.
  • Delay(10): A brief delay of 10 milliseconds.
  • Pulse(0.1,10): This generates a pulse of a specified duration and intensity on the initialized DRV2605.

Lines 57 – 62 → Initializing the HC-SR04 ultrasonic distance sensor. Here, we set the pins for input and output using the pinMode function.

Void Loop

code snippet 3.png

Lines 69 – 70

This part of the code reads the value from the potentiometer and converts it into the number of degrees it is set to. Using the analogRead() function, the current analog value of the potentiometer is read. This value is then divided by 1023, which is the maximum value of an analog pin in Arduino. The result is then multiplied by 270 degrees, as the potentiometer has a range from 0 to 270 degrees.

Lines 81 – 95

This part of the code defines different zones for the potentiometer, corresponding to the detection range of the ultrasonic sensors. Three zones are defined: 0 to 90 degrees, 90 to 180 degrees, and 180 to 270 degrees. These zones represent detection areas of 0 to 20 cm, 20 to 50 cm, and 50 to 100 cm, respectively. For clarification, it is noted that in reality, these areas correspond to ranges of 0 to 1 m, 1 to 2 m, and 2 to 5 m, but for the convenience of testing the code, they have been scaled down to smaller ranges. Additionally, these ranges are automatically adjusted based on the speed of the vehicle using a potentiometer to adjust the range instead of a speed sensor.

Lines 94 – 106

In this part of the code, the two ultrasonic sensors are used to measure the distance to an object:

  • digitalWrite(): This activates a short pulse to the trig pin to activate the ultrasonic sensor. The trig pin is first set high (HIGH) to start the pulse and then set low (LOW) to end the pulse. This pulse lasts for 10 microseconds.
  • pulseIn(): This function measures the time the echo pin is high (HIGH). This is the time it takes for the ultrasonic signal to travel to an object and return.

The measured time is then converted to a distance by multiplying the duration by the speed of sound (0.0340 cm/µs). Since the signal travels to the object and back, the distance is divided by 2 to get the single-trip distance.

Lines 111 – 128

This part of the code controls the motor when an object is detected within the range of the ultrasonic sensor.

  • TCA9548A(ports[…]): This function activates a specific port of the TCA9548A I2C multiplexer, configured here to activate motor 1 for a specific effect.

The motor frequency increases as the object gets closer to the ultrasonic sensor. Therefore, "the slope" of a linear relationship between frequency and distance is calculated. This slope is initialized in the code to adjust the frequency based on the measured distance.

  • slope = (maxf - minf) / (mind - maxd)

Then, the required frequency is calculated and initialized in the code as ‘f’ using the determined slope. It is important to note that the frequency increases linearly between the minimum and maximum limits, depending on the distance of the object to the sensor.

  • f = slope * distance2 + (maxf - slope * mind)
  • Vibrate(f, 0.5, 0.2, 70): This is a function defined from lines 217 to 270. It takes four parameters:
  • ‘f’: the calculated frequency
  • ‘0.5’: the strength of the vibration
  • ‘0.2’: the duration of the vibration in seconds
  • ‘70’: the duty cycle

These parameters can be adjusted to the driver's desired settings and provide feedback through vibration in the steering wheel.

Video of Prototype

This is the YouTube link to the presentation of our haptics project, including a video of the prototype: https://www.youtube.com/watch?v=pvcVq0jgs_U&ab_channel=ZiasDelaey

References

[1]        “Om de drie dagen vindt een dodehoekongeval plaats: ‘We moeten dringend meer doen’ | Het Nieuwsblad.” Accessed: May 21, 2024. [Online]. Available: https://www.nieuwsblad.be/cnt/dmf20230729_92675276

[2]        “De dode hoeken en blinde vlekken van ons verkeersbeleid,” De Standaard. Accessed: May 21, 2024. [Online]. Available: https://www.standaard.be/cnt/dmf20240129_92368906

[3]        “Aantal dodehoekongevallen.” Accessed: May 21, 2024. [Online]. Available: https://datawrapper.dwcdn.net/ai8RE/1/

[4]        E. Hargis, “Why Blind Spots Cause Many Accidents?,” Rosenberg & Gluck LLP. Accessed: May 21, 2024. [Online]. Available: https://www.lilawyer.com/blog/blind-spot-accidents/

[5]        “Rijhulpmiddelen - Informatiesysteem dode hoek.” Accessed: May 14, 2024. [Online]. Available: https://www.fordservicecontent.com/Ford_Content/vdirsnet/OwnerManual/Home/Content?variantid=7127&languageCode=nl&countryCode=NLD&Uid=G2045870&ProcUid=G2045871&userMarket=NLD&div=f&vFilteringEnabled=False&buildtype=web

[6]        “Side View Assist (SVA) - technologie in detail.” Accessed: May 14, 2024. [Online]. Available: https://www.bmw-motorrad.be/nl/engineering/detail/comfort-ergonomics/sva.html

[7]        “Met de camper naar Frankrijk? Deze stickers moet je verplicht op je voertuig kleven | Mobiliteit | hln.be.” Accessed: May 14, 2024. [Online]. Available: https://www.hln.be/mobiliteit/met-de-camper-naar-frankrijk-deze-stickers-moet-je-verplicht-op-je-voertuig-kleven~a9f26d71/

[8]        “Technische hulpmiddelen ter voorkoming van dodehoekongevallen bij vrachtwagens.pdf.” Accessed: May 14, 2024. [Online]. Available: https://www.vias.be/publications/Technische%20hulpmiddelen%20ter%20voorkoming%20van%20dodehoekongevallen%20bij%20vrachtwagens/Technische%20hulpmiddelen%20ter%20voorkoming%20van%20dodehoekongevallen%20bij%20vrachtwagens.pdf

[9]        “Buitenspiegels vervangen door camera’s blijkt een slecht idee | Auto | AD.nl.” Accessed: May 14, 2024. [Online]. Available: https://www.ad.nl/auto/buitenspiegels-vervangen-door-cameras-blijkt-een-slecht-idee~a4875daa/

[10]     “Active lane assist > Cruise control redirect > Audi Nederland.” Accessed: May 21, 2024. [Online]. Available: https://www.audi.nl/nl/web/nl/innovatie/veiligheid/cruise-control/lane-assist.html