[Andrew] wrote in with a new take on the classic persistence of vision bike spoke hack. While many of these POV setups use custom PCBs and discrete LEDs, [Andrew]’s design uses readily available off-the-shelf components: WS2811 LED strips, an Arduino, an Invensense IMU breakout board, and some small LiPo batteries.
[Andrew] also implemented a clever method of controlling his lights. His code detects when the rider taps the brakes in certain patterns, which allows changing between different light patterns. He does note that this method isn’t incredibly reliable due to some issues with his IMU, so now he senses when the rider taps on the handlebars as well.
If you want to build your own bike POV setup, you’re in luck. [Andrew] wrote up detailed instructions that outline the entire build process. He also provides links to sources for each part to make building your own setup even easier. His design is pretty affordable too, coming in at just under $50 per wheel. Check out a video of [Andrew]’s setup in action after the break.
24 thoughts on “Simple POV Bike Effects With WS2811 Strips”
I’m working on similar project (no IMU, using hall effect sensors, and I aim to display static images loaded from SD card), there is a problem with Ws2811/2812 – their refresh rate is 400Hz, so with high RPM, angular resolution will not be great. Otherwise they are a good choice – relatively cheap, and there are dense (144 LEDs/m) strips available. For higher refresh rates, LPD8806 based strip would be desirable, if not for their low density (60LEDs/m max). Of course one could design his own PCBs, but using strips is so much more convenient.
Yeah, they seemed fast at first (1.25 microsec per bit) but at 90 LEDs x 24 bits that almost 3ms per refresh. I needed to rewire my setup and connect only 30 LEDs serially and driving them using three Arduino pins in parallel, so the whole refresh takes < 1ms and in theory you could achieve 1 kHz.
This is my WS2811 library, based on Alan Burlison's popular AVR library with the difference that it lets you drive 2, 3 or 4 strips in parallel:
BTW. I challenge anyone to do 5 in parallel in the same fashion.
In theory you can do 8 or 16 on an Arduino with preprocessing, but that rules out animation, and you probably don't have enough space to store the data on an Arduino.
is that challenge arduino only ;) i can do a lot more than that on a $4 dev board.
Yeah, that puzzle is only interesting specifically with AVR assembly at 16MHz ;)
figured ;) save yourself the headache and switch to the Cypress PSOC then the interface is designed in pseudo hardware , so no timing issues, tight loops and you get all the cpu time to work on the effects. Strangely i just posted the one i’m using to hackaday.io a short while ago.
pretta bad effects… could have been much better…
I thought it was clever and reminds me of a walking animation. Actually if Andrew could build “knees” and ankles into it, it would be a walker. You could use the IMU to trigger a change to a standing pose when stopped too.
Well, you can’t build knees since those are straight spokes, but you can display almost arbitrary animations.
The hackaday post doesn’t say it but the video doesn’t show any Persistence of Vision effect at all because that’s not a professional camera. To the eye it looks as if one half of the wheel disc was white and the other one black. There are also other effects like text, spirals, spinning globe, but these can’t be recorded with my camera.
I was assuming the use POV effects and animation to simulate bending knees about half way out to the rim.
I’m curious, is it as blindingly bright to the eye as it seems in the video?
Those LEDs are extremely bright at night and can still be seen in the daylight. In the video they’re set to brightness level 100 out of 255, but I’m not sure if the scale is anything close to linear. At 255 to me they seem a *little* brighter, but start to heat up a whole lot more, as well as heating my voltage regulator.
I’d suggest APA102 strips for this:
http://cpldcpu.wordpress.com/2014/08/27/apa102/ (shameless self plug)
-19 kHz PWM
– Much faster update via SPI
saw the APA102 via krux at SYN shop, they’re pretty neat.
The APA102 also have support in the FastLED library too, which I cannot recommend enough if you want to play with blinky things!
that is a neat library, and i just implemented my own rgb/hsv one this weekend … oh well. i now recall you using it on the pong as well.
Yeah I’m loving it. The new version 3.0 with fast sin & cos in 8 and 16 bit and the ‘beat’ generation function is really awesome.
yeah i’m looking at some guys fire effect, it’s really nice.. i shall immediately steal it. If it doesn’t have a PSOC port, i’ll port it over.
HSV/HSL is definitely a lot better for this stuff, CieLAB/XYZ i just don’t know if it’ll be doable on chip quickly, theres another peceptual color space thats interesting, http://www.cs.harvard.edu/~sjg/papers/cspace.pdf my xmas strips are been driven from a PC so i can throw all the horse power at it, and its interesting for colour research too.
Maybe some clever chinese boffin will make a chip that speaks HSV/Lab/XYZ
I always thought the benefit of SPI was, that you don’t need any library at all!
But of course, the colourspace conversion functions may be handy.
Well of course you can just use SPI yes.
But I don’t want to roll my own fast sin and cos functions (tiny lookup tables, fixed point interpolation etc). The HSL/HSV conversion is essential, if you are doing blinky things without using HSL/HSV you are doing it wrong.
There has been a lot of work put into performance of all the functions in the library that I honestly wouldn’t reproduce if I did it myself. Must avoid Not Invented Here syndrome!
funny, i am also working on a very similar project using APA102.
the APA102 is a really good choice for a project like this.
unfortunately the strips used to be only available in a 36 leds/m stripe.
i made a custom FPCB design for 90 leds/meter and that looks great so far.
drawback: much more expensive than WS2812B .. but the timing ratings for these leds are GREAT.
and because of the separate clock you can archive a stable refreshrate and exact offset for each row.
if there are so many people interested in this we should team up and share our ideas.
in the end we will have something beautiful.
are there groups on hackaday.io yet ?
yeah the APA102 seems great, but its mostly only that people have timing issues with the WS281x coz lower powered CPU’s,, change that, gets rid of the issues.
I wouldn’t want to be riding that bike with the weight of the battery but then also if that battery slips at high speed, someone is going to get hurt.
Absolutely great hack here! Thanks Andrew for sharing with us. It is a pleasure to meet you at Makespace Madrid.
i dont understand some of the comments.
problems updating enough pixels?
oh nevermind, i just got it, but for anyone else not getting it.
your refresh is determined by the rotaion of the wheel?
therefore at higher speeds it “wont work” unless you do the segmented parallel???
I wonder what would come first, the cops stopping me and forcing me to disassemble it on the spot, or my bike being stolen.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)