Sam Gentle.com

Shifting into Consciousness

Shifting into Consciousness

This is a write-up for Shifting into Consciousness, a project I worked on with Helen Amanatiadis and Culture at Work. The goal was to have a pressure-sensitive mat that would wirelessly trigger a wall-mounted box to spray perfume in the air and blow it around with a fan. I came in fairly late on the project to help out with the technical side of things, so most of the hardware had been specced out already, but there were some pretty interesting challenges getting it all to work.

The main brains of the project was the LightBlue Bean, an Arduino-style programmable Bluetooth Low-Energy module. We had two per piece, one for the mat and one for the wall box, and four pieces, so eight beans total. The floor beans were triggered by a sheet of velostat. They would then send a signal to their respective wall beans, and those beans would then activate a servo (to squeeze the perfume bottle) and a motor (to spin the fan). The beans were powered by little coin-cell batteries (they're very power-efficient), but the servo and motor were powered by a separate 5v USB battery pack. Sketch of the wiring layout on the bean

The first challenge was getting the beans to talk to one another. Bluetooth Low-Energy expects one primary device and many secondary devices connecting to it. Ideally, the wall bean could have acted as the primary, but the beans can't do that. Instead, we added a Raspberry Pi to act as a central router. All the beans connected to the Pi, and the Pi had an internal table of which beans' messages should go to which.

Although this added some complexity, it perhaps turned out for the best, because it made the whole system a lot more debuggable. If the beans were just connected to each other it would have been a bit tricky to figure out why one wasn't triggering. Is it a problem with the mat? Is the Bluetooth disconnected? Has the battery run out? Having a central server meant that the individual beans could send debug information to it as they operate, and even be manually triggered if needed. I put together a neat web interface to do this, which was probably the highlight of the project. The beans web interface

The second challenge was the USB battery packs. While they were relatively cheap and easy to interface with (we just cut up the USB cables they came with), they are really designed for high-current charging, and often shut off if you draw too little current from them. Because the motor and servo were inactive most of the time, the packs would just turn off. You can solve it with some clever electronics to set up a pulsed load, but there wasn't really time to do that. Instead, I set up the servos to switch on periodically and wiggle back and forth to waste some power. This worked well enough, but it required a lot of tuning.

The last challenge was the complexity of switching DC motors at low voltage. I'd never previously done much with motors, so this was a bit of a surprise to me. The existing setup had been done by someone else and used a transistor with far too low a current rating, no flyback diode and no base resistor. Any one of those could have blown the transistor at any time but, as these things tend to go, it only happened the night before the exhibition opened. Once I realised what was wrong I went and frantically learned about transistors, but it was really too late at that point.

So unfortunately, we went to exhibition without the fans working, but the servos worked great and the Bluetooth communication via the Pi was surprisingly solid. You can find some more technical details and code in the prototype wrapups I did while I was working on it. Work in progress