12V 10A DC-DC to 5V circuit - Page 1
Forum section: electronics / beginners

author: misiek303
author_rank: Contributor
timestamp: April 03, 2023, 01:30:17 am
content: Need to step down from a 12V Car battery to Arduino?I found one but it using large components ( attached ).I wonder if LM2596 board will do the job safely, but can't find a circuit for it.Thanks

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 03, 2023, 04:09:03 am
content: Cars have a very "toxic" power environment. They are nominally 14.4 volts while running. They can drop to 9 volts when starting. There can be large load dumps causing 120 volt spikes.

author: Swainster
author_rank: Frequent Contributor
timestamp: April 03, 2023, 05:04:16 am
content: Car battery to 5V @10A? Your linear circuit example (at least the 3D modeled part) will definitely burn up as it will be dissipating almost 100W when the car is running. Those pass transistors need to bolted to a big ol' heatsink. Agreed that using a buck regulator is much better, however LM2596 is only specc'd for 3A.

author: james_s
author_rank: Super Contributor
timestamp: April 03, 2023, 06:46:37 am
content: I knew someone would mention the mythical load dump. Well technically it's not a myth, but I've never seen it happen and the vast majority of USB chargers and other devices that plug into a lighter socket will smoke if it happens. If your car was made within the last 40 years or so it is extremely unlikely, load dump protection is something you put on critical hardware like the ECU though even many of those lack it. For an auduino don't even worry about it. Modern car electrical systems are not nearly as hostile as a lot of people think, those warnings are from the era of crude electromechanical voltage regulators.

author: Eraldo
author_rank: Regular Contributor
timestamp: April 03, 2023, 07:20:40 am
content: What do you need to power with the 5 volt? If just the arduino and some sensors then a regular 5v linear regulator can handle it.If you want a lot of power then just buy a powerful buck converter with high current capabilities (depends on your needs). They are also constant voltage devices so no need to worry about the battery voltage.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 03, 2023, 01:59:17 pm
content: Quote from: james_s on April 03, 2023, 06:46:37 amAll it takes is a loose battery cable. And that's what was probably making the computers reset in my car the other day. Had to do a quick repair the other night.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 03, 2023, 02:03:55 pm
content: Here's a good app note:https://www.ti.com/lit/snva681

author: misiek303
author_rank: Contributor
timestamp: April 03, 2023, 09:03:32 pm
content: I did research on LM2596 as I don't need a lot of output power, 3A is sufficient. It will be actually powered MEGA2560. So I draw the attached circuit based on the LM2596 datasheet. I don't need an adjusted regulator. And yes the car ( it is actually for the motorcycle ) can supply 14V. So it must sustain that.As far as the >100V spikes on the bike shut down. Is there anything I can add to protect it? - not sure if the flyback is for. The are only for reverse current right?Can you guys have a look at the circuit, please? I added a 5V fuse (F3) and would like to add a fuse (F4) for 12V, no idea where to put it. Can you help? - unless this circuit and components are trash, please tell me that as well.Big thanksCheers.

author: james_s
author_rank: Super Contributor
timestamp: April 03, 2023, 09:12:24 pm
content: I've used the LM2596 and it's a good part, easy to use and works really well. Beware the Chinese modules you can get on ebay, they actually work pretty well but they are NOT real LM2596, the frequency they operate at is completely different.

author: Jwillis
author_rank: Super Contributor
timestamp: April 03, 2023, 09:16:56 pm
content: The 680uF capacitor is configured wrong. Negative side of cap should be grounded. The way it is now will block DC voltage.Feedback must be connected to output.https://www.ti.com/lit/ds/symlink/lm2596.pdfPage 1

author: james_s
author_rank: Super Contributor
timestamp: April 03, 2023, 09:20:28 pm
content: That's a very weird way of drawing a buck converter too, I would not even have recognized what I was looking at without closer investigation. Draw it the way it is on the datasheet and it will be a lot more clear.Also the part shown in your drawing is the -ADJ (adjustable) variant which needs an additional pair of resistors to set the output voltage, without that you will have a 1.2V power supply.

author: Jwillis
author_rank: Super Contributor
timestamp: April 03, 2023, 09:25:12 pm
content: Quote from: james_s on April 03, 2023, 09:20:28 pmNot really. Its a way to emphasize that connections need to to be kept as close to the regulator as possible.

author: misiek303
author_rank: Contributor
timestamp: April 03, 2023, 09:39:09 pm
content: 680 Cap, I screwed this one up. Thank you, corrected.Also changed LM to SX-3.3 from -ADJ. Is this correct ?I redrew the circuit, based on the new pinout locations.6th pin, is it just a heatsink?What about the fuse for 12V, if I need it at all. And additional spike protection, can you advise?Thank you so much

author: Bud
author_rank: Super Contributor
timestamp: April 03, 2023, 10:22:04 pm
content: 3.3 means it is a 3.3V part. If you need 5V you use the part with index 5.0, or ADJ with a resistor divider, see the datasheet for the adjustable regulator design procedure.

author: Jwillis
author_rank: Super Contributor
timestamp: April 03, 2023, 11:18:07 pm
content: Quote from: misiek303 on April 03, 2023, 09:39:09 pmYou can put a fuse on the input side if you like but won't be necessary since you have one on the load side.Arduino is usually supplied with 500mA from a USB so no more than a 500mA fuse would be required.Over voltage lock out could be added but really won't be necessary. The 680uF capacitor is probably enough.Main thing is to try to keep the coil orientated far enough away from the chip to keep EMI from the coil magnetic field interfering with the chip. A board layout is presented on page 32 of data sheet.

author: james_s
author_rank: Super Contributor
timestamp: April 04, 2023, 01:12:39 am
content: A fuse on the input side is advisable for an automotive application, unless you know the circuit feeding it is fused at a low enough value that the fuse will fail before something catches fire. Under normal circumstances you can rely on the regulator to protect against faults, but if the fault is with the regulator IC itself or the input filter capacitor then the protection features of the IC won't help.

author: james_s
author_rank: Super Contributor
timestamp: April 04, 2023, 05:57:15 am
content: Not much fun in that.

author: Eraldo
author_rank: Regular Contributor
timestamp: April 04, 2023, 02:04:48 pm
content: I'm failing to understand op. Does he just want stable 5v 3A or does he just want to try and build his own buck converter.Just wanna know if what he needs is functionality or a project to do in his free time. If functionality is what you need, just buy a buck converter off amazon or any other store with buck converters. In aliexpress you can get 8A ones for less than 5 euros.On the other hand if you just want to build your own then you will have to delay the main project where you seem to want to work on (which requires 5v 3A). Or, as Edavid said, just buy a capable car charger (which are buck converters in disguise) and youre done.You gotta be more specific with your needs op.

author: misiek303
author_rank: Contributor
timestamp: April 04, 2023, 02:20:43 pm
content: Quote from: Eraldo on April 04, 2023, 02:04:48 pmI am designing a board for my motorcycle that controls all lights and starts the bike. I want it all on one board. The board will use Mega2560 which will control ProFets. I will connect it to the 12V motorcycle battery to power it up, therefore the DC-DC buck converter implementation that I want to put on the board. Is this DC-DC buck overkill or should I look for a different approach?, like using an optocoupler with resistors?I started the other post to add one more feature. I need to sense another 12V input that comes from the Ignition Key[] GND[] 12V Battery constant power[] 12V Ignition KeySomebody responded that an optocoupler is sufficient. It must just sense the 12V ignition Key and trigger an IO on Mega to wake it up. So if I can do that safely with Optocoupler, why I can't use another one to power it up?Does this make sense?Thank you so much for helping out?

author: james_s
author_rank: Super Contributor
timestamp: April 04, 2023, 05:04:44 pm
content: An optocoupler is an isolated switch, you power the LED on one side and it causes the transistor to switch on and conduct on the other side. You can't power something through an optocoupler, each side needs its own power source.

author: misiek303
author_rank: Contributor
timestamp: April 04, 2023, 05:33:57 pm
content: Can optocoupler share the GND with input and output ?

