Step Down from 12v Car switch

Hi guys,

Thanks again for all your help so far with my project.

I've been building my prototype at my desk so far and I think it's time to try it for its intended purpose.

I've basically got a bank of LEDs replacing my cars rear lights (just playing around) and I'm wondering how to get the 12v inputs for the brakes/turn signals/running lights into the arduino safely.

On my desktop version, I've got 3 buttons going into digital pins on the arduino which control the functions of the LEDs

My question is, can normal digital/analog pins on the arduino handle 12v or do I need a stepdown like this?

http://www.hobbytronics.co.uk/d24v5f5-5v-step-down-regulator?keyword=5v%20step%20down

Am I understanding the use of this product correctly?

Ive read that the vin pin on the nano which I'm using for my project can handle 12v but my understanding of the other pins is that they can only take 5v. My understanding of all this is very hazy hence the question.

Also, if the stepdown is needed, do I need 1 for each of the 3 inputs?

Thanks again guys,

Kyle

A voltage regulator is for power, not for signals.

I'd recommend combining 2 simple things - A [u]voltage divider[/u] (2 resistors) to knock-down 12V to 5V, and a [u]protection diode[/u] to make sure any voltage spikes on the 12V power don't exceed 5V on the 'output side' of the voltage divider.

Thanks for the quick reply Doug!

OK, Im glad I asked. I didn't know it could be so simple to stepdown the signal.

I'll do some googling for voltage dividers and protection diodes.

What you said about the voltage regulator got me thinking of my next issue. I've been using a desktop power supply for my LEDs but how do I power them using the 12v Car battery?

Would it just be a 12v to 5v adapter like this one:

12v to 5v 20a power adapter

Or is there a way to integrate this functionality onto a pcb? I'll have 350 LEDs but each led should only draw a maximum of 40ma due to the colours I'm using.

Thanks again,

Kyle

How would you guys go about this?

Thanks again,

Kyle

350*0.04A is 14A, so your 20A power supply is reasonable. Question is if your LEDs really need 5V. 5V isn't enough for 2 LEDs + limiting resistor, and if it is 1 LED + limiting resister, then you are throwing away 40-50% of energy in heat.
So, what do you have there and can you change it?

Hi,

Thanks very much for the reply.

I'm sure I've misunderstood your question but I'm using WS2812B strips in my setup at the moment which seems to be working well. It sounds like you think I'm using individual leds?

I expect you know what my setup is already and I'm just confused about your question but the power supply I'm using is a 'desktop' 110/220V mains powered power supply.

My question is, how is best to convert my setup for use in a car using a 12V battery? As I said before:

Would it just be a 12v to 5v adapter like this one:

12V to 5V 20A power adapter

Or is there a way to integrate this functionality onto a pcb?

I hope this question makes sense. I've seen setups in cars like this before but I don't know how they're powered. For example, the PCB (with all the leds on it) seems to just plug into the existing wiring in the car but I don't know if there's a power adapter/regulator (as linked above) hidden away somewhere or if the PCB itself is directly taking 12V power and distrubuting among the leds?

Thanks again,

Kyle

kylefoster:
I'm sure I've misunderstood your question but I'm using WS2812B strips in my setup at the moment which seems to be working well. It sounds like you think I'm using individual leds?

Then 5V make sense. You did not say what you used. Could have been some weird 5V led strip like this one:

I expect you know what my setup is already and I'm just confused about your question but the power supply I'm using is a 'desktop' 110/220V mains powered power supply.

Why do you expect that I know what your setup is?

My question is, how is best to convert my setup for use in a car using a 12V battery?

By using a DC-DC converter that converts 12V to 5V. You linked one that should work. Is it a good one? Is 20A perhaps even a blatant lie? Is it regulated well enough not to fry the electronics inside LEDs? Also no idea. I don't know, there is no datasheet. Test it, see if it goes hot. Or go for a more reliable seller than eBay.

I hope this question makes sense. I've seen setups in cars like this before but I don't know how they're powered.

Basically like that, with the caveats given above.

For example, the PCB (with all the leds on it) seems to just plug into the existing wiring in the car but I don't know if there's a power adapter/regulator (as linked above) hidden away somewhere or if the PCB itself is directly taking 12V power and distrubuting among the leds?

Am I overreading anything here? What PCB are you taking about?
In general, I would assume that you don't just overlook a 14A power supply somewhere and it is not something that you solder to your PCB in a DIP6 package.

Hey,

Thanks for the thorough reply and sorry for making things so confusing!

I should learn to re-read what I've written! I've mentioned the WS2812B strips so many times in previous threads that I forgot this time.

Test it, see if it goes hot. Or go for a more reliable seller than eBay.

I certainly will. I wasn't planning on going for ebay tbh but when you google for quick answers, ebay is usually the first thing to pop up.

Am I overreading anything here? What PCB are you taking about?
In general, I would assume that you don't just overlook a 14A power supply somewhere and it is not something that you solder to your PCB in a DIP6 package.

Again, I didn't explain. Other products similar to this on the market consist of a simple rigid PCB with a load of LEDs on it. Since I'm so new to this in general, I wasn't sure if there was a way to integrate some sort of power supply/distribution onto a PCB and this thought was also flamed by other similar products stating (plug and play) without immediately mentioning the need for a power supply.

Thanks again,

Kyle

kylefoster:
Again, I didn't explain. Other products similar to this on the market consist of a simple rigid PCB with a load of LEDs on it. Since I'm so new to this in general, I wasn't sure if there was a way to integrate some sort of power supply/distribution onto a PCB and this thought was also flamed by other similar products stating (plug and play) without immediately mentioning the need for a power supply.

