LED Controller, new to this.

Hey, im new to all of this so please bare with me! Got a couple of questions but I will first explain what I want to do.

Basically I will use 4 of the pins to output power, and RGB values to a maximum of 3 LED strips, about 30-40 LED's.

I will then have a an input, which is a rotary switch, this of course will change the hue, and it also has momentary push inputs, but of course all of the is down to the program.

My main question is how do I go about powering the Arduino Nano, and the LED strips using a 12V input from a motorbike battery, without busting anything.

About connecting the leds, please use Google. Pages and pages full about it.

12V is fine for the Vin of an Arduino if it doesn't need to provide real power (which it doesn't seem to do here) But the 12V from a vehicle isn't really 12V. When it's running it's getting close to 15V. It can also be very noisy. So I would get a DCDC buck converter, set it to around 8V, add a +-220uf and a 100nF cap to that and connect it to the Vin of the Nano.

Or the real easy solution. Get a (decent) USB car charger, plug it in and connect the USB of the Arduino to it.

Basically I will use 4 of the pins to output power, and RGB values to a maximum of 3 LED strips, about 30-40 LED's.

Arduino pins do not output "power". They can only output a small current at 5V. They can power a single small led, but not much more. They are meant to control, not to power. So you will need some transistors. These can be used to boost the current and voltage to be enough for your strips. We can recommend a type of transistor once we know more about your project.

You mention using 4 pins for 3 RGB led strips. But there are several types of RGB strip. Some need 12V, some need 5V. Some allow control of individual LEDs in the strip. Some allow control of groups of 3 leds. Some only allow control of the strip as a whole. Some need transistors to drive them.

So please post a link to the type of strip you intend to use. Read the forum sticky post to find out how to post links properly so they can be clicked on. Then we can advise further how to control the led strips.

If it were my project, I would power the Nano using a dc-dc convertor as septillion says, but I would use a 12V to 5V designed for car/bike use and power the Nano through its 5V pin.

Hi, sorry about the lack of knowledge in this. Been watching some videos and doing some reading and realise I would need to a MOSFET to control the power going to the LED strip, correct?

Can't find the exact LED strips I ordered, no longer in my eBay order history for some reason, I was mistaken, they are 5V.

Voltage: 5V
LED's: 15
Length: 0.5m
Can only control the whole strip, not individual LED's.

Pretty much the same LED's

It would be nice to get the circuit designed and maybe have a prototype built which I can plug into the Arduino like an Ardiuno shield.

I have just ordered a breadboard to make prototyping easier.

Hmm... Ok that puts a different perspective on things. You are going to need a substantial 12V to 5V dc-dc convertor. Not just to power the Nano but the strips as well.

Your strips will need around: 3 strips x15 LEDs x3 colours x20mA per led = 2.7A. Plus a little something for the Nano. So you are looking for a 3A, 12V to 5V convertor.

You are correct about the MOSFETs. But don't buy them without first checking the model with us here in the forum. You are looking for a logic-level, n-channel mosfet. IRL540 or STP16NF06L would be suitable examples, but there are many more available. How many MOSFETs depends on whether you want to control the colour of each strip independently or together. If together, you will need 3 MOSFETs and 3 Arduino pwm pins. For independent control of each strip you would need 9 MOSFETs and 9 Arduino pwm pins. Uno/Nano only has 6 pwm pins. But it is possible to simulate more pwm pins in software, as long as the Arduino is not too busy.

So, for power I have found this on eBay, would this do the job in reducing the voltage?

For the MOSFET's I want to control all of the LED's together, so I will just need the 3 then, would these do the job?

The MOSFETs are fine. That dc-dc convertor says

Load capacity:3A(Max) Typical 1.5A

Is not a good idea to run components at their max for long periods. (And it's not very ethical to sell something based on the max rating and only mention a typical rating of half that in the "small print", so I would avoid that seller.)

Maybe look for something similar but with a "typical/nominal" rating of 3A or more, ideally something with a heatsink built in or metal case, and says it is for vehicle use.

PaulRB:
And it's not very ethical to sell something based on the max rating and only mention a typical rating of half that in the "small print", so I would avoid that seller.

That's what every MOSFET manufacturer does... ::slight_smile: At least this seller tells you.

septillion:
That's what every MOSFET manufacturer does... ::slight_smile: At least this seller tells you.

Was talking about dc-dc convertors, not MOSFETs. Martyn's suggested MOSFET should be plenty for the task, they are rated for (max) 5x the current he needs, so should not even need heatsinks, but I was worried about the dc convertor he found.

But you're not wrong about about MOSFET manufacturers...

Actually, there is a disadvantage to those MOSFETs you linked to. It may not be important in practice. They have "cropped leads": this means they probably won't be any good for building a prototype circuit on a breadboard. The short leads won't make (good/any) contact with the breadboard's contacts. That said, breadboards can't deal with current much more than an amp or so anyway. And if you don't have any breadboards, it's probably not worth you buying any because you will still have to do some soldering even to build a minimal prototype.

I have already ordered the MOSFETs, but if you say the breadboard can't handle the current then I can just solder the circuit together using wires, not a problem.

I have found this DC Converter, it's rated at a max of 3A though, and you said it's not good to constantly run it at max?

If so is there one you would suggest?

You can get 5A convertors like this one for example. I can't personally recommend any particular model.