Powering Four short 5v LED strips and Two 12v encoder motors

Hi Folks,

I’m way over my head here so I’m hoping to get some help or guidance.
Please, Please bear with my long…. explanation.
I’m a noobie’s noob, if such a thing exists, meaning I know less than a noob.

The image shows what I’m trying to achieve.
Basically, I need to power:

  • Two (2) 12V motor encoder motors (came with tracked chassis kit)
  • Two (2) 5V WS2812B ECO 60Pixels/m LED Strips, about 45” long each (Head and Underneath Base)
  • Two (2) 5V WS2812B ECO 60Pixels/m LED Strips, about 8” long each (Name-Plate)
  • One/Single (1) 5V or 12V Cool LED. (Holographic Simulation)

Given what needs to happen (see explanation below), can a 12V 2000mAh Nickel-Metal Hydride Battery be able to power all of the above, on its own?

Quick Explanation:
W.A.L.D.O. happens is one, 3-minute scene of a staged play.
So, using a 6-Channel, RC Transmitter & Receiver unit)

  • W.A.L.D.O. enters the scene and stops.
  • Head LED’s, Underneath Base LED’s, and Name-Plate LED’s stay lit throughout the whole scene.
  • Head LED’s need to change from a Low-lit Light-Blue color to a High-lit Red Color and Flash, and then return to Low-lit Light-Blue again.
  • Underneath Base LED’s are a Low-lit Blue color, at all times.
  • Name-Plate LED’s are a Medium-lit Blue color, at all times.
  • At one point an alarm goes off signaling the change of the Head LED’s as mentioned above.
  • Shortly after that the Single Cool LED (top of Head) comes on to symbolically project a video (the idea here is R2-D2’s holographic message from Princess Leia to Obi-Wan Kenobi).
  • After this W.A.L.D.O. exits the scene the same way it entered.

What I’ve purchased:

  • A tracked chassis kit – with Two (2) 12V motor encoder, motors.
  • Two (2) L298N DC Motor Driver Modules, although I think I’ll only need one.
  • Two (2) 5V WS2812B ECO 60Pixels/m LED Strips for the Head, the Underneath Base, and the Name-Plate; I got two just in case I burn the first strip.
  • A Three (3) pack wire connectors (male-male | male-female | female-female)
  • A 12V 2000mAh Nickel-Metal Hydride Battery and Charger
  • One (1) RC Transmitter & Receiver (6 Channels)
  • Six (6) 22-gauge, different color wire spools to run power up to the Head and Single Cool LED’s

I still need to purchase the Single Cool LED and I’m still waiting for the Arduino Uno board which will be here in a couple of days, I hope, with a kit, which I’m hoping will run all of this.

Any HELP or ADVICE would be appreciated.


It probably will if it has all the parts and you write the code so it does what you want. Rule #1 A Power Supply an Arduino is NOT! Rule #2 all grounds must be connected. Rule #3 were here to help so ask questions. There are no bad questions unless you don't ask. We like it when you post schematics not frizzy things and links to technical information on all the hardware devices. Reason for the links there are many different items with the same name and description that do the same thing maybe, maybe not. The most important rule is to have fun.

Hey Gil(?),
Thanks for your reply.
I'm just starting out with all of this stuff, not only Arduino but electronics as well. Unfortunately, I don't have good memory retention when it comes to these kinds of things; which is ironic since I can memorize pages and pages of dialogue when I'm working on a play, but anyways, that's on me.
I'm a visual learner not so much a textbook kind of guy, which explains my low grades in school.
I've looked at numerous YouTube tutorials but it seems to me that most if not all of them pre-assume the viewer has some knowledge of the subject matter which I don't, not really.
I understand that the Arduino is not a power supply, that it's a microprocessor, a mini-computer if you will.
As for drawing an electrical schematic, the best I can do is to sketch how I think the wires will run through W.A.L.D.O., but those would simply be lines that only I would understand, it would not be a proper schematic.
I've seen videos (see image) on how to connect a single 12v dc motor encoder, motor to the L298N motor driver, and then to the Arduino Uno board but not how to connect a second one, I mean where do I connect the second set of 4 wires to? (and here I'm assuming that the connection for a 12v dc motor would be the same for a 5v dc motor).
Most videos that show how to connect two motors are for dc motors without encoders.
I still don't understand how or even why I would use the other 5v power supply connection on the L298N if I'm using the 12v.
I get that I'm in deep waters here but I'm determined to learn how it works. I don't really have a choice, my friends are expecting me to produce this W.A.L.D.O. robot for their show and I don't want to let them down.
I can draw, design, create and build things with various materials but this electronic "stuff" is kicking my you know what.
So please, how can I help you, help me, in simple everyday English? I'm 62 but please try to explain things as if I were 10; if you can.
And again, thank you for your reply.

