Posts tagged LEDs

The Flying Carpet

While lying on damp, cold, and hard ground at Kiwiburn one night, we decided that festivals are more fun when dry, warm, soft, and fluffy. So we made a festival blanket that we named the Flying Carpet – fluff on the top, waterproof underneath, padding in the middle, and LED animations around the edge (Teensy, FastLED, Li-ions, as per usual).

Heteronormatively, Wendy did the fabric; I did the electronics. Here’s her tutorial on how to make one yourself.

Mitochondrion Mark 5.3 LED Staff

In short: the Mitochondrion looks as stunning as I hoped for about five years ago.

My journey into the obsession of making LED staffs

About five years ago, I stopped fire spinning and started building LED staffs. I wanted to have images hanging in space around me while I am spinning staff. Technology (and my skills) have finally got to that point where I’m pretty happy with the Mitochondrion, Mark 5.3.

The path has been:
Mark 1 – I learnt so much by designing the first one that there was no point building it. Straight on to…
Mark 2 – Ran without a microcontroller and had some fundamental flaws, like not turning on. I learnt enough to build the next one…
Mark 3 – The first of those pictured above. 44 LEDs controlled by a Picaxe. Twenty-eight bytes of memory, home-etched circuit boards, sketchy wooden parts, and bubble-wrap.
Mark 4 – First to use LED strips, 88 LPD8806 controlled by an Arduino Nano, twenty NiMH cells, and 3D printed parts. Eventually became bomb-proof enough that various I was happy to let randoms play with it at festivals.
Mark 5.2 – Teensy 3.1, 800 NeoPixels as four parallel strips of 200, and lithium cells. It looked good at Burning Man until the overloaded Voltage converters tried to catch fire.
Mark 5.3 – The brief details are: twelve 14500 Lithium rechargable cells powering 800 APA102/DotStar LEDs in four strips, controlled by a Teensy 3.2 microcontroller, with a motion sensor to turn it on and off, running the wonderful FastLED library and my own multitasking code to display a hundred images. You may have seen version this at Kiwiburn this year.

The not-so-brief details are explored below, with an emphasis on the inevitable trade-offs that you face when trying to push to the boundary of what’s possible.



What are the limits?

First limit is size, because here we’re trading off between ease of holding, stiffness, and internal diameter. The outside diameter of the tube can only be so big before it gets hard to hold. 32 mm is already fatter than I’d like for a staff. The only possible material for the tube is polycarbonate and that’s pretty flexible stuff. That diameter tubing comes in two choices of wall thickness and 1.6 mm is like a noodle. So 3.2 mm wall it is, giving a 25.4 mm inner diameter. That fact alone drives the rest of the design.

Second limit is energy storage. I want this to be kicking out the lumens all night long, or at least as long I last at a festival. (So that’s till about half-way through the night when everyone is kicking off and I say “I’m just going back to camp to get more water” and then I sneak off and crash out. But I digress.) I also want to fit four LED strips along with the necessary wiring and internal structure. Turns out 14500 cells (AAA size) fit, with about a quarter of millimetre spare. Twelve of them give me 33 Watt-hours, which is sufficient. Splitting them into two groups puts the heavy cells at the tube ends for good weight distribution when spinning. Keeping those two groups as one pack, i.e. all the cells in parallel, makes charging so much easier. Charging from USB is handled by Peskie Products tiny 800 mA board.

The cross-section looks like:

Third limit is power. I’m keen on ridiculous peak powers. And 800 LEDs could peak at 150 Watts. Sadly, that would pull 4 Amps per cell, a rate of 6C. There are high discharge rate 14500 cells, but I’ve yet to find any that are also protected and 50 mm long. The Trustfire Flame cells I’m using have a detectable Voltage sag at anything above 0.1 Amps, so I chose to cap the power at 10 Watts. More is certainly possible, but the green and blue LEDs fade out leading to a noticeable colour change. And 10 Watts is still the brightest LED flow tool that I’ve seen in NZ. (At some point, I’ll try higher discharge cells…)

Fourth limit is features. Here the trade-off is between time writing code (and getting it to work) and just building the bloody thing. I’m at the point where it does images. It doesn’t visualise music, yet, but that’s the plan for Mark 5.4.

Fifth is durability. Making a long, thin electrical device and then repeatedly throwing it on the ground is just hard. So everything is solidly mounted, there’s 3D printed ninja-flex bumpers at the ends, all structural parts are aluminium, thick 3D printed nylon, or FR4. All wires are as short as they can be, with locking connectors. All solder connections between parts that could move are sewn. All cell holders are screwed in place as well as soldered.

Key design features for the Mark 5.3

Power architecture – the great thing about APA102 LED strips is that they will happily run off 3.7 Volts, meaning no need to step Voltages up to 5 Volts as with NeoPixels. (They also just work, unlike NeoPixel’s tricky timing requirements.) This simplifies the power architecture greatly and avoids using UBECs. The downside is that they pull 1 milliAmp per LED even when the LEDs are set to off. I don’t have room for a physical power switch, so to keep the stand-by life at more than a day, there’s MOSFETs between cells and strips which cut or enable power to the strips. This also allows for control of the strips on start up – the Mark 5.2 didn’t have this. On power-up, the NeoPixels could light before the microcontroller had booted up, getting stuck in a high-current draw mode, preventing the Teensy from starting and damaging other components from overheating. The Mark 5.3 holds power off to the strips until explicitly commanded by the microcontroller.

Here’s a block diagram, clickable for enlargement:

Overall Arrangement and Physical Alignment – Accuracy is hard. Or rather, accuracy is expensive and time consuming. Squeezing everything in gets to be a pain in the arse, when you have quarter-millimetre tolerances. Making everything stiff enough and strong enough is bonus arse pain. So rather than try to make structural components myself, I used the PCBs as structure, alignment, and circuitry. Board shops will happily drill holes for no cost with micron accuracy. Then everything just screws together and fits together. The four sides are in two pairs with L-brackets holding each pair. There’s hinges between each pair so you can remove the internals and open the whole thing up for access.

Physical power switches – I said this doesn’t have room for one. It doesn’t, at the ends. One end holds the charging port, the other the microphone. I probably could squeeze one in, but there’s lots of current so the switch isn’t going to be small and the ends are the parts that get most knocked-about, so it’s not going to be durable. Still, power switches are necessary for debugging and resets, so there’s two tiny, board-mounted six Amp switches, one for each battery pack.

Multi-tasking code and timing

The code is all built on Alan Bleaklow’s Very Simple Arduino Task Manager. Every feature is an object that gets called every X milliseconds. The pattern generator and display refresh run every 2 milliseconds; the motion sensor every 250 milliseconds when spinning and every 500 milliseconds when stationary. Communication between objects is by message passing, with a SwitchModes object running a finite state machine to hand smooth transitions between spinning, ambient, and timed-out modes. Transitions between images happen every few seconds, or on reversal of the spin direction. The transitions are sharp, but could be gradual.

This code is probably a bit over the top for just displaying images, but is a solid platform for more complex behaviour.

The interface is entirely motion-based. Spinning wakes it, not spinning drops it into mellow ambient modes, rolling it turns it black.

With a Teensy at 72 MHz and data to strips at 10 MHz, updating 200 LEDs takes 1.5 ms. The display aims to update every 2 milliseconds, leaving 0.5 milliseconds to get new the next column of image data or generate the next frame of a pattern, or do other stuff. This is plenty.

Images

I wanted a strong visual identity to take to Burning Man – something very New Zealand. I also wanted bright colours and not too much complexity, coz the Teensy is pretty tight on memory. Luckily, NZ was having a competition to replace our flag, which provided a source of bold designs that look great in a palette of only 16 colours. (Unluckily, the proposed replacement flag is crap so we might be sticking with the original.)

Some are 256 colours, most are 16 colour for two pixels per byte. Images are 32, 48, or 72 pixels high.

So I rounded up a heap from the flag competition, along with lots of traditional tuktuku and kowhaiwhai patterns, and some mandala drawn by Spiralishis, and some mathematical designs sourced from Wikipedia. Some of these were tweaked in Gimp with conversion to polar co-ordinates, shifted, and faded brightness in the rectangular originals to give round and even brightness in when displayed by the rotating Mitochondrion.

Like this, original on left, what it looks like on right:

The images are processed from GIFs by a hacked version of Philip Burgess’ LED poi converter. It takes a directory full of images and writes out a header file full of image data and palettes, which then gets picked up by the compile.

And of course, we had to include Laser Kiwi. It’s the People’s Choice!

I’ll admit to being quite pleased with this version.

