I hope you can help me I'm looking into putting LEDs in my Star Trek ship for the navigation and strobe lights also glowing impulse engine. It will be about 10 to 12 LEDs. The led are also going to be blinking in different intervals so can I controll all this on one arduino mega or any other. Do you know how I can do this?
Yes, this can be done easily. An Arduino Nano might be the easiest for this project.
Thanks I can buy one with terminal connectors with but can I add the nano to a 12v power supply?
Also if I have 3mm led do you know what resistor I need to light it with nano.
Yes, you can use a 12V supply but it would be much better to use a 5V supply, such as a phone charger with a USB plug suitable for the Nano. Is there a reason you want to use the 12V supply, other than that you have one already? A 5V 500mA charger should be enough.
To decide exactly what resistor is best to use, you need to know two things.
Firstly you need to know the forward voltage of the leds. Each colour will have a different forward voltage. Was there information on this from your seller's web page? If not, there is a way to find out.
Secondly, you need to know how much current you should use for each led. There will be a maximum current, which should also be shown on your seller's web page, but is probably 20mA. But this maximum may make the leds too bright. You may need to experiment to decide how much current you want to make the model look good.
Or you could simply start with 330R resistors and see how they look. If they are too dim, try 220R or even 160R. But do not go below 160R until you know the forward voltage and maximum current. If they are too bright, try 470R, 680R or 1K. There is no danger using higher value resistors.
Thanks for that. I would like to run at 12v as I have light strips inside the ship and they run at 12v. It would be good just to have one Cable running down the metal stand. So I'm right in thinking that the nano pins give you 40ma but recommend to use 20ma sorry to say but what is that in volts lol.
What I'm trying to say do you get 5 to 4 volts on every pin.
You will see ~5 (high) on the outputs.
So I'm right in thinking that the nano pins give you 40ma but recommend to use 20ma sorry to say but what is that in volts lol.
I'm not sure if you are joking now about that.
Each of the Nano's pins outputs 5V (unless the Nano is overloaded). Each pin can source or sink up to 40mA but it is better not to exceed 25~30mA. And overall, the Nano's pins should be limited to about 200mA in total. If many of your leds will be flashing, the total current should not be a problem.