Pages: [1]   Go Down
Author Topic: ATtiny84 controlling LED light bar???  (Read 713 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to make a light bar for my truck. I run with a rescue squad and decided to try to make my own lightbar.... here is what I would like to do and I would like to have ya'll help with this to make sure I got the right idea. BTW I am new to this type of stuff  smiley-grin

First of all my power source will be 12v from the truck and I would like to have 30 white LEDS and 30 red LEDS

I will hook 12v to a PCB from Radio Shack
I will use this  https://www.sparkfun.com/products/107 to take the voltage to 5v
That will supply power to my ATtiny84 that I am going to program with a few different flashing sequences
I know that I will not be able to run very many LEDs with the 5v supplied from the ATtiny84.

My question is would the best option be to use this  https://www.sparkfun.com/products/10349 to up the supply power coming from the ATtiny so I could power more LEDs or am I misunderstanding something??

Thanks any help will be appreciated!!


Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can run the LEDs from 12V and use NPN transistors to handle the voltage and current.  That will allow you to have several LEDs in series and reduce the number of current limiting resistors.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have a link to a good tutorial on how to use an NPN transistor?

Thanks
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 119
Posts: 4591
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A transistor can switch stuff on/off but LEDs aren't that simple. LEDs need current regulation ... and before you know it you've got a PCB full of components.

There's a much simpler way to do what you want: Use an integrated circuit, eg. the AN6884 chip which does switching, current regulation, etc. all in one little package.

http://www.ebay.com/sch/i.html?_nkw=an6884

Datasheet: http://www.e-ele.net/DataSheet/AN6884.pdf

One of those chips can switch 5 strings of LEDs on/off with no extra components needed, and you can connect dozens of chips to a single Arduino pin (switch hundreds of LEDs with one Arduino pin!)

You've got 12V available so each AN6884 pin can drive multiple LEDs.

A white LED needs 3.6V so you have enough volts to connect three of them in series with a bit left over (3x3.6V=10.8V). Each AN6884 pin can therefore drive three white LEDs. Five pins per chip means each chip can light up fifteen white LEDs. Thirty LEDs only needs two of them.

Similarly... red LEDs usually need 2.2V so each AN6884 pin can drive (up to) five of them (5*2.2V=11V). Each AN6884 can therefore switch twenty five red LEDs on/off. Given that you have some extra capacity and red LEDs aren't as bright as white ones you maybe could put in forty red LEDs instead of thirty (ten strings of four LEDs).

Four AN6884s, two Arduino pins, the LEDs, that's all you need. No resistors, no transistors.

nb. You run the AN6884 at 5V, the same as the Arduino, and connect the Arduino's output pin to the AN6884 pin 7 ('AMP. output'),  bypassing the internal amplifier (which isn't needed here).
« Last Edit: December 11, 2012, 05:24:28 am by fungus » Logged

No, I don't answer questions sent in private messages...

Pages: [1]   Go Up
Jump to: