Professional Documents
Culture Documents
by molecule13
I really wanted to make a little cloud that would light This is the first of three steps. The second part of this
up as though it was filled with lightning. After googling project will be adding bluetooth control, so I can
a bit, I stumbled upon "The Cloud" by Richard Clarks trigger weather patterns in the cloud via my phone.
on. It's a beautifully executed concept and I wanted to The third part will be automatically triggering weather
see if I could make one too. There are lotsofexamples patterns according to the day's weather report. I want
of "cloud lamps." What I like about mine is I built the an easy-to-use, "glanceable," aesthetically appealing
shape of the cloud completely from scratch, so I weather indicator for my apartment. Plus I've heard
wasn't left with a mostly round cloud (a common cloud computing is the hot new thing.... :)
problem). I'm also really proud of the lightning
animation I created. Stay tuned for those future Instructables!
https://www.youtube.com/watch?v=XxMMNcU-hWE
3. Polyester batting, 3/4" thick. It's easiest to pick out 4. Boning (like the kind used for corsets). I used a
batting by going to a fabric store in person to find the yard and could have found use for more.
right kind. You want batting that's about an inch thick.
Something like this, but I'd need to see it in person to 5. Needle and thread
6. Hot glue gun with the little battery backpack soldered on)
1
5 3
2 4
2 1 5
4
3
Using a piece of cardboard for the base, glue the how many lumps you want your cloud to have, and
boning to make the basic outline of your cloud. You the overall structure. You can augment later with
can make hoops with the boning - I found it was cotton balls, but this part will define the overall shape
easiest to sew the two ends of the boning together, of your cloud.
and then glue the hoop directly onto the cardboard. I
also tried leaving one piece of boning pointing out into Be sure to leave a little door in half of the cloud,
the air like ribs. Both methods worked fine. where you'll place the electronics. Make the part of
the batting that will become the door a little thicker
Rip your 3/4" batting in half, and hot glue it to the than you might otherwise. It's nice to have the extra
boning and the cardboard in tasteful, cloud-like folds. support.
At some points, it will be easier to gently sew the
batting to the boning to keep it in place. Keep in mind
Gently pull apart your cottonballs. I pulled apart about Drip hot glue directly onto the outside of the batting,
30 while my hot glue gun was heating up. The and gently pat your cottonballs into place. You don't
cottonballs themselves have a bit of a circular need to completely cover the batting. Since the
structure to them, and if you tear them apart carefully batting is white and a little fluffy, if some is showing
you'll preserve some of those whorls, which looks that's ok. I preferred to vary the amount of cottonballs
really cool later when the light shines through. You I was using so the cloud would be differing densities -
can also unroll cottonballs so they'll make longer, it's nice if the light can shine through more in some
stringier clouds if you want. places and less in others.
2
1
1. Unrolled cottonball
2. Unrolled cottonball
3. Pulled apart cottonball
First, you'll need to solder your LEDs into a long strand. I usually
take the easiest route of soldering male-male jumper cables directly to the Neopixels. The wires are flexible, the
connections are solid, and it's super fast and easy. No need to strip any wires! Test your connections as you go,
so you can quickly fix any issues. The basic circuit for this project is very simple. I'm building mine on a
breadboard for now, but for a more permanent project, you'll probably want to solder things together directly, or
maybe use a little proto board. With only 5 LEDs, you probably don't need a capacitor, but I always throw one in
anyway to be safe. The polarity of a capacitor matters. That means you need to plug it in correctly for it to work.
There are several ways to recognize the polarity of your capacitor.
The negative side should be connected to GND. The other side attaches to PWR.
Connect power, ground, and signal from your microcontroller to your LED strand:
As always, if you are new to soldering, I highly recommend Adafruit's Guide to Excellent Soldering.
https://www.youtube.com/watch?v=XxMMNcU-hWE
You can try different placements of the LEDs inside I wanted to be able to access the microcontroller, so I
the cloud. I ended up adding some cardboard pieces just temporarily hold the door closed with a pin
on the inside, because I wanted some parts of the through several layers of batting.
cloud to be a bit darker than other parts. I also left the
animation playing for a while, and glued on a few
more cottonballs wherever it felt right.
https://www.youtube.com/watch?v=Vh3HVOzsb7M
This is a great project that I was able to do in just a couple days (working nights)! I added an
adafruit powerboost and left a little flap of cotton so it can be recharged easily. The powerboost's
indicator light also gives it a low steady glow when the lightning isn't flashing.
Thanks for catching that! I just updated the instructions. I follow the best practices recommended
by Adafruit and used a 1000uf, 6.3V capacitor.
Hello,
First of al thanks for the awesome code! i am making a night lamp for a kid. I am using an encoder
with this. My ultimate goal is to make use of the encoder button to switch between programs and
use the encoder itself to change some things like color, intensity of the light or with this code the
frequency of the strikes! for one reason or another i am able to program the encoder on itself or
ether the neopixels. But together they do not seem to work... Maybe you can assist me in any
way? With this a picture of the project so far!
Kind Regards,
Yyov
I need help getting the program to load to my trinket Pro. I can load the "Blink" but when I try to
load Cloud-Lightning I'm getting an error. "exit status 1 Error compiling for board Pro Trinket
3V/12MHz (USB)
What am I doing wrong?
Hmm, well you're getting a compile error (I can tell because the message you helpfully provided
says "Error compiling for board"). That means that, as the compiler is trying to make the code into
machine-understandable language, something went wrong. To understand what, we need more
information! First, turn on the verbose messages for compiling in your IDE:
File->Preferences->Show verbose output during:. Tick boxes for compilation and upload.
Then try to compile again. You should get a LOT more information, and some of it will be useful :)
In particular, I'm guessing you're missing one of the libraries you need to install (or you didn't
restart the IDE after installing them). But we should be able to tell with more information.
Here is the full verbose compilation Thanks for the Help
Arduino: 1.8.3 (Windows 10), Board: "Pro Trinket
3V/12MHz (USB)"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs
-logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware
C:\Users\John\AppData\Local\Arduino15\packages -tools C:\Program Files
(x86)\Arduino\tools-builder -tools C:\Program Files
How to Make a Lightning Cloud: Page 9
(x86)\Arduino\hardware\tools\avr -tools C:\Users\John\AppData\Local\Arduino15\packages
-built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries
C:\Users\John\Documents\Arduino\libraries -fqbn=adafruit:avr:protrinket3
-ide-version=10803 -build-path C:\Users\John\AppData\Local\Temp\arduino_build_269669
-warnings=none -build-cache
C:\Users\John\AppData\Local\Temp\arduino_cache_672861
-prefs=build.warn_data_percentage=75
-
prefs=runtime.tools.avrdude.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-
arduino9
-
prefs=runtime.tools.arduinoOTA.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1
-prefs=runtime.tools.avr-
gcc.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-
atmel3.5.4-arduino2
-verbose C:\Users\John\Desktop\Lightning\cloud-lightning\cloud-lightning.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile
-logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware
C:\Users\John\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-
builder
-tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools
C:\Users\John\AppData\Local\Arduino15\packages -built-in-libraries C:\Program
Files (x86)\Arduino\libraries -libraries
C:\Users\John\Documents\Arduino\libraries -fqbn=adafruit:avr:protrinket3
-ide-version=10803 -build-path
C:\Users\John\AppData\Local\Temp\arduino_build_269669 -warnings=none
-build-cache C:\Users\John\AppData\Local\Temp\arduino_cache_672861
-prefs=build.warn_data_percentage=75 -
prefs=runtime.tools.avrdude.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-
arduino9
-
prefs=runtime.tools.arduinoOTA.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1
-prefs=runtime.tools.avr-
gcc.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-
atmel3.5.4-arduino2
-verbose C:\Users\John\Desktop\Lightning\cloud-lightning\cloud-lightning.ino
Using board 'protrinket3' from platform in folder:
C:\Users\John\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.9
Using core 'arduino' from platform in folder:
C:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20
Detecting libraries used...
"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-
arduino2/bin/avr-g++"
-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections
-fdata-sections -fno-threadsafe-statics
-flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803
-DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR
"-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino"
"-
IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs"
"C:\Users\John\AppData\Local\Temp\arduino_build_269669\sketch\cloud-lightning.ino.cpp"
-o "nul"
In other words random(chance) in English is: "a random number between zero and chance minus
one". So if chance is set to 10 it'll return a random number between 0 and 9, and if chance is set to
5 it'll return a random number between 0 and 5.
...then do the next thing. So, if you want to make it more likely all you have to do is make that
statement something that's more likely to happen. So if you want it to do a lightning strike 50% of
the time, you might change it to:
chance = 1
if (random(chance) == 0)
The only options for a random number between 0 and 1 are 0 and 1! So 50% of the time (on
average) you'll get a lightning strike.
The other thing you might want to change for a more "electricity" effect is the delay between strikes
(make the number here smaller): https://github.com/molecule/cloud-lightning/blob/v1.0/cloud-
How to Make a Lightning Cloud: Page 24
lightning/cloud-lightning.ino#L104
Or the delay between the flashes in the ligthningStrike itself (make the max number here smaller
too):
https://github.com/molecule/cloud-lightning/blob/v1.0/cloud-lightning/cloud-lightning.ino#L120
For this part, you'll really just have to mess around with the code until it looks like you want it to
look! I don't have any special knowledge that lets me design this: I just played around until I liked it.
I hope you'll share your changes with us when you're finished! I'd love to see a video of the
completed project. Good luck :)
[1] https://www.arduino.cc/en/Reference/Random
[2] https://github.com/molecule/cloud-
lightning/blob/c3af10c57ad2d1b4f775eebefa147384399d5827/cloud-lightning/cloud-
lightning.ino#L90
I juat want to say thank you for your instructable.except for the actual programming
part(installing/uninstalling drivers like crazy) everything went smoothly. Your code is amazing and
thank you for sharing. Only question i have is there a way to adjust colors of neopixels so they
flash different colors?
You're very welcome! I'm sorry the drivers were a challenge, but nice job on getting it all worked
out! And yes: there is a way to adjust the colors of the neopixels :) Here's the relevant line of code:
https://github.com/molecule/cloud-lightning/blob/m...
strip.Color is one of several methods used to change the color of a certain pixel! It takes either two
argument (as in my code, linked above), or four arguments (as in the Adafruit tutorial, linked
below). They're really the same: they just take the same arguments in different forms. Let's look
first at the four argument version.
The first argument is "n", the pixel that you want to change. The next argument is the red value, the
third argument is the green value, and the last argument is the blue value. When you're building a
color, you'll decide how much of that color you want to be seen for each LED. So, if you wanted to
make purple, you might pass in even amounts of red and blue, and zero green:
strip.setPixelColor(pixel, strip.Color(50, 0, 50));
Whereas if you wanted to do turquoise, or any kind of teal/blue/green mixture, you would pass in
some amount of green and some amount of blue, and zero red:
strip.setPixelColor(pixel, strip.Color(0, 20, 50));
All mixtures will create a color, you just have to experiment until you find the right amount of
mixture for the colors you want. Right now in my code, every value passed in to strip.Color is the
same:
strip.setPixelColor(pixel, strip.Color(scaledWhite, scaledWhite, scaledWhite));
That means the LEDs will flash white. I hope that this little extra bit of information helps you!
To learn even more, I highly recommend Adafruit's learning system!
https://learn.adafruit.com/adafruit-neopixel-uberg...
My daughter loves her lightning cloud. Thank you for the code and directions!
Awesome lamp! I made it successfully as my first ever electronics project. I used a UNO and it all
went very smoothly. Your code was so user friendly and I didn't have one issue. However......when
my lamp is powered off computer usb it works brilliantly. I bought a mobile power bank to use as a
power source for the lamp rather than the battery pack, and it does power the lamp but for only a
few minutes before it seems to switch itself off!? I've checked over the power bank and can't see
why it's doing it. Any ideas? The power bank is - 2600mAh 5V DC 1.2A output. Sorry, real novice
here.........thanks!
Hi! Glad to hear you had a good time and the code was user friendly.
For the power issue...the fact that it's switching itself off sounds almost like a safety
mechanism...are you shorting the power somehow? You'd need to post some pictures or a wiring
diagram (or both) to get more help, though.
Thanks for responding. You'll see my photos so hopefully that will show what I have done!
Apologies for not really knowing how to do a wiring diagram (yet?)! I have since purchased a
power adaptor for the arduino and it has been running fine! I am running 4 LEDs from the board to
clarify. Without knowing for certain ( which I don't) my concern was exactly what you suggested,
that I was somehow shorting the board out. I checked all my connections and couldn't find a
problem and so tried the power adaptor and all seems fine. I do wonder if there can be an
intermittent supply drop from the usb external battery? I'm really just guessing though! And that
could have been enough to stop powering the unit? Anyway, take a look and let me know you're
thoughts! Many many thanks for your time and input!
Sorry this response is so late! I just now found out that Instructables doesn't seem to email you
about every comment, so I didn't realize a lot of these were here until just today.
Anyway, in your picture I can't see where the red, green, or yellow wires are going. I'm suspicious
that the green and yellow in particular are not hooked up correctly. I'm also very concerned that
you don't seem to have any wire connected to ground. Can you post a picture with the entire circuit
visible? (Or maybe by now you've moved on, which would be understandable :) ).
Wow! Thanks for replying after such a long time. I have moved on but only after I sorted the power
issues I was having and put the cloud into a mains adaptor! I think the power bank I had was faulty
which led me down a dark path for a while! Pardon the pun. I love my cloud though and all credit to
you for your amazing posts. It was very straight forward so thank you very much. I'm still a novice
but certainly a lot more confident in trying things out now!
Just something I've noticed:
Many USB power banks shut off if the draw is too low after a minute or two. Put a phone or
something else on the bank and see if it stays on.
I can almost guarentee that the cloud is drawing so little current that the power supply is switching
off because the load detector isn't tripping.
Have you made any headway on your goal of adding a speaker or "weather for the day"? This is
amazing on it's own, but I'm imagining a thunderstorm at night for an hour or two, then a "weather
Yes I have! I expect the final instructions for the "weather cloud" will be up by next weekend for
sure. One change is if you want to control the lightning cloud over WiFi, you'll want to use
something called the Particle Photon. It's a very easy to use board, and would replace both the Pro
Trinket and the Bluefruit modules. (Initially I was thinking I'd need the Bluetooth in place to talk to
the Arduino board, but with the Particle Photon everything is combined into one convenient place.
Even if you decide you don't want to hook up your lightning cloud to the Internet, you can control it
via the Photon just as easily. Here's where to order it one, and I'll post versions of the code that
work on the Photon soon:
https://store.particle.io/
I am also interested in the weather cloud idea and about to build a massive (70+ cubic feet)
lightning cloud. Since it's being installed in a dark hallway roof, it'd be nifty if I could perform effects
aside from lightning. Did you make any further progress toward this, or do you need any help?
Do you have the"Weather Cloud" instructions up yet? This is awesome!
Id love to try this out as well!!!... till then Ill be ironing out my issues with no lights flickering yet =/
Dumb Question: If you used an Arduino Uno to display the lightning effects in the video, how did
you transfer the code to the Pro Trinket?
In the video of the cloud, I was using a Pro Trinket!
Also, it's not a dumb question but I'm not sure I totally understand it well enough to give a good
answer. Here are some guesses about what you mean, and answers:
Do you mean why does the code work on both? Many different Arduino board are compatible,
meaning the same code will work on different boards. In some cases you need to change pins, or
remove functionality that isn't there, or shrink the size of the sketch for a smaller board, but for the
most part the same code will work everywhere. That's the case here: this code will work without
changes on both the Pro Trinket and the Uno.
Do you mean literally how do I transfer it? The code lives on the computer, so to put it onto a Pro
Trinket, I just plug the pro trinket into the computer and hit "upload".
Feel free to ask follow-ups if I didn't understand your question the first time!
Hi, have a problem and cant open die .ino from u...
By others have never a problem .u know what is it ?
Want use a Arduino Uno.
best regards
He have a Problem by launch4j ???
fun stuff
Love it! Fun idea with the black spray paint. Thanks for sharing your cloud!
Just ordered the necessary electronics for the project and i have high hopes for the outcome. I will
need some help with the coding as i have only built small electronics from kits such as radios and
the electronics of a guitar. I will be posting soon once i get my electronics and i would love some
help and feedback. The cloud looks great by the way. I can only hope to get close to that.
Will be happy to help! Look forward to seeing your finished product :)
Im new to electronics and programming and all of this is super overwhelming but I'm hanging in
there.
I need your help though (sorry if this is super basic)
I've downloaded the arduino side and have configured the pro trinket 3v board option.
What programmer do I use?
Do I simply copy and past the code and hit upload?
When I click verify it gives me this error: "Documents/Arduino/Test1/Test1.ino:1:31: fatal error:
Adafruit_NeoPixel.h: No such file or directory
#include <Adafruit_NeoPixel.h>
^
compilation terminated.
Hmm ok, well I'm not sure. It does look like you have the wires going the right places, but one
funky thing is that you have the headers to the Pro Trinket on "upside down". See the black plastic
part of the headers? That should be UNDERNEATH the Pro Trinket.
I'm wondering if they're not sticking all the way in to the breadboard,
which means you're not getting a connection to your LEDs. That would prevent things from lighting
up!