I am working on my first Arduino project. I would like to make two different colors of LED Diodes light up and play a sound when the color is changed. I would also like to add another button to play different sounds without changing the colors. However, as this is my first project, I am a little lost on the wiring. I have done several pieces of research, and have done my best to create a diagram. I would also love any feedback and explanations on why things should work one way over another. I know a lot of the tutorials include LED strips rather than Diodes as they are able to be controlled, however, due to the style of the project, Diodes would be better. Thank you very much ahead of time!
Update- Yes I am aware that the symbol for the battery is backwards. I am still learning the directions of how things go in the diagrams. I am also aware that LEDS do not play sounds, which is why there is an SD MP3 Module and speaker. Someone on a post on another website was a bit rude about that.
Please post a link to that. The most common type is "DFplayer mini", which I would recommend because they are easy for beginners. But they do not connect to the Arduino in the same way as an SD card module. With these modules, the speaker connects to the player module, not to the Arduino.
Your diagram does not show the values of the series resistors used with the LEDs. I see many LEDs connected in parallel to the same Arduino pins. Unless the series resistors are of a high value, this will damage the Arduino pins. High value series resistors would prevent that damage but would make the LEDs dim. So you may want to use transistors to handle the current for the LEDs, such as bc337.
Your slider switch can connect to the Arduino in the same way as the pushbutton. You can leave the third pin of the switch unconnected.
Your connection marked "to power lights?" is an error and should be removed. That would cause all LEDs to be permanently lit, and could damage the Arduino pins also by causing a short-circuit.
That is not an MP3 player board. It may be possible to get Nano to play some sounds using that board, but it will be difficult for a beginner and the sound will be poor quality and not very loud. I strongly recommend you get a DFplayer Mini board instead. They are cheap, easy to use and will make much better quality and louder sound.
Looks like you have 11 blue LEDs controlled by an Arduino pin and 11 orange LEDs controlled by a second pin, plus 3 red LEDs permanently on.
The blue LEDs have a forward voltage of at least 3.0V. With a 68R resistor, and 4.5V supply, the current drawn by each led will be (4.5-3.0)/68 = 22mA. They are rated for 20mA, so they are in danger of slowly burning out.
The orange and red LEDs have a forward voltage of at least 1.9V. With a 68R resistor, and 4.5V supply, the current drawn by each led will be (4.5-1.9)/68 = 38mA. They are rated for 20mA, so they are in danger of burning out very quickly!
So... 11 blue LEDs at 22mA each, connected to the same Arduino pin. 11 orange LEDs at 38mA each, connected to the same Arduino pin. The maximum current an Arduino pin can source or sink before damage occurs is 40mA. You need to re-think this.
Are those rechargeable AA (NiMH) or non-rechargeable? I hope for the sake of the environment that they are rechargeable.
Rechargeable NiMH have a lower voltage than non-rechargeable, around 1.2V Vs 1.5V. But both types have a higher voltage when fully charged. Non-rechargeable have a maximum voltage of about 1.7V and rechargeable about 1.4V.
With rechargeable I would recommend using 4 cells instead of 3.
When connecting 3xAA non-recheargeable or 4xAA rechargeable batteries, there will not be enough voltage to connect them to the Vin pin of the Nano which needs at least 7V. You can use the 5V pin instead, because even with fully charged batteries, the voltage is unlikely to exceed 5.5V.
Do not connect 4x non-rechargeable battery to the 5V pin, that would be over 5.5V and would damage the Nano.
Yes, I was planning to use rechargeable, but forgot to include that in my calculation and just did a regular battery just in case.
Also, question. Would it be possible to have the led diodes light on a separate power circuit, but still have a way to play the sound when the lights change? Or is this just something I forget about trying?