Project for an upcoming wedding

So I've been doing a lot of reading and research on my project and will give you as much info as I can hopefully without being too long winded. First I'll include a list of the materials I have ordered but not necessarily acquired so far.

http://www.amazon.com/gp/product/B00P2FX9WY?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00

This is my Arduino Uno. Arrived

Bread Board with jumper wires. Arrived

More jumper wires. Arrived

power supply. Arrived

http://www.dhgate.com/product/wholesale-new-500pcs-lot-super-bright-diffused/132094653.html#myaccount_orderdetail-1-null

LEDs not arrived yet sadly and I'm running out of time. Wish they would hurry up and get here from China. But where in America are you going to find 500 3mm diffused LEDs for $17. The biggest issue is the website doesn't give you the information needed to order the proper resistors. I'm hopping when they arrive they will have a spec sheet that will tell me what resistors to order. Unless there is a good range of resistor you all think would work well for them.

Substrate / vessel for LEDs and all components

What I would like to do is attach the LEDs to the paper lantern in a random pattern and then hang them from the reception tent. But I don't just want to have all the LEDs on at the same time. I've looked on the internet and seen schematics for wiring up an 8 x 8 matrix of LEDs in a premade display to the Arduino. They then control the display with a potentiometer. I can use the schematic to wire up the LEDs but I don't want to control the LEDs with a potentiometer. I want to turn on the power supply and have each paper lantern run independently. I also don't necessarily need to have 64 LEDs on each paper lantern. It will all depend on if it looks too crowded or not.

I'm hoping this is the best approach which you can all tell me better then I can. I'm looking to create a program that will randomly pick a column and a row pin on each run and turn on that LED. If the program should pick a PWM pin it will cause the LED to fade on then off. I basically want the LED's to blink slowly but randomly and fade in and out randomly. Each time an LED comes on it would stay on for a random amount of time not to exceed a certain limit. I want the blink rate to be random as well as the fade in and out rate. I'm basically looking for the LEDs to twinkle slowly like stars in the night sky. I want to avoid a strobe light effect

I've done computer programing before but a long time ago in basic and the first versions of c and c++. I was hoping someone had already written a program that sort of accomplished this and I could figure out how to modify it to fit my goal. Sadly all I can find are the programs to run the premade 8 x 8 displays. I've also seen the DIYs to build the cubes of LEDs and have them do cool animations. I'm thinking I might be able to modify one of those but haven't really looked at any of the programs on the internet yet.

I welcome any and all suggestions or code write suggestions. I'm not looking for the complete program dropped in my lap. I do also have a relative with much more coding prowess then I have.

Thanks in advance.

500 LED's? Let's suppose that you are going to operate them on average at about half brightness, or say 20 ma. apiece. Your talking 10 amps here, and I saw something above about a 9 v. battery power supply. That isn't even close. Also, in round numbers you have 19 i/o pins on the arduino. In the most efficient configuration, that could control a 10x9 grid, i.e., 90 LED's. You could do just about any number of LED's you wanted with shift registers in this plan, but I don't get the impression that your ready for that. But on top of all that, your going to have to string lots of wires, fairly long ones, which introduce more power losses.

Possibly, this could be done with some of the Adafruit neopixels, or similar, if you separated the strips to pieces that would reside in each lantern, and the wiring would also become much less arduous. But, neopixels are quite expensive, more power-hungry, and a chain of 500, if all you want is red, is a bit of overkill.

I think you might want to break this into several separate arduino-driven systems, but even then, the expense goes up quickly.

How long will you have to build this?

How far apart will the lanterns be? You can multiplex 8x8 leds on an UNO but you will need an external power supply to power the leds and a transistor and 2 resistors per led or a chip solution.

China to US free shipping takes 3+ weeks.

Care and feeding of leds.

I think you might want to break this into several separate arduino-driven systems, but even then, the expense goes up quickly.

Cheaper if standalone AVR’s are used instead of Arduino boards, but a LOT more work.

Thanks for the questions and responses. I’ll respond to any more as quickly as I can when not at work. I didn’t want to have all the lanterns strung together like a Christmas light set. So each lantern will have it’s own battery, bread board, Arduino, and set of LEDs. I figured I could wire all that up inside the lantern fairly easily or maybe not. I haven’t tried yet since the LEDs havent arrived yet. The latest shipping update from last week I believe claims that they have left the sorting facility or some such so who knows.

So the most number of LED’s I’ll potentially be running at once in a lantern will be 64 or 8 X 8. If I put up 10 lanterns that’s 640 LEDs and I only have 500 coming so most likely fewer LEDs per lantern. If the program where written correctly only one LED would be on at any given moment but the program would loop so quickly that it would create the semblance of lots of LEDs being on at once.

