LPD8806 DLW



LPD8806 SD/LCD Digital Light Wand!
(Last Update – 20 September 2014)

I have gathered the information from the HL1606 Digital Light Wand Blog and brought it all over to this new page so that there would be a page dedicated to the LPD8806 Digital Light Wand created by IS0-MICK.

Mick took my original design and turned it into a very easy to use and versatile tool for long sessions of light painting away from the tethers of a computer by incorporating an SD Card and LCD Display into the mix to make the wand independent of the Code Generation! Simply load BMP Images to the SD Card, select the image on the LCD display and GO!

Thanks Mick for your support of the Digital Light Wand AND this blog! See the updates below.

First off, if you are not sure what a Digital Light Wand is, then go back to this page for a brief description along with a description of how the Digital Light Wand has evolved.

So… not to delay any longer, here is the info on how to make your own LPD8806 Digital Light Wand! All it takes is some basic soldering skills and dealing with downloading and installing a little bit of software and you will be up and running with it!

1) Here is a wiring diagram for wiring all the components together for a single strip (Arduino MEGA).
And here is the wiring diagram for a dual strip using the Arduino MEGA setup.
And here is the wiring diagram for a dual strip using the Arduino DUE setup.
2) Here is a brief picture tutorial including a parts list and basic instructions for assembly.
3) Here are links to the different versions of the Arduino Code:
Here a link to iso-mick’s Arduino code.
Here is a link to the Dual Strip/Interlacing version of the code. MRR v1.2 (Arduino MEGA)
Here is a link to the Dual Strip/Interlacing version of the code. MRR v2.0 (Arduino DUE)
Here is a link to the Dual Strip/Interlacing version of the code. MRR v2.0 (Arduino MEGA)
) Here is the Arduino Library files to drive the LPD8806 Light Strip
4) A note about the image files that you store on your SD Card.
5) Detailed instructions on how to create the BMP image files for use with the DLW using Photoshop CS4.

Here is a video of the LPD8806 Digital Light wand in action!

Here is the wiring Diagram for a single strip setup (Arduino MEGA):
LPD8806 DLW Wiring

Here is the wiring Diagram for a Dual Strip Setup (Arduino MEGA):
LPD8806 DLW Dual Strip Wiring

Here is the wiring Diagram for a Dual Strip Setup (Arduino DUE):
LPD8806 DLW Dual Strip Wiring - Arduino DUE

Dual Strips in action with the new menu and interlacing:

227 Comments

  1. leo October 25, 2014 at 6:05 am #

    Hi!!!

    congrats for the ws2812 project. it looks great!

    I sorted out correctly the issue that I had regarding sending a single file as a loop, and I wanted to share the sketch here in case somebody needs it.

    At the same time, I wanted to ask you (Michael) if you could check it out, since I have been testing it with a white bmp file to be able to measure its maximum energy consumption (I am using 7.9mts of led strip) and doing this I found out that I do not have real white. or at least I do not perceive it really white. I know that perception with the led strip could be tricky, but I thought that perhaps there is something in my code that is provoking this. I have been looking for a brightness value, but found nothing. so if you have 10 minutes to check it out, I would really appreciate it.

    http://www.leobettinelli.com.ar/download/ws2811_cube_80px_1set.zip

    thanks!

  2. Michael Ross
    Michael Ross September 28, 2014 at 6:23 pm #

    For those of you interested. I just posted a basic tutorial and information on building a new Digital Light Wand using the NeoPixel WS2812 144 LED per meter strip! The link is in the menu at the top or click here: http://mrossphoto.com/wordpress32/neopixel-ws2812-dlw/

  3. Michael Ross
    Michael Ross September 20, 2014 at 1:38 pm #

    Update: I have added some detailed instructions on how to create a proper 24 Bit BMP image in Photoshop CS4 if you are looking for details on how to do this. The link is here. http://www.mrossphoto.com/DigitalLightWand/BMPHowTo.pdf

    • Satwik Sharma September 20, 2014 at 1:52 pm #

      Hello Michael,

      Would you be ever trying to create a digital wand with ws2812b 144led/m strip, using arduino due? or maybe even a better board like arduino yun, or some other arm based chipset?

      If you have created on with arduino due, a glimpse of it’s code would be really helpful.

      With Regards,
      Satwik Sharma

      • Michael Ross
        Michael Ross September 20, 2014 at 2:13 pm #

        Hi Satwik,

        I do have some of ws2812b 144 led/m strip and have played around with it a bit. It is a POWER hungry strip and only a very short piece of it can be powered through the Arduino. It can be done but will definitely take re-writing the code to make it work and a separate power supply for the strip itself. Maybe someday I will have some time to play with it but at the moment I do not have time to do so.

        The Arduino Due, by the way, puts a total different spin on the code for use with Digital Light Wand. I have played with it a bit as well and and have a diagram on how to wire up the SPI for the DUE and also some code to work with it.

        Using different light strips is a big change to the code since you have to use different libraries created for the chips on the different light strips and then adjust the code to work with the different libraries.

        Cheers,
        Mike

        • Satwik Sharma September 21, 2014 at 1:04 am #

          Hello Michael,

          Thanks a lot for your reply. And yes, you are right, 144led/m is really power hungry. Like mick, i too use a separate power supply to power it. I use a 10A 5V supply for it, but that really limits the mobility of the wand.

          Would be trying to power it through a 10400MaH power bank soon.

          I did some research and came to know that pixelstick uses ARM A4 or A6 based chipset for it. The biggest advantage of it is that it displays the pic really fast. Using a mega, i have to move at a snail’s pace to get the dimensions of the picture right. Even a small change in the speed distorts the picture a lot. Maybe it would be a bit faster with DUE.

          I will try to look in to the code and try powering the strips with a DUE sometime soon. Lets see how that works out.

          Satwik

  4. Gary Young July 21, 2014 at 5:49 pm #

    sorry for the repeat post but i posted in the wrong place ..
    hi ive seen this 2m 288 pixel strip on ebay http://www.ebay.co.uk/itm/2m-WS2812B-RGB-LED-Pixel-Strip-288-Individually-Addressable-Pixels-144-m-/151346432529?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item233cf34a11

    can you tell me if the Mega 2560 R3 with
    LCD Keypad Shield would work … and what code would i need please , also suggestions on a pwer supply would be appreciated … ive spent 4 hours trying to research all this but im a complete noob to this and really want to build a wand..thanks in advance

    • Michael Ross
      Michael Ross September 20, 2014 at 2:18 pm #

      Gary,

      That strip would need a different library and will not work with the code above. (see answer posted to Satwik above). The different versions of the Mega 2560 are all compatible and should work fine.

      Using an LPD or HL strip will not need an additional power supply for up to 2 meters of strip. However, the ws2812b strip is really power hungry and will require a separate power supply of the correct voltage for the strip. It will also need enough amps to be able to handle a night’s worth of light painting without going dead.

      Cheers!
      Mike

  5. leo July 1, 2014 at 4:06 am #

    Another question!!! :)

    Is it possible to send simultaneous BMP files to more than 1 led strip?

    poing!

  6. leo June 20, 2014 at 2:49 pm #

    Hi people!

    I would like to ask for some help. I am trying out different stuff with the beautiful software from the light wand, but I don´t know much about code. Perhaps you have the time to give me a hand :)

    I am creating a light installation based on the “digital light wand” sketch. This installation uses only one file from the sd card, but it that must run for 9 hours. my led strip has 64 pixels, and the maximun bmp size is in this case 64 * 30000, which gives me a 10 minutes lasting file. so I need to be able to repeat this file ad infinitum…

    I am using the sketch “Arduino Digital Light Wand + SD + LCD V1.07 (ws2801) // by Is0-Mick 2012″, and I would like to have the option of repeating files, like we do have in the “DLW_dual_strip_v2_0″.

    I am really new in arduino, so It is very difficult for me know to decrypt how to be able to add the menu that we have in “DLW_dual_strip_v2_0.ino” to the sketch that I am actually using “ws2811_cube_64px.ino”.

    If this is too complicated, I would be also very happy if I could have a sketch that when you turn on the arduino, it simple runs the file XX.bmp and repeats it forever, altough having the possibility of control the frame delay and other parameters is very usefull.

    Thanks for the great job and for sharing it!!!!

    • Michael Ross
      Michael Ross June 22, 2014 at 7:12 pm #

      Hi Leo,
      Sorry for the delay in a reply. If you just want to put the program in an endless loop basically so it will just keep on playing the same file over and over again, find the following code in the script:

      if ((keypress == 4) || (digitalRead(AuxButton) == LOW))//select key (send out the selected file)
      {
      SendFile(m_CurrentFilename);
      }

      And then change it to the following (change the word keypress to the number 4):

      if ((4 == 4) || (digitalRead(AuxButton) == LOW))//select key (send out the selected file)
      {
      SendFile(m_CurrentFilename);
      }

      —-
      This will basically tell the main loop in the program to ALWAYS send the file to the strip since 4 will always be equal to 4. ;-) Let me know if this is what you were looking for.

      Cheers!
      Mike

      • is0-mick June 23, 2014 at 8:20 am #

        Alternatively you could just place a piece of wire (or link) between the two pins for the AUX send button.. :)

        Mick

        • leo June 24, 2014 at 3:55 am #

          Excellent people!

          thank you very much! This weekend I will mount my piece and share with you the results.

          I cannot avoid to think anyway, that it would be beautiful to have the full menu that we use in “DLW_dual_strip_v2_0″ in the “Arduino Digital Light Wand + SD + LCD V1.07 (ws2801) // by Is0-Mick 2012″ sketch. Perhaps with time?

          Thanks as always!!!!

          leo.-

  7. leo May 30, 2014 at 5:33 am #

    Hi there!

    I was wondering if someone already created a sketch to use with the WS2801 but with the menu that it is being used in the last versions of the DLW, for example the “DLW_dual_strip_v2_0″

    cheers!

  8. Vass May 26, 2014 at 3:17 am #

    Anyone 3D printed a nice housing for the arduino, LCD and SD card reader?

  9. Richard March 29, 2014 at 9:22 pm #

    I have pasted code in here http://pastebin.com/QRv6c2sD

    I am trying to be able to make changes to led count so if i wish to display a smaller image of the one I have selected I then select smaller led count and this will change this it works to a degree but have the issue with the count being divided by two.. I was also wondering if there was a way to be able to start the image from the top of the wand / bottom of the ie visa versa. ie if you had a small flying bird image and the normal direction was bottom to top if you could make the led count smaller to reduce the image size and then have it start image from the top..?? the reason that I left the code in for two strip lights just wanted this option so during the menu you select dual strip or single strip..

    • Allan March 31, 2014 at 12:08 pm #

      Hello Richard,
      Why not just resize your image to 144px H instead?

      Or still use 288px but favor either top or bottom depending on which side you want the image to show. Of course having the background of the image as black would not display in the wand.

      I think this would be more of a simpler solution than switch between lengths.

      The core code you’ve posted was for the LPD8806. The one that works for the 288 strip was ws2801.

      I hope this helps.

      • Richard March 31, 2014 at 5:03 pm #

        Hi Allan,

        many thanks for your reply and looking at the code sorry i did not change the header of the code, but the code I have pasted is what actually work with my 144 leds, ie using the adafruit_neopixels. I am going to have another look at the code maybe later tonight, but the idea is that I just upload the biggest image I want to display ie 288 pixel width and thn by slectign the pixel count parameter I can make this shrink accordingly without changing the image, this already works in the code attached above now but just wanted to resolve the pixel count being halved which as mentioned will take a look tonight hopefully. Also want to look at being able to address the image from a top down perspective, so at present with code above I can make an image display using 72 pixels [1/2 meter in height] over a 288 wand using a 288 ppixel picture but i wish this to start at the top of the wand so ignore the first 216 pixels just thinking out loud so will investigate this later. mcuh appreciated for your input hopefully get a diffuser in the next couple fo days and be looking good and will then hopefully post images

      • Richard March 31, 2014 at 5:05 pm #

        Sorry Allan fat fingered a lot of that previous text lol

      • Gary Young July 21, 2014 at 5:45 pm #

        hi ive seen this 2m 288 pixel strip on ebay http://www.ebay.co.uk/itm/2m-WS2812B-RGB-LED-Pixel-Strip-288-Individually-Addressable-Pixels-144-m-/151346432529?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item233cf34a11

        can you tell me if the Mega 2560 R3 with
        LCD Keypad Shield would work … and what code would i need please , also suggestions on a pwer supply would be appreciated … ive spent 4 hours trying to research all this but im a complete noob to this and really want to build a wand..thanks in advance

  10. Richard March 29, 2014 at 9:00 pm #

    Hi Allan,

    many thanks for this, I shall look into this sketch and see how this works, do you have an email that I can forward you my code, so can get an idea of some other things that I am trying to configure. some work but some others don’t so wondering if you could do a sanity check on it for me..

    Kind Regards

    Richard

  11. Tony Mcfall March 16, 2014 at 11:42 pm #

    Good share, we will try our 60pixel LPD8806 led strip from http://www.gree-leds.com/productshow.asp?ArticleID=9YQWYTZR8U

  12. Lee March 16, 2014 at 4:59 pm #

    Hi all,
    Im wanting to build one of these but am a bit confused about a few things. Is the dual strip using the 32 or 52 leds?
    There is talk on here of 144LED/M WS2811 Led but does the code at the top of the page run it?
    Whats the difference between the one on this site and the one on adafruit.com. this site uses the arduino mega and theres the uno.
    Advice please
    Lee

    • is0-mick March 17, 2014 at 1:07 pm #

      Hi lee, theres a few different codes on here for most strips now, so it’s basically up to you what strip you want to use or what size and resolution. The length of strip can be set in code.

      I think I posted a version ages ago on adafruit. Is that what you meant?

      Mick

    • Lee March 21, 2014 at 5:29 am #

      Hi Mick
      Good to know I can use most strips etc. Will do some shopping around.
      As to Adafruit what I meant was they have build info for one that uses the arduino uno and not the mega as you use on here. Just wondered which is the better option and they are different beasts
      Thanks
      Lee

      • is0-mick March 22, 2014 at 8:22 am #

        Hi Lee,
        not seen the ida fruit version, does it use a SD card and display also?

        Mick

      • Lee June 25, 2014 at 1:28 pm #

        Mick
        sorry for the delay, other things have kept me away :(. The Adafruit version just uses an UNO and SD card, no display which could be an issue. The reason I looked at it is because I have an UNO at the moment but not a mega.
        I think I have decided to go and build this one but could do with some advice. I have seen strips with the WS2811 chip, adafruit neopixel (not sure what it uses) and the LPD8806 chip. Will the code on here work all these? Also Im thinking or a 2 meter wand using 144 led/m, which version should I use. Correct me if im wrong but the dual code is to get higher pixel per meter and not for having in one line. Do all the codes support the lcd.
        Thanks
        Lee

  13. Satwik March 11, 2014 at 4:34 am #

    Hello Michael and Mick,

    You two are doing a really fantastic job.

    I have two questions.
    1. What Lcd shield are you using on your Arduino Due? The one available on sainsmart and ebay, all run on 5V and the arduino due supports input at 3.3V only. So link to the shield you are using would be really helpful.

    2. Should i power the LPD8806 52led/meter strip directly from the board as suggested in the circuit diagram, or should i power it from another power supply?
    Coz i fear that i might over-draw current beyond the normal range of the board.

    With Regards,
    Satwik Sharma

    • is0-mick March 11, 2014 at 5:11 am #

      Hi I power my strip by a separate 5v regulator as it can draw too much power and damage the reg on the board. (Been there done that lol).

      As for the shield I’m using the one off eBay it usually has markings of dfrobot or such on it. And sometimes the right button is spelt wrong. Im also using the mega not the due.

      Hope that helps.

      Mick

      • Satwik March 11, 2014 at 8:07 am #

        Hello Mick,

        Thanks a lot for a quick reply.

        Even i was thinking of using a separate 5V supply.

        As for the shield is concerned, the LCD doesnt give out any output, so no problem with the LCD part. Its the buttins i was a bit concerned about. As they might carry the signal back to the analog pin A0 at 5V, and that might harm the board. So thats why i was asking if you, michael or any other member here used it. And i think the dfrobot sheild you mentioned is also based on the same design.

  14. adobe photoshop cc February 24, 2014 at 7:22 am #

    Great work! This is the type of info that are meant to be
    shared around the internet. Disgrace on Google for now not positioning this publish higher!

    Come on over and visit my website . Thanks =)

    Also visit my web page – adobe photoshop cc serial key

  15. Richard February 18, 2014 at 3:38 pm #

    Many thanks Allan will let you know how i get on once all parts arrived and put together looking forward to it..

  16. chico February 17, 2014 at 4:43 pm #

    I made the circuit according to the schematic and the code is working well because every time i choose my bmp file it says sending. However, I don’t see any lights on the led strip. I checked the ground and 5 volts that is connected to the LED strip from arduino and I am getting 5v so it is supplying 5v but I’m not getting any light on the LED stip. I used an external power supply and the led strips lights up but not all, only 1/4 of the led lights up if I use an external 5v. Any suggestions guys? Thanks a lot!!

    • chico February 17, 2014 at 4:45 pm #

      Also, what is the use of the temporary switch that is on the schematic? Thanks!!

      • is0-mick February 18, 2014 at 4:48 am #

        Hi Chico, are you using the right version for your strip?
        Did you set the correct strip length in the code?

        The external switch is just an optional button to send the pattern to the strip (just saves having to fumble with the small switches on the board).

        Mick

        • chico February 18, 2014 at 2:51 pm #

          The version that I am using is V1.07 and I got the code from here http://pastebin.com/gT3QM6jH

          For the LED Strips, I have a single strip that has 52 LEDs.

          I am using Arduino Mega

          If I installed the wrong code please let me know which version I should use. Thanks a lot for the quick reply!!

          • is0-mick February 19, 2014 at 7:26 am #

            OK that code is for the LPD8806 based strip.
            Is that what kind of strip you are using?

            As “52 led’s” doesnt tell me what type of chips it’s using..

            Mick

          • chico February 20, 2014 at 2:08 am #

            Sorry for the lack of information. The strip that I have is 5V LPD8806-52P Strip.

  17. Richard February 14, 2014 at 6:45 pm #

    Hello Light Wand Bloggers, I’m curious if anyone one on here has encountered the blinking “SD init failed” message after installing the arduino code. I’m pretty sure I’ve followed the instructions correctly but perhaps I’m missing something else. Any assistance would be greatly appreciated.

    Thanks!

    • leo February 15, 2014 at 7:19 am #

      normally this message appears when the sd reader is not connected properly. check out the pins that are being used in the sketch.

  18. rob February 9, 2014 at 2:11 pm #

    hi i am seeking some advice – i have managed to get my hands on a led strip 144 leds WS2811 i would really like to build a light wand but i am not sure which arduino board i need, any help at all would be most appreciated

  19. Vass February 8, 2014 at 1:36 pm #

    In Radio Control, we reduce down the 11.1 from a 3 cell Lipo to 5 or 6 volts using a “ubec”. It’s perfect for what you need.

  20. Danny February 8, 2014 at 12:53 pm #

    Just a quick 1 for everyone, I have been in comunication with Allan (because we are both using the 288 led light strips) with regards to power supplies for our wands, My plan is to use 3 cell 11.1v Lipo’s but I need to covert this down to 5v to power strip directly and ardinuo.
    So my question is how have people sorted out their power supply and what are they using,

    • caz3mc February 8, 2014 at 1:30 pm #

      Hi Danny I used a voltage regulator to give a steady 5 volt supply but if you have to high an input voltage then dropping it down will result in heat being generated, i had a 8volt remote controlled car battery and put the voltage regulator onto a bit of aluminium to dissipate any heat build up. hope this is of help to you.

    • GP February 12, 2014 at 10:04 pm #

      Any chance you have a wiring diagram of what you are doing for the 288 strip? Is the Mega able to handle the data and timing for the strip?
      Cheers,
      G

  21. leo January 27, 2014 at 2:28 pm #

    Hi guys!

    I saw that you are now building the DLW with WS2811 led strips. I would like to ask you if it makes any difference for the arduino sketch if the strip is 5V or 12V. I am planning to feed it straight from a battery or adapter, and not from the board. I saw that the 12v strips are much cheaper…

    Also, is there a limit to the number of pixels? or as far as I have enough power to light them up, it will work fine?

    And just to be sure, is this strip suitable? http://www.ebay.com/itm/5M-White-PCB-New-Version-WS2812B-WS2811-WS2812-Digital-5050-RGB-LED-Strip-DC5V-/310785964779?pt=LH_DefaultDomain_0&hash=item485c497aeb

    It has only 30 leds per meter, but it is ok for the project I have in mind.

    Thanks for helping!!!!!

  22. target promo code January 17, 2014 at 7:59 pm #

    Hi everyone, it’s my first go to see at this web page, and piece of writing
    is truly fruitful in favor of me, keep up posting these content.

  23. Allan January 10, 2014 at 9:47 pm #

    Hey is0-mick,
    In Phillip Burgess’ adafruit neopixel painter tutorial http://learn.adafruit.com/neopixel-painter/overview He used a rotary encoder.

    Ive done it and it works great! But the problem with this setup, it maxes out at 170 pixels. And having a longer strip, I would like to maximize it :)

    So would it be possible to add the rotary encoder to your ws2801 code?

    Thanks!

  24. Danny January 10, 2014 at 7:59 am #

    Michael
    Help need please got my mega 2560 r3 board yesterday, while i’m waiting for other parts to come i decided to put your Ws2801 code on it but it came back with some errors ! I know nothing about this but did look over just to see if anything was obvious but saw nothing. (nothing is/was connected to board) [URL=http://smg.photobucket.com/user/carpman1/media/Arduinoerrors.jpg.html][IMG]http://img.photobucket.com/albums/v508/carpman1/Arduinoerrors.jpg[/IMG][/URL]

    • is0-mick January 14, 2014 at 6:33 am #

      Looks like you haven’t downloaded the adafruit ws2801 library and put it in your audrino libs folder…

      Mick

    • Danny January 15, 2014 at 3:14 am #

      Your Spot on Mick got it sorted now though thanks

  25. Vin January 3, 2014 at 11:56 pm #

    Do i just paste the code to my arduino software and compile it because I did that and I was getting an error and not letting me upload the file. Thanks

    • is0-mick January 6, 2014 at 4:22 pm #

      You need to give a little bit more detail…
      “An error”, doesn’t really help much.

      But I’d think its either missing libraries (could be LCD display, sd card, led library), or wrong arduino version or something that is causing the problem.

      Can’t really say though without additional info..

      Mick

  26. Vass December 26, 2013 at 9:18 am #

    Hi Mick

    After a year or so with the old wand, it’s time to upgrade

    I want Max resolution
    So, twin strips I’m guessing is the way to go

    Am I using 32 or 52 LED’s per metre of the 8806?

    Thanks
    Vass

    Thanks

    • is0-mick January 6, 2014 at 4:20 pm #

      Hi Vass,
      I think i’d not bother with twin strips and I’d go with the newer strip mentioned below.

      It has the same resolution if not higher than the dual strips..

      Mick

  27. Danny December 26, 2013 at 4:28 am #

    Just sourcing my parts now for 2m wand

    • Danny December 26, 2013 at 4:35 am #

      Just sourcing my parts now for a 2m 288 led wand, I was looking at the 1602 keypads but came across tft touchscreens would i be able to use them instead ? (it even has a micro card reader onboard)
      http://arduino.cc/en/Guide/TFTtoBoards

  28. Danny December 19, 2013 at 4:14 am #

    @ Michael Ross great wand, I’m really intrested in a making a wand very similar to yours ( I have no experience in anything like this, I have done a little soldering before though). I have a few quiries that i hope you can help me with as I know nothing. Would it be possible to make a wand that would normally be a meter long but if you wanted put a 1m extension onto the top to give you bigger pics / wand ? Would it require changing the Arduino code thingy ?
    I know you recommend the LPD8806 leds would it be possible to use this instead http://www.ebay.co.uk itm/121161746255?ssPageName=STRK:MESINDXX:IT&_trksid=p3984.m1436.l2649 what differences would this make ?

    • is0-mick December 19, 2013 at 6:34 am #

      Hi Danny,
      You can do what you said with a 1m extension, but you’d have to use different images for the size of wand.
      ie If your 1m wand was 50 pixels, and +1m was 100 pixels.
      You’d need to do images at that size.
      The code you would just set at the max size, and the extra pixels would just be ignored.

      The strip you said should work, but you’ll have to use my other code for that chipset ws2811.

      Someone asked the same question further down:
      Posted December 4, 2013 at 11:52 am by Allan

      Kind Regards

      Mick

    • Danny December 19, 2013 at 7:05 am #

      Cheers Mick thats exactly what i was thinking, the resolution should be incredible 288 pixels on the 2m wand, I plan on using the 8aa power supply any ideas if i will have any probs?
      now i just have to plan how to do the joint be that will have to wait till I get the bits.

      • Allan December 19, 2013 at 12:14 pm #

        Hello Danny,
        I just finished my 288 LED setup: works great. I was using 6-AA and this thing eats up battery like there’s no tomorrow!

        Using rechargables is the way to go .I will be upgrading to SANYO eneloop 1,900 mAh Ni-MH: hopefully it will last longer.

        @Mick
        The ws2801 code you had posted with a little bit of tweaking (mainly just adding Adafruit Neopixel libraries and converting to GRB) worked well. Thank so much.

        How can I add brightness control?How can I somewhat edit frame delay? Because even at 0 is still a bit slow. Maybe its the limitation based on my set-up probably?

      • Danny December 19, 2013 at 3:33 pm #

        Cheers for that Allan. Can I call on you if i need any help as it looks like you have done the setup I want to use ? how is it handling ? Any pics of your finished wand ?
        Would be great to this wand in action !!!

        • Allan December 19, 2013 at 6:16 pm #

          No problem, Danny. I will post some pics later.

          6.5 ft/ 2m is awesome! I have used I believe a 12.2 mm commercial aluminum track lighting/under cabinet diffuser. and it fits perfectly: no light spills on either side.

          One thing like I mentioned before is that this thing takes a lot of power. 5v USB will not be enough. It will hang. So remember that when testing.

          • Allan December 19, 2013 at 6:20 pm #

            And yes, I will be happy to help if I can. :)

            • Danny January 10, 2014 at 8:17 am #

              Hi Allan
              Got some of my parts now and finished making the holder, got a few questions i hope you dont mind and can help me, did you join the strips of leds? If so did you just solder? i noticed the led strips we use have 5 wires and all the schematics are 4 wires what pin locations have you used ? did you have any problems with Mikes code ws2801?

            • Danny January 10, 2014 at 8:25 am #

              By the way for my holder I used Led light strip profile which has diffuser, made a tube handle on the back same style to the pixel stick out of an hospital crutch.

            • Allan January 10, 2014 at 8:45 pm #

              I soldered them together. If you notice there is a joint every 1/2 meter. That little gap should’ve been A LOT more closer. I would’ve done it if I didn’t stick them in my channel before firing them up (doh). If you can, try to re-solder it as close as you can because you will be able to see that little gap. I find them really annoying.

              The led I used only had 3 connections. (5v, GND, CLK/DATA pins) The code is0-Mick is pretty much straight forward, just make sure to add adafruit’s neopixel strips arduino library from here: https://github.com/adafruit/Adafruit_NeoPixel. I can upload the code I used if you need it.

              BTW, I tried uploading some pictures of my wand + sample pics several times but wordpress apparently thinks I’m a spammer. You can shoot me an email at dfernandez [at] cadmiumdesigns [dot] com and I can send you the pics and code.

              Good Luck!

        • Allan December 26, 2013 at 1:27 pm #

          Image credits to their respective owners

          • Allan December 26, 2013 at 1:29 pm #

            More

          • Danny January 11, 2014 at 3:38 pm #

            They look really good mate, I emailed you earlier about some stuff if you could drop code in with your response that would be great been looking round the adriuno site all day and still cant figure it out cheers dan. Are you post these in your blog as i would love to see bigger/ higher res versions

            • Allan January 12, 2014 at 1:06 am #

              Thanks Danny and Jordan. Here is the code: http://pastebin.com/ZZ1fzqfm It is important that you have the neopixel library copied in your arduino libraries folder for this to compile properly.

              I will try to upload the pics in another host for better resolution pics.

          • GP February 5, 2014 at 10:48 pm #

            Hi Allan
            Do you have a wiring diagram / photos of the actual wand you used? Would be great to have a look.
            Cheers,
            GP

          • Richard February 17, 2014 at 6:44 am #

            Hi Allan,

            I am also in the process of building a digital light wand with the 144led’s (288Led’s). Currently awaiting for the remainder of the parts to turn up. Was going to look at 2 dual strips of 2meters (144Leds) to get awesome pixels. However a question if you will, how did you provide the power for this you mention the 5v from arduino will not be enough did you use another shield (power FET) or regulator..? Was the source a 12v Battery and how did you regulate etc. Even better would be a wiring diagram as this will be my first arduino project so any help / assistance would be greatly appreciated.

            • Richard February 19, 2014 at 10:15 pm #

              Many thanks Allan

            • Allan March 29, 2014 at 8:25 pm #

              Hey Richard,
              I am basing this reply on the assumption that the strip was wired properly. ( please double check to make sure)

              The modified code I uploaded http://pastebin.com/ZZ1fzqfm should work AS IS.

              Have a look out on STRIP_LENGTH and replace its value with 288.

              I hope this helps.

            • Richard May 15, 2014 at 11:32 am #

              Hi Alan,

              sorry back on the case again and got a bit more time to spend on project again got lights working now however I have changed the keyboard and LCD shield over for a straight LCD and was relying on using the aux buttons that i have placed onto pins 22 – 31 on mega 2560. however with the shield removed it just simply starts and then when it hits the loop it is just looping through and displaying all options very fast and not waiting for an input from the keyboard. How do i get the code to read and wait for the key press when not using the shield. is this something to do with the analog read in the code and should it be waiting for digitalread or something. Also it no longer appears to dim down automatically I tried to write in a backlightoff to make it do that but I think this is also due to the loop and not sensing the keypress. I have placed code here http://pastebin.com/hP7kP0S5 Many thanks in advance

          • Richard March 28, 2014 at 10:51 pm #

            Hi Allan,

            got a weird one happening still building mine and waiting for a few parts but have got it working, I am using the interlaced code however I only want to use the single 2M strip for the moment that is 144 leds per meter however when I define the strip length it divides this by two ie if I state 288LEDs it only produces the results on 144 LED length somewhere the code seems to divide this by two.. would you be able to point me in the right direction for this I wish it to If I state 288 strip length then it outputs to 288Leds.

            Many thanks in advance

            Kind Regards

            Richard

      • Jordan December 30, 2013 at 7:16 pm #

        Allan, I am happy to hear that you were successful using the 144LED/m strip:

        http://www.ebay.com/itm/Black-PCB-1M-144LED-M-WS2811-Led-Digital-strip-RGB-Individually-Addressable-5V-/121161746255?pt=US_Car_Lighting&hash=item1c35cd874f

        You say that you had to alter isO-mick’s code a little:

        http://pastebin.com/HPRvu2cf

        Would you mind sharing the code tweaks you did? “mainly just adding Adafruit Neopixel libraries and converting to GRB”.
        I’m useless trying to figure this out, and this high resolution strip seems ideal.
        I can’t figure out why everyone doesn’t use this led strip…

        I appreciate your assistance :)

        • is0-mick January 14, 2014 at 6:41 am #

          I thik everyone doesn’t use this strip because it’s new to the market. It didn’t exist when we started, the HL1606 we used originally only had 16 colours even!

          If I was building a wand now, then i’d deffo use the new strip with the higher resolution :)

          Mick

  29. Gary December 18, 2013 at 12:19 pm #

    Hello Mr Ross, do you know if you will be doing a tutorial on the ultimate orb tool.
    I think it’s a light stand and wheel, but not much else.

    Thanks
    Gary

  30. Gary December 18, 2013 at 12:15 pm #

    Congrats to all in finishing there wands.
    Just waiting for the SD card reader from China.
    Taking ages…

  31. Maarten Takens December 17, 2013 at 4:03 am #

    Thanks for sharing , i finished my lightwand last week and i am very happy with the results !

    regards
    Maarten Takens

  32. Brian Zhang December 14, 2013 at 11:41 am #

    Hi Michael, thanks for your sharing and it is so helpful for me.
    And do you know ws2811 LED Light Strip? I just found there is only one data line in this strip, and with closer distance between the bulbs. But I don’t know how to write the arduino code to drive it. did you ever do some research on the WS2811 ?

    • Brian Zhang December 14, 2013 at 11:51 am #

      sorry, I just found the comment that you already finish the code for WS2811. Thank you very much.

  33. kev December 8, 2013 at 11:26 am #

    I finished mine few days ago. Works just fine, thanks a lot :D
    What is your advices about the batteries supply?
    I use a 5V 1A for 64 leds and I think that it can’t give enough current to make a good “white” color (only pink)

  34. Allan December 4, 2013 at 11:52 am #

    I just finished my own DLW using 104 LPD8806 configuration.Thanks to both of you iso-mick and mr ross for all your efforts.

    I was contemplating on doing a longer version then I came across this WS2811 144 led/meter strip.

    http://www.ebay.com/itm/Black-PCB-1M-144LED-M-WS2811-Led-Digital-strip-RGB-Individually-Addressable-5V-/121161746255?pt=US_Car_Lighting&hash=item1c35cd874f

    So I have to ask: since this thing has only ONE contact data and control point, is this even a viable alternative to the LPD8806? As this will solve all my problems with housing and diffuser issues by using cheaper led commercial channels.

    Thanks and keep up the great work!

    • is0-mick December 4, 2013 at 2:23 pm #

      Yes it should work with that strip.

      I did a version for the ws2801 for someone a while ago..

      http://pastebin.com/HPRvu2cf

      is the code.

      Mick

    • Allan December 4, 2013 at 2:33 pm #

      Thanks Mick for the reply. That’s great! This is going to be a lot easier for me.

      BTW, what are your thoughts about the pixelstick by Bitbanger Labs? I really like the animated timelapse feature.

      http://www.kickstarter.com/projects/bitbangerlabs/pixelstick-light-painting-evolved

      Thanks again.

      • is0-mick December 4, 2013 at 6:41 pm #

        Isn’t it just doing exactly the same as what we’ve been doing for some time now?

        The animated time lapse feature? isnt that just displaying 1 picture, taking a shot.
        Displaying the next frame (picture from the sd card), taking another shot… (repeat) … and making an animated gif?

        So split an animated gif into its frames, save as BMP, put on the sd card.

        Or am I missing something?

        Mick

      • Allan December 4, 2013 at 8:44 pm #

        Now that you say that, I feel like a complete idiot. Lol!

        It probably would make better sense too if you go left-right-left-right. So you don’t have to go back to your starting point every time.

        Thanks. Ill report back in case I come to any problems on the new one.

      • Richard February 17, 2014 at 2:12 pm #

        Hi ISO mick. So I have a single strip 104 pixel using the LPD8806 SD/LCD with arduino Mega. I’m currently using the arduino code for a dual strip, I am seeing some images come through but I’m definitely missing something. Any chance you could kindly consult with me and provide some assistance with programming the arduino to recognize my pixels properly? My email is richardbrianlv@gmail.com

        I’d really appreciate a hand.

        I look forward to your response.

  35. Gary December 2, 2013 at 8:58 am #

    If I have 3 external switches to control the LCD display, will I need to add additional code to Micks code.

    If I do, what would it be and where would I put it within Micks code….

    Thanks

    • is0-mick December 2, 2013 at 8:26 pm #

      HI,
      My code already has code in for 3 additional buttons, up / down and send.

      Wires attach to these pins:
      //AuxButton is a seperate button to send the image. Connect wires to these pins to use it.
      int AuxButton = 44;
      int AuxButtonGND = 45;

      //Up Button is a seperate button to move up the filenames. Connect wires to these pins to use it.
      int UpButton =42;
      int UpButtonGND = 43;

      //Down Button is a seperate button to move down the filenames. Connect wires to these pins to use it.
      int DownButton =40;
      int DownButtonGND =41;

      Mick

  36. Gary Horne November 19, 2013 at 8:07 am #

    I really want to make one, so awesome.
    The HL1606 is all neat in a box, is there a box available for all of the above to fit in nicely and to carry around when on location.
    Are there any tutorials regarding the above.

    Thanks

    • is0-mick December 2, 2013 at 6:52 am #

      I had a similar problem with the skipping.
      Those keypad shields use resistance to select the different buttons, and sometimes the values of the resistors vary slightly.

      Or a slightly dirty contact in the switches can also vary the resistance slightly…

      I did add code in my version to use external switches, I’m not sure if Michael has included that in his code?

      Mick

    • camilozk December 20, 2013 at 6:19 am #

      hi iso mick!

      I have just tryed an external button. it works but you have to be very precise while pushing. as soon as you push too long, it skips numbers very fast. I assume that I will have to cimply get used to it.

      anyway, I still would like to solve the “low brightness / flickering” of the display. the brightness of the LCD´s backlight is fluctuating all the time, and it is not at its 100%. I can notice this because it is at its 100% when the arduino is initializing, but afterwards it goes down. any idea on this? someone else experience this?

      thanks!!!!

  37. camilozk October 29, 2013 at 1:04 pm #

    Hi there!

    I am trying out the code for the dual strip, arduino mega2560 version of the lightwand.

    Everything seems to work alright, but the brightness of the LCD´s backlight is fluctuating all the time, and it is not at its 100%. I can notice this because it is at its 100% when the arduino is initializing. Also, when I move around the menues, it skips some steps. for example, it doesnt do 1-2-3-4-5-6-7-8, but 1-3-5-7-8-1-2-4-5-7

    weird huh?

    any explanation?

    thanks!

    • is0-mick December 2, 2013 at 6:49 am #

      If you get that message, then you have saved the files in teh wrong image format. They need to be RGB888 which is 8 bits for each colour, or 24bpp :)

      Mick

    • leo December 20, 2013 at 6:37 am #

      It is solved.

      I dont know what the problem was, because the format was ok, but when the images were saved by photoshop 7, they didnt work. now I am using photoshop cs4 and it works. I am VERY HAPPY!
      THANK YOU SO MUCH!

  38. leo October 25, 2013 at 3:30 pm #

    Hi Michael!

    Thank you so much for being available for our inquieries. I really appreciate it!

    I have just got my arduino, made the soldering, installed the library that is in this link (https://github.com/adafruit/LPD8806), downloaded the txt file under this link (http://pastebin.com/gT3QM6jH), changed the extension to pde and uploaded it to arduino, apparently, with sucess. I also downloaded the 4 angrybirds images you have under this link (http://mrossphoto.com/wordpress32/image-files/) and changed the resolution to 52 pixels, as my strip has 52 leds.

    when trying to play them, the message in the screen is as follows: “unsupportede bitmap use 24 bpp”

    I also saw that are some issues related to the power, so I have just connected the arduino to the computer via usb, instead to the battery, and it is giving me the same error back…

    Any suggestion?

    Thanks!!!!!

    • is0-mick December 2, 2013 at 6:55 am #

      I think I replied to the wrong post, see post above.

      Mick

  39. kev September 26, 2013 at 4:35 pm #

    Are you talking about the Arduino software or the Digital Lightwand Code Generator ?

    • Michael Ross
      Michael Ross September 26, 2013 at 4:58 pm #

      The Digital Light Wand Code Generator is not really used any longer. It was used with the older version of the DLW. What I am referring to is the code that you download to the Arduino Board using the Arduino software to run the DLW. Even if you were using the old Code Generator, the code that it Generates would be the code that you would have to download to the Arduino board. The space to hold these programs on the Arduino boards is what I am referring to.

  40. kev September 26, 2013 at 12:40 pm #

    Hey!
    Thanks for this tutorial!
    Just a question: Does this wiring work with an Arduino UNO ?
    This is the same software, I just have to write the correct output PIN right?

    • Michael Ross
      Michael Ross September 26, 2013 at 2:34 pm #

      Thanks Kev. One of the main differences between the Arduino UNO and the MEGA is the amount of memory it has on board for programs. (32K vs 256K) I haven’t tried running any of this on an UNO but if the program will fit into memory, then it will work. But I really think this program is too big to fit into the memory on the UNO.

  41. GazB September 14, 2013 at 8:07 pm #

    Mick, I need your please!

    I’ve built it and it works for around 2 cycles, but then it freezes!!! I’m using the 9v and 2aa batteries (both new).

    The LCD screen flickers and seems like it’s to getting power! But it is! Any ideas what could be causing this? Could it be the SD card (currently an old 16GB) or does it need more than 12v? I’m using 104 LEDs (2m).

    Please get back to me as soon as you can if you don’t mind. I need it working for a project next week.

    • is0-mick September 17, 2013 at 4:33 pm #

      Sounds like a power related problem?
      What are the 2aa batteries being used for?

      You can run the thing just off a 9v pp3, although with 104 led’s you may be better off trying 6 x AA batteries.

      What voltage is your strip?

      Im using an old SD 2gb card. Are the wires short from your reader to the arduino? as if not this can cause problems.

      Hope some of that is of use.

      Mick

    • GazB September 18, 2013 at 5:47 am #

      I had the 2AA and 9V linked to make up to 12V. And i’ve tried the 8AA route to make 12v.

      Strange thing now is that it I’ve just tried it off a 9V pp3 battery, and it still crashes and freezes. So i’ve just tried running it from my laptops USB port and it works fine!!!

      I’ve just looked up the site where I got the strip from it says 5V! But I had it running on the old code before the SD and LCD addition on a PP3.

      Just wondering if it is powering off the USB port, then for some strange reason it must only need up to 6V or around that range (USB is 5V ish). Very strange! Especially when everyone is running on 12V. Can’t see the Arduino being faulty as it runs off the USB (unless i’ve knackered the power port with 12V?)

      • is0-mick September 18, 2013 at 7:18 am #

        12v “should” be OK, although I only use 6xAA NiMh(rechargable) batteries, so I’m running off 9v.

        I managed to blow the regulator on my arduino by drawing too much current and had to remove it, and use a different one.

        It may be the batteries you are using aren’t providing enough current. Have you tried sending a different pattern? something simple, like only a few LED’s on at a tme?

        It could be the SD card wires being too long, you only want about 3-4″ between the SD card reader and the arduino, anything more can cause intermittent read problems.

        Mick

        • GazB September 19, 2013 at 11:15 am #

          Aha I’ve sorted it! Very strange indeed though! I found it works better on 6x AA rechargeable 2000 mah’s. Works much better now and hasn’t frozen in testing. Anything above or below caused it to malfunction. Very odd, but at least it’s working now! Cheers Mike and Mick :)

          • Caz3mc December 3, 2013 at 4:25 pm #

            I was having power issues also and resolved mine by using an external 7.2V battery and a 2 amp 5 volt voltage regulator, the Arduino gets it’s power from the 7.2v on the positive side of the voltage regulator and the LED’s get power from the 5 volt output side of the regulator, I’ve not had any power issues since trying it this way. I’m not an electrician but it worked for me? I’m sure Mick & mike will correct me if I’m wrong. I’ll try and post a diagram of how I wired it up plus a picture of the case I used.

    • Michael Ross
      Michael Ross September 18, 2013 at 4:04 pm #

      I am going to add some details here to back up what Mick is saying and explain why it is a good idea to run your Arduino on a 9 volt input as opposed to 12 volts.

      I have seen Arduinos act up on several occasions by using 12v power sources. They are rated to handle 5 to 12 volts (if I remember correctly) and there is an on-board power regulator that converts the input to the 5 volts that is actually used by the Arduino. The problem is that the power regulator can really only handle up to 12 volts and it can overheat even when using 12 volts. Most batteries, when new and particularly rechargeable batteries have more than the rated voltage in them. For example, a 12 volt battery might even have up to 13 or 14 volts. 1.5 volt batteries have like 1.8 volts.

      I have come to realize that the upper 12 volt limit is truly a hard limit and you will experience erratic behavior with the Arduino if you hit that limit or go beyond it. It is a heat related issue really and most people that run into this problem find that the Arduino may run fine for a little while, but as soon as the regulator overheats, it starts going nuts! And it is also VERY possible to damage the regulator if you overheat it too much or too many times.

      So… with all of that being said. Stay away from using a 12 volt input on the Arduino. If you are using a 12 volt battery, then you will need to step it down to 9 volts for input into the Arduino or you will experience the erratic behavior. Stick with a 9 volt input and you should not experience these problems.

      Also… just as a side note. Using 6 AA 1.5 volt batteries is better than using 1 9 volt battery because you will get longer lasting power from the AA batteries compared to the 9 volt.

  42. Roddy September 12, 2013 at 3:42 pm #

    Hi, Great tutorial. I am very interested in building one of these but I already have a high powered 12v Tracer battery pack and was wondering if I can use this tutorial but with a 12v addressable RGB light strip like the WS2811 5050 RGB LED?

    • is0-mick September 17, 2013 at 4:30 pm #

      Yes 12v strips and 12v battery would be fine.

      Mick

  43. Kyle September 6, 2013 at 11:38 pm #

    Hi Michael,
    Thank you so much for the detailed tutorials. I’m trying to build my own wand according to your instructions, but I’m running into the “sd ini failed” error. I double and triple checked my wiring to make sure it was the same as your diagram, and I reloaded iso-mick’s code, to no avail. Any suggestions?

    • Kyle September 7, 2013 at 9:26 am #

      Oh, and I forgot to mention, my SD reader has two ground pins. Your’s didn’t, and I’m pretty new to DIY electronics so I don’t know if that has anything to do with my issue.

      • Kyle September 11, 2013 at 1:12 pm #

        Problem resolved, I switched out the old wire with female jumper wire and header pins (I wasn’t getting any power to the sd card). However, I’m now stuck with verifying iso mick’s code. It says:
        In file included from Digital_Light_Wand.ino:75:
        /Users/Kyle/Documents/Arduino/libraries/LPD8806/LPD8806.h:8: error: redefinition of ‘class LPD8806′
        /Users/Kyle/Documents/Arduino/libraries/LPD8806/LPD8806.h:8: error: previous definition of ‘class LPD8806′
        In file included from Digital_Light_Wand.ino:75:
        /Users/Kyle/Documents/Arduino/libraries/LPD8806/LPD8806.h:8: error: redefinition of ‘class LPD8806′
        /Users/Kyle/Documents/Arduino/libraries/LPD8806/LPD8806.h:8: error: previous definition of ‘class LPD8806′

  44. GazB September 6, 2013 at 4:20 pm #

    How have you all gone about getting this into a project box? Has anybody managed to find one that will allow you to access the keys and show the screen etc?

    • Michael Ross
      Michael Ross September 18, 2013 at 4:07 pm #

      I am not aware of a project box that is ready made to work with the Arduino along with the LCD key display. I am not using a project box and just have the board and wiring attached to the strip using wire ties.

  45. digital photography June 30, 2013 at 9:06 pm #

    It’s an awesome paragraph for all the web users; they will obtain benefit from it I am sure.

  46. Leonardo June 15, 2013 at 1:51 pm #

    Hi Michael I`m impressed by your work and I was wondering if you can give a little help with a problem I`m having trying to connect my sd to the arduino due. I followed your wiring but with no luck, it still doesn´t work, can you give a little help here it would be a lot to me thanks.

  47. Leonardo June 15, 2013 at 1:45 pm #

    Hi Michael I`m very impressed about your work and I was wondering if you can give me a little help with this. I`m trying to hook up an sd card to do a simple datalogger but with no result with my arduino due. I have wired the sd with your diagram but with no result. Can you give a little advice here please, it woul really help me, thanks

  48. Scottish Dave June 14, 2013 at 6:27 am #

    Hi,

    First of all, thank you for sharing this work, it is excellent. I do however have a couple of questions…

    1. What software are you using to convert the input images to 24bpp ? I cant seem to get anything to work.

    2. I am attempting to to modify the code to use a ws2801 strip and the Fast SPI 2 library. Have considered switching to the Fast SPI library ? I have got the LEDs to show an image but it aint right. I suspect it has something to do with the ‘Gamma’ section but I dont undertstand it enough. Could you maybe explain it’s function please ?

    • is0-mick June 14, 2013 at 1:32 pm #

      Hi Dave,
      any software will do to save the images as 24bpp. Gimp, photoshop, or even paint in windows.
      You do need to rotate the image 90 degrees to the right.

      The gamma section is just a look up table to change the 24bpp to the 2 million colours that the strip supports (as the strip is not 24 bpp).

      It just gives better colours that’s all..
      You just send 1 byte in, such as a R, G or a B.. and it spits out a converted byte in a more proportional scale.

      I already did a ws2801 version for someone else, if you want to take a look at it, its posted in the comments below, or here is a link to it.
      code:
      http://pastebin.com/73igD6wx

      I did use fastspi at one point, but we are already using the spi for reading from the sd card, so you’d need maybe extra hardware or such to do the switching between devices maybe? and I’m not sure how both libraries would work connected to the same pins?

      what do you mean by the image “aint right” ? you may need to change the order of the R,G,B being sent, as some strips the LED’s are wired different.

      So when you send to the strip you may have to change it from R,G,B to R,B,G for instance.

      Mick

  49. Martin2 June 5, 2013 at 10:25 am #

    Hello once again,

    I have a question regarding the code used to read in the bitmaps from the SD-cards:

    for(int y=imgHeight; y > 0; y–)
    {
    int bufpos=0;
    for(int x=0; x < displayWidth; x++) {
    uint32_t offset = (MYBMP_BF_OFF_BITS + (((y-1)* lineLength) + (x*3))) ;
    dataFile.seek(offset);
    getRGBwithGamma();
    strip1.setPixelColor(x,r,g,b);
    }

    I would like to display the bitmap the fastest way, so that single pixels appear as much as possible as dots in the picture, not as stripes, when the DLW is moved during exposure time.

    So I had a look at the code. I don´t understand anything of the formula used to calculate something whatever there, but I saw the "dataFile.seek(offSet)". Now i wonder what happens in this. In my understanding there is a pointer moved in memory to point to the right values within the bitmap, right? But what exactly is done there? Is there a real access to the SD-card involved? Or is the bitmap somehow buffered? Should I buy the fastest SD-card available or doesn´t it matter at all?

    Also: What do you think about the gamma-conversion? Is it time-consuming? If so: To be able to make the LEDs blink as short as possible, could I ommit the conversion and instead adjust the bitmap itself? Would that fasten up the display?

    And another question: Would the usage of an Arduino Due speed up things considerably? If not: Why should I use a Due instead of a MEGA?

    Lot of questions! Thanks a lot! Martin.

  50. Martin2 May 29, 2013 at 6:45 pm #

    Once again I have to thank here for all your efforts. I tested my DLW today and got some pleasing results:

    https://dl.dropboxusercontent.com/u/58966369/DLW2.jpg

    Thanks a lot!

    However I have a strange behaviour with two BMPs I have made. They play some time then stop. First I thought it might be a problem with the power supply, because all the LEDs are lit. But even changing from a single 9V battery to 8×1,2 Eneloop didn´t so it. All other files play fine. Now the prblematic files both display the whole range of cours, they are made with Photoshops Gradient Tool.

    Might it be, that some color value running thru the gamma table raises a fault?

    Here are the problematic files:

    https://dl.dropboxusercontent.com/u/58966369/rainbow.bmp

    https://dl.dropboxusercontent.com/u/58966369/rainbow2.bmp

    Can anyone check if it is my problem or a common one? Thanks! Martin…

  51. Martin2 May 28, 2013 at 12:21 pm #

    Hello nerds,

    I woulf like to make a “double sided” version, where the backsides of the strips are put together, so the strip will have lights boch on the front and on the backside. This would make it possible to rotate the strip without having blackouts in the picture.

    What would you suggest how to start this feature? Should I build it as a single thing and then make “mirrored” Pictures? Or ist ther an easy way to go along by software or so?

    Thanks! Martin…

    • Michael Ross
      Michael Ross May 29, 2013 at 10:34 am #

      Hi Martin, Sorry for the delays in getting back to you. I have been a bit busy the past few days. Regarding a double sided version of the DLW… You are going to run into the problem that the LEDs on these strips are not viewable 180 degrees. Without some sort of diffusion over the LEDs you will not be able to see them at a 90 degree angle to the top of the LEDs. You can easily make both strips do the exact same thing though by attaching the Data and Clock connections to the same pins on the Arduino. As far as a mirrored image goes, that can be accomplished with any version of the Digital Light Wand simply by moving it the other direction in front of the camera (Instead of Left to Right, move it Right to Left). :-)

    • Martin January 27, 2014 at 12:27 pm #

      Hello you nice girls & guys out there.

      I finished a project now that was done with my elder stick (among others), it is a sort of light painted theater piece. Have a look here please, but turn on sound, there is a little audio in it:

      http://www.time-slice.de

      Haven’t been here for a long time and now saw the incredible progress in terms of resolution. The 144 LED/m strip seems great, I ordered one 5 minutes ago.

      Have fun! Martin…

  52. martin May 25, 2013 at 7:47 am #

    hi michael ,
    im having a little problem when i install the code it comes up with the following errors, (see below ) any chance you can point me in the right direction?

    martin

    sketch_may25b.cpp: In function ‘void GetFileNamesFromSD(File)':
    sketch_may25b:726: error: ‘class File’ has no member named ‘openNextFile’
    sketch_may25b:742: error: ‘class File’ has no member named ‘isDirectory’
    sketch_may25b:750: error: ‘class File’ has no member named ‘name’
    sketch_may25b:756: error: ‘class File’ has no member named ‘name’

    • Michael Ross
      Michael Ross May 25, 2013 at 7:52 am #

      It looks like the SD library is not installed correctly. Make sure it shows up in your libraries list in the Arduino asoftware. You will need to copy the library into the libries folder in your Arduino software installation if it is not there.

      • martin May 25, 2013 at 9:08 am #

        hi michael,
        thanks for replying ,i think its installed by the look of things,kinda new to this code if you couldn’t guess lol, i’ve got the strip running the example strand tests ok,the reader i’m using doesn’t have a cs pin but has a nss pin is this the same ? or could this be the cause of the problem,if i need a sd library where can i download it from?

        • Michael Ross
          Michael Ross May 25, 2013 at 9:17 am #

          I am responding on my phone right now and cant get to my computer to get some detailed answers for you. The NSS thing bithers me and could very well be the issue. I havent seen one labled like that. And the SD library should have come with the Arduino install. If you look in the folder where you have the Arduino software installed, there should be a fomder called libraries and then under that, one called SD or SDLib or something like that. If it is therethen it is installed. I will have to do some research to see what the NSS thing is. Do you have a link to the one you purchased?

          • Martin May 25, 2013 at 1:02 pm #

            Hi michael, thanks for your help so far ,think ive cracked it ! I’ve tried a different approach and uploaded the code on a pc instead of a mac and the code seems to work on the device even with the weird card reader( I was given it ,but can’t seem to find that kind online anywhere) i have a “normal” lol one on order now too :) can i ask what program are you using to convert the images with?

            • Michael Ross
              Michael Ross May 25, 2013 at 2:17 pm #

              Cool! Glad you got it working! From the looks of what I could get to online on my phone, the NSS is the same things as SS on the other cards out there. I have been using photoshop to save the image files as a 24 Bit BMP file and it took me a bit of time to figure that out. If you dont have photoshop, you can try Paint maybe or try to use another graphics prorgram that will give you options to change for BMP files. Not sure if others may have other suggestions here on this or not.

            • ma\rtin May 26, 2013 at 8:38 am #

              hi michael, spoke too soon lol,
              ive got the arduino and sd card loaded up ok no error codes and they see the files on the sd card,and i can select them and it say’s its sending them but i get nothing on the led strip,i know the led’s works ok because i uninstalled the code and re-tried the test strip codeand they work fine, i just cant get it to talk to the led’s at the moment any ideas?.

            • martin May 26, 2013 at 9:50 am #

              hi michael,
              fixed it ;) went back through the code and as ive just seen on the comments i had same problem that Chris R had, where the sketch says pins 31 and 32 for the data and clock and the wiring diagram says 33 and 34 ,….works like a dream now thanks for the help and such a great tool ;)

  53. Michael Ross
    Michael Ross May 21, 2013 at 12:13 am #

    Okay… I FINALLY figured out the issue with what seemed to be a limit to the number of files the program would read on the SD card. I really didn’t have the time to spend on this, BUT… It was bugging the hell out of me so I sat down and started going through the code in more detail to analyze exactly what was going on.

    Instead of being a memory issue like I thought it might be, it turned out to be an issue with the number of files being opened on the SD Card and a limit was being hit with the number of file handles issued. That is the real reason for the problem! Now for the fix!

    There are two lines that need to be added to the code to cure the problem. I have tested this with 177 files on my SD card and it works just fine now.

    In the following function, there are two entry.close (highlighted in RED) commands that need to be inserted. This will make sure that each file is closed after it is opened when getting the list of file names from the SD card and limit it to one file handle being used at a time. I will fix the code that is linked on this website but mick, would you mind updating the code that you have to make sure these are added?

    Thanks!

    void GetFileNamesFromSD(File dir) {
    int fileCount = 0;
    String CurrentFilename = “”;
    while(1) {
    File entry = dir.openNextFile();
    if (! entry) {
    // no more files
    m_NumberOfFiles = fileCount;
    entry.close();
    break;
    }
    else {
    if (entry.isDirectory()) {
    //GetNextFileName(root);
    }
    else {
    CurrentFilename = entry.name();
    if (CurrentFilename.endsWith(“.bmp”) || CurrentFilename.endsWith(“.BMP”) ) { //find files with our extension only
    m_FileNames[fileCount] = entry.name();
    fileCount++;
    }
    }
    }
    entry.close();
    }
    }

    • is0-mick May 21, 2013 at 4:37 am #

      Hi Michael,
      nicely spotted.
      I never had the issue, guess it was because I was only using a small number ~12 bmp’s on the SD card.

      I will update my code to make sure I close the files (doh silly me !)

      Mick

  54. John Marshall May 20, 2013 at 6:56 pm #

    Hi Michael,

    I’m trying to make a programable orb based on this code and using a diffused string of WS2081 LEDs. When I connect everything up only the first LED lights up and when I send a program using the LCD screen it just flickers a little and the rest of the LEDs dont proceed to light up. I have just basically downloaded the adafruit library and replaced the LPD8806 library references in the code with that of the adafruit on. Any ideas on where I might be going wrong?

    Thanks in advance,

    John

    • Michael Ross
      Michael Ross May 20, 2013 at 7:53 pm #

      Hi John,

      Can you email your code to me? I will take a look at it and see if I can see anything in the code. Also, can you tell me how you have the strip wired up to the Arduino? My email address is Michael R Ross AT Verizon DOT net (No spaces and replace the obvious with the appropriate symbol and period. ;-) )

    • is0-mick May 21, 2013 at 4:32 am #

      How strange!
      I just did the same thing a few days back..
      Although I was more thinking of using it as a dome tool.

      code:
      http://pastebin.com/73igD6wx

      Mick

  55. Chris R May 20, 2013 at 1:01 pm #

    All on and loaded :) have put some bmps on and can select them but when i press the go button it says sending but no flashing leds :( i have noticed that LPD8806.h in the library stays black not orange like the others! could this be the problem or could i have a duff strip ?is there any way to test it ?
    cheers chris

    • Michael Ross
      Michael Ross May 20, 2013 at 1:45 pm #

      Do you have the LPD8806 Library copied to the Arduino Libraries folder? The LPD8806.h include stays black in mine also but it works just fine. So I don’t think that is the issue. At this point I think the Arduino and program is fine with the exception of making sure you have the right PINs defined. Double check what pins you have the Data and Clock lines connected to on the strip to the Arduino and make sure the dataPin1, dataPin2, clockPin1, and clockPin2 variables at the top of the code are set to the same pins you are using on the Arduino. Also make sure you have the proper power connections to the strips from the 5v and GND on the Arduino to each of the light strips.

      I can make a BMP file for you that is known good and working on my wand so that we can eliminate the possibility of the file being an issue. I dont think that is the problem though since it passes the initial checking to make sure the file is good and in the proper format before sending to the strip. How many total LEDs do you have on your wand and how are you supplying power to it? Are you testing just through the power of the USB connection?

    • Chris R May 20, 2013 at 5:41 pm #

      got it … again ty … it was the data and clock pins .. phew not the strip :) the sketch used was set to 31/32 but i went by the wiring diagram and used 33/34 i really should learn to read instructions first then maybe i would have noticed sooner hehe .. it was so cool the first time it went off … got so excited i had to order a 5m roll lol cause now i want more :)
      cheers chris

      • Michael Ross
        Michael Ross May 20, 2013 at 5:48 pm #

        LOL Awesomeness! Welcome to the madness! ;-) Have fun and make sure to add your creations to the groups on flickr! :-)

        • Chris R May 20, 2013 at 5:57 pm #

          Thank you will do !! Also #i found that if u make a long rectangle BMP and divide it in 2 from corner to corner along the length then paint 1 of the triangles blue and the other black then video it … the DLW makes a excellent Lightsaber just need some sound effects lol :)

  56. Chris R May 19, 2013 at 7:31 pm #

    trying ti upload the code but keep getting
    ‘class file’ has no member named ‘openNextFile’
    any ideas wot i doing wrong pls ?

    • Michael Ross
      Michael Ross May 19, 2013 at 8:44 pm #

      It looks like the SD Library is not being seen by the Arduino IDE. Do you have an SD folder under the Libraries folder where you have your Arduino software loaded?

      • Chris R May 20, 2013 at 6:38 am #

        thanks lol ops didnt have card in
        but now getting “avrdude: stk500v2_ReceiveMessage() : timeout
        avrdude: stk500v2_getsunc() : timeout communicating with programmer”
        i says done uploading but not getting anything on the lcd screen .
        thanks again 4 all your help

      • Chris R May 20, 2013 at 6:45 am #

        Ooo got it i am a wally i had the wrong com port selected lol
        yeah this means play time tonight :)

  57. Michael Ross
    Michael Ross May 19, 2013 at 5:36 pm #

    I thought I would throw this out there since I finally figured out what the issue is last night! The code reading file names from the SD has an issue. The array that holds the file names is limited to the number of characters not the number of file names. So the longer the file names are, the less names it will hold. This is why I was running into the issue of it only seeming like it would hold a limited number of files. It is going to take some time to figure out another way to do this since it seemed that adjusting the array size did not help. I think the code is going to have to be changed to read the file names one at a time using the file index instead of trying to hold all file names in memory. Just my opinion on how to fix it anyway.

    A search on how to do this did not come up with much of a clear answer. So if anyone has any suggestions or wants to take on this task, please do so.

  58. Chris R May 19, 2013 at 4:34 pm #

    Thanks again guys for another great project mine is almost done and ready to play ! just forgot to get a battery holder :( but here is my progress so far http://www.flickr.com/photos/blinkey2012/sets/72157633536539060/
    looking forward to more projects in the future too hopefully :)

  59. Michael Ross
    Michael Ross May 18, 2013 at 2:00 am #

    Okay… after a few nights of working with the dual strip DLW on the Arduino DUE platform, I have come to the conclusion that I have hit a saturation point with sending data for 156 LEDs on the two strips. The differences between the DUE and MEGA are significant and where the DUE definitely has a faster processor, the MEGA has advantages with being able to store code in memory for faster processing. So ultimately the MEGA wins in the speed department using Mick’s basic code and it will take a major reworking to make it work faster with the DUE.

    So… I have gone through the code one last time for the arduino MEGA and have posted the MEGA v2.0 code above. This code has all the menu options and includes a way to fully adjust the brightness of the strip. If there is someone out there that is really good with C programming and has a good understanding of the Arduino DUE that can take this and make it as efficient as possible, I am sure everyone would appreciate it. I don’t really have the time or patience to dig into that far right now. ;-)

    Cheers!
    Mike

  60. Don May 17, 2013 at 10:37 am #

    I the video you have a cover/defuser over the led strips. What material are you using and how do you secure the strips to the stick?

    • Michael Ross
      Michael Ross May 17, 2013 at 12:27 pm #

      Hi Don,

      I will see if I can get some more details of how I put mine together posted with some additional photos. Over the years I have experimented with different diffusion methods to tone down the super bright LEDs a little bit and spread the light out just a bit more to help fill in the gaps between the LEDs. What you see in the video is a piece of flexible water pipe that was cut in half (lengthwise), heated with a torch to soften it, then flattened between some wooden boards while it cooled. The diffuser is mounted just by wrapping cellophane tape around it all.

      The strips are mounted to a piece of wood lattice trim (1″ wide, 1/4″ thick). Most of these strips have adhesive backing on them and you can stick them directly on the surface that you are mounting them to. Some of them do not however so some double sided tape will help hold them in place. Even with the adhesive backing, I still used some zip ties to hold the strip to the wood trim. I used one zip tie every inch and half or so after I had both strips mounted.

      Now, I did overlap the strips on top of one another and used black electrical tape to insulate the electronics so there would not be any shorts created by doing this. I will show some details of that in the photos I post since it is a bit hard to explain without seeing it.

    • Michael Ross
      Michael Ross May 17, 2013 at 1:12 pm #

      Additional Photos have now been added to the Assembly Instructions page

      • Don May 18, 2013 at 11:23 am #

        Thanks Mike,
        That does explain alot.
        Don

  61. Michael Ross
    Michael Ross May 14, 2013 at 4:09 pm #

    Howdy Everyone! Me again with another update on the dual strip 156 LED light wand.

    Last night I noticed that the frame delay setting didn’t seem to be having much of an effect any longer with this higher pixel count so I suspected I was hitting the saturation point with the speed of the Arduino sending the pixels from the file to the light strips. I had to adjust for this by moving the wand slower. And because these LEDs are so bright, It was causing the images to be washed out or overexposed even on the lowest ISO at f/16. This is still great in a situation where you have a lot of ambient lighting and might want to use an ND filter to slow the light down a bit, but for dark environments, it is just too much light. So, I did some digging into what it would take to adjust the brightness level of the pixels on the fly and it turned out to be a fairly simple fix.

    So, I have made some further adjustments to the code and added two additional features. One is to adjust the brightness level and the other is a Push On/Push Off feature that when set to on will run the selected bitmap over and over again until the select button is detected to stop the endless loop. This second feature would be useful for small repeating patterns that you you want to just keep running such as a rainbow effect, etc.

    Now I am sure there may be others ways to address the speed issue with the code but that is a bit beyond my “programming” capability without spending a ton of time on it. So if someone with a bit more programming experience wants to try to tackle that, please do so. :-)

    And there is the option of trying to get all of this to run on the new Arduino Due as well which has an 84MHz clock on it compared to the 16MHz clock on the Arduino Mega. It looks like the Due also has expanded SP capabilities and it may be worth while looking into changing the strip communications to SPI as well along with the SD card. So many options. ;-)

    • Michael Ross
      Michael Ross May 15, 2013 at 10:58 pm #

      After totally reworking the code to work with the Arduino Due, I think I have it all working correctly now. Some big differences in dealing with the DUE compared to the MEGA! I haven’t changed the strip communication to use SPI yet but may do that later. It does seem to be working a lot faster though! I will work up the wiring diagram and post the code once I get it fully field tested and work out any bugs I might have overlooked.

      • Michael Ross
        Michael Ross May 16, 2013 at 1:24 pm #

        I have added the wiring diagram and the code for the Arduino DUE and connecting the SD Card along with dual LPD8806 Strips. Lots of room for improvement still.

        Also, just a note, if you decide to venture into the Arduino DUE area, it is still new and there are a lot of issues. Currently the only Arduino IDE that works with the DUE is beta version 1.5.2.

  62. Don May 13, 2013 at 12:55 am #

    I’m curious as to what type of battery to use for a dual 52 LED wand. How much current will this wand draw at one time?

    • Michael Ross
      Michael Ross May 13, 2013 at 1:06 am #

      I am using 8 standard AA Batteries. (to supply power to the Arduino) And actually, if they are brand new batteries, I only use 7 and jumper the battery holder where I remove the 8th battery. Arduinos can’t really handle anything over the 12 volt mark. The current draw is a bit of guess since these strips are rated at a full sustained load with all LEDs on bright white. Sustained loads just don’t happen on a wand like this since it only flashes a pixel line in about about 50 milliseconds. The Arduino is rated at 2 amps on the power side and I have yet to burn one up driving the strip directly through the Arduino.

    • is0-mick May 13, 2013 at 2:57 am #

      I’m using 6 x Nimh AA rechargable on 2x 52 LED strips (104 LED’s) seems to work fine :)

      Mick

  63. Michael Ross
    Michael Ross May 12, 2013 at 6:14 pm #

    I have updated the code a little bit more that I posted yesterday… it is now version 1.1 Made some changes to the way the repeat works so there would be no delay and adjusted the back light fade out timing just a little more.

    Oh! And I received the new LPD8806 strip with 52 LEDs per meter yesterday. I now have it mounted to a 1.5 meter mount. Dual strips… 156 LEDs. Will be testing the resolution of it a little bit later this evening.

    • Martin2 May 28, 2013 at 4:29 pm #

      Hello Michael, after having soldered my 104 LED strip here almost without any faults that had to be corrected- thanks to your excellent advices here – I would like to put my hands on your 1.1 version, but cannot find it. Did you release and link it here? I would love to have the repeat times feature and so on. I could code it myself, but since I know I will build in some more features, I would like to start from your release. Could you give me a hint?

      Thanks a lot! Martin…

      • Michael Ross
        Michael Ross May 29, 2013 at 10:38 am #

        Marin, the version 2.0 code above is the best option since it has all the latest bells and whistles. I may have the 1.1 code out there still if you just change the link for one of the others to reflect that version. If you are using a single strip instead of dual strips, I can modify it to work for a single strip fairly quickly. Just let me know.

        • Martin2 May 29, 2013 at 11:39 am #

          Dear Michael. Thanks for your reply.

          I would like to be as flexible as possible, I am building an aluminium system that can be changed for 104 LED, 2×52 mirrored or even using only 52 LED on as short stick.

          When you look onto my website you can see that the LED stick is rotated very fast, so it is really important that I can have the “mirrored” option.

          So is the “Dual Strip” v 2.0 also suitable for a single strip?

          Thanks a lot! Martin…

        • Martin2 May 29, 2013 at 11:45 am #

          Oooops. Didn´t read carefully enough. Actually yes, I would appreciate it very much, if you could provide a “fairly quick” modification. Isn´t it possible to make the code handle both single and dual strip versions at once? I am fixing my LED strpes with neodym magnets and will be able to change the strip fast to a dual strip version and vice versa. Thus a single code would make me even more happy. :-D

          Thanks again for your kind help. Martin.

          • Michael Ross
            Michael Ross May 30, 2013 at 1:08 pm #

            Hi Martin,

            I am not sure that I fully understand what you mean by “mirrored option”. Mirroring to me means a copy of the the original but reversed as in an image being reflected by a mirror. But it almost seems what you mean is to have two strips (mounted so they are facing opposing directions) and you want both strips to do exactly the same thing at the same time or basically that one copies the other exactly. Is that the case?

            This is getting confusing because of the possibilities. It sounds like your idea of a dual strip is different than what we have been talking about before in using the second strip to increase pixel resolution. And of course, imagination is basically the limit to the possibilities and writing a program to pull together all possibilities is basically impossible! ;-) At least until we figure out a way to interface the Arduino with our brain! Ha!

            So, just to pull all of this together as I see it, You are putting together a Digital Light Wand that will be convertible from 104 LEDs full length, or 104 LEDs on dual strips (mounted front and back – 52 LEDs per strip), or 52 LEDs as a single strip.

            I take it you will NOT have the dual strips in a side-by-side/offset mount at all correct?

            So the options would be:

            Single Strip – 104 LEDs
            Single Strip – 52 LEDs
            Dual Strip – 52 LEDs (Not acting as a 104 LED strip)

            If this is correct, then you do NOT need software options to do this. But you WILL need BMP images that are saved in 52 pixels for the 52 pixel length use and also BMPs that are saved in 104 pixel length when used in the 104 LED configuration. Just connect the data and clock connections of both strips to the same pins on the Arduino in the dual strip configuration and connect the second strip to the end of the first strip for the 104 LED configuration.

            However! The code will need to be modified to drive a single strip instead of the Dual Strip configuration as I have it programmed. I will try to create a single strip version of the code this afternoon and get it posted for you.

            Cheers!
            Mike

            • Martin2 May 30, 2013 at 7:28 pm #

              Hi Mike! Thanks for your reply. The options you mention I have right now only by working on the bitmaps and without changing anything on the hardware side.

              I have a 104LED single strip now. Sometimes I use the full length (104 single) or turn around the strip so that the backsides come together, now I can use a bitmap with height 104 but on one half black, then I have a single 52 LED strip, or, when “mirroring” the 52 pixels in Photoshop, I have a dual strip, non interlaced. So it is true, I have these options now.

              For this setting I would – of course :-) – love to have the enhancements you made to the code for die Dual interlaced strip for higher resolution. So I would appreciate it very much. On the other hand I would also love to have the opportunity to have the 104LED-interlaced version. I suppose it is too hard to code that in one sketch? I think it would be great to have it all under one hood, but I can imagine it is a lot of work.

              I don´t think my programming skills are good enough to bring all that together, so in the end I maybe will have to have a notebook to upload another sketch to the DLW. I can live with that, I almost all the time have a notebook with me on my shootings.

              However, if it isn´t too much work for you, I would definitely like the enhancements off the dual version on my single strip too. Thank you so much!

              • Michael Ross
                Michael Ross June 1, 2013 at 9:03 am #

                Martin, can you give me more specifics on how you plan to connect the strips to the Arduino in all of the configurations? I am not sure what you mean when you say you “turn around the strip so that the backsides com together”. Do you mean you are folding it lengthwise instead of disconnecting the top half and reconnecting it at the bottom (at the Arduino)? How you are doing this will change how the code needs to be written to control it.

                The code is not that hard to modify from this end since I have my head in it pretty deeply at the moment. But how the strip(s) are connected to the Arduino make a huge difference. For the Dual strip/offset/High res version, the two strips need to be connected to two different sets of pins on the Arduino to work with the dual strip code modification that I did. But when operating as a single strip, and that includes one long strip or the strip folded in half front and back, then the strip(s) will need to be connected to one set of pins on the Arduino. Does that make sense?

            • Martin2 June 1, 2013 at 1:13 pm #

              Hello Mike,

              At the moment I have the two strips connected to each other and then one of them connected to the Arduino. So i just fold the strips, always only one is connected. It is like a single 104 LED strip. Until now I don´t use the interlaced version you coded.

              If it is necessary to make these connection changeable I will do that. I could have one set of pins left unused for the 104 single strip version, then disconnect the two strips from each other and plug them both to the Arduino with their own set of pins for each other. This is something that can be done without having a computer with me. But as long as there are two versions of code for single/dual strip, I have to have a computer with me to change from one setup to the other. It would be nice to have the possibility to have both the single/dual option without having to put a new sketch onto the arduino, but by maybe alter the connections, this would be ok.

              I suppose one could code the sketch also in a way that all the time there is only one strip connected and everything is running on one bus, no? This would prevent the DLW-artist from having to fiddle around with unplugging and plugging together the strips. I think it is best when you determine which is the best way to do it, because you have the most experience with it and know how much hassle each way is. In any case I would appreciate every much not having to have a computer with me.

              It won´t take to much time for me to rearrange the strips, but maybe it takes you a long time to write the code the way the strips won´t have to be rearranged?

              However, thank you very, very much for you efforts. Best regards! Martin.

              • Michael Ross
                Michael Ross June 1, 2013 at 4:12 pm #

                Martin, this code will work with your current setup. This will only work with a single strip as you have it configured. You will have to make sure you bitmap images are set up correctly to deal with the full, half and folded versions of your wand for the time being. Make sure you change the pin numbers in the code to match what pins you have your strip connected to on the Arduino. All of what you said can be accomplished but I don’t really have the time at the moment to do a complete rewrite to get it to work with your setup AND a dual strip option.

            • Chris R June 2, 2013 at 3:40 pm #

              Hi martin and mike
              been reading this with interest as i also like the idea of a kinda modular system .with 1 control box that i could just plug various lengths/resolutions of strip into..
              and i was wondering if i could add a selector switch/ menu option. then combine several of gr8 sketches already written into 1 sketch ( cause making 1 is way above my skill level to be honest) but i have found this which gives me hope :)
              {
              // read the state of the pushbutton value:
              int modeSwitch = digitalRead(3);

              // check if the modeSwitch is in the HIGH state.

              if (modeSwitch == HIGH)
              {
              // execute sketch #1 code:
              }
              else
              {
              // execute sketch #2 code:
              }
              }
              do u guys think this kinda thing would work?
              thanks chris

            • Martin2 June 2, 2013 at 6:24 pm #

              Hello Mike, hello Chris.

              First once again and not the last time I want to thank Mike for his really very kind work here. I installed version 3.0 for the single strip but with all the menu stuff and so on. It works flawless. I am very happy with that.

              If ever I will find the time to rewrite the code for an all-together-solution I will dig into it. The way you proposed, Chris, is not a very promising one, I think, because you have to have all the menu handling and all that in the code, and a lot of it is redundant for both versions. Also I think it would be good to alter the button handling a little to an interrupt driven version. It would open up new possiblities. In the end it would be nice to have a version both enhanced in code and hardware so that an artist could play the DLW almost like an instrument.

              I am driving that 50-camera setup, and I am doing some 30 seconds ++ exposures, where the DLW has to show some different pictures. I would like to come to a point where I could draw complete scenes with a lot of stuff in it, like streets, cars, chairs, trees, flowers an so on, an it all has to be done within a certain time. This is quiet a very high skill the DLW-artist has to have and thus the DLW itself should support him/her as much as possible.

              The fact, that I have the “play it until next keypress” feature now, the one that Mike coded, opens up nes possbilities in drawing the stuff, it is very usefull. Next thing I am looking forward to is to have an “auto advance to next picture” feature. As far as I can see this can be done easily. When I worked it out, I will send the code to Mike, I would be happy to bring my cents in here too.

              Best wises for now! May the light be with you!

              Martin…

  64. Michael Ross
    Michael Ross May 10, 2013 at 9:18 pm #

    Alright!

    I have completed making some changes to Mick’s code to add some additional variable manipulation in the field and also to deal with dual strip interlacing with movements of the DLW from the left or right. This new version of the code includes the following menu items:

    1-File Selection
    2-Initial Delay Time (Time delay before sending file)
    3-Frame Delay (Time duration of each row of pixels)
    4-Dual Strip Delay (Interlacing timing)
    5-Dual Left/Right (flips interlacing timing if moving from left to right or right to left)
    6-Repeat Times (Number of times to repeat the current image
    7-Repeat Delay (Delay Time between repeats)

    Use the UP and DOWN keys to move to different menu items
    Use the LEFT and RIGHT Keys to change the value/selection

    Press the SELECT button to Run the sequence at any time.

    I will be doing some testing on this tonight in front of the camera to test out the interlace timing but other than that, it should be ready to go! The code can be downloaded in the main blog post above.

    Cheers!
    Mike

  65. Martin May 7, 2013 at 9:18 am #

    Hello again!

    I know this is somewhat ot, but I don´t know where else to post my question.

    I wonder how one would start a project that would bring a new dimension into LED-light-painting. I would love to have a led-matrix of lets say 60×60 LEDs, that, when drawing with it, would create 3D-Light-Objects. Let´s say I wanted to draw a 3D sculpture with the shape of a bottle, a flower, or a tree. I could then have a 60×60 matrix drawing from the ground up while the matrix “builds” the shape.

    How would one start researches to make this possible? I suppose, this cannot be done with one Arduino any more. Should one try to synchronize several of them? Or is it better to start completely new from scratch using a netbook or something else?

    Maybe someone has an idea to build such a matrix?

    Thanks a lot! Martin…

    • is0-mick May 8, 2013 at 9:22 am #

      You could probably do it with one arduino still and the sd card, but instead of thinking of it as a matrix, just think of it as a long strip! (360 long).

      so each 360 line of data is your “frame” (layer) then just move your wand upwards slowly (if thats they way you lay your image out).

      Have the strip cut into the lengths you require, and just lay them out in a pattern like this
      | | | | | <– each length of strip.

      Quite hard to explain what I mean, but hopefully it will give you the idea.

      Mick

      • Martin May 8, 2013 at 6:44 pm #

        Thanks Mick, unfortunately the matrix I think of is much larger, I thought of a 60×60 square pattern, thus 3600 LED. Do you think that Arduinos would still be the right gear.

        • is0-mick May 9, 2013 at 3:19 am #

          Oops, my bad. Yeah it may be pushing it a bit, but more so due to the ram only being small on the arduino’s.

          I think the library stores each pixel in an array, so you’d need 3600×3 = 10800 bytes / 1024 = 10.54k of memory for each frame.

          The mega2560 only has 8k of ram.

          A Rasberry pi, should be able to handle it I’d guess, although I’ve not got or used one.

          Mick

          • Martin May 9, 2013 at 6:15 pm #

            Hmmmm… The more I think of it I suppose the project is a little too big for me. Just was dreaming having the possibility of being able to put 3D-objects into my camera rig… :-) The technical specs go beyond my knowledge and what I can do, I suppose…

            • Michael Ross
              Michael Ross May 9, 2013 at 7:31 pm #

              I am sure something like can be done, but the power required to drive that many LED’s is going to limit you big time. I have seen some simple light painting 3D attempts just by arranging LEDs in a cube for example, but even with that the effect really wasn’t all that worth while to me. Particularly since you are capturing the image in 2D. Good ideas all start with a vision though and there still may be another good way to accomplish what you want to do. :-)

    • Michael Ross
      Michael Ross May 9, 2013 at 5:43 pm #

      Wow! I keep thinking about how much power you would need to drive that many RGB LEDs! Just off the top of my head even if you went with 18ma times 3600 times 3, you are talking like what… almost 200 amps? I can see the magic blue smoke escaping from the Arduino already! ;-)

  66. Michael Ross
    Michael Ross May 6, 2013 at 1:39 pm #

    I probably should mention that I noticed that I have had a lot of intermittent issues with my SD card reader also. I thought most of them were cured with switching over to AA batteries from the 9 volt battery but I do still get some init failures and file read problems here and there. And it also appears that I cannot have more than 82 or so files on the SD card. Not sure what the problem is other than maybe memory or file formatting issues. I will have to get some time to properly ID the problem and troubleshoot more to see if I can pinpoint the problem.

    The main reason I am mentioning it here is that in my experience, the SD card interface seems a bit buggy and I would like for others to post more specifics on what they are seeing if they are experiencing anything problematic related to the SD card.

    • is0-mick May 7, 2013 at 3:47 pm #

      Hi Michael,
      I’m using a 2gb sandisk sd card which seems to be fine.

      There is a slight bug in the SD library (causes init failures if you remove / insert the card while reading for example).
      I found a fix, but it involves a change to the SD library itself (see the comments in my code about how to do it).

      Apart from that, I’ve not had any issues. May be the sd card is too big? or something? I’m not sure if the Library supports fat32 or only fat16 ?

      Mick

      • Michael Ross
        Michael Ross May 8, 2013 at 9:23 am #

        I think I found out what might be causing my problem. I am using some thicker stranded wire and have about 6 inches of it between the SD card reader and the Arduino. I was reading a few posts were it was recommended to keep this as short as possible due to some intermittent issues like this. I have second board and strip that I set up for dual strips and I am not having any problems like that with it at all. So that very well could be the issue.

        • Rob May 13, 2013 at 2:44 pm #

          UPDATE…Bought 52 LED/mtr strip from NooELEC very fast delivery only seven days from posting in the USA to being in my little hands in the UK. Strip all connected and working perfectly. Now going to try a two metre dual strip. It’s taking me longer to sort out all the images I want to use than it took me to build the Lightwand

          • Michael Ross
            Michael Ross May 13, 2013 at 3:48 pm #

            Very Cool! Glad you were able to find a supplier. You will have to post a link to some of your work when you get it going.

            And I feel your pain on the work involved with the images. I have gone from a 2 meter strip, to a dual 96 LED strip, and now to a dual 156 LED strip and have had to reformat the images for each version. Dealing with the file formatting has been a bit tricky and then even formatting the SD card and writing the files to it. Although I do admit that I am starting to get a process down in dealing with it all. I have found it best to reformat the card any time I make changes to or add images then copy the images to the newly formatted card each time. I think Mick is right in the fact that the SD card library has bugs in it. It seems to be extremely picky in the files it deals with.

  67. Rob May 6, 2013 at 6:09 am #

    Thanks to Michael for a great idea & Mick for great code. I am all programmed, ready to go when I finally source the LED strip, I have been let down by two suppliers on a well known site, one in the US and the other in China. can anybody reccommend one that has stock and will deliver to the UK
    Thanks in advance, Rob

    • Michael Ross
      Michael Ross May 6, 2013 at 12:14 pm #

      Rob, I am not sure what to tell you regarding a supplier that will ship to the UK. I am sort of surprised that you are having that problem. Perhaps one of the other folks here can steer you to a reliable supplier for the strip.

      Here are a few sources that I know of or found.
      Adafruit.com (which I notices is carrying a LPD8806 strip with 60 LED’s per meter now!)

      InsomniaLighting.com
      LEDLightngHut.com

      and I am sure there are several places to purchase it from on AliExpress.com but make sure you are getting what you want and of course it will take some time for shipping.

  68. Michael Ross
    Michael Ross May 4, 2013 at 7:14 pm #

    I updated the software on my LPD8806 Digital Light Wand today and added more images to the SD card and plan on doing some playing tonight. I will post some example BMP images along with the results on the BMP Image information page linked in the main post of this BLOG.

    I can’t wait for the higher resolution strip to get here! :-)

  69. John Marshall May 3, 2013 at 11:43 pm #

    Hey Mick,

    I think I’ve wired everything up correctly but I am getting SD init failed! flashing on the screen. Any ideas about how I might troubleshoot this? I’ve got an LC Studio SD Card module (http://www.lctech-inc.com/Hardware/Detail.aspx?id=0c3b6f7a-d101-4a60-8b56-3abfb7fd818d)

    Thanks in advance,

    John

    • Michael Ross
      Michael Ross May 4, 2013 at 10:28 am #

      John, Double check your connections and pins used for the interface. Also make sure you have the SD formatted properly. If you are using a large SD, then try a smaller one. I could not get a 64GB card to work at all. And it took the proper formatting to get a 32GB card or any other sized card for that matter and that was primarily for the MP3 Radio project I have been working on. But I would think that the same would apply here. I was getting the same message you are getting until I formatted to FAT. I also had an issue with that happening when I used a 9 volt battery to power the Arduino. It was a bit intermittent and would work every once in a while, but most of the time it would fail. That problem went away when I changed it to use 8 AA batteries instead of the 9 volt battery. But as an additional note here, it would work fine when powered by the USB cable as well.

      • John Marshall May 6, 2013 at 12:33 am #

        oh, and I am using an SDHC card formatted as FAT32.

    • John Marshall May 6, 2013 at 12:32 am #

      Hi Michael,

      I changed out the system to use 8 * AA batteries. All the connections look fine. Please confirm that there is no need for the MISO pin (Anduino pin 50??). In any case I have ordered a new SD Card module (a different one) off ebay and it should be here in a few days so if it is just that component that is faulty it shouldnt be a big deal.

      Thanks again for your help.

      John

      • Michael Ross
        Michael Ross May 6, 2013 at 12:48 am #

        Oh My! Yes! Good catch! The MISO on the SD reader DOES need to be connected to pin 50 on the Arduino!! I will correct the wiring diagram! My bad! Sorry about that! :-\

      • Michael Ross
        Michael Ross May 6, 2013 at 12:56 am #

        The Wiring Diagram has been update to correct that wire being left off for the MISO connection.

        • John Marshall May 6, 2013 at 5:31 am #

          Hey Michael,

          Thanks very much, I have soldered the miso pin on and am getting further now :). I think in Mick’s code the pins for the data and clock are 31 , 32 where as in your diagram they are your diagram they are 33 , 34. I have modified the code going to my board to suit and now when I click send I’m seeing LEDs light up (yay!!!) but unfortunately I am only seeing 8 from 48. I set my strip length variable in the code to 48, is there anything else I need to do or could there be a fault with my 8806 strip, there is a join after the 8 LEDs so could it be that that joint has not be done correctly or do you know of anything else that might cause that behaviour?

          Thanks,
          John

          • Michael Ross
            Michael Ross May 6, 2013 at 11:56 am #

            Great! Sorry about that again. I should have checked the wires off while I was making that diagram.

            Here is a note about the PIN usage on the Arduino. The Arduino MEGA’s SPI Interface is set to Pins 50 (MISO), 51 (MOSI), 52 (SCK), and 53 (SS). This cannot be changed. So the SD Card reader will need to be connected to these pins specifically for it to work.

            Of course the 5 volt power and Ground pins have to be used for the respective power and ground connections on the SD Card Reader and LED Strip as well. ALL of the other pins are your choice as to which ones you use. This is true for the Data and Clock connections on the strip and also the external switch connections.

            Mick uses pins 31 and 32 in the code for the Data and Clock connections to the strip (respectively) and pins 44 and 45 for the external “Select” trigger to “Play” the file to the strip. You can use any other open pins for these as long as you make sure and make the changes to the pin assignments in Mick’s code.

            John, I am not sure what length of strip you are using but make sure that you have a BMP image that is the SAME number of pixels as your strip. (And that all the pixels are something other than black so that you will see the LEDs turn on for a test). I can post a test sequence BMP file here if you let me know what your strip length is so I can make adjustments to the number of pixels.

            I have had bad connections on a strip before, but it usually turns out being a bad component as opposed to the actual connection where two segments of strip join together.

          • John Marshall May 6, 2013 at 7:57 pm #

            Hi Michael,

            I am trying to make a meter long light wand with the 48 LED / meter LPD8806 tape. I’m using bitmaps to test that are 48 pixels high when turned on their side, please let me know whether this is correct and if not perhaps post a sample image… I’ve tried a couple of different images and I’m getting the same result but I am definitely following the guidelines of 48 pixels.

            I guess I’ll try heating up the joins in case there is an issue there and if that doesnt work I’ll have to try cutting the LED tape after the 8 LEDs that are working and resoldering, this is a pain because it means I won’t have a full meter of LED tape to work with anymore.. oh well I guess that is the problem with buying parts off ebay, I just wanted to make sure before I started cutting the tape up that there was nothing code wise that could be causing the issue (I was particularly suspicious because it was exactly 8 LEDs).

            I think I’ll order some more tape in case it does prove to be this as it takes ages to come in and I cant find anything available locally. I do have a 5M role of some lower resolution stuff when I got a bit overexcited and ordered it without understanding the LEDs per meter implications so worse case I can use that in the interum untill the high res stuff arrives.

            Thanks for all your help getting this up and running, I feel like I’m getting closer and am nearly there.

            THanks again,

            John

            • Michael Ross
              Michael Ross May 6, 2013 at 8:15 pm #

              Here is a 48 Pixel Test for you. It should light the entire strip of LEDs in the following sequence… Red, Green, Blue, Yellow, Magenta, Cyan, White. Click here to get the file (You may have to right click on the image that is displayed and then select save image as to get the file to download)

              The Bitmap format is a little confusing and since they need to be rotated so that the top is on the side, if you resize them after rotation then they need to be 48 pixels wide. Before rotation they would need to be 48 pixels high. Just to make sure that is clear. I tested this bmp image on my 64 LED strip and only 48 pixels were lit so this should work as long as your strip doesn’t have problems. At least this will help narrow it down to just that.

              It does sound to me like you have a strip issue. Reheating the pads with a soldering iron should fix the issue if it is at that point but when I have had issues like this in the past it was usually a bad component. What you can do though is just cut out a two led section and resolder the strip back together with 46 LEDs instead of removing all 8 of them.

            • John Marshall May 7, 2013 at 8:40 am #

              Hi Michael,

              Turned out it was the connection between the two strip pieces and heating them up / resoldering the connection has done the trick. Just need to wait for some better weather here to get out and try it out properly.. Thanks so much for all your help!

              John

  70. is0-mick May 2, 2013 at 7:07 am #

    Hi Michael,
    Just noticed you are using an old version of the code.
    v1.04, now up to v1.07

    Suggest you use this version, which has a gamma look up table (better colours) and also has dual strip capability (side by side for double resolution), and supports external buttons for up / down for selecting the file, as well as the send to led’s button.

    Here is the link

    http://pastebin.com/gT3QM6jH

    Mick

    • Michael Ross
      Michael Ross May 2, 2013 at 11:08 am #

      Thanks Mick! I will update the link above to make sure everyone is getting to the latest code.

      By the way, I have ordered a roll of the LPD8806 strip that has 52 LED’s per meter and will modify the wand I made with your design to a dual strip using that. Soooo… effectively it should take the resolution to 104 LEDs per meter! ;-)

      I am also thinking about making some changes to the code to add some other options to make things a little more flexible. Things like adding a “Repeating” option and an adjustable initial delay time. What do you think?

      • is0-mick May 2, 2013 at 5:05 pm #

        Currently just holding down the external button should repeat i think?
        Or alternatively just extend your pattern, by copying pasting?

        I’ve tested it with an image of 10,000 across.
        I’m using 52LED per M also, and doubled it to the 104, only problem I did have, was because the led’s are not aligned beneath each other you get a type of interlacing at the edges.
        See here:
        http://www.flickr.com/photos/68646769@N07/8228510411/in/photostream

        Mick

        • Michael Ross
          Michael Ross May 4, 2013 at 10:56 am #

          Mick, That is really cool! The resolution is awesome! Regarding the interlacing… We had the same issue when Phil was working with the double strip. If you add a slight delay to the leading edge strip so that effectively both of them turn on in the same spot as the wand is being moved, this will take care of the problem. But it does all depend on if the wand is being moved left to right or right to left and also how fast the strip would be moved. I would think that most would work from camera left to camera right and walking at a slow pace so the delay would need to be introduced to the strip on the right as seeing it from the camera.

        • Michael Ross
          Michael Ross May 7, 2013 at 8:57 pm #

          Hi Mick,

          Disregard the note about being confused. It took me a bit to walk through the code but I finally figured out how you were writing to the dual strips and I split them out so they could be latched with a delay to get rid of the interlacing problem you were experiencing.

          Here is a link to some code that I created ONLY for a dual strip set up. You will see that I split the strip declaration into strip1 and strip2 and I made appropriate changes to the setup, latch and delay, and clearstrip functions, and the part of the code where the information is being sent to the strips. there is also a variable for dualdelay to allow setting the time delay between turning on the strips (the value will depend on how fast you normally move the strip). And another note… in the code that I have linked here, I had to reverse the Green and Blue positions in the setPixelColor commands since the strip I am using is an older one that had that in the wrong order.

          Let me know if you have any questions about what I did. Hopefully this will keep you from spending a lot of time dealing with the interlace issue. :-)

          Cheers!
          Mike

          • is0-mick May 9, 2013 at 12:46 pm #

            Hi Michael,
            Just looking at your code, only downside I can see is that you need a seperate hardware configuration for dual then single.

            My original idea, was to have a single strip with may be a hinge or such, so you could use it as a long 104 strip, or a dual 2×52 by simply folding it in half, and having another switch or so to select the “mode”.

            There may be a couple of ways to do what you’ve done with the same wiring as what I originally had, such as copying the data to two arrays, then putting them out seperate to the relevant parts of the strip.

            What do you think?

            Mick

            • Michael Ross
              Michael Ross May 9, 2013 at 5:39 pm #

              Interesting idea! Hmmm. I guess it would be possible to hinge the strip but only keep the Data, 5V, and Ground connections hinged on the strip and keep the clock connections separated to different pins on the Arduino so that you can trigger them with the offset to get rid of the interlacing when folded but still trigger them simultaneously when not folded. The code would then just need to be changed so that it would feed data down the strip in the two different ways depending on a folded state variable driven by that mode switch. I am sure there may be other ways to approach this too but to do what you are talking about, this is the first thing that comes to mind.

    • Martin May 2, 2013 at 3:31 pm #

      Although I will dig into the code deeply I would appreciate such an already existing extension very much. Btw.: Have a look at my lightwand-photos I made together with light-painter Till Pöhlmann with my 50 cameras in matrix-style:

      http://www.martin-hoppe.com/mailreply/index.php?id=9041&param=animation

  71. is0-mick May 2, 2013 at 6:54 am #

    Great work Michael!

    All the best

    Mick

  72. Martin May 2, 2013 at 2:04 am #

    Michael! This is so cool! Thanks a lot for sharing your knowledge and experience. This is really great. I will now order all the parts. Can´t wait to make it work. Thank you so much!

One Trackback

  1. [...] have the Arduino code ready to download on my website along with detailed wiring diagram, parts lists, and basic assembly instructions. And if you run [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

Protected by WP Anti Spam