ButtonQ

Prototyping + Electronics

The ButtonQ was a project I built while I was working at TechTAP Inc. It was a product designed to help load balance cashier checkout queues at larger businesses.

ButtonQ is a wifi-connected button and a screen that showed advertisements to customers waiting in line to checkout.

Whenever a cashier became available they could press their button and the screen would flash the number of the available checkout aisle to queue the next customer.

TechTAP sold the system to a supplier of grocery store lighting solutions in Nashville.

I got involved with the project from someone emailing the Hacklab.to mailing board. They were looking for a way to toggle power on a light that ran on mains power.

I responded back, keen to cut my teeth on my very first electronics contract job! It also seemed the perfect opportunity to test out the ESP8266, a WiFi capable microcontroller I had heard about at hacklab but never used myself.

Over a weekend a TechTAP employee, @exluto, and I put together a (percarious) proof of concept of the ButtonQ at Hacklab.TO!

After building this proof of concept, TechTAP hired me on fulltime to complete the project.

I had 2 months from getting hired to put together a prototype to ship to the client. The client's ask was 8 buttons that could turn mains power on/off and trigger a notice on a digital signage screen.

The design brief was well defined, but we were under high time constraints.

We used off the shelf parts for everything.

The button was an arcade button hooked to an esp8266 NodeMCU devboard and mounted on a PVC project case we bought off amazon.

The mains power relay was tricky to do safely, but I found a Controllable Four Outlet Power Relay Module on the McMaster-Carr website.

Another developer at TechTAP found PiSignage, an opensource digital signage program designed for the raspberry pi. Digging into it's source code, they discovered a way to build a simple Android app that would recieve signage content from PiSignage.

Picking up from where their work left off, I architected a system which used the raspberry pi as a digital signage server and MQTT server, and a fleet of esp8266's communicating to eachother and the pi over MQTT.

I wrote firmware for the buttons and relays using HTTP, WiFi, and MQTT libraries for the esp8266. The buttons published to MQTT topics that the relays were subscibed to. When one of a button's switches changed state the event would get published and routed by the RaspberryPi to that button's paired relay.

For the Pi I wrote a simple python script that listened for all the events published by the esp8266s. Whenever one of the buttons were pressed, the python script would send a request over socketio to the custom android app that had been made by the other TechTAP developer. I used systemd unit files to handle starting all required services on system boot.

For networking I used a cheap OpenWRT router.

We were able to hit our 2 month deadline! Though it took a few very long days of testing and last minute changes in the office and some rushed weekend shipping. The client was thrilled with the prototype and was ready rehire us for another round of revisions.

They wanted the relay to be smaller and the button to look more unique. We had another 2 month turn around.

Instead of using off the shelf parts, this time I opted for off the shelf products.

With some research a coworker and I found a seller on AliExpress selling jumbo buttons that came with an esp8266 and a WS2812B RGB LED already inside. The seller, APRBrother, provided schematics and documentation for their button, and an FTDI programmer!

The APRBrother button required a couple of modifications to meet the design spec of our client.

The client had asked for a clicky momentary button, an on/off switch, and for the button to be able to run on USB power. APRBrother's button, however, had a spongy and soft feel to it's momentary button, no on/off switch, and ran on 2 AA batteries.

To satisfy the clients requirements I used a small fleet of 3d printers at the Toronto Tool Library Makerspace to make an case that would fit around APRBrother's button.

The Home Hardware at College and Spadina has an electronics section in their basement. Luckily I was able to find a clicky momentary switch that was the same size standard as the one in APRBrother's button!

Knowing our team would require additional temporary support, I contracted the help of my friend Rana to do the slow work of replacing the button's momentary buttons, adding an on/off switch, and (regretfully) soldering the FTDI programmers to the buttons to provide a usb interface for power.

After a long night of soldering, and 3 coats of boring-corporate-grey spray paint, the buttons were done!

I used a SONOFF S31 for the relay.

SONOFF brand items smart home devices that are ESP8266 based. Though ITEAD ships SONOFF products with a proprietary app for controlling and configuring them, they also leave serial pins accessible on their products' PCBs. Which meant I could write my own firmware for them!

Using the FTDI-USB programmer that we got with our AliExpress ESP8266 buttons I was able to program the esp8266 devices! I even tried making a jig to program them faster in batches!

Some late nights of flashing, testing, and fixing followed in order to meet the client's ambitious 2 month deadline. With the support of my coworkers a ButtonQ set of 8 buttons was prepared and shipped to our client.

TechTAP was contracted for a third iteration of the ButtonQ button. The clients ask this time was a flatter, smaller button. Something simple and cylindrical.

I created a 3D printed button case that was fully parametric! That way we could easily create different sizes to the client's taste.

This project was an exercise in self learning. My coworkers at TechTAP were hugely supportive in the completion of each iteration of this project. But I was most often on my own for solving the technical challenges required to realize this project. CAD and 3D printing were areas I had only dabbled in before this project. I was still quite new to electronics and firmware development. I also learned way more about networking and Linux system administration! Through the development of ButtonQ I became proficient enough to ship a product to a client (twice!) that relied on all of these skills!