Photo credits

All spinning pics by Gordon Lehany of Platnam Images, who mostly does landscape and event photography, and platinum printing, but is game.

Mitochondrion Mark 5.3 further progress

My new countersinking technique is unstoppable.

Mitochondrion Mark 5.2 first spin

Of course, a whole bunch more to do, but it goes.

Mitochondrion Mark 5 progress

Brightness levels are optimal.

My life at present

A easier and more reliable way to join 144 LED per metre strips – sewing

The 144 LED per metre LED strips are stunning. The LEDs are close enough that they blur into a single bar of light. Sadly, the LEDs are close enough that joining the strips is a nightmare. The pads are tiny, joints are sketchy, the LEDs too close together to get an iron in there, and it’s easy to overheat and damage the LEDs. And I’ve had to make up four 1.4 metre lengths for the Mitochondrion LED staff, requiring joints in each.

So after much swearing and head-scratching I’ve come up with a better technique for joining them – sew them before you solder.

This applies to both NeoPixel and DotStar (APA102C) strips.

First up, cut the strips to leave whole pads. Don’t cut in the middle between LEDs, cut to one side. Yes, this means that the first LED on the part of the strip you are cutting off is now useless, but hey, you only lose one LED. I found cutting with a knife on a chopping board worked for me, my snips are far too large for this. The strips I’m using had adhesive on their backs, I scraped this off. The ends should look like:

Then make up a jig to hold the two ends in position, leaving both sides free. The ends of the strips should just butt together, for reasons that will become obvious. I only have one vice, so I used a clamp and some blocks from the workshop:

The next step is the fiddly one. I cut a length of multi-stranded hook-up wire, stripped the insulation off, and pulled out a single strand. I fed this through the holes in the pads and wove it back and forth. You could just make a simple loop, but that would leave the strip ends free to move and overlap. Instead, I wove some of the loops in a figure of eight pattern, with the strand crossing sides between the ends of the strips. This pattern can be tightened onto the pads and holds the strip ends against each other. Tweezers help. A picture is probably clearer than words, click to enbiggen to make it even clearer:

Getting the strand between the ends is easy, provided you start the sewing at one side of the strips and work across. That way you can hold the strand tight and pull it between the strip ends. Once I’d done a reasonable wrap, I took both loose ends of the strand to the back side, twisted them together a few times, cut them short and bent the ends down:

Now that the strips are held to each other and there is wire between the pads, soldering is a piece of cake:

And this is with a dirt-cheap, no-temperature control, medium-size soldering iron. I’ve yet to have a failed joint with this technique:

Bonus notes:
1) This technique does require an additional 1 mm between LEDs. This leaves a tiny, tiny gap. When the LEDs are on, I can’t spot the gap. If that isn’t good enough, then you could use the wire technique to overlap the pads directly and tie them together, but that’d require more complicated knots.
2) These joints are still just solder, so I wouldn’t bend them too much. Thick tape on the back of the joint seems like a good idea.
3) I really should write up my bombproof LED driver design.

Mitochondrion Mark 5.1 – Motion sensor data

It’s good data. There’s lots of it.

I just need to work out what to do with it…

No Mitochondrion Mark 5 for Kiwiburn… but something else instead

Right then, after a fair amount of swearing, I made the decision that the Mitochondrion Mark 5.0 has some fatal design flaws and won’t be ready for Kiwiburn. Turns out the 144 LED per metre Neopixel strips are a bastard to join and connect to. There’s a variety of ways to do it, none of which will work with my very tight design. Seriously, don’t try to squeeze as much into a one inch tube as I did.

This does mean I’ve learnt enough that the Mark 5.1 should be much easier to construct. This does mean designing and ordering new circuit boards, stepping the power down to 60 Watts not 120 (coz it was going to melt), using more reasonably sized batteries (14500 not 16340), and trying the new APA102 strips with POV and smooth colour fades.

So instead of the Mark 5, we’re bringing something else. It’s a Wendy & Jez co-production and you are all invited. You’ll know it when you see it, but yesterday it looked like:

Mitochondrion Mark 5.0: First light

Yeah, this is going to be bright.

That’s the test power board, the test centre board, and the test strip. The power board holds four 16340 Li-Ion cells and a 5 Volt, 4 Amp converter (and some other gubbins). There’ll be four of them, one for each strip. The centre board holds the Teensy, motion sensor, FRAM, and level shifter (and a bunch of other gubbins). The test strip is 144 Neopixel LEDs. There’ll be 800 of them.

