newb here

Ok guys my name is josh, i ahev always kinda been on to electronics. i saw a video online the other day of a guy that had about 10 led’s in the lower portion of his headlight. Now he couls turn it on and all leds would stay , press a button then the would go from left to right , then start over at left and keep repeating. then press button again and they would go left to right then from right to left back and forth till shut off or changed. They would do this one by one fast… looked awesome. Now i just ordered the arduino mega and i am trying to figure out how to do this before it all comes in… I love this site and have fell in love with this place and ahve been reading non stop for 3 days… also what is the max leds i can control seperately on the maga and the standard arduino?
Thank you guys so much in advance.
Josh

Instead of running each led to a separate output pin you can use shift registers to give you a whole lot of in or outputs.

The mega most likely has plenty pins for what your doing.

I coped this from the website where i bought mine.

? Arduino microcontroller with USB connection ? Specialized library functions for robots ? Based on the ATmega1280 ? Multiple Serial Communication Lines ? 54 digital I/O, 16 analog I/O ? I2C and SPI Communication ? Multiple power options

well if this helps this is what i would like to do in all. it will be on a sport bike with 2 headlight housing. i will ahve 10 led in each headlight so a total of 20 lights in the front, not i would like to be able to make both of them pulse at the same time one each side but also make only the left side work or the right side work. would also like to do the same thing in the rear. I am also gonna run another mega for all the other leds on my bike so i can make them strobe run sequence or whatever.. I have alot of questions but i am kinda afraid to ask them b/c i dont want people to think that i just want some one olse to tell me what to do and not try and figure it out myself.. Thanks so much. Josh

Because the mega has 54 digital outputs you can in theory control 54 different LEDs but it may be too large a current draw for the atmega to handle and then you will need to use a powered shift register or transistors etc.

Mowcius

Im still a beginner myself but i came into it with a fairly basic knowledge and have been learning with my mega for about 3 months now.

I am pretty sure you can tie everything your trying to do with lights and most likely more with just one arduino if done properly.

One thing I have learned with this development thing is that there is always more than one way of doing things and the differences sometimes can change the amount of work a good amount.

First thing i can suggest is to brush up on your typing skills and go over what you type before posting because some things were not exactly clear.

Ill be glad to help you when i can, i have more of the circuit development part down more than the code writing but this forum as well as the arduino playground and countless other websites have all kinds of great info and tutorials to help you get the basics down.

http://arduino.cc/en/Guide/HomePage

http://www.arduino.cc/playground/

http://arduino.cc/en/Tutorial/Foundations

Baby steps young grasshoppa, I think you should try a few more beginner projects before jumping to the main one without a baseline knowledge of how to do things the best way.

Consider the RGB LED also . They can be set to give you any colour you might desire. Don't worry about the insect references just consider yourself a mantis.

Consider the RGB LED also

Needs a hell of a lot of pins and to get any colour you desire, they all have to be pwm pins...

Sorry guys i get exchited and get in a hurry alot. here is a little simplier breakdown of what i am needing to do. And yes i will be doing smaller projects before i jump into this.. The front of the bike has 2 headlight, i want 10 led's at the bottom of the headlight in a row and probable also on the tail of the bike..

i want to make the leds be the same on both sides by having them stay on all the time, or start on the first led and got on/off/on/off from left to right then start over.

Aslo want to be able to make them scroll from left to right then back down from right to left on/off/on/off and that fasion.

The reason i am wanting to use more than on arduino is b/c i would like to be able to run different patters. As if i only wanted the headlight led's on, or if i wanted all other leds on. you know kinda mix and match.

I hope that this cleared things up a little bit. And that you guys very much for the help so far.

I am not able to get anything local the only thing i can buy is a basic stamp kit for 100 but if i am gonna use the arduino i would rather just start with it.

Thanks again Josh :)

Ok, just buy an arduino mega as a good start. That will provide you with enough pins for all those LEDs and coding them would be simple. For the front ones, if they want to be ultra bright ones, then power them with a transistor on each line so as not to overload the arduino with too much current.

The code as I said will then be simple, you can just set up an array and then get it to scroll through etc. More about that once you've got a board.

I would buy an arduino mega as a good start and a 100 LEDs or something. You will also need resistors for those, and probably transistors for the white ones.

Mowcius

ok i already have 200 green led's but they already have resistors on them should i be able to use them?

Remember i am new to alot of this. I just ordered the Getting Started with Arduino Kit from MakerShed.com was like 70$ and it does not ahve the Mega board it has the smaller one but this will help me out alot with discovering what i can and cannot do with it....

I will have more question when it comes it but till now i think i have most of my questions awnsered... Thanks Josh

ok i already have 200 green led's but they already have resistors on them should i be able to use them?

Maybe, what is the value of the resisors and what is the current draw of the LEDs? You can then work it out. The arduino gives ~5v from a digital HIGH http://www.kpsec.freeuk.com/ohmslaw.htm

Remember i am new to alot of this. I just ordered the Getting Started with Arduino Kit from MakerShed.com was like 70$ and it does not ahve the Mega board it has the smaller one but this will help me out alot with discovering what i can and cannot do with it....

Yep, it will be a great help for you in finding out about arduino, electonics and coding.

I will have more question when it comes it but till now i think i have most of my questions awnsered...

Okey dokey, the forum's always here ;)

Mowcius

I am not sure how to quote some one on here?

From what i can tell the resistor on the led is green, brown then a really dark brown then gold so thats a 510ohm 5% tol. possible green, brown black then gold..

i have no clue what Volt the Led's are i do not have the pack they came but they are green in color. They were being used on a 12v system. and will light with a 9v battery.

Josh

You can quote someone by copy the text, and pasting it here, after clicking the Quote button (the one with the blue arrow on it).

Do you have a multi-meter? Most are able to measure small amounts of current. Connect the led and a resistor to a battery. Then measure the current flowing through the resistor.

You can quote someone by copy the text, and pasting it here, after clicking the Quote button (the one with the blue arrow on it).

got it, the batt has 9.41 v at battery, 3.08 volts after resister and resister ohms at 519,
Thanks

batt has 9.41 v at battery, 3.08 volts after resister and resister ohms at 519

Ok, your best bet, as they are designed for 12v is to use a 12v battery (or 9v if you think it's bright enough) to power the LEDs and a seperate battery for the arduino. Then you want to use transistors controlled by the arduino to turn on the LEDs on the 9/12v circuit.

Mowcius

well even if i have to buy new leds i would like to make it were everything is controlled by 12v. but i just need to find out how to regulate the voltage since most auto charging system provide 12-14 volts.

I know this is off subject but is there any way to make a smaller controller since i will have limited room on a motorcycle? i was reading about the nano and mini? Josh

The nano is a good smaller board but it is best to sort out the code and circuit first before you move onto a smaller board.

If you control the arduino through the regulator with 12v then 7v of it is being wasted and turned into heat. If you had a small transformer making it 7v ish for the arduino then using the same power source should be fine. Isn’t there any electronics on your bike that runs on less than 12v that you could piggyback the arduino power off?

Mowcius

I really do not think that there is, i will check into it and see. I was just curious about the nana or mini after i had figured out the programmin and wiring and all of that first on one of the larger boards.

Thanks Josh

Yes once you have sorted out the wiring on a larger board then it would be simple to move it to a smaller board. Another quick comment though. If you are going to get a smaller board then you also need an FTDI board/cable as they do not have a USB connector for programming.

Mowcius

i think i will be able to use the mega board if i have to since it is only about 4x2.7 in size..

Thanks for the heads up on the connector tho..