James West

May include blinky lights. And cocktails.

Category: Quick Makes

Adding Twitter control to a bubble machine

I got a bubble machine for a fiver at The Works with the idea that I could control it somehow from a Raspberry Pi Zero W. It turned out to be quite a simple hack, with satisfying results.

Before adding any bubble mixture I turned the machine face down and took the six small screws out of the back so I could get the case open. Inside I found an electric motor, which turns the bubble paddles and drives the bubble-blowing fan and the back of the battery box. There’s quite a lot of empty space inside too, which means it’s not hard to squeeze the Raspberry Pi in there.

I de-soldered all the existing wires and replaced them with a short pair of wires from the battery compartment and another pair from the motor’s terminals. The original circuit included a button at the top of the case, which I’ve by-passed. I used my hot glue gun to fix the button-press in place at the top. I used the motor controller board from my CamJam Robotics kit to connect everything to the Pi, hooking the motor up to the “Motor A” terminals and power from the batteries to the VIN and GND posts (taking care to ignore my badly chosen wire colours). It’ll be interesting to see how much of a battery hog the little motor is.

Pi Zero W and CamJam motor controller in place and connected to power and the electric motor.

I drilled a 10mm hole in the back of the case and elongated it with my Dremel to allow me to pass a Micro USB connector through which supplies power to the Pi. I used one of these extenders so I can use a proper power supply or a USB power pack if I want to take the bubble blower outdoors (and of course I will once summer comes!)

As far as hardware goes that’s it, so I wrote a few lines of python with GPIOzero which supports the CamJam Robotics kit. This made the coding side of the project super-simple, which I like very much. It really did take just a few lines to prove the Pi was controlling the motor and letting me remotely blow bubbles.

Bubbles powered by @Raspberry_Pi pic.twitter.com/WdMxsxC7gt— James West (@jameswest) April 7, 2019

For the final touch I wanted to let anyone set the bubbles going by watching Twitter for the #blowbubbles hashtag. I recycled the code I wrote for the Tea Time Klaxon, so again it was quick and easy to get this going. The complete program is here if you’re interested.

Quick make: Adding LEDs to a world map to show the status of stuff

In a recent sale my local branch of The Works was selling this cork world map. It was only a few quid – even less than the £7 sticker price and I thought it could be improved by adding some LEDs to it.

Today I finally got this sorted, starting out with a test build of the circuit, wiring two groups of LEDs in parallel (blue and yellow to match the buttons I’d got), with a 100 ohm resistor for each one.

I decided where to put the LEDs on the map, and drilled 3mm holes with my Dremel for them. I also marked out where the buttons needed to go and used a craft knife to cut through the layers of cork, corrugated paper and card that make up the sandwich of the board. The LEDs were hot-glued into place after being pushed through the map, Because the board was quite thick they ended up being just about flush with the surface which gives quite a nice effect when they light up.

I also fastened a 3 x AAA battery box onto the back and stuck the power rails from a breadboard nearby to help hook up the LEDs.

Next I soldered a resistor to the cathode of each LED and wired up the buttons and battery pack to the breadboard. Then I connected the LEDs to the power and used electrical tape to cover up the exposed LED legs to prevent an short circuits.

I’m happy with how this came out. The location of the LEDs in this case isn’t important, they can be used to indicate whatever you imagine: the location of Dalek invaders and UNIT forces for instance. You could put them on specific continents or oceans to help with geography homework or show where particular food, animals, or resources come from.

Quick make: cocktail cabinet LED rainbow

We love our cocktail cabinet, bought at a vintage shop in Northallerton. But you can improve everything by adding LEDs to it, right?

Cocktail cabinet lights

After finishing my K9 build I’ve time to spend on a few smaller ideas I’ve had kicking around, like how to make the cocktail cabinet glow. I splurged on a Mote kit from Pimoroni and the pHat to go with it. I made a simple frame from some plywood that was in the shed and screwed the Mote strips to the outside edges. A Pi Zero W went in the middle and I threaded the cables through the gaps I’d left at the corners.

Mote sticks frame

A couple of screw eyes and some picture wire let me hang it on a picture hook behind the cabinet. I’ve just got one of the example scripts provided by Pimoroni running for the rainbow effect, but in the future I’d like to make the LEDs flash or change colour in response to a Twitter hashtag like #cocktailtime

I also think it’s time for that wallpaper to go, and paint a nice clean white wall instead.

© 2019 James West

Theme by Anders NorénUp ↑