Difference between revisions of "Wearable Space Bubble"

From Idea Shop Wiki
Line 48: Line 48:

Revision as of 22:11, 30 April 2020

What is the Wearable Space Bubble

The Wearable Space Bubble is an IoT project that detects other people's Bluetooth devices to give you more personal space! Check out the definitely real commercial below!

The Space Bubble uses Bluetooth protocols to detect nearby Bluetooth devices, and then estimate their distance to the wearer. If a new Bluetooth Device is detected within the space bubble it activates a warning siren telling them to move away! In this case, the sound chosen was "Can't Touch This" by MC Hammer. If a device is detected getting close to the user, LEDs on the user's jacket will light up warning them to step away.

Device Architecture

This device utilizes an ESP32 microcontroller, a NeoPixel LED Ring, and an Adafruit Sound FX board and guitar amplifier. The ESP32 performs Bluetooth sensing and sampling, and activates the LED ring and Sound FX board when your space bubble is violated!

The LED Ring is controlled using PWM (Pulse Width Modulation), you can learn more about PWM on the Arduino page!

The Adafruit Sound FX board is activated with a digital output pin on the ESP, and can be set to play multiple sounds. At first, I wanted to store the sound files on the ESP32, but when I compressed them to fit available memory I found the quality dropped too much to be usable. Here's a great project from Hackaday on storing WAV files on an ESP32.'

Bluetooth Sensing

Almost everyone nowadays has a Bluetooth device on them, that is identifiable with a MAC address (like a license plate for devices), whether it’s their phone or headphones these devices can be accessed and detected without directly connecting to them or interfering with them at all.

To determine the location of nearby devices, the Space Bubble sends out an “inquiry packet”, asking nearby devices to identify themselves. Bluetooth devices that receive this request will respond with their identification, and the social distancing device can determine how far away these devices are depending on the strength of the returned request. This is called RSSI, received signal strength indicator, and it’s measured in decibels.

Testing this method on the ESP32, I found that the RSSI varied depending on the distance of devices, and proximity to other Bluetooth devices. Bluetooth devices all operate on the 2.45 GHz frequency, which is close to Wi-Fi, so some noise is expected*. I utilized a method of sampling several different values and averaging them to get a more accurate reading for distance.

If a Bluetooth device is detected within a certain range of RSSI values, we check its MAC address against previously detected addresses (this is in case the user has a Bluetooth device) and then determine a more accurate RSSI value using the sampling algorithm. If the device is not within 6 feet of the user (give or take a few feet), the Space Bubble will output a variable number of LEDs on the LED ring which should show other people how close they are to violating your space bubble. If the detected device is within 6 feet of the user (give or take a few feet), the LED ring will spin and flash, and a siren is activated to warn the approaching person.

*Side Note: To prevent the majority of the noise, Bluetooth Devices utilize adaptive frequency hopping. Basically, it's like if you were using a radio channel with your friend, and someone else hopped on and started talking. You tell your friend you're moving to a different channel and you both move to a new, clear channel.

Next Steps

The next steps for this project are improving the quality of the build and designing an enclosure for it. The LED ring in the sleeve was sewn in, however I didn't have the right wire to complete the build due to quarantine restrictions, or a soldering iron, so I duct-taped wire together from an old cord I had in my apartment (this is not advisable it kept falling apart). It would also be interesting to factor in other nearby devices that could cause noise in the RSSI algorithm.

Thanks for reading! - Joe Ricker