<

0

status indicator lamp

One of the painpoints of working in open spaces is that you end up getting easily disturbed by those around you. For my final project, I created a lamp that indicates to others of your current status or "mood," such as whether you're having a crappy day or a great one. The idea is that the lamp could be synced to your Slack or Facebook status to enable real time, digital and physical continuity.

I tried to scope this project such that it touches upon all the skills that I learned in the course. I'll speak to each below. Interesting features of the lamp are that it's both bluetooth enabled and responds to capacitive touch. Simply tap on it to control brightness, and change your status wirelessly via the web app.

I started by thinking about the form and physicality of the lamp. A couple of past projects had used mixed materials, and I thought that a combination of wood and matte plastic could turn out nicely. I also wanted visual interest through the use of a mesh pattern.

It turns out creating random lines algorithmically isn't easy, especially because the lamp has two surfaces and the patterns must line up. Nathan, one of our TA's, helped me with this in Grasshopper. First, you need to create a rectangular surface and divide up the points, then connect the lines randomly through JITTER, then OFFSET them, and finally SURFACEMORPH to map it on to the cylinder.

Once I was happy with the design, I created a couple of test prints at various scales. Initial prints without supports made it look pretty fragile. I adjusted the thickness of the meshes to create a stronger structure.

To produce a higher quality print, I used the Objet printer, which uses a UV cured resin and a soluble gel-like support material. This was alot easier than the ultimaker. Simply dip the casing into an acid bath and then use water to remove. So much easier than removing the support with the PLA!

Next up: the wooden base. The base needed a lip for the mesh shade to clip onto, as well as an inner shelf to lay an acrylic frosted sheet over to diffuse the light.

I used the CNC machine to mill the wood. Since my piece of wood was a bit small, I had to secure the piece onto a larger piece of wood to cut. The machine that I used has a vacuum that prevents the wood from moving around.

Post processing!

I'm using the Neopixel LED's, which are quite beautiful. To separate the electronics from the LED, I laser cut a piece of wood to separate the two components.

I also used clear acrylic and frosted vinyl to create a more diffuse effect for the LEDs.

For the electronics, I used the ATmega328P for my lamp but had evaluated different options as well. One of my stretch goals was to include an OLED display, so I wanted the flexibility for more pins.

I created a board based on the fabduino documentation. Solderimg the ATmega328P was a huge pain!

Capacitive touch proved to be the most challenging to get right. There are two types of capacitive touch sensors. The first are self-capacitive sensors (which use only one pad) and the second are mutual capacitive sensors. I tried both, and ended up using the latter.

With the self-capacitive sensor, I was able to get a good reading by lining the interior of the plywood base with copper tape and seeing a change by tapping on the outside. However, I didn't test it without the FTDI header and FabISP programmers until I put everything together. The thresholds were entirely different, and I couldn't create a reliable signal.

Panicking, I moved onto the mutual-capacitive sensors. Again, I was able to get pretty good readiings while having the FTDI connected, but inconsistentcies came up again when it came to packing everything up. I ended up simply exposing the pads for reliability. Although this wasn't ideal, it could be a design flourish.

In the hardware code, I set it up such that the touch count updates each time the threshold is reached, and the brightness then depends on touch count.

For the bluetooth, I had some challenges with the RN4871 module during the Networking and Communications wekk, and so I ended up using the HM-10, which had alot more documentation and also supports the 4.0 standard. One thing that took me a while to figure out was getting the module into commmand mode. It turns out you need to set your serial reader to no line ending in order to trigger it.

A lot of the existing documentation on bluetooth devices requires a native app (iOS or Android) to connect to bluetooth. I came across Google's Web Bluetooth API, which enables bluetooth interactivity with just a web app. It uses the Generic Attribute Profile (GATT) and is partially implemenetd (Macbook users need to run it with a Chrome browser, and it doesn't yet work on iOS yet!).

I also leveraged the the Web-Bluetooth-Terminal library, which allows for serial communication to the bluetooth device from a browser client. Since software serial only takes in one character at a time, I had to find a way to hack around it by taking the first character of the color in my Javascript code and map it to the RGB color in my Arduino code.

I created a web interface that lets people pick their current status, which then passes that information to the bluetooth lamp. I also had to take into account maintaining the brightness across across color changes and tap changes. Printing everything to serial was crucial for debugging.

I tried to deploy on Heroku but receive an error when I visit the site. I won't have time to get the deployment working before the final but the web app does work on my local computer.

Once I knew I had the basics of an MVP final project, I made optimizations to fit my board onto the Attiny 44. I decided to create headers everywhere so I could continue prototyping.

Two gotchas that I didn't foresee when miniaturizing: the Neopixel lights only work for PortB pins, and my program was too big for the memory of the Attiny. I replaced it with the Attiny 84, and refactored my code from the ATMega328P. Integrating everything didn't quite work as expected, and so I'll be using the ATMega328P again for the demo.

Last step: intergrating everything together and doing a test in the dark! Here the lamp connects to bluetooth and can be controled by a web app.

Responds to touch by adjusting brightness!