Multiple RGB LEDs and DC Motors

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.

Any help is appreciated. Thank you in advance!

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.

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.

A suitable AC-DC adapter would work. But to choose one you need to know what voltage and how much current your motors require.

If you want your motors to be controlled independently then yes you will need a transistor (preferably a MOSFET) for each motor.

Steve

slipstick:
A suitable AC-DC adapter would work. But to choose one you need to know what voltage and how much current your motors require.

If you want your motors to be controlled independently then yes you will need a transistor (preferably a MOSFET) for each motor.

Steve

My motors are TS-755 (12V, 160 mA, 11500RPM) Do you know which AC-DC adapter I should go for?
Thank you!

Let’s say your motor takes 500mA maximum @12v (you will need to check your motor).

For 12 motors you will need a .5 X 12 = 6A @12v power supply.

Get one a bit larger i.e. 8A @12v.

You can use these circuits for motor control.

Suggest you use circuit C1.

Edit:
Let’s say 200mA, therefore 12 X .2 = 2.4A

Use a 4A @12V.

Lots on eBay and Amazon.

This might work:

larryd:
Let’s say your motor takes 500mA maximum @12v (you will need to check your motor).

For 12 motors you will need a .5 X 12 = 6A @12v power supply.

Get one a bit larger i.e. 8A @12v.

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.

larryd:
Suggest you use circuit C1.

I am using this circuit but I don't know how to connect 12 of them together with the arduino mega, any suggestions?

Not sure what what you are asking.

If you know how to make one cct. then you simply repeat 12 times.

If you are asking how to physically do it, one way is to use a ‘solderable’ breadboard.

Lots of examples on eBay and Amazon.

https://www.google.com/search?q=breadboard+solder&tbm=isch&ved=2ahUKEwiy4q3Uk9blAhVjJ30KHZGkD1YQ2-cCegQIABAC&oq=breadboard+solder&gs_l=mobile-gws-wiz-img.3..0l2j0i8i30l3.6669.9035..9821...0.0..0.320.832.6j3-1…0…1…0i67.5uJwntDmboQ&ei=owjDXfKECePO9AORyb6wBQ&bih=659&biw=1024&prmd=isvn&rlz=1C9BKJA_enCA832CA832&hl=en-US

ex:

See posts #43, #47 and #48.