I was really excited about the variety of voting applications that BLE could help make easier. However, as I explored each idea, I found the following issues:
- Real-time voting applications in rooms with many people (like classrooms, conferences) are not feasible, since most BLE peripheral devices don't allow simultaneous connections. Also, since these applications are low-security, there are not many advantages over using the Internet.
- To make a secure voting booth, fraud prevention would be required, but it would be hard. The range of Bluetooth is large enough that there would still need to be defenses against fraudulent voting. The most secure idea I could come up with is a two-booth solution, where the first booth outputs a cryptographically-signed "ballot signature" that the user receives. The user then walks to the second booth to submit a ballot with that signature. The act of walking from the first booth to the second can then be regulated using traditional means (security camera, physical barriers, etc.). This is a solution, which potentially feasible, both requires more security review and offers little advantage over paper ballots, so I decide to not go with this idea.
- Implementing a comment/message board would require a storage mechanism. The Arduino could be augmented with its own storage, a device with more onboard storage like a Raspberry Pi can be used, or submissions can immediately be sent to a computer or stored online. I opted to not build this for this class, as each potential solution would require significant build steps that aren't related to wireless technologies.
With these in mind, I tried to find the most meaningful application that didn't have these constraints!
Read the Room is a room that marks the sentiment of a room based on its recent occupants. It is meant to be installed in common areas with no permanent occupants, like break rooms and lounges.
Why: Sometimes the people who need the most support around us are the quietest. In spaces with many different people, small common areas tend to only serve those with the most energy. This is a simple device that allows occupants to sense the energy of those around them.
To use Read the Room, users use their phones to scan the QR code on the box, which takes them to an app (or website, once Bluetooth APIs for mobile web becomes available). Then, users would tap the sentiment (sad, meh, happy) that matches their current mood. The process is anonymous, and there is no mechanism to prevent users from submitting multiple votes; however, the device will only accept one vote every minute (and the app will indicate whether the device is currently accepting votes).
Over time, the 3 LEDs on the device change to represent the relative occurrence of mood of the room. The device will discard older submissions, so the current reading will reflect only recent submissions. To preserve anonymity, the device wait for a random duration (1-10 minutes) before updating the reading to reflect the latest submission.
Read the Room is a good application of BLE, as the entire set of interactions that we would like to allow only involve users within Bluetooth range. Compared to an online voting system, this solution is much more scalable. The only web component — the page the QR code links to — can be a static page and would be easy for people to host their own copies of. Moreover, the submitted data is not stored on the Internet, providing some inherent privacy.
- Arduino Nano 33 IoT
- 3 LEDs
- Enclosure
- Printed Label
- Battery pack or micro-usb cable + AC adapter
- Wiring
- Mounting hardware (e.g., Command hooks)
-
The client should search for Bluetooth LE devices with service
e3099389-0215-400b-890e-a91262d6f618
and connect to the first device found. There should only be one device. -
The client should write to integer characteristic
334c7536-1133-4f0e-a4d6-e3cf23f3c6b4.
The characteristic only supports writing. Allowed values:1
(sad)2
(meh)3
(happy). - That's it! Now the client can disconnect.
- Two ways to persist data locally on Arduino: store to EEPROM (for small amounts of data), SD card module (for larger amounts of data).
- Consider the encryption of BLE communications as well.
- The video prototype was good even though it doesn't involve a working device. The phone webapp should be similarly prototyped as well, even if technical limitations currently prevent such an app from being built. Update: I added a prototype!
- Since the device is mounted to a fixed location, using Wi-Fi should be not too much of a hassle. In this case, a webapp would send responses to a server, where the sentiment is stored. The Arduino would only be responsible for periodically pulling the latest collective sentiment and displaying it. This setup technically violates the physical isolation of the system, but there is still a metaphor of this being an isolated system, so some of the benefits remain (like having this setup feel intuitive for first-time users).