My fear though is that if a loop through the program only turns on one LED at a time that it will loop slow enough that it will end up looking like a follow the lit LED as it traces a pattern around the lantern. That’s obviously not what I want.

to re-phrase
1 lantern will have up to 64 led's
not all on at the same time and POV when on (persistance of vision)
random pattern
battery powered.

see CrossRoads site and posta bout MAX7219 daisychainable breakout board
http://www.crossroadsfencing.com/BobuinoRev17/

you can wire the direct but this board is done for you.
I would add a NANO to the back not an UNO

POWER : -------------
how many minutes do you want these to run ?
a 6 hour party, is 360 minutes.
you should be able to calculate power use, then the size of the battery

=============

sources for LED's
there are plenty of USA warehouses that can have a few thousand LED's in your mailbox this Saturday.

raidengl:
My fear though is that if a loop through the program only turns on one LED at a time that it will loop slow enough that it will end up looking like a follow the lit LED as it traces a pattern around the lantern. That's obviously not what I want.

I think you can turn any LED on and off over 1,000 times a second, probably faster.
so, unless you want it to looks like Times Square, you will need to slow it down on purpose.
if these are hanging, you can power from wires
if they are table displays, you could have batteries under the table.
if you expect them to be taken home as gifts, then you need to run from batteries.

At most they would run for 4 hours. I have to have this done by June 5th of this year.

raidengl:
At most they would run for 4 hours. I have to have this done by June 5th of this year.

two goals that I think can be met.
visit Crossroads and read about that board and that chip.
then search this site for that chip. it is what will light the LED's for you.
the software... that will need more discussion.

So they will hang from the ceiling in the reception tent and when I looked at it I don't think there where any outlets. Plus I want the people hanging these to flip an on off switch hang it then walk away.

I'll look at that board but I'm trying to keep the cost down. I would prefer to only have to order more arduinos and bread boards. I like the idea of an arduino mini because of the size. I worry that it doesn't have enough pins for an 8 x 8 matrix.

I'll need to attach the arduino and breadboard to something and then slip it through the hole in the top of the lantern. I did however just discover that there are breadboard shields for the uno. That would help with the size constraints.

My plan is to get one built and the program written and if it works the way I want and or has the look I'm going for I'll make the rest.

How to breadboard AVR chips, make your own Duinos.

Note that you can program AVR chips with your Arduino and on the Arduino site you are encouraged to roll you own end-products. This gives you direct access to

Sometimes DIP Micro (stores in US and Canada at Niagara Falls) have 328P's on sale which BTW for your project a 168P will suffice. If you're willing to use shift registers, an ATtiny might do. DIP Micro also sells very small AVR boards, the 168P Micro is often on sale for less than $3. Shipping from there in the US and Canada is 2 or 3 days.

The multiplex method will pull less current but the total brightness of leds at any moment is shared. Just turn a row pin (with resistor) HIGH with all column pins but one set to INPUT and that one set LOW and you will light up the one led. No chips needed, if you solder the resistors into the row wires then you probably don't need breadboards either.

With battery power, go for DC-DC Buck converters (under $2 for 3A max capacity) over 7805 type regulators. Regulators, like voltage dividers, dump excess voltage straight to ground. A 9V battery will deliver 5V through a 7805 and come out with a very weak current while a Buck converter will raise the current for 5% or less waste.. the battery will last almost twice as long.

I'd suggest no more than 16-24 leds per lamp. If you get them ready in time, maybe set some up with mics and leds that light up when certain sound levels are reached.

Thanks for the ideas GoForSmoke I know that there are all sorts of sensors that could be plugged in to make the lights do stuff and it is an intriguing idea. However I'm a woodworker by hobby and am building the cake stand for the wedding along with trying to sell my condo. I.E. I don't have a lot of free time so I'm not sure I want to get too wild and crazy with this maybe after the wedding is done I can play around a bit more and see how crazy or cool it can get. I think I'll stick to just making them blink and fade for now.

I like the tutorial that you sent me and while I could pull that off I'll stick to the premade boards for now.

I found this buck converter on Amazon

I'm assuming it would work just fine for what your talking about. The 9V battery holder I already bought has a built in plug adapter for the power port on the arduino. I can cut that in half then strip the wires and run them in to the in ports of the buck converter and the plug adapter in to the out ports of the converter and plug it in to the Arduino.

As for soldering my soldering iron is buried somewhere in my storage unit and I'd prefer not to dig it out unless I absolutely have to. Since these only have to work for one day my plan is to build them with jumper wires and bread boards.

As for the number of LEDs per lantern why do you say no more then 24. Do you think the wiring will get to complicated or busy or will more then 24 run the battery down too quickly even with the buck converter?