Testing reveals a bunch of issues to fix, but at least I’m at the stage of making light.

Mitochondrion Mark 5.0.1 progress: almost enough LEDs

The answer to the question “how many LEDs?” is always “moar!”. However, I think this counts as “almost enough”:

And you’ll note from the change in version number that the Mark 5.0 power design didn’t work out. The Mark 5.0.1 power design is underway. In short, while I could fit 18.2 mm diameter cells into a 19.6 mm space which also holds circuit boards and wiring, “could” is not the same as “should”. Hence the delicate trade-off of diameter, length, weight, energy, power, charging, balancing, and not catching fire means that 16340 cells are looking better than 18650s. This will result in downgrading the peak power output from “portable apocalypse” to “merely seizure inducing”, but you can’t have everything.*

* – Well, to be precise, you can have everything, but a large fraction of everything is planned for release in future versions.

Winter, therefore tidying up

Winter’s kicked in, so I’ve switched modes into finishing things off, tidying up, and getting generally tatted down and squared away.

So, the Too Bright Hat needed a new cable. 3-pin mini-XLRs seem to be the right balance of durable, small, and able to handle 8 Amps, but finding connectors with decent cable clamps took a while. The Hat is on my head and the driver is on my belt, so there’s plenty of flex and tension on the cable. Without clamps, that stress results in:

Ended up with the REAN Neutrik ones. Of course, no-one in NZ stocks them, which is a shame as they’re good and solid.

The Hat driver had a LiPo with just a fuze for protection, along with low Voltage cut-out handled by the Teensy, which is a bit shit. Charging the battery required taking the battery out of the box because it’s also kind of crowded in there and there’s no room for a charging port:

That yellow connector is an XT-60, good for sixty Amps, making it ten times as big as needed, and that black fuze is bloody huge too. So I swapped that all out for some EC3s and a proper PCM board, freeing up lots of space. Of course, I filled it right up with banana sockets for the charge and balance connections so I can charge the battery in place.

If I can do what I want to do with the Mitochondrion Mark 5, then it’ll be pulling peaks of 50 Amps. Inside a one inch tube. Fitting all that in is going to be fun…

Testing level shifters for running Adafruit NeoPixel strips from a 3.3 Volt Teensy

If you’re running NeoPixel LED strips off a Teensy 3, maybe because you want to put 180 LEDs on a hat, then you need a level shifter. But which one? The NeoPixel data protocol is high speed and pretty harsh on timing requirements and I’ve had a bugger of a time getting reliable data from the Teensy to these strips. Hence I’ve tested a bunch of shifters. I tried a TXS-0102, TXB-0108, 74HCT245, PCA9306, and a MOSFET based shifter.

The Teensy outputs data at 3.3 Volt, the strips expect 5 Volts. Or rather, the strips might see 3.3 Volts as a digital 1 or they might not. If you want some reliability, then you’re better off shifting the Voltage level up to 5.

Each LED reads the data it needs and passes on the rest, regenerating the signal to nice square pulses, so there is no decline in signal quality along the strip. Well, that’s the theory. In reality, all sorts of weird failure modes can happen.

Anyway, short conclusion from this testing is: use a TXS-0102 shifter if you’re tight on space and running one or two strips, use a 74HCT245 if you’re not or you are running three to eight strips. The 74HCT245 was the only shifter to give perfect performance, everything else had some kind of problem.

Test results and scope pics

180 LED Hat for Kiwiburn

Here’s details on my Kiwiburn project – a hat with 180 LEDs, all individually controlled… but to be honest, this was my project for Circulation, back in November. Getting it built was easy, getting it to work took quite some time, but I learnt a great deal. So here’s my design for a portable driver for the NeoPixel LED strips.

Why do this? Before making the next Mitochondrion, it was time to learn some new technologies.

The Mitochondrion Mark 4 (my glowstaff) is not too bad – 88 LEDs controlled by an Arduino Nano. However, it might be pretty but it isn’t responsive or interactive. It just splatters photons everywhere, generating randomly-chosen patterns.