author: james_s
author_rank: Super Contributor
timestamp: April 04, 2023, 05:36:40 pm
content: Sure, the two sides are totally isolated, they can share anything that doesn't need to be isolated. They're essentially a relay, except optical rather than mechanical.

author: misiek303
author_rank: Contributor
timestamp: April 05, 2023, 02:15:22 am
content: I did research and draw this. It is an inverted connection for the optocoupler. I wonder if bc817 should do it as well.As far as I understood, the inverted is pull-down and the non-inverted is the pull-up?I don't know why the attached drawing is inverted actually, I don't understand the physics here yet.Regardless, is this circuit correct?

author: misiek303
author_rank: Contributor
timestamp: April 05, 2023, 04:12:52 pm
content: ok, regardless.If I have input IO with PULL-UP enabled, Do I need to pull it down to change the IO state?if so. Do I need an inverted or non-inverted option and what does it actually mean, I get different information when I read things and this is so confusing.Thanks

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 05:10:10 pm
content: I'm not sure I understand what you're asking. Input pull-up is used for active low inputs, ie the default state is high and then you assert it by pulling it low. This is the most common way buttons and such are interfaced to a microcontroller.

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 05:11:51 pm
content: Quote from: misiek303 on April 05, 2023, 02:15:22 amThat can't possibly work, you've got +5V connected directly to the IO pin so that pin is hardwired high and there is no way the optocoupler can do anything with it.

author: misiek303
author_rank: Contributor
timestamp: April 05, 2023, 05:36:13 pm
content: Quote from: james_s on April 05, 2023, 05:10:10 pmThis is exactly what I want to achieve, what you just said. Is this circuit more like it?If not can you draw something for me?Also is this circuit inverted or non-inverted. I still understand this.

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 05:41:55 pm
content: No that's still not right, I'm beginning to feel like you are just randomly guessing how to connect things together. Have you read The Art of Electronics or taken any of the EE courses on Khan Academy? If you want to design circuits there is really no way around learning the basics, trust me on this, you will spend an enormous amount of time and frustration trying to figure things out if you have gaping holes in your understanding of the basics. Hang on, I'll draw this up for you.

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 05:49:33 pm
content: This is how it should be connected. You probably don't need the pullup resistor if you have the internal pullup enabled on the IO pin but in (electrically) noisy environments it can be helpful to have a stronger pullup.

author: misiek303
author_rank: Contributor
timestamp: April 05, 2023, 06:26:56 pm
content: Quote from: james_s on April 05, 2023, 05:41:55 pmYou feel it correctly. I have no clue what I am doing, therefor I am here in the beginner's group, hehe. I probably should start from the classes. I really want to accomplish something quickly, but it is overwhelming so I wonder if I should stop.Thanks for the drawing. I appreciate it.If you don't mind I have more questions.If the IO is pulled up internally, and if you want to change the pin state you short it to the GND, like a push button. So why in my circuit do I need 5V at all?

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 06:39:30 pm
content: You really should spend at least a few days going over the basics, you don't need to take a complete EE degree course but pick up the fundamentals. Basic circuit concepts, Ohms law, Kirchoff's law, series and parallel circuits, etc.You don't. 5V powers the microcontroller, that's the only place you need it, the internal pullup will pull the pin up to 5V with an internal resistor so to assert that input you short it to ground. If you use an external pullup you will need 5V for that too.

author: Zero999
author_rank: Super Contributor
timestamp: April 05, 2023, 09:56:56 pm
content: Has anyone noticed the circuit attached to the original post will only work up to 1A? Q1 and Q2 will never turn on. Their bases should be tied to the input of the 7805 and R1 & R2 should be an ohm, not 1k. F1 is not needed because the regulator will limit the current. F2 should be on the supply side to the entire regulator to protect the cable in case the it fails short circuit.

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 10:02:09 pm
content: I didn't even look at it to be honest, in this day and age there are few reasons to go with a 78xx regulator and external pass transistor, it's so easy to build a working buck converter now that it makes sense to do so in most cases where you need more than a couple hundred mA or so. The only time I'd consider linear is if I needed very clean power or some other specific need.