Project

# Title Team Members TA Documents Sponsor
6 E-Bike Crash Detection and Safety
Adam Arabik
Ayman Reza
Muhammad Daniyal Amir
# Title

Team Members:
- Ayman Reza (areza6)
- Muhammad Amir (mamir6)
- Adam Arabik (aarabik2)

#Problem
E-bikes are gaining popularity as a sustainable and convenient mode of transportation. The main issue with the growing number of e-bikes is the safety of the rider and those around them. If a rider gets into a crash, there is no automatic shutoff for the electrical systems on an e-bike. This means that the bike's motor can remain on, potentially causing more harm to the rider or the surrounding environment. Current safety systems installed on electronic devices typically focus only on post-crash communication, such as sending alerts to contacts or calling emergency services. There is currently no system that can detect a crash in real time and instantly cut power to the bike’s electrical systems to improve safety.

#Solution
My group's solution is a crash detection system with a motor shutoff that can integrate with e-bike systems. This device will use its own sensors and electrical measurements to recognize when a crash occurs. Once a crash is detected, the system will cut all power to the motor, ensuring that the bike can no longer accelerate even if the throttle is still engaged. To reduce false positives, the system will use a module that combines data from multiple sensors to provide a more accurate assessment of whether a cutoff is needed. In addition, the design will include a manual override that allows the rider to turn the motor back on and continue operating the bike normally. The goal of this project is to create a crash protection system that reacts quickly to its environment to prevent further harm during a crash.

#Solution Components

##Subsystem 1: Crash Detection Sensors

This subsystem is responsible for detecting sudden deceleration, impacts, or abnormal electrical behavior that indicates a crash. The design will use an accelerometer and gyroscope, like the MPU-6050, to monitor motion and angular velocity. A current sensor like the ACS712 will be used to detect sudden changes in motor current that occur during impact. An optional vibration or impact sensor may be added to confirm collision events and improve reliability.

##Subsystem 2: Control and Processing Unit

This subsystem will process the inputs from the sensors, run the crash-detection algorithm, and issue the motor cutoff command. The system will be built around a microcontroller, such as an STM32 or ESP32, which has the processing capability to fuse sensor data and apply threshold-based decision making. The microcontroller will also handle input from the manual reset and override switch to allow the rider to re-enable the system if a false detection occurs.

##Subsystem 3: Motor Cutoff Circuit

The subsystem physically disconnects the motor power when a crash is detected. A MOSFET-based switch will be used to cut power from the e-bike motor controller. The cutoff circuit will be designed to handle the motor’s current and respond within milliseconds. Once triggered, the motor will remain disabled until the system is reset by the rider.


##Subsystem5: Testing and Validation Setup

The subsystem is focused on verifying the accuracy and timing of the system under controlled and real-world conditions. The initial bench testing will involve tapping the sensor and measuring how quickly the motor cutoff occurs using the oscilloscope. The controlled crash simulation will be performed by stopping the spinning wheel or using drop tests to mimic the impact. Field tests will involve riding the e-bike over curbs, bumps, and rough pavement to ensure the system doesn’t false trigger during normal use. Once a crash has been detected, the motor can be re enabled using the reset button.

#Criterion for Success

The rider must be able to manually cut and enable power to the motor at any time using switches on the electrical systems. If the bike tips over onto its side, the motor must turn off automatically. If the bike comes to an immediate stop that indicates a crash, the motor must turn off automatically. The system needs to be able to work with e-bike motors.

RFA: Any-Screen to Touch-Screen Device

Ganesh Arunachalam, Sakhi Yunalfian

Featured Project

# Any-Screen to Touch-Screen Device

Team Members:

\- Sakhi Yunalfian (sfy2)

\- Muthu Arunachalam (muthuga2)

\- Zhengjie Fan (zfan11)

# Problem

While touchscreens are becoming increasingly popular, not all screens come equipped with touch capabilities. Upgrading or replacing non-touch displays with touch-enabled ones can be costly and impractical. Users need an affordable and portable solution that can turn any screen into a fully functional touchscreen.

# Solution

The any-screen-to-touch-screen device uses four ultra-wideband sensors attached to the four corners of a screen to detect the position of a specially designed pen or hand wearable. Ultrawideband (UWB) is a positioning technology that is lower-cost than Lidar/Camera yet more accurate than Bluetooth/Wifi/RFID. Since UWB is highly accurate we will use these sensors to track the location of a UWB antenna (placed in the pen). In addition to the UWB tag, the pen will also feature a touch-sensitive tip to detect contact with the screen (along with a redundant button to simulate screen contact if the user prefers to not constantly make contact with the screen). The pen will also have a gyroscope and low profile buttons to track tilt data and offer customizable hotkeys/shortcuts. The pen and sensors communicate wirelessly with the microcontroller which converts the pen’s input data along with its location on the screen into touchscreen-like interactions.