Sure you can put a power supply on a PCB. Here is one (which I like to use e.g. when I build a 3.3V controller for a 12V LED - it conveniently fits UNDER a Wemos D1 Mini): http://www.watterott.com/de/MP1584-Buck-/-Step-Down-3A-Adjustable-Regulator-Module
That will give you up to 3A, though (wouldn't use it for more than 2A, some similar even specify 1.2A).
But as you know, P = R * I^2, so 14A is a number that you will not get as a small PCB part without substantial cooling.

ElCaron:
5V isn't enough for 2 LEDs + limiting resistor, and if it is 1 LED + limiting resister, then you are throwing away 40-50% of energy in heat.

?????????

INTP:
?????????

Disagree? Most types of LEDs of which you have 350 (and that are not WS2812B, which is a little more than just an LED) have a forward voltage of 2.1V (red, could work with a resistor, perhaps) and 3.2V (green/blue). OK, latter would be 36% dissipation at the resistor.

Thanks a lot for clarifying.

In that case, all of the other products I've seen must have an 'off-board' power supply?

I'm also not sure how separate round leds work compared to my strips. Does a normal round led (5mm for example) draw similar current compared to each led on an RGB strip? Or is it drastically different.

I'm just trying to think of any way existing products may not need an external power adapter/regulator.

Thanks again

Kyle

ElCaron:
Disagree? Most types of LEDs of which you have 350 (and that are not WS2812B, which is a little more than just an LED) have a forward voltage of 2.1V (red, could work with a resistor, perhaps) and 3.2V (green/blue). OK, latter would be 36% dissipation at the resistor.

You assume 350 bulb LEDs in SERIES and then give advice accordingly when he's dealing with smart LEDs in parallel.

Anyway, moving on . . . .

That was before he knew I was using strips?

Either way, I think we're reaching the best solution for my query?

INTP:
You assume 350 bulb LEDs in SERIES and then give advice accordingly when he's dealing with smart LEDs in parallel.

I most certainly did not assume 350 LED in series. That would be silly. I assumed groups of LEDs in series with current limiting resistors. Common LED strips for 12V have 3 LEDs in series with a resistor, and those groups in parallel.
For 5V and common LED forward currents, there isn't any too effective group size, so I wanted to know if there is any optimization potential.

Hi guys,

I had a thought about potentially being able to connect 12V power directly to my project without the need for an external power supply/adapter.

You mentioned:

MP1584 Buck / Step Down 3A 1-18V Adjustable Regulator Module

Although it can only do 2/3A, would it be possible to have 10 of them? One for each strip which draw 2A max and then have a common bus to connect 12V?

For the current, also bear in mind that the brightest colour I will use is 255, 150, 0 so the LEDs should never draw 60ma and the actual number of LEDs will be 33 per strip.

Thanks again guys,

Kyle

Well, yes you can of course power multiple step-down converters from your 12V. It is just another of many devices that are powered with your cars 12V. You can probably not just connect multiple MP1584 modules at the output to get more current.

I don't understand, though, why you think that you are then eliminating "the need for an external power supply/adapter. The MP1584 module is exactly the same type of device as the one you linked from eBay. The eBay one is just more powerful and thus needs cooling.

Thanks for the feedback,

I'm just thinking out loud really. I'm precious about my car I suppose and I'd prefer not to add more components to it and having a larger power supply that requires mounting somewhere with additional wires doesn't seem as clean to me as a PCB with everything consolidated onto it that I can just plug into a 12V connector.

Does that make sense? Since this is a big learning curve for me, I also had this conversation about the Arduino itself. Initially, I was thinking of having the Arduino mounted somewhere else. So there might have been 3 components, the LED matrix, the Arduino and the power supply.

This was when I was playing around with an Uno and didn't know that a Nano would do everything I needed. So now I'm down to 2 components, the 'board' with the Nano on it and a power supply and I'm trying to find out if it's possible/safe to consolidate the power supply onto a board too?

You said:

You can probably not just connect multiple MP1584 modules at the output to get more current.

Is it not possible to have 10 of these in parellel connected to a bus bar? Assuming the wire from the battery is sufficient?

These also seem popular:

http://www.miniinthebox.com/ultra-small-lm2596-power-supply-module-dc-dc-buck-3a-adjustable-buck-module-regulator-ultra-lm2596s-24v-switch-12v-5v-3v_p1023925.html?currency=GBP&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=89613632233&adword_kw=&adword_pos=1o4&adword_pl=&adword_net=g&adword_tar=&adw_src_id=8550168004_288094633_19784783353_pla-18283950120&gclid=CjwKEAjwgo6_BRC32q6_5s2R-R8SJAB7hTG-kctYDAllNYcCoe87eqcPAp9GqjeUOYe1q29_48qTQxoC7zrw_wcB

Thanks again,

Kyle

The LM2596 modules are a pretty old design. I don't know any aspect in which an MP1584 would not be superior. This is especially important sind you want to draw high current, so any lack of efficiency will heat up your chip.
Read this:

There is also a third option, which is way more expensive, though, but probably the best choice. I do not know it.

You could try to ad one of these coolers to the chip https://de.aliexpress.com/wholesale?catId=0&initiative_id=SB_20160922034712&SearchText=raspberry+pi+cooler

Thanks for your help,

Since I'm so new to electronics, I suppose my question was more general than specifying a specific chip so I'll reprhase the quesiton.

Is it possible to have 10 MP1584 DC-DC Adjustable Buck modules in parellel connected to a bus bar? Assuming the wire from the battery is sufficient? So the inputs for each are all linked to a common 12V supply and the output for each powers it own strip of 33 leds.

I'd be keen to use these on my prototype if it would work so I don't have a single large power supply, somewhere else in my car etc.

Thanks again,

Kyle