Schematics are how we speak about hardware. Pictures of components are of little help. Especially when the connections aren't identified.

Get a pencil and paper, draw a box to represent the motor, the Arduino and the 28 board. Draw the wires between them and label everything.

I have ABSOLUTRLY no clue what the green and blue wires from the motor are in your drawing, but it looks like a sure way to destroy the Uno. Hope you have spares.

Hey Steve,

Thank you for your input.

I'll work on the schematics, as you asked; not sure what you meant by the 28 board.
As for the image I uploaded, that was from a Google search I did: how to connect a motor encoder motor to L298N and Arduino Uno.
Since I'm still waiting for the Arduino Kit to arrive, however, I haven't burned anything yet; thanks for the heads-up.

Do you know of any videos that will show me how to properly wire 2, 12v DC Motors with Encoders to the L298N motor driver and then to the Arduino Uno board?

I've seen plenty of YouTube videos on how to wire a simple DC motor to the L298N and then to the Arduino Uno board but nothing on encoder motors.

Thanks Again.

Oops, wrong glasses...... L298N board.

This is the first time you mentioned that it's a motor encoder- post a link to the specs of the motor encoder. I am curious because I have never seen a motor encoder.

Let's start with the L298N and motors, there is tons written about them but that is not important at this point. Motors convert electrical energy (watts) to mechanical rotation. They consume electrical energy to do this. They come in lots of shapes and sizes. To make them work we need to give them enough energy to operate and do what are rated at. This happens with the proper voltage and current, or watts. Multiply that times voltage and you get watts. The voltage should stay reasonably constant the current will change with the load. So the more work the motor does the more energy it needs. Watts is the amount of of energy consumed.

Bigger motors use more watts, if the voltage is fixed the current will increase. Assume you have a glass and you need to fill it every 10 minutes and you have a small bucket of water, this will work fine. Now you have the same bucket but you now have a big picture which you need to fill every 10 minutes, the bucket will not last very long. Now you use a barrel and you cannot fill it there is just not enough water available in your bucket. Now switch from a small bucket to a hose. You now do not have any problems as there is more than enough water available from the hose.

A power supply is sort of like that, it puts out a given voltage and a maximum current, or watts. Your load (motor) uses some of those watts, just the amount it needs to do its job. What is left other loads can use. From this we determine that only so much energy is available from the power supply. The Arduino has its own power supply, capable of only a few hundred milliamps. It regulates its input voltage ~12V to 5V. The difference between the input and output is burned up as heat, the higher the load the more energy is burnt up as heat. Adding a motor load may cause this to overload and possibly shut down and or fry. This will also generate transient that can damage the microprocessor and other semiconductor devices. To prevent this we use an external power supply, this gives the additional power needed and whatever voltage that is needed.

Voltage is measured with a voltmeter or multimeter. All measurements need a reference point that the readings are relative to. In electronics many times this is called ground. Therefore it is important to be sure all grounds are connected and of adequate size. When a voltage is stated generally the reference is assumed. The electronic parts also use this as a reference.

