Share this project


Share this project

Open source, 8000 lumen, ultra bright LED light pad with Electric IMP WIFI, Atmel AVR & Arduino micro controller built in.
Open source, 8000 lumen, ultra bright LED light pad with Electric IMP WIFI, Atmel AVR & Arduino micro controller built in.
225 backers pledged $94,482 to help bring this project to life.

A little info on programming the Lumapad

Hello Kickstarter Backers,

Lumapads have started to ship and people are asking how to write their own code.  Remember, if you don't know how to read schematics, flash Atmel chips and load hex files via AVR dude or Arduino, I do not recommend messing around.  I will be providing the factory hex files on the Lumapad website for those of you who need it but in most cases the factory software should be fine as-is.  If you do accidentally erase everything, an AVR ISP can be purchased to flash the factory software.  I recommend this for anyone trying to write their own code even if you are using the Arduino programming environment.  Remember to set the chip selection to Arduino "uno" in the compiler.  Once you erase the factory firmware, the only way to get it back in is via a hex uploader since I did not write the code in the Arduino language.  Don't worry, you can't break anything but be aware that you can  have a hard time getting the code back in if you have never done it before!

You do not need to load special software to use the electric IMP card.  All you need to do is ground (set to 0) IMP-Data1 to shut off channel 1 (16 LEDS) and ground IMP-Data2 to shut off the other 16 LEDS. PWM the IMP data1 and data2 lines if you want to dim either or both channels.  You will need to open an account on the Electric IMP Website, blink up your IMP and then write simple code to control these two data lines.  

The fan will still be controlled by the Atmel.  This is a design safety feature.  The Atmel will always monitor the temperature and control the fan as long as factory firmware is installed.  You can not control the fan via the IMP for safety reasons.  There are multiple overheating safeties built into the Lumapad design due to the immense heat produced by this light.  If you erase the factory firmware in the Atmel chip, the onboard safeties will still protect from overheating but it is not recommended to run the Lumapad for long without the factory firmware installed or at least your own code with propper temperature monitoring written into the code.

If you want to control the fan or read temperature directly with the IMP, you will need to control PortB.0 (= fan off, 1 = fan on) via the Atmel chip and some Arduino code but you can also read some of the IMP lines via the Atmel so you can do a pass through or very simple code. The circuit is designed so that grounding any of the many control lines will do the same things so you have lots of options.

If you decide to write your own Arduino (Atmel) programs just control OC0a (PortD.6) and OC1a (PortB.1). Set to "0" (ground) to shut each 16 LED channels off or PWM these 8 bit counters to dim. Very easy in Arduino. Fan temperature is read via ADC6. The lower the 10 bit value, the hotter the light is. A binary value of less than 150 is the danger zone. Fan is controlled by PortB.0. Shut fan off by setting this port to "0" (ground) 

That's it! All the software is installed already to control all this stuff and the hex file is on the Lumapad website should you accidentally erase it. Be sure you have a way to reload the firmware either by an Atmega AVR programmer or Arduino programmer. Remember, I wrote the code in hex so there is no Arduino file, I leave that up to you guys so be sure you know how to reload hex files before messing around!!!

I hope you all enjoy your Lumapads, a whole bunch of technology and time went into the design of these lights.  There is no brighter LED lighting system out there in this price range with all these features and intense illumination.

