Hello, I am new to all this so I apologize in advance.
What I need to do is to control the speed of 12 dc motors and the color of 12 RGB LEDs simultaneously and independently.
I know how to control the speed of 1 DC motor but I have no idea how to connect everything together.
larryd:
If you use Neopixels instead of RGB LEDs, you need one I/O pin and then use either Fastled or Neopixel library.
If the motors are simple DC and not reversible, you can use PWM to control their speed.
A driver transistor between the Arduino and motor is needed.
An Arduino Mega has 14 PWM pins.
You do need an appropriately sized power supply for the motors and an external 5v power supply for your LEDS.
Thank you so much for your quick response! So, if I have an Arduino Mega would using an AC to DC adapter provide sufficient energy? And also do I need 12 transistors (one for each motor?) I'm sorry if my questions are stupid, just trying to learn. Thanks again.
El-cheapo made-in-China power supplies are best derated by 50%. So 6A would need a 12A rated power supply, which can probably supply up to 8-9A before either the overcurrent protection kicks in or the thing simply overheats. Those manufacturers tend to overrate their products.
Other than that, they tend to do the job quite well.