Pages: [1]   Go Down
Author Topic: Strobe Light Project  (Read 1306 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

I just ordered my Arduino Uno last night and a ProtoShield kit from Sparkfun. I'm somewhat new to electronics, I have a basic understanding of things and have built other small projects before following guides online.

My idea is to build a strobe controller, like one you can place in your car in the windshield and powered by a 12 volt cigarette lighter plug. Which would have 1 push button to change to a different type of pattern, and after 3 secs that pattern would be saved to memory as default. My biggest question I think would be how specifically can I wire up about 60 LED's, 30 for each side of the controller, am I going to need resistors and whatnot? Essentially two sides of 30 LED's would alternate with the different patterns I plan to create. My thought was to connect each set of 30 LED's to the arduino, which I'm not sure what I need to do to accomplish this. I once I get this working instead of using my Arduino Uno all the time to run it, I think I can upload my code to this: http://www.sparkfun.com/commerce/product_info.php?products_id=8846 or something similar that is cheaper.

I was thinking of using these LED's if they will be bright enough: http://www.ebay.com/itm/100-X-5mm-Round-white-led-light-Super-bright-100PCS-/170684507716?pt=LH_DefaultDomain_0&hash=item27bd96e644 Any suggestions?

This is essentially what I want to create:

« Last Edit: September 21, 2011, 11:38:37 am by Silent » Logged

Texas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Lost in SPI FADE land
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To get the effect in the video you linked I would start with a few TLC5940 chips. Each 5940 can drive 16 LEDs. You can use 4 of them to get to your 60 by chaining them together. The setup would require only 5 pins on your arduino not including power and ground. Because you set the current on each 5940 with a single resistor you would not need resistors for every led. Just set the current and go. Then it would just be a matter of setting your patterns in the sketch. Not only can your do a strobe but you still retain the ability to fade on/off.
To use a push button to set the "default" pattern you would just use a variable which holds which pattern is on currently and that would only change when you press the "change pattern button" so then you could use a second button to turn the pattern on/off while only turning that 1 pattern on/off. But then you will need to make sure your arduino does not lose power otherwise it will just revert to what ever pattern was the "default" when you uploaded the sketch.
If you wanted to get more in depth so even if you lost power it would stay with whatever pattern you set as default you could have it read/write that parameter from an external flash card every time you change the pattern so when the arduino powered back up it would just look at the external source for the variable of which pattern to use.

Each of those LEDs use ~20mA which means each TLC would be required to handle 300mA at full brightness if you used 15 leds per IC. Which I think is under the max spec but I may be wrong and would like another more experienced member to chime in on the power side of this. I currently have a few 5940nt IC running at 300mA and are barely getting warm but my LEDs are no where near full brightness with this so I'm pretty sure you will need transistors at the least to help drive the LEDs.

There are different ways to go about this and with my limited experience this would be the route I would take to accomplish your project.
Logged

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

Thanks for the help. As for saving the default pattern, I think I can just save the pattern id to the EEPROM and do it that way instead of having to have a flash card. I also was able to order some TLC5940 sample chips for free from TI.
Logged

Texas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Lost in SPI FADE land
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use the EEPROM but the reason I did not mention it is because of:

"An EEPROM write takes 3.3 ms to complete. The EEPROM memory has a specified life of 100,000 write/erase cycles, so you may need to be careful about how often you write to it."
Taken from http://www.arduino.cc/en/Reference/EEPROMWrite

Figure every time you write to that variable you lose life on your eeprom. And every time you press the "change pattern button" you are essentially writing to it. You could specify only to write to eeprom after the change button has not been pressed for a specified amount of time so when you cycle through the patterns it does not write every time.
Logged

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

Yeah my thought was to have it write to it only after 5-10 secs of being on the selected pattern. Using a flash card seems like a bit more than I actually need for something like this. I wonder if there is a better alternative.
Logged

Texas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Lost in SPI FADE land
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could use a separate eeprom IC such as the 24LC256 which can hold 32 kilobytes and is used via the I2C Bus and is fairly easy to read and write to and not to expensive at 1.95 ea from sparkfun. If you got a socket for the chip and ordered a few chips then eventually when it died you could just plug a new one in and continue on. Its cheaper than the ATmega chip.
Logged

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

I'm guessing the only way you would know if it died would be if it no longer was saving the correct pattern? I think I will still need the ATMega chip anyway, after I get a working model with my Arduino Uno, I want to make it more cost effective to make using http://www.sparkfun.com/products/10524. At least that's the idea anyway
Logged

Texas
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Lost in SPI FADE land
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes you will still need the ATmega but you wont have to replace it (at 5.50 ea) when the eeprom dies if you use a seperate cheaper (1.95ea) eeprom. And yes when it dies it will not save it anymore. It will just keep whatever the last value was. All my projects are standalone atmega setups and I only use my uno to program the chip and for testing my project.
Logged

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

Oh, I see what you mean. What all do you have to have to program the ATmegs using the uno?
Logged

Pages: [1]   Go Up
Jump to: