If you haven't already seen it, here's Part 1.
I decided to rule evenly spaced lines along the length of the PVC tube as a guide to make sure that I placed the LED strips in the right spots. I really wanted them evenly distributed. I also thought that due to the fragility of the strips themselves, that I'd use 3M double sided tape pads instead of hot glue to stick them to the cylinder. The LEDs have the potential to heat up which might have caused the glue to fail.
I carved a temporary channel for the power and data wiring to pass out underneath the edge of the vase and just sat the glass instead of securing it. This allowed me to get a sense of the space I had to work with and what other considerations to make when building the final base.
|Starting to look like something Tony Stark might have on his desk.|
The first and simplest is a piece of paper. Which... is too hairy:
It does effectively hide the individual LEDs, but it's really not the thing to use. After a visit to the art supplies shop I came back with two different thin, frosted polypropylene materials to test:
You can see in the top row that the LEDs are far too individually visible with the first material. And even two sheets weren't enough to give the right effect. However the second material worked better, and after doubling it to two sheets thick it gave exactly what I wanted. None of the individual LEDs were really visible on their own and any patterns effectively blended nicely to produce smooth gradations of colour.
Testing it in the dark with a particle simulation yielded nice soft shadows and a warm campfire effect.
Shooting these clips with my iPhone, I began to confront the exposure issues that make shooting bright lights in dark places a bit tricky. It's really hard to get a sense of the right colours the lamp is capable of via digital cameras. What seems burnt out white at the bottom of the fire in the GIF above is actually really nice on the eyes. However, later I realised shooting under-exposed with a larger sensor would produce far better results. More on that later.
So, it was about at this point I started considering a couple of things. 1: What is the final form of the base going to be, and 2: I wanted to put this somewhere else in the house and NOT have to have it connected to a computer via USB the whole time. This meant I needed to choose a small form-factor stand-alone computing platform that fits in the base I design, and can run the Fadecandy server plus compute the processing sketches that power the lamp.
Now, having chosen the Fadecandy board to control the lights, the choice of platform is reasonable [OSX, Windows, Raspberry Pi and Linux] but does NOT include Arduino. In fact one of the reasons Fadecandy exists is to do serial computation at a rate that most Arduino boards cannot. So the only other readily available small form-factor platform is Raspberry Pi. It's also one I have a shot at doing more complicated coding and setup in due to it's embedded Python support.
There ARE more high-end small form-factor platforms out there ie take a look at https://www.hardkernel.com for more. AND those platforms offer potentially much more CPU power for computing sketches at a rate similar to my mac mini. But they cost more, need to be shipped internationally, require more cooling etc. Plus I could go buy a Raspberry Pi locally and start messing with it.
One more thing, the now famous and useful page I linked to in Part 1 - 1500 NeoPixel LED Curtain with Raspberry Pi and Fadecandy concludes with the following statement:
"Python and C both perform quite well on the Raspberry Pi. An expert programmer could make this a self-contained system, not reliant on a networked computer to drive the animation."
Now, that's what I needed to do. I wanted a fully standalone lamp with a button on the front to change sketches and maybe a knob to adjust a parameter in the currently playing mode etc? And the Raspberry Pi is available on the local network via wifi, so what about serving a webpage with animated GIF buttons for the different modes so guests can change it? Whoah, slow down there dude, you don't even have a Pi yet.
Ok, time to fix that.
Raspberry Pi Model 3 B+. NZ$60. A full quad-core linux computer you can fit in a pack of playing cards ... well, almost. It was pretty cool to unbox this, plug it into my monitor, give it a mouse and keyboard, an operating system [Raspian] on a SD card and have a computer up and running that comes with Minecraft pre-installed!? It certainly gave Jamie some ideas about building a lunchbox laptop with Retropie to take to school.
A couple of evenings tinkering around and I had the Raspberry Pi running my own lavalamp sketches completely standalone.
|You can see here also a hardware button and a green status LED connected to the GPIO pins. More on that later. You can also see what a cluttered mess my desk is.|
The original ION lamp that inspired this whole thing was superbly minimalist. I was unable with my time and access to tools & materials to mimic their aluminium touch sensitive casing. I used an upside-down $14 vase anyway! I didn't want to do something too out of keeping. Looking around, I saw a variety of things that could work, maybe with some modifications etc
I wanted to keep a natural material feel to it, so maybe some wood? I really liked the white mesh of the light cover in the bottom right hand corner of the image above. That would provide a suitable amount of air flow for cooling as well as look relatively tidy? I kept looking and stumbled across this lamp in a local hardware store:
|Oh hells yeah. A little steampunk maybe but, meh.|
I was planning to run the Raspberry Pi in a headless fashion, so the HDMI and keyboard and mouse cables would not be required. I was connecting via wifi also, so no ethernet to consider. Just power, a USB-A or two for the Fadecandy and a mic perhaps?
|The cutting disc on the dremel made short work of the copper cylinder|
So I underestimated the amount of room the USB-A plugs would require to fit inside the mesh cylinder and had to embark upon some shroud-stripping and smallification.
|This might look a little dodgy but I'd really only exposed the ground wire and planned to heat shrink it anyways.|
|It fits, and it works. Phew!|
While I was working through this phase I also made decisions about buttons and lights. I'll detail more about this in the software section. I needed one button to switch the sketch that was running and another to start up and shut down the Pi. The Raspberry Pi is a complete Linux computer and Linux file systems can be corrupted if they lose power - so you simply cannot pull the plug reliably. You MUST shut them down nicely or deal with losing everything.
I also wanted a status light that I could use at a glance to know if the lamp was on, or ready to be safely switched off etc. All these buttons and lights connect to the GPIO pins on the Pi but needed to be wired up and placed during this part of the build.
|I decided to wire up both blue and green LED choices to see which I preferred. Although I liked the blue it was too piercing and I went with the green for a more old school look.|
Cutting the button holes went easily enough with a combination of cutting and sanding discs on the dremel. One button on the front for switching sketches and one on the back for startup and shutdown.
I made the decision to go with two power cables to supply the lamp. This wasn't as neat as I hoped but I didn't feel brave enough to drive the Pi via the power supply I'd bought for the LEDs as their requirements at full-white might risk drawing too much juice and make the Pi brown-out. So I chose to live with running both the LED power cable AND the Pi 5.1v adapter supply together. They needed to go into the side of the base at the rear but I didn't want them rubbing on the rough copper cuts I made. So I lined the edge of this hole with a hose washer I found at the hardware store that was the right size.
|It's not exactly strain-relief but it'll stop any wires from being cut. Also you can see where I slipped with the dremel and scratched the copper surface while cutting the power hole. D'oh!|
|My first real look at the aesthetic direction.|
|I drilled into some of the existing holes in the mesh to enlarge them just enough for the screws required.|
|Success. PVC tube attached.|
|It's ugly but it'll get cleaned up.|
|It's all stacking up nicely.|
During my sketch investigations I found a small USB microphone on Amazon that just plugged in and worked in Linux. This meant that using a Processing library called Minim, I could modulate any parameter of a running sketch. So I could change the colour of the particles in my campfire sketch for example, just by monitoring sound in the environment. I decided to include this capability and make use of it later during the software phase.
The microphone was a little on the large side and had a flexible boom neck that I really didn't need. So I disassembled it and you can see the condenser unit sitting on top of the USB plug stack. It used to look like this:
|I just need the mic and USB stuff really. Not the flexible neck or casing.|
|Cling to the wall status LED. Just hang in there little buddy.|
|XT-60 for the win!|
|Powering it up on the bench. You can see the green status LED as well as the Pi board lights through the mesh.|
|It's alive Stimpy!|
And then with the cover on all that remained was to drill holes for the screws to keep the top wooden platform in place just poking out of the mesh. That's if for the build and install. From here on it's mostly software and adding new capabilities.
The next section will be all about the software side of things. I'll detail the tweaks and discoveries I made during my Raspbian setup as well as some Python for switching sketches based on pushing the front button etc. Also some Processing sketch discoveries. See you there.
Part 3 is here now.