|
|
Copenhagen, Denmark
Offline
God Member
Karma: 18
Posts: 842
Have you testrun your PDE file today?
|
 |
« Reply #1 on: January 18, 2013, 11:22:11 am » |
What voltage does the battery supply (how many are in series)? Do you have a multimeter capable of measuring the current? (That is really the key question to if the Mega can supply all.)
Otherwise it is fairly easy to use a driverchip (one that is a simple "amplifier" for each pair of wires)
|
|
|
|
|
Logged
|
|
|
|
|
Switzerland
Offline
Faraday Member
Karma: 69
Posts: 3310
|
 |
« Reply #2 on: January 18, 2013, 12:01:09 pm » |
The manufacturer claims that the candle lights work for 120 hours with one CR2032 battery. Such a battery has a capacity of about 225mAh which means the average consumption must be below 2mA at 3V. Driving 50 of them results in 100mA of current which should be possible for the Mega, even on 3V3. You cannot drive them by the GPIO (digital outputs) directly because they supply 5V and not 3V, you have to use at least a transistor for each.
|
|
|
|
|
Logged
|
|
|
|
|
Copenhagen, Denmark
Offline
God Member
Karma: 18
Posts: 842
Have you testrun your PDE file today?
|
 |
« Reply #3 on: January 18, 2013, 12:09:52 pm » |
Nice bit of detective work, pylon. So now dblejeune just needs to use a LED-Resistor calculator to limit the current (and thus drop the voltage)and hope that works. At least it is worth a test.
|
|
|
|
|
Logged
|
|
|
|
|
Switzerland
Offline
Faraday Member
Karma: 69
Posts: 3310
|
 |
« Reply #4 on: January 18, 2013, 01:01:50 pm » |
So now dblejeune just needs to use a LED-Resistor calculator to limit the current (and thus drop the voltage)and hope that works. If the candle light is just one LED, this is correct. It's claimed that they flicker in some kind and that sounds like an electronic circuit controlling multiple LEDs. That would mean the current consumption is probably not constant and you cannot just use one resistor to have a constant voltage. Just my two cents  .
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 9
Arduino rocks
|
 |
« Reply #5 on: January 18, 2013, 01:09:22 pm » |
So, one of you said resistor, I understand how that works. The other said transistor, which I don't understand. Could you elaborate please? Thanks a lot guys.
|
|
|
|
|
Logged
|
|
|
|
|
Copenhagen, Denmark
Offline
God Member
Karma: 18
Posts: 842
Have you testrun your PDE file today?
|
 |
« Reply #6 on: January 18, 2013, 01:29:59 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Dubuque, Iowa, USA
Offline
Edison Member
Karma: 13
Posts: 1546
|
 |
« Reply #7 on: January 18, 2013, 02:19:21 pm » |
I was at a get together at a friend's house and he had a bunch of these lights (paid ~$8 at Sam's Club for 24, plus an extra battery for each!) and suffice it to say disassembly was a top priority. Inside it's just a battery, a switch, and the LED. The LED contains whatever circuitry/design is required to make it flicker. I can't find any of these LEDs with a datasheet for more detail, but I see that EvilMadScience sells them .. as well as eBay, pretty much everywhere... 50 LEDs at 20ma (total 1A) is going to be too much for the Arduino to power. If you want to switch them individually then you should use something like a 74HC595. If you want to put them into a few large groups then Msquare's link above is a good choice.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 9
Arduino rocks
|
 |
« Reply #8 on: January 18, 2013, 02:34:12 pm » |
So, the shift register actually looks like a really nice way for me to accomplish what I want to do. Basically all lights are on, then they go out in a chase sequence. So, each of my shift register outputs would have a transistor that feeds power to the candles from a separate power source?
|
|
|
|
|
Logged
|
|
|
|
|
Dubuque, Iowa, USA
Offline
Edison Member
Karma: 13
Posts: 1546
|
 |
« Reply #9 on: January 18, 2013, 03:44:43 pm » |
If you use a TPIC6B595 then you will not need any external transistors (chip is capable of 150ma per output or 500ma total). You still need a resistor. If you use a TLC5916 then you will not need any output resistor (one resistor per chip sets output current).
There are lots (LOTS) of "shift register" type chips to choose from.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 9
Arduino rocks
|
 |
« Reply #10 on: January 18, 2013, 04:21:21 pm » |
Cool. Checking those out now. Would the voltage input for the shift register need to come from a different power supply, or would I be able to use the 3v from the Arduino?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 9
Arduino rocks
|
 |
« Reply #11 on: January 21, 2013, 10:15:25 am » |
So, will the 3v provided on the board be enough? Or is it subject to the same limitations as the outputs?
|
|
|
|
|
Logged
|
|
|
|
|
Copenhagen, Denmark
Offline
God Member
Karma: 18
Posts: 842
Have you testrun your PDE file today?
|
 |
« Reply #12 on: January 21, 2013, 10:47:26 am » |
There are other pages on this site, other than the forum, you know. One, quite easily to get at from the front page, "Products" show the basic specifications: 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15340
Measurement changes behavior
|
 |
« Reply #13 on: January 21, 2013, 11:01:25 am » |
There are other pages on this site, other than the forum, you know. One, quite easily to get at from the front page, "Products" show the basic specifications: 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
Actually the maximum current draw specification for a shield's 3.3vdc pin is a little complex due to legacy history. The current uno and meg2560 boards have a on-board 3.3vdc voltage regulator that is certainly able to supply more then 50ma of current, 100-150ma is probably possible without issue. However older arduino boards that used FTDI USB serial converter chip used the build in 3.3vdc regulator inside the FTDI chip which did carry a 50ma maximum current specification and the FTDI chip could be damage if one drew more then that amount of current from the shield 3.3vdc pin. So what is a poor commercial shield developer to do? If they design a shield that draws more then 50ma from the attached control board's 3.3 pin then it would work for current Uno boards but might very well break older arduino boards that used the FTDI chip. That is why you will see that most commercial shield boards that require the use of 3.3vdc have their own on-shield 3.3vdc regulator, rather then draw current from the 3.3 pin. So the Arduino folks are taking the prudent position by stating that the maximum current to be drawn from the shield 3.3 pin should be limited to 50ma or less, more for legacy compatibility then a actual technical limitation on current arduino board designs. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 9
Arduino rocks
|
 |
« Reply #14 on: January 21, 2013, 11:03:55 am » |
Fair enough. I have practically no experience with this, so sorry if I'm coming off a bit noob-ish. Is it possible to just split off of the 5VDC power supply that is running the Arduino, and feed the input of the shift registers with that?
|
|
|
|
|
Logged
|
|
|
|
|
|