I want more than just random brightly coloured lights. I want emotion, narrative depth, and engagement. That requires a far gruntier microcontroller than an 8-bit Arduino. Something like a Teensy 3.0 – ARM Cortex, 32 bit, about fifty times faster, lots more memory, and only 18 mm wide. And LED technology marches ever on, with Adafruit’s Neopixel strips being a big step up. And all of that is pushing me to use lithium batteries, even if they take more looking after than NiMH.

Thus it’s time to step up my technological game for the Mitochondrion Mark 5. The Hat seemed like a simple project that I could use for learning these new technologies – how to use them and what to use them for. Now that the Hat is working, I’m glad I took this step, because trying to get all this to work for the first time in the Mark 5 would be a bugger. Continue reading 180 LED Hat for Kiwiburn

Best Kiwiburn Ever!


Picture by Peter Jennings

Very brief summary:

  • Returning to Kiwiburn, with my closest people, who’ve also been away.
  • Helping to build and light the Effigy. The Effigy crew. The resulting meat blanket.
  • New site, oh yes.
  • Finally getting the Hat Band working and out in public. Ooo… it’s shiny. It lasted three days before an expected hardware failure.
  • Being really glad I’d put a dim mode on the Hat. Otherwise no-one could look at me, coz 180 LEDs. I’m not that anti-social. Well, not always.
  • All the smiles.
  • Poking nature with a stick.
  • Cuddle piles with all the fluff.
  • Being happy enough with the durability of the Mitochondrion that I can just give it to anyone, no matter how munted.
  • Realising that I’m very happy with my life.
  • No FOMO, but a bad case of FOMP – Fear Of Missing People. I didn’t see enough of far too many people, in some cases I didn’t see them at all, but as Wendy says we were “focused on deepening connections with people I already know rather than forming a whole bunch of new ones”

There’ll be a proper write-up of the Hat Band hardware, when I’m less shattered. And some pics and video.

Four thousand LEDs

This is possibly the most relaxed video I’ve ever put together.

Squidsoup were kind enough to let me have a play with Volume 4,096 – a sculpture of four thousand LEDs, in a 16x16x16 cube that hangs in the foyer of the Royal Society of New Zealand.

These patterns are all Perlin noise in HSV-space, with varying rates of change and scaling. And yes, the patterns were generated with Processing and more Toxiclibs.

Filming by Patrick Herd. Music by Christian Dittmann – Planeta rojo. Best viewed at 1080p.

The Mitochondrion at Circulation

Circulation is one of New Zealand’s finest little circus festivals. I got back from there last night, still covered in bruises and glitter, but I finally managed to get some video of the Mitochondrion in its native setting, helped by Nicholas Leland, Tama Bw of The Fire Bugs, Reece Dunn of Dragon Flow, Josh Smythe & myself for the spinning, JD for the dome and filming, and Ryan Walker at Spiral Technica for the live motion-tracking projection mapping. No idea where the mirrors came from, but cheers.

Tune is Will Marshall vs Youthful Implants – Use of Weapons, available at Soundcloud under a Creative Commons licence.

And thanks especially to everyone who helped put Circulation together.

Mitochondrion Mark 5 progress

Mitochondrion Mark 4 code is now running on the Mark 5 chip. Teensy 3.0 – an ARM Cortex M4 on an 18 mm wide board. Consider me pleased. Have yet to time the code, but should be faster. Much faster. Which is required, as it might be possible to replace the Mark 4’s 88 LEDs with 800.

Still a long way to go for the Mark 5, but changing the chip from Arduino to Teensy is probably the biggest step.

Also, Eclipse is still a royal pain in the arse, but does actually work for compiling, building, and programming. No debugger and it doesn’t play nicely with the serial port, but it does the job.

(Oh, and the Teensy has an on-chip temperature sensor. This may be needed, as preliminary thermal modeling suggests that full-whack may make the whole thing melt. Coz, you know, EIGHT HUNDRED LEDS.)

Under the Spinfluence

Reese Dunn in the renegade show at Under the Spinfluence with the Mitochondrion, Mark 4.2.4.

Pic by Charlie Whiteley.

The Mitochondrion Mark 5 begins…

That tiny thing is a Teensy 3.0. ARM Cortex M4.

It’s a serious step up in performance from the Arduino Nano that runs the Mark 4. Four times the program memory, eight times the variable memory, four times the clock speed and 32 bit not 8, so quite substantially more grunty.

Which is somewhat handy, as it’ll will have to look after somewhere between three and eight times as many LEDs.