Off-The-Shelf Hacker: Mosquitto under Glass
Work continues on the plan to build an MQTT-based on the CHIP computer, covered recently on Off-The-Shelf Hacker. I’ll use the MQTT broker as a data hub for a variety of my “remote” projects.
By remote, I mean that messages are sent wirelessly to devices that trigger physical actions through their general purpose input/output pins (GPIO). The device might also send a response back, say from a sensor to the sender. Two-way and one-to-many or many-to-one messaging are MQTT’s bread and butter.
MQTT (MQ Telemetry Transport) is a mature client-server messaging system that uses a lightweight, publisher/subscriber model and runs over TCP/IP networks. It’s designed for connections between devices, in remote locations, with limited bandwidth and possibly high latency. To implement MQTT, I use Mosquitto, an open source message broker.
I’ve pondered suitable packaging for the MQTT/CHIP data hub for a while. Since I’ll be prototyping other MQTT devices in my shop, a decorative desktop case seems like the way to go. I could put the thing on my desk or a bookshelf, plug it in and not worry about it much.
Don’t forget that the Mosquitto/CHIP is set up as its own WiFi access point, making it a self-contained data hub device. Just connect all the edge devices to the AP and start sending messages back and forth.
It would be small enough to carry along for demonstrations at The New Stack pancake breakfasts. I could slip it into a little padded box for transit to the venue. Or, maybe it would make sense to be able to pop the Mosquitto/CHIP data hub board out of one case and put it into another, perhaps ruggedized, portable case, when taking it on the road or out in the field. Modularity and interchangeability are important concepts in the Off-The-Shelf Hacker’s tool box.
Today’s excursion into fast prototyping examines the aesthetics, sourcing, and build of the project.
Get into a “Notions” Store
I’ve always liked the look of the old stock ticker tape machines. Why not put the diminutive CHIP computer under a little glass dome? Glass domes are popular for steampunk projects, you know. Naturally, we can also deftly turn a phrase and call it the “Mosquitto Under Glass” project.
The next question is, “Where do I find a little glass dome and base?”
Hobby Lobby has four different sizes. I purchased a 3×5-inch model for around $8, along with the matching base for another $3. With a couple of discount coupons, it came to around $6.
Crazy as it sounds, I regularly spend a decent amount of time wandering around various retail outlets doing what I call “project possibility recon.” It’s a habit I picked up as a child when I lived in small towns with limited childhood entertainment options. Being a geek helps as well. I’d spend hours inspecting bolts, hinges, electrical items, new tech, fishing equipment and all manner of gadgets on my travels as a youngster.
The “habit,” which is really just my insatiable curiosity of everything, has taken me into home improvement outlets, big box electronics retailers, neighborhood hardware shops, thrift stores and vintage specialty shops. Steampunk, of course, thrives on the diversity of sources.
A craftsman knows his materials. Off-The-Shelf Hackers are certainly craftsmen, albeit with a decidedly 21st-century techie spin.
So be sure to visit a variety of stores and just wander around. Think about your projects and how you might combine what you find, to get the look and functionality you seek. It takes practice, and you’ll get better with experience.
Mounting the Mosquitto/CHIP
On the conference floor at the recent Cloud Foundry Summit, people asked me for plans to the Gen-5 Steampunk Conference Badge. There aren’t any. I do fast moving, one-off prototypes, then cover the projects in articles and tech-talks. Documenting a build with detailed fabrication drawings, extensive schematics, meticulous bills of materials and so on, just isn’t a high priority, because they are labor intensive and I am not currently monetizing that effort. Perhaps I’ll offer plans or a how-to book if people show an interest in buying them.
With all that in mind, most times I just “eye in” dimensions, then cut and solder parts together, as needed. After a few projects, you’ll develop your knack for this form of fast fabrication. Fast prototyping is a challenging balancing act between getting the job done without losing momentum and making it look good. Practice and a lot of cutting and soldering will get you there.
For the Mosquitto/CHIP bracket, I cut a couple of pieces of 3/16” brass tubing to around 3-1/2” in length. The two pieces of tubing were placed next to the CHIP board along to its long axis, then three pieces of 3/8” X 1/16” brass flat stock were placed cross-ways to support the board at the bottom, at the same level as the single mounting hole (next to the USB connector) and at the top of the frame.
I chose to angle the frame inside the dome to make the board more visible than just a straight-up and down orientation. The frame also extends about one inch above the board, to protect and stabilize the connectors (micro-USB, USB and audio).
Clamped to my plywood workbench, the pieces were soldered together, after careful adjustments to ensure everything was square and lined up correctly. You have to work quickly with a high-powered (140-watt) soldering gun, so your handiwork in one area doesn’t loosen already soldered parts. Again, practice yields positive results.
Two angled pieces of 3/8” X 1/16” brass flat stock were also used as the mounting feet to attach the frame to the wooden dome base. I simply soldered them to the bottom from of the frame.
I also had to cut a slot at the rear of the wooden base, to pass the power cord into the dome. For this procedure, the base was clamped to my workbench and a Dremel was used to make the cut. I used a “spiral, side-cutting” bit with the Dremel, set on the lowest speed. The cut extended below the dome ring slot so that the wire could pass under the edge of the dome.
I plan to add a tri-color LED on a little bracket that will project light onto the front of the CHIP. I think lighting up the components on the front of the board will add a nice steampunk effect when the Mosquitto-Under-Glass is running. The tri-color LED will need some current-limiting resistors and will be hooked up to three of the CHIP’s GPIO pins. A Python program will control the LED. It’s pretty much a mirror image of what I’ve used for the Gen-4 Conference Badge “ozone tube.”
Hopefully, my examples help provoke thought and inspire you to apply your creativity to build your own cool new physical computing projects.