The L298N is an older bipolar design. It does a good job when properly applied and its characteristics are taken into account. It uses transistors in a darling configuration on each of its outputs. A general rule is bipolar transistors have a 0.7V drop across each junction (emitter collector). In a darlington configuration there are two of these in series causing a 0.14 volt drop. The other side is the same so you lose about 2.8 volts to the motor. Your 12V now becomes 9.2 volts, about a 25% reduction in voltage. This will cause the motor to draw more current to do the same job. Newer devices use MOSFET outputs, they will have a voltage drop of maybe 0.1 volt or less. That delivers more energy to the motor so it can better do its job and uses less current. The motor wattage has remained the same. You can play with this using an online Ohm’s Law calculator: https://ohmslawcalculator.com/ohms-law-calculator

Hopefully this helps answer some of your questions. If you can get a copy of the Arduino Cookbook, it is a wealth of informations.

The most important thing for you to do is relax and have fun with this. It is a journey, not a few day project. Remember you are learning a new language that most people do not understand or comprehend.

Actually, I mentioned that in my first post, under the image of W.A.L.D.O.
... Basically, I need to power:
Two (2) 12v motor encoder motors (came with tracked chassis kit) ...
So, maybe it is the glasses :slightly_smiling_face:

Thanks for the clarification, the L298N.

Here are two images for the motor(s), Parameters, and Wiring info:

And, if you're interested, here's a link to the seller:

Thank You.

Thank You for the information and for the link to the Ohms Law Calculator.
Yeah, I know it's not a sprint, it's a marathon, a very long marathon, and I'm okay with that. My frustration, which seems to be coming across, is not with the product but with my learning retention, limitations; it just takes me longer than most to "retain" what I'm trying to learn. I know I'll get it, I just want to get it yesterday not a year from now.
I wouldn't say that I'm having fun, not yet anyway, but I can honestly say that I see the potential for having fun, once I can figure all this stuff out.

Thank you again, for your patience and help.

The fun starts when things work. Start simple, then add features. Here is a tutorial about the L298 board:

Run the code in that tutorial, then start experimenting with the sketch to change parameters. Only then, consider adding the encoder code.

1 Like

Thank you for the link, it is one of the many websites I found during my Google searches.

As informative as this article was, no disrespect to who wrote it, it's one of those articles that, IMHO, falls short of being a truly helpful tutorial for "this" beginner.

One example is the Power Supply section of the article. The image, with its three labels (5V EN Jumper, On-Board 5V Regulator, and Power Supply Pins) doesn't show us what the 12V, GND, and 5V pins are. It mentions the two power pins Vss, and Vs but it doesn't actually or properly relate them to the image; there's no visual reference to these (Vss and Vs) on the image.

Even further down the article, in the L298N Motor Driver Module Pinout section, where the pins are labeled and talked about, there's no mention of the Vss or the Vs.

At this point, I lost interest in the article but I continued reading it, actually, I read it twice, and I came to the same conclusion.

I know what they are now, I don't necessarily know how to completely or correctly use them yet, but I will. I had to search Google for more information, articles that more clearly explained the L298N and how to wire it in a way that I could understand.

For me, as I mentioned before, being a visual learner, seeing how things go together and work, I needed to find videos that showed me and explained what the pins were and so forth.

Now, after watching numerous YouTube videos on how-to the L298N I think I somewhat understand the simple basics of how it should go but I'm still missing the Arduino board and the Kit that accompanies it.

Of course, since I have motors that are encoded, I still don't know where to attach the other four wires to the board(s); for get about coding them. My search continues.

Thanks again Steve, I truly appreciate your feedback and help.

Forget about the encoder for now. Concentrate on one thing at a time- get the motors to function first.

The motor will run without the encoder, its job is to tell the electronics where it is and how fast it is turning. To be honest motors are one of the harder things to control. Why not get a few leds and switches and start with them, it will help you learn the language. In the process you will learn about pull up / down resistors. Current, voltage and of course leds.

Thank you for the info on whether the Motors work or not work with the encoders, that's never been clear for me and it really helped.

And, yeah, since I will be using LEDs on my friend's project I've already started to look into that.
I've also started to look into how to manage/control all of it, the Motors and LEDs, using an RC Transmitter and Receiver. Eventually, it's their hope that W.A.L.D.O. will have speakers and an onboard camera but that will be in its 4.0 or 5.0 version.