Get this buck converter instead; they're 1/4 the cost [Buck Converter] Also, forget using a breadboard in every single lamp. Use a strip board and solder components to it. [Strip Board] If you dont halve a soldering iron, here's a cheepo that should do you good enough [Soldering Iron], and if you'll need solder with that. [Solder]. The good stuff is full of lead, don't even worry about it.

I think what you're going, if i understand correctly, is a bunch of LEDs in one lamp fading in/out like stars and having several of these. You really want to keep costs down if your going to make a dozen of these, so using strip board and a cheaper buck converter will help. Also, get arduino nanos, you dont need the full capabilities of an uno. [Cheep Chinese Nano Clone]. Shipping will take forever, but you can use the arduino you already ordered to develop the program and when these arrive, you'll be ready to upload your code to all of them.

The nano has 6 PWM outputs and 6 digital non-PWM, so you could have a 6x6 matrix. I think 36 LEDs per lamp should be enough. When multiplexing a 6x6 matrix, you will only ever have 6 LEDs on at one time in reality, but it can appear as though they are all on. So you can plan for power consumption as if it were 6 LEDs.

How do you plan to set this up inside the lantern? Battery and board in the center with a skeleton of LEDs?

Also [On/Off Switches], if you need them only 5 cents each, ships with the boards and iron.

Tayda Electronics is my favorite, everything is super cheap and they usually ship from the US. Express shipping is cheap too!

You will also need 6 mosfets for each one [Mosfets] and a [10k Resistor] for each mosfet. Also a current limiting resistor for each column of LEDs. [150 ohms] will give close enough to 20ma, although you could probably get away with [130 ohms] for a bit extra brightness.

diffused 3mm LEDs like these? 300 for $15. Ships from Niagara Falls, typically just 2-3 days with USPS shipping.
http://www.dipmicro.com/store/LED3BD

Yes I want all PWM LEDs to fade in and out and all others to blink slowly and randomly. I think my biggest hurdle will be the programing to make that happen.

Griffin175 thanks for the links and forgive me for being lazy but what do the Mosfets do for my design? I like the on off switches but the 9volt battery boxes I've found have the on off switches built in to them. however I hate to break it to you but you might want to recheck your math on those buck converters. The one I found is $7.99 and yours is $9.30. I like the idea of the strip boards I'll just have to relearn how to solder. I haven't soldered in decades. I know the basics I'll just have to practice. The strip boards would keep the cost down but if I could keep the control core in a more vertical plane then it would be easier to slip through the small hole in the top of the paper lantern. I might be able to put together an L shaped substrate that I could attach everything to.

CrossRoads thanks for the link but I couldn't find a white 3mm diffused on there. But I already have 500 on the way they just need to arrive. The battery box I order came from the same website as the LEDs and from China and it arrived so hopefully fingers crossed.

I’m either going to attach the LED’s to the outside of the paper or inside to increase the diffusion of the light haven’t decided yet.

Sounds more like you need several WS2803 per group of LEDs. 18 outputs, each with separately controllable 8 bit PWM. Easy to dasiychain.
I’ve only seen them on e-bay, get them from the guy in Niagara Falls, have them next week.

WS2803-preliminary-En.pdf (437 KB)

Or a combination. One MAX7219 for 15-level PWM of all LEDs connected to it, and a 2 for on/offcontrol of other LEDs.
Or WS2803 256 level fade up & down and MAX7219 for on/off only, or 15 level brightness control of the LEDs connected to it.

That's 5 buck converters for $9.30, the one you linked was $8 for one. Mosfet are needed because the IO pins can't supply enough current to the LEDs without damaging the pin. At 5v and 6 leds with 150ohms each would draw 200ma. Too much for one pin. If you want to buy a bread board for every lamp you could, but soldering is not a difficult thing to do and it'll be far more stable reliable and durable soldered. There's a great short tutorial by Great Scott on YouTube. If you use an IC for multiplexing you probably won't need mosfets. You could also have more leds or a greater duty cycle.

All sorts of things going on here.

The LEDs are rated at 20 mA continuous, more or less. You do not need any other specifications.

If you want to light one at a time, then you have 16 available pins on the Arduino, so you can use an 8 by 8 matrix. It requires 120 Ohm resistors in each cathode common, or each anode common; one or the other.

If you want to light more than one LED at a time, then you want to use the MAX7219 pre-made modules from eBay. They come with a red matrix but it is more practical to buy these and ignore the matrix as you make your own.

You do not want to use UNOs, you want Pro Minis - again from eBay.

You do not use a 9V battery or regulator, you use a four AA cell holder with a series diode to break it down to less than the rated 5.5 V for the Arduino and MAX chips.

You cannot do this without soldering.

Do you want the eBay links?