System for a rotating circus, with lights

Heyya everyone! Haven't posted in here before, but I've been noodling with Arduino projects for a while now (About 6 months) and I finally tried my hand at prototyping my own invention in Tinkercad. The basic idea is having a circus tent rotating with an engine continuously, as blinking lights turn off and on again, giving an illusion of a living tent.
I came to a solution which looks pretty functional, pictured below, with the gearmotor powered by two AAA batteries, rotating at increasing speeds with a potentiometer. Additionally I have a bunch of LEDs in different colors blinking interchangably, after a variable amount of time.



But as you can see, the lights are taking up a lot of pins in the Arduino and wire-wise it's a bit messy-looking. Is there a way to make it look any cleaner and still have the lights shine brightly, rather than splitting the voltage between all eight?
Thanks in advance. If you have any other comments or suggestions for improvements, I'd love to hear them!

Please, post your code in text, not graphics.

If you are concerned about wires and neatness, the WS2812 addressable RGBLEDs range in LEDs per meter, can be programmed for any color and any animation you can imagine.

  • You need a kickback diode across the motor.
    Use a logic level type MOSFET.

Is that a problem?
You still have spare pins (the analogue pins can also be used to drive LEDs).
Leo..

It looks like you always switch on/off the red LEDs together and always switch on/off the blue LEDs together, is that right?

If so, you only need one Arduino pin for the reds and one for the blues.

To avoid overloading the Arduino pins and keep the LEDs bright, you can use more transistors. They don't need to be as large as the MOSFET you are using for the motor because they won't need to handle so much current. But if those large MOSFETs are the only type you have, you can use them. Alternatives suitable for your LEDs would be BC337 or 2N2222.

Each transistor would control the current to a group of 4 LEDs connected in parallel, each with it's own resistor.

You could save a couple of resistors by connecting pairs of the red LEDs in series and using a single, lower value resistor for each pair. But this trick would not work with the blue LEDs. With only a 5V supply, the blue LEDs need to be in parallel.

If you don't have any more transistors, you can still save a couple of pins by using only 2 pins for the red LEDs. Using that trick I mentioned above, you can connect pairs of red LEDs in series and use a lower value resistor.

Red LEDs typically have a "forward voltage" of around 1.8~2.0V. So a pair of them in series has a total forward voltage of 3.6~4.0V. We want to supply them with 5V from an Arduino pin, but limit the current to ~30mA (comfortably below the pin's absolute max of 40mA). So we would choose a series resistor of at least (5-3.6)/0.030 = 47 ohms.

Blue LEDs typically have a forward voltage of 3.0~3.2V, so a pair of those in series would be 6.0~6.4V which is more than the 5V supply, so we can't do the same for the blue LEDs.