Fortunately or unfortunately, the jury is still out, my personality has always been that of jumping into the deep end of the pool. TMI to get into but it's good to know you can teach an old dog new tricks; even if at first he has to bang his head against the wall before realizing there's a door.

Gil, Steve,

I made this "schematic" of W.A.L.D.O. but due to all the WARNINGS of possibly burning the board, and or all the other components, plus not knowing if any of this is actually correct, I haven't done any testing yet; I wanted to run it by you guys first.

I know it's not an actual schematics but this is the best I can do, for the time being, and I hope you can read and understand it.

I look forward to your critiques/advice, to seeing what I got wrong, and what I possibly got right; if anything.

If it needs to be redone because it's really, really bad, give me some suggestions where I can help you, help me.

There appear to be a lot of missing GND connections between the various power supplies and I also see no power supply for the Uno board. I'm also curious as to why you're using 3 separate 5V power supplies (I assume they're 5V; cannot actually read it in the small picture...) while from an electronic viewpoint a single 5V supply with sufficient power rating could power all the led strips + the Uno.
Furthermore, I see a '12V cool white led' directly connected to the UNO which evidently isn't going to work (well).

Thank you for your input.

There appear to be a lot of missing GND connections between the various power supplies...

Does this mean I would need to connect all the GND's from the batteries to the Arduino GND as well as to the LEDs? Is it not enough that there is a complete circuit between each battery and each LED?
Also, there are 3 GND's on the Arduino board so which one is the correct one to use?

...and I also see no power supply for the Uno board.

I wasn't really sure if the Arduino board needed its own power supply since I was supplying the L298N with a 12V, 2000mAh power supply already and simply using the Arduino to control the motor actions using its PWM pins. But, after looking at the examples I've been looking at, I can see my mistake and why I would need it, at least I think I know why. Without power the Arduino would be dead in the water, there would be no communication between the two; but if I'm wrong, please correct me.

I'm also curious as to why you're using 3 separate 5V power supplies (I assume they're 5V; cannot actually read it in the small picture...) while from an electronic viewpoint a single 5V supply with sufficient power rating could power all the led strips + the Uno.

Yes, there are 3 separate 5V batteries, one for each of the LED strips and the reason for this is simple, I don't understand the power rating you are referring to (so if you would be so kind as to explain that to me in simple terms that would be AWESOME).
Here's where I get even more confused, so please bear with my ignorance. If I read and understood correctly, I'm losing 2V right off the bat when I connect to the L298N which leaves me with 10V to run the motors. I'm okay with that since I don't need the motors to run at full capacity. However, each of the LED strips requires a minimum of 5V each which is why I have the 3 separate power supplies.

Furthermore, I see a '12V cool white led' directly connected to the UNO which evidently isn't going to work (well).

I did a search on how to connect a single LED to the Arduino and I saw this YouTube video: LED Brightness Control with Arduino https://www.youtube.com/watch?v=2cNC4k8FMhQ, I've included the image of his schematic as well.

He uses it to control the brightness of the LED but all I need is to turn the LED on and off. I did notice that I didn't include the 220Ω resistor in my drawing. Is this what you are referring to here?

Again, thanks for your input.


No. All connections between the components need to reference to a common GND level.

Doesn't matter - they're all connected!

Of course it does; it's an electrical device, so it needs to get its power from somewhere. It's just like your smartphone or your computer - without a battery or a wall outlet it's not going anywhere.

Simply put (with some shortcuts, which we can get away with), you need to watch two things: voltage and current. A power supply will supply a certain voltage, and a current up to its rated maximum. That up to part is important as it means that a power supply rated for 10A will happily supply 1A if that's all that's being asked from it. Just don't expect it to give you 11A.

Your led strips and your Arduino want to be powered from 5V, so you can use the same power supply. The Arduino will draw only a marginal amount of current; maybe 50mA or 100mA or so. The led strips are more relevant; each 2812 led draws a maximum of (if memory serves) 60mA, there's 60 per meter in your strips, and you have a total of 108" worth of led strips (2 x 45 + 2 x 9) or 2.74 meters. So that makes around 165 chips, at 60mA each is a little over 9.8A, so let's say 10A. That's the bare minimum your 5V supply needs to be able to source. Factor in a safety margin of at least 20% (I'd rather go for 50%), so that means you need a 5V power supply that's rated for 12A at least. 15A would be fine to, 20A as well but that would already be overkill. You can power all the led strips + the Arduino from that same supply.

Since you seem to be operating from battery power, you could use a single 12V battery and a DC-DC step down converter to take the 12V down to 5V. You know what power rating to look for in the DC-DC converter - just see above.

I briefly checked the datasheet of the L298N and I don't see where you get the voltage drop of 2V from. However, even if this happens to be the case, a DC-DC converter can easily take 10V down to 5V for your leds. If your motors can be run under these conditions as well, no problem there.
You may/will have to go with a bigger battery if you are going to run both the motors and the LEDs from it of course since the power now all needs to come from a single source.
2000mAh @12V = 24Wh, given that your LEDs (all on at full power, all white) consume a maximum of ca. 10A @ 5V = 50W and your motors consume about 400mA while running (200mA each) at 12V = ca. 5W, this makes for a power consumption of 55W for the entire system not accounting for conversion losses. So a battery of 24Wh would last a little over half an hour - again, not accounting for losses and in a perfect world, so in reality let's say maybe 25 minutes. But it depends a lot on what the robot does - how it moves and particularly how the LEDs are being run.

That schematic doesn't show a "12V white led", but a generic 5mm red led with a separate resistor. If that's what you mean - yeah, you can run that directly from your Arduino. But not a LED (module) that has its current limiter resistor included in the package and that is supposed to run form 12V. But why not just use one more WS2812 for this and set it to white? You've got a slew of those anyway; I don't see why you'd want to implement this particular led in an entirely different manner.

Thank you for your quick reply, much appreciated.
You've given me much to process, understand and learn; thank you for that.
I may not be able to wrap my mind around just yet but I'll get there at some point.
Each LED strip will be roughly 36 inches in length and although they will all be on throughout the scene, they wont all be running at full brightness.
I don't have the numbers yet, mostly because the brightness will be determined once W.A.L.D.O. is on the stage and the lights for the scene are set.
But I do know that the only strip that will reach full brightness will be the Head LED strip, and then, only when they switch from Light-Blue (BTBD) to the flashing RED. This will only last for about 10 to 15 seconds and then, still flashing, they will dim (BTBD) for another 10 to 15 seconds before they return to their original Light-Blue state.
The other LED, on the head of the robot, is a single 12V LED diode which comes on once, for about 30 to 45 seconds, and then goes off.
The robot wont be moving much. It only appears in the final scene of the play and at most it will travel a total of about 15 to 20 feet round-trip, on and off stage.
Not understanding the power rating thing I thought I would power each LED strip separately.
If, due to my current lack of knowledge and understanding, I was to power the LED strips separately, would this be something that could damage the Arduino Uno board?
Would I connect all the grounds in pigtail fashion to the GND on the board or run them each individually to the GND?

Again, thank you for your help.

You're welcome, hope it helps.

Ok; I was going by what you wrote earlier, but I've shown the math (which is simple & straightforward) so you can work it out for any length and number of strips.

The lower the light levels you use and the fewer the LEDs that are on, the longer the battery will last, obviously. Working out an exact power budget will be a chore and very dependent on the software, but you can do a ballpark estimate to see if the battery will sort of cut it. By the looks of it, and assuming a 3 minute performance as you mentioned earlier, it should be just fine the way it is.

Not necessarily. It might very well have had you not connected the GNDs together.

Either will work OK for this device, but I'd recommend using the Arduino board as the central point from which each LED module gets its own GND connection. It's called a 'start ground' design (since it mimics a star if you lay it out on the floor). But a bus design (I think that's the pigtail fashion you mentioned) would work here OK as well.