# Solution Components

## Location Sensing Subsystem (Hardware)

This subsystem will employ Spark Microsystems SR1010 digitally programmable ultra-wideband wireless transceiver. The transceiver will be housed in a enclosure that can be attached to the corners of a screen or monitor. Each sensor unit will also need a bluetooth module in order to communicate with the microcontroller.

## Signal Processing Subsystem (Hardware and Software)

A microcontroller, specifically the STM32F4 series microcontroller (STM32F407 or STM32F429). Real-time sensor data processing takes away a considerable amount of computing power. The STM32F4 series contain DSP instructions that allow a smoother way to perform raw data processing and noise reduction. This subsystem will allow us to perform triangulation to accurately estimate the location on the screen, smooth real-time data processing, latency minimization, sensitivity, and noise reduction.

A bluetooth module, in order for the sensor to send its raw data to the microcontroller. We are planning to make the communication between the sensors and the pen to the microcontroller to be wireless. One bluetooth module we are considering is the HC05 bluetooth module.

The microcontroller itself will be wired to the relevant computer system via USB 2.0 for data transfer of touchscreen interactions.

## Pen/Hand Wearable Subsystem (Hardware)

The pen subsystem will employ a simple spring switch as a pen tip to detect pen to screen contact. We will also use a Sparkfun DEV-08776 Lilypad button to simulate a press/pen-to-screen contact for redundancy and if the user wishes to control the pen without contact to the screen. The pen will also contain several low profile buttons and a STMicroelectronics LSM6DSO32TR gyroscope/accelerator sensor to provide further customizable pen functionality and potentially aid in motion tracking calculations. The pen will contain a Taoglas UWC.01 ultra-wideband tag to allow detection by the location sensing subsystem and a bluetooth module to allow communication with the microcontroller. The unit will need to be enclosed within a plastic or 3D printed housing.

## Touch Screen Emulation Subsystem (Software)

A microcontroller with embedded HID device functionalities in order to control mouse cursors of a specific device connected to it. We are planning to utilize the STM32F4 series microcontroller with built in USB HID libraries to help emulating the touch screen effects. We will also include a simple GUI to allow the user to customize the shortcuts mapped to the pen buttons and specify optional parameters like screen resolution, screen curve, etc.

## Power Subsystem (Hardware)

The power subsystem is not localized in one area since our solution consists of multiple wireless devices, however we specify all power requirements and solutions here for organization purposes.

For the wireless sensors in our location sensing subsystem, we plan on using battery power. Given the UWB transceiver has ultra-low power consumption and an internal DC-DC converter, it makes sense to power each sensor unit with a small 3.3V 650mAh rechargeable battery (potential option: [https://a.co/d/acFLsSu](https://a.co/d/acFLsSu)). We will include recharging capability and micro usb recharging port.

For our pen, we plan on using battery power too. The gyroscope module, UWB antenna, and bluetooth module all have low-power consumption so we plan on using the same rechargeable battery system as specified above.

The microcontroller will be wired via USB 2.0 directly to the computer subsystem in order to transmit mouse data/touchscreen interaction and will receive 5V 0.9A power supply through this connection.

# Criterion For Success

## Hardware

The UWB sensor system is able to track the pens location on the screen.

The pen is able to detect clicks, screen contact, and tilt.

The microcontroller is able to take input from the wireless pen and the wireless sensors.

Each battery-powered unit is successfully powered and able to be charged.

## Software

The pen’s input and sensor location data can be converted to mouse clicks and presses.

The pen’s buttons can be mapped to customizable shortcuts/hotkeys.

## Accuracy and Responsiveness

Touch detection and location accuracy is the most crucial criteria for our project’s success. We expect our device to have a 95% touch detection precision. In order to correctly control embedded HID protocols of a device, the data sent and processed by the microcontroller to the device has to have a low error threshold when comparing cursor movements with wearable location.

Touch recognition and responsiveness is the next most important thing. We want our system, by a certain distance threshold, able to detect the device with a relatively low margin of error of about 1% or less. More specifically, this criteria for success is the conclusion to see if our communication network protocol between the sensors, USB HID peripherals, and the microcontroller are able to efficiently transfer data in real-time for the device to interpret these data in a form of cursor location updates, scrolls, clicks, and more.

Latency and lags should have a time interval of less than 60 millisecond. This will be judged based on the DSP pipeline formed in the STM32F4 microcontroller.

## Reliability and Simplicity

We want our device to be easily usable for the users. It should be intuitive and straightforward to start the device and utilize its functionalities.

We want our device to also be durable in the sense of low chances of battery failures, mechanical failures, and systematic degradations.

## Integration and Compatibility

We want our device to be able to be integrated with any type of screens of different architectural measurements and operating systems.

Project Videos