Remember, if you have no idea what this email means, don't change the factory firmware in the Lumapad until this makes sense!



    1. Missing avatar

      Cary Hull on September 28, 2013

      Hello all. I've created a forum on googlegroups for lumapad-users that anyone can join:!forum/lumapad-users

      Loving the lights so far. Got an AVR programmer and a few EI cards. Ready to start hacking. :)

    2. Richard Haberkern 8-time creator on September 14, 2013

      Welcome to the world of programming where it can take days to realize that one simple line of code was all that was stopping your Lumapad from working.

      The good news is that I fully tested the Lumapad functions and it is easy to revery back to the factory code. The Arduino control board was designed in a way that allows for safe manipulation of the lines without risking damage to the board. This feature can also be a nightmare to navigate on the schematic and what looks like simple control lines can become very confusing. If you aren't sure about how lines are wired or what components are installed / not installed, simply remove the board and take a look under a magnifying glass. People have already discovered that some of the resistors on the board are actually jumpers / switches and this design feature has even confused me. Sometimes, looking at the physical board goes a long way to understanding how everything works.

    3. Richard Haberkern 8-time creator on September 14, 2013

      Steve, If you look at the schematic and read all these notes here, you will see that there are only two lines that control all the lighting. IMP Data1 (PWMOUTA) and IMP Data2 (PWMOUTB). Grounding either of these lines will shut off 16 out of the 32 LEDs or one of the channels. The Atmel also is connected to these two lines via the two 8 bit OSC pins which is what I control the light with in my code.

      The only other control line is the fan on/off and board temperature monitor. Four pins total for data in and out. With the 8000S models, all the LEDs are in the same color spectrum to there are two 16 LED channels but no difference in color. On this unit, you simply dim both channels at the same rate to control brightness. With the dual color (6000D), you vary each channel differently to balance the color how you want.

      We discovered that the PWM from the Atmel may need to be shut off before controlling the Lumapad via the IMP so we added some test code via the updated hex file so that grounding PINC.5 will shut down the PWM outputs on the Atmel to allow full control via the IMP without interference from the Arduino (Atmel)

      People have started copying the features I wrote in my compiler and are porting them over to Arduino now. As the project progresses, much more code and info will be available. It is up to the community to make this happen and I am happy to say that many people seem to be jumping on this fun project.

    4. Steve Fish on September 14, 2013

      Sorry for all the chatter. After cold-booting the whole system, then reinstalling Scanner's flash code, I'm now able to get the light to respond. I suspect I had previously set the value of pin1 to 0 which relinquished control of the LEDs from the eimp. All part of the learning experience. :)

      Since Scanner's code changes the values for pin9 and pin8 but only turns off one set of lights on my 6000D, I was hoping there's still a way to change the values for both sets of LEDs in this Lumapad. If I can find a way to manipulate each individually, that would be fantastic. Any help there would be greatly appreciated.

    5. Steve Fish on September 14, 2013

      Well, crud. I'm not sure what happened, but now my Lumapad isn't responding to the eimp commands at all. I reverted back to the Hello World code they provide and even though the IDE says everything's ok, changing states in my browser (led=1 or led=0) no longer makes any change to the lighting on my Lumapad. It was working beautifully last time I shut off the Lumapad, but now it's not.

      If someone with a little more experience might be willing to help me get this back up and running, I sure would be grateful.

      - Steve

    6. Steve Fish on September 14, 2013

      I really appreciate what you're doing here, guys.

      I'm trying to delve into the eimp pin settings to manipulate the lights on my 6000D. Pin9 seems to control the 6400K color temp LEDs, but I can't figure out how to call the 3200K color temp LEDs. It seems the allowable range of pins is 1-9. I inferred from the notes below and Scanner's Github code that pin1 (when set high) can tell the Arduino board to allow the eimp to control the LEDs. Pins 3, 4, and 6 don't seem to exist, but manipulating the values of the others (2, 5, 7, and 8) as if they were LEDs doesn't seem to accomplish anything that I can see.

      Can anyone shed more light on this or possibly provide a guide/reference to manipulating the LEDs for a 6000D using the eimp? Even just a few simple examples might go a long way for me.


      - Steve

    7. Scanner Luce on September 13, 2013

      It is just a start but my code (for both the arduino side and the eimp side) is up at:

      Things I have plans for:

      o lightning mode (as in what the original firmware does) but via the eimp
      o new version of the arduino side so the fan is off unless it needs to be on for cooling
      o messaging between the eimp and arduino so can use the local switches and lights to feed in to the eimp control

    8. Tim
      on September 13, 2013

      Hey guys - I've started creating a "dummies guide to the Lumapad @

      Currently it's a list of stuff I've had to figure out so far - would very much appreciate any comments / contributions :-)

    9. Richard Haberkern 8-time creator on September 13, 2013

      Glad to hear you made progress with programming. Let us know what great code you come up with.

    10. Scanner Luce on September 13, 2013

      so a little update. I have not been able to program the arduino via the FTDI basic.

      But I can program it via the ISP header so I have been using that (using an AVR pocket programmer and the ISP Pogo adapter from sparkfun.)

    11. Richard Haberkern 8-time creator on September 3, 2013

      No, the Lumapad is 3.3V. All those settings in the Arduino environment are basically the same. I think they do that to confuse people like us but keep it simple for everyone else.

    12. Scanner Luce on September 3, 2013

      Ah. After looking at the control board and your explanation that part of the schematic makes sense now. Yes, RJA8 and RJB8 are indeed set to '1' and not '3'. Okay, that removes that confusion from the equation.

      Hm. My FTDI Basic is set to 3.3v mode. Would that make a difference?

    13. Richard Haberkern 8-time creator on September 3, 2013

      Scanner, the easiest way is to repeat my steps. Remove the IMP to be safe. Use the Arduino compiler, select the correct com port, either Pro Mini 8MHZ or 16Mhz (both seem to work), and write a few lines of code to turn on the red or green led. That will help make sure you are doing the same thing as me.

    14. Richard Haberkern 8-time creator on September 3, 2013

      Today was my final day of assembly and testing so you got me at a good time. This part is fun when other people are working along with me so I don't mind one bit. I can learn a thing or too just like you along the way.

      PD.0 and PD1 are only really connected to the USB.

      I see where you are confused. It looks like there are two 150 ohm resistors tied together at RJA8 and RJB8. This one got me too. I do the main design but have an electrical engineer that finishes up my work. He sometimes overcomplicates things. If you snap your Arduino control board out by removing the one scree and taking off the side green panel to make it easier to remove, you will notice RJA8 and RJB8 are really like switches and the resistor is only across pins 1 and 2. pin 3 on both jumpers is missing (TXD and RXD) This is an area for the user to change if they want.

      From the factory, DAT1 and DAT2 are connected only to PWMOUTA and PWMOUTB unless your unit is special but it would be hard for the machines to lay one resistor on top of another on the same pad!

    15. Scanner Luce on September 3, 2013

      Remove plastic header: Yup!

      Basically when I either directly use avrdude or go through the arduino ide you can see that the lumapad gets reset (the bi-color LED attached to PC3 and PC2) turns off.

      You see RX on the FTDI basic pulses once.
      You see TX on the FTDI basic pulses three times.
      The bi-color LED turns on (green)
      Then the RX light on the FTDI basic goes on and stays on (and avrdude just hangs with the aforementioned error: ("avrdude: stk500_getsync(): not in sync: resp=0x00")

      (the command line I am using for avrdude is: "avrdude -pm328p -cstk500v1 -P /dev/cu.usbserial-A601LPHF -Uflash:w:Lumapad8000S_V2.hex:a" )

      I have to apologize for taking up so much of your time. Since it is working for you there must be something I am doing wrong (this is all on OS X.. but I have programmed many an arduino, including ATTiny85's.

    16. Richard Haberkern 8-time creator on September 3, 2013

      Scanner, I just did a bunch of tests with no problems found. If I was you, I would write a simple few lines of code in Arduino to blink the green or red led and then compile/upload it via the USB. Once that works, you are home free. That's how I tested it here and also how I got the hang of the Arduino environment when used in Lumapad.

      This stuff isn't easy to figure out and can drive you crazy. I spent 12 hours trying to figure out the PWM via Atmel only to find I was using timer 2 instead of timer 0. Ten seconds to change the code, twelve straight hours to find an obvious mistake on my end!

      I guess that is the fun with stuff like this.

    17. Richard Haberkern 8-time creator on September 3, 2013

      OK, as long as the IMP has no code in it, you don't need to remove it to program with the Arduino. I just tested it with the Arduino set to Pro Mini. The issue may be with the hex file loading via AVR dude. I guess someone will need to write some Arduino code so we can get rid of my hex file!

    18. Richard Haberkern 8-time creator on September 3, 2013

      Scanner, I have heard about issues with AVR Dude and it saying "failed" or out of sync but still working. I just tried to load a basic LED on/off code into the Lumapad using the Mini Pro 8MHZ and 16MHZ - both seemed to work fine. The UNO setting gives the out of sync error. I used the UNO code but it really is based on the Pro Mini so try that setting.

      There is nothing in the schematic that I see that would stop the programmer from working as long as the IMP is removed. I will try installing the IMP and see what happens.

    19. Richard Haberkern 8-time creator on September 3, 2013

      Haven't tried this new version but grounding PinC.5 (DAT3) should shut off all PWM from Atmel and leave lights at full brightness. No buttons will function.

    20. Richard Haberkern 8-time creator on September 3, 2013

      Did you remove the little plastic support on the six pin header? The pins won't make contact without doing that. Kind of a pain but I didn't want the pins sticking out the back.

      I fully tested Arduino bootloader so I know it works.

    21. Scanner Luce on September 3, 2013

      Huh. Interesting that you can program it using the Arduino suite at all. I get the same error whether the eimp is plugged in or not.

      And you can see on the FTDI basic that the "RX" light is stuck on constantly once you try to upload a sketch to it (granted, the arduino suite is imprecise about what arguments exactly it is invoking avrdude with.)

      I figure in newer versions of the firmware if the eimp raises pin 1 high (DAT3-/SS in the schematic) which is connected to PC5-ADC5-SCL) it is a signal to the atmega to go hands off on the two PWM channels.

    22. Richard Haberkern 8-time creator on September 3, 2013

      If you want, tell me which pin you want me to monitor and I will change the hex so it shuts off the Atmega PWM when pulled low. We can make that the first upgrade firmware.

      I know the Arduino programmer works if you slide out the IMP because I already tested it. I never tested with the IMP installed but I don't think that will be a big issue if we change the code so the PWM in the Atmega shuts off and is only used to monitor temperature when the IMP is in control

    23. Scanner Luce on September 3, 2013

      Actually I was wrong about how to get the lumapad with the default firmware to be able to be controlled from the eimp:

      All you need to do is after a power up or a reset, while in the first mode, press the "down brightness" button until the LED's are fully off.

      Then the eimp code will have priority over the PWM channels.

      So no need to pull and reset the eimp. But you still need to do this ever time you power cycle the lumapad so I am still going to be looking at replacing the atmega code.

    24. Richard Haberkern 8-time creator on September 3, 2013

      Just pull the IMP card when programming. I think my engineer did it that way to allow true hardware uart. Easier than using a soldering iron!

    25. Scanner Luce on September 3, 2013

      Just an update.. it looks like you are using the same pins for rx/tx with the atmega chip as also the pins for the PWM.

      Not sure if that is the main cause but trying to program it via a FTDI basic connected to J7 is a no-go.

      Basically the reset is not long enough or the constant data on the RX line basically means that the arduino suite can not download stuff. You always end up with a:

      'avrdude: stk500_getsync(): not in sync: resp=0x00'

      error (and then it will basically hang until you reset the lumapad or unplug the FTDI basic.)

      I guess the next step is solder in a 2x3 header on to J5 so I can program it via the ISP pins.

      I have found one way to give the eimp priority over the PWM channels is to basically remove power from the unit. Remove the eimp card. Restore power to the unit and then re-insert the eimp card. After you use the buttons to fully dim the lumapad you can then control the lumapad's LED channels via the eimp.

    26. Scanner Luce on August 28, 2013

      Okay. I was a bit confused because you had two hex files for download (not at home so I can not try stuff yet) but you explained that now. Thanks. B-)

      I have the FTDI basic (and am setup with avrdude, as well as the basic arduino env. so I should have no problem then.

      I already cut out the 'sticker' cover over the AVR ISP header so should be all set to go now. Thanks.

      BTW my code will be appearing up at:

      (it has the eimp code you saw below.)

    27. Richard Haberkern 8-time creator on August 28, 2013

      No, the Arduino firmware is already in the Lumapad. If you know how to load hex into Arduino (I think AVR Dude allows it), then you only need a USB serial converter as a programmer. One like the FTDI basic from Sparkfun. You need to carefully remove the little black plastic spacer on the USB six pin header so the wires make contact This is only there to hold the pins during manufacturing.

      When I write code, I use the 6 pin AVR ISP, test it and the save the hex file. I then load the UNO bootloader into the chip, save the fuses as "FF,D6,FF" and lockbits as "CF". This then makes the Lumapad board an full UNO. I then load the saved AVR hex file via the Arduino USB cable. Once this is done, I can then read back the entire chip contents and create a combined UN0 / Lumapad Hex file for manufacturing. The files are on the Lumapad website as two separate pieces (UNO/8000S)

    28. Scanner Luce on August 28, 2013

      Oh another question - in order to program the lumapad from the arduino environment I need to flash the 'Lamapad_uno.hex' file via the ICSP header on to the lumapad first, correct? (and to go back to the factory firmware - 'Lumapad8000S_V1.hex', obviously)

    29. Richard Haberkern 8-time creator on August 28, 2013

      I tried to think of every variation in the design. If I get some time, I will add a simple logic pin to my hex firmware so when you pull when of the IMP lines low, the Atmel goes into Hi-z.

      I wish I had thought about this sooner but there are a lot of things to do at the moment. I am going to be teaching myself Arduino code but I have been doing commercial firmware for so long that I really have a knack for speed and reliability. Switch platforms will take time for me to get a hang of it and Arduino has very limited functionality in my opinion compared to C, hex or even Bascom which is my favorite.

      Look forward to seeing what Scanner comes up with!

    30. Scanner Luce on August 28, 2013

      Thanks for the info. Out of the box I was expecting to have to write arduino code to interface between the imp and the lumapad. Hopefully I will have time in the coming week to get it working.

      In theory it should be pretty simple to do what you described. Will add more comments here as I learn things and in the future will point to my github repository for the code instead of gumming up this with lots of unformatted code. B-)

      Keep shipping and enjoy the design conference you will be attending!

    31. Richard Haberkern 8-time creator on August 28, 2013

      Scanner, Please keep us all up to date on your progress.

      I have been reviewing the design and I may be incorrect in assuming the IMP will work directly without worrying about the Atmega. The I/O pins in the Atmega may be pulling up the two driver lines and when you try to ground them on the IMP, they are not pulling the voltage low enough. When we designed it, we anticipated every possible variation but I guess we assumed people writing IMP code would write their own Arduino code too! If i wasn't so busy filling orders, I could take the time to come up with some improved code but I think it is really time for the backers to get involved anyway. After all, that's why the Lumapad was made as an open source design for developer.

      Some notes:

      I think the way to solve this issue would be to erase the Atmel firmware so all the I/O lines go into "Hi-Z" but then you would lose the extra thermal safety shut down. It would be best to write some simple Arduino code to at least read the ADC and then shut down everything if the 10 bit value goes lower than 150. 155 - 180 is the normal temperature range (ADC value) at full brightness.

      I think the first thing that may need to happen is that you begin by writing some new Arduino code to function like my factory code. You can then have the IMP talk to the Arduino code for full functionality and real WiFi code.

      This is the whole point about my designs. It is interesting and fun to get the community involved in creating new ideas and uses for my products. I also enjoy watching people with different or even better skills than me improve the things I make.

      Please be sure to share your code with the community here on what is now the unofficial forum page for Lumapad.

    32. Richard Haberkern 8-time creator on August 28, 2013

      Remember that there really are only two control pins for the LEDs. Channel 1 (PWMOUTA) and Channel 2 (PWMOUTB) each have multiple control lines.

      You may have an issue with the Atmel PWM output fighting one of the channels. Make sure you have the pushbuttons at full brightness too.

      Basically, grounding any of the pins shut off the LEDs. All other logic states are ignored.

    33. Richard Haberkern 8-time creator on August 28, 2013

      Not really the right place to post code but I guess it is as good as place as any.

      I would just start by setting both IMP 8 and 9 to "0". That's the same thing I do in the Arduino code and it worked fine. The analog pot controls the overall brightness is should just be left at full brightness when writing code.

    34. Scanner Luce on August 28, 2013

      Hm. I must be missing something. It seems that the knob over-rides my ability to set the brightness of one of the channels (when trying to control it via the electric imp)

      Been futzing with different things for a couple of hours now. I can control the channel on the electric imp pin 8, but not the one on pin9.. except for one point I somehow managed to turn off the channel on pin9 and had to power cycle it to get it to come back on.

      My code looks like this:

      imp.configure("AS LumaPad 01", [], []);
      server.log("Hello from the lumapad");

      led_chan2 lt;- hardware.pin9;
      led_chan1 lt;- hardware.pin8;

      // led_chan1.configure(DIGITAL_OUT);
      // led_chan1.write(0); // working
      // led_chan2.configure(DIGITAL_OUT);
      // led_chan2.write(0);

      led_chan1.configure(PWM_OUT, 1.0/500.0, 1.0);
      led_chan2.configure(PWM_OUT, 1.0/500.0, 1.0);

      chan1_bright lt;- 0.0;
      chan2_bright lt;- 0.0;
      imp_control lt;- "off";
      going_up lt;- 1;

      function chan0_set(value) {
      if (value == "off") {
      imp_control = "off";
      server.log("Turning http control off");
      } else {
      server.log("Turning http control on");
      imp_control = "on";
      local v = value.tofloat();
      if ( v > 1.0) {
      v = 1.0;
      if ( v < 0) {
      v = 0.0;
      // write a floating point number between 0.0 and 1.0, where 1.0 = 100% duty cycle
      server.log(format("Setting channel to %f",v));

      function loop() {
      if (imp_control == "on") {
      if (going_up == 1) {
      chan1_bright += 0.1;
      if (chan1_bright > 1.0) {
      going_up = 0;
      chan1_bright = 1.0;
      } else {
      chan1_bright -= 0.1;
      if (chan1_bright < 0.0) {
      chan1_bright = 0.0;
      going_up = 1;
      imp.wakeup(0.05, loop);
      agent.on("chan0_set", chan0_set);

    35. Richard Haberkern 8-time creator on August 27, 2013

      *****Model 8000S Modes*****

      Normal - use up/down button or knob for dimming
      Stealth - Runs silent, fan turns on if LEDs overheat.
      Fire - Simulated fire, up/down buttons control speed
      Lightning - Random lightning flashes
      Strobe - up/down buttons control flash rate

      *****Model 6000D Modes*****

      Normal - use up/down button or knob for dimming
      Stealth - Runs silent, fan turns on if LEDs overheat.
      Fire - Simulated fire, up/down buttons control speed
      Lightning - Random lightning flashes
      Strobe - up/down buttons control flash rate
      Hold "mode switch" for 4 or more seconds and LED will turn orange to indicate color temperature adjustment mode.

      Up/down buttons will dim or brighten channel one (1)
      Hold "mode switch" and Up/down buttons will dim or brighten channel two (2)
      Hold "mode switch" for 3 seconds, fan will toggle on and off
      Exit to main mode by holding "mode switch" for 4 or more seconds.

    36. Scanner Luce on August 27, 2013

      Thanks! That is all I needed to know!