Battery options to power Arduino + 24 PWM LEDs.

Discussion in 'Embedded Systems and Microcontrollers' started by EnjoyIce, Mar 1, 2016.

  1. EnjoyIce

    Thread Starter New Member

    Jan 13, 2014
    25
    0
    Hi guys!

    I am working on a project that requires me to use 12 bicolor LEDs (so 24 LEDs total). These lights are providing stimulus to 12 'subjects'. So the user can control which colour each light is and its brightness etc and we're looking to achieve 12 hours run time.

    The LEDs I am using are these: http://www.lc-led.com/products/lc led-n300tby2d.html

    And the circuit is this https://dl.dropboxusercontent.com/u/100324079/LEDMultiplex.png (Each Blue+Yellow combo is one bicolor LED)

    We would like to be able to power the circuit for 12 hours so in order to calculate what batteries we would need ... I don't know! I've never done anything like this before (I'm learning electronics!).

    The LEDs take a maximum 30mA each, so would we need to add that up for a total current (current is the same through things in series, but since its multiplexing, the circuit switches through each LED in cycle so would we need to have 30mA * 24? Or just 30mA in general?

    I know batteries performance degrades over time, so I was looking at these type of batteries:
    http://www.ebay.co.uk/itm/Lucas-12V...941675?hash=item2ec55165eb:g:Z8oAAOxy87tSFQ-v

    The Arduino requires between 7V->12V supply input which it regulates to 5V. I believe 20Ah should be enough.

    I'm sure I have all the info I need on the datasheet to figure this out but I'm struggling to get my head around it!

    Thanks in advance!
     
  2. TheButtonThief

    Active Member

    Feb 26, 2011
    219
    38
    I once measured the current consumption of my Arduino UNO while it was running code but with no high outputs and it was drawing a little over 25mA which isn't very much. However, there are circuits on the board that are superfluous unless you're developing and they consume current too, so if your project relies upon battery power, think about using ONLY the chip in your project. After all, the Arduino is a development board and the chip is the micro controller, why use the whole board? Put the chip onto some strip board and it'll consume a lot less power.

    With your LED's muxing 4x3, only a max of 4 are going to be high at any given time and so max current draw per cycle is 30mA*4 =120mA

    Lets assume you DO use the Arduino (instead of just the chip); 120mA+25mA=145mA. At this point, the battery you require would need to be no higher that 1740mAh in capacity (0.145*12=1.74), however you can probably get away with 1500mAh as your LED's are pulse width modulated and so aren't on the entire time during each mux cycle.
     
  3. Evanguy

    Member

    Dec 21, 2014
    81
    8
    You wouldnt want to run the battery to dead, well depending on the type but if you used a lead acid 12v deep cycle you would want probably 3 times the amp hours needed. so maybe a 5HA battery. i would use the battery you have linked in your first post

    That 5 ah i said was based off the math in the post above mine. long story short you want about 3 times your required ah for slecting a battery
     
    Last edited: Mar 1, 2016
  4. TheButtonThief

    Active Member

    Feb 26, 2011
    219
    38
    Does it have to be SLA? 4 AA's would do the job nicely, they're not as expensive or as space consuming.
     
  5. EnjoyIce

    Thread Starter New Member

    Jan 13, 2014
    25
    0
    I will be using the whole Arduino (for this version anyway) but that is an interesting point I can take forward in the future!

    Ok, so its fairly simple in that sense. Since its 4x3, it'll be 4x30. If I theoretically had them all on at once .. 24*30=720mA? So theoretical maximum would be 720*12 = 8640mAh. Which means the battery I linked is more than double what I would need .. if I somehow had all LEDs on at max for the full 12 hours?

    But as battery output degrades (current drops etc) while it is used .. would it be best to go for more? Like Evan said.

    It doesn't have to be SLA at all! That just seemed like a viable option when I found it. 1740mAh requirements would mean something like this would be fine right? http://www.amazon.co.uk/Energizer-2000mah-Rechargeable-Batteries-Pack/dp/B000IX2GD8 - 4 of those gives 8000mAh, so would give me headroom as Evan mentioned. Although if we had all lights on at once .. I'd need something like 16 of those AAs to give me the headroom?

    Thanks for your replies guys!
     
  6. TheButtonThief

    Active Member

    Feb 26, 2011
    219
    38
    If you're muxing, how can you have them on all at once? If you were able to have them on all at once as well as individually, why bother muxing at all? On a 3*4 matrix, the most amount of LED's you'll have on at once is 4.

    Also, 4*2000mAh batteries would give you 8000mAh if connected in parallel but only supply 1.2V. You'd have to connect those batteries in series to achieve the voltage you require. 4*2000mAh batteries in series would provide 2000mAh of current but you'd get a 4.8V supply (the Arduino will work with this supply voltage)

    Muxing is a tricky concept to grasp and what I've had to clear up here are day-1 basics, programming a matrix display is far from simple, I wonder how you're going to do it.
     
  7. EnjoyIce

    Thread Starter New Member

    Jan 13, 2014
    25
    0
    I understand that in a 3x4 matrix, the most we can have on at a time is 4. I'm just checking that my understanding of the calculations is correct by calculating it for all lights. (I ask a lot of probably silly questions .. its just my way of making sure I understand things!).

    I have actually already created some software on the Arduino that controls the 12 lights allowing you to choose what colour they are (or both colours at once), the brightness (10/20/30% etc), the duration they are on for in total and timings for an on/off flash, all individually for each light. It all works, but this is obviously powered by being plugged into a laptop at the moment!

    Going for the AA batteries would be preferable as it will take up less space .. however to achieve the needed current/voltage, we would have to do some mix up of parallel and series?

    As a basis, for 5+V and the required ~8000mAh. We would need 4 columns of batteries, each column being 4 or 5 deep? so 4x4 or 4x5 (the columns being connected in parallel, rows in series). I say 4 or 5 deep since 4 would give ~4.8V and 5 would give ~6V. Since the Arduino usually takes a bit more than 5V, it would be best to go for 5 deep?

    Is there anything to look out for when connecting batteries in such a configuration (with quite so many)? I've been looking around online and most examples only use 2x2 or 2x3 but don't mention anything to particularly look out for. (apart from the usual don't mix battery types and things).

    Thanks again!
     
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I don't get this. As shown in the diagram, the LEDs will be lighted in sets of 3, i.e. B1, B2 and B3 all on or all off, and likewise Y1, Y2 and Y3. The members of each set of LEDs are wired in parallel, which is a dubious way to do things, though if they're identical parts purchased at the same time, it'll probably work. If the LEDs were wired in a matrix, shouldn't there be 24 of them for electrical purposes, not 12, since they're dual units?
     
  9. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Just read the thread within the last few minutes and I noticed the same thing. The diagram presented is not a matrix, nor is it multiplexed...
     
Loading...