Save a Buck (Converter) - Page 1
Forum section: electronics / beginners

author: thunderbolt87
author_rank: Contributor
timestamp: October 13, 2015, 11:41:04 pm
content: Hi there,I'm currently working on a project with a microcontroller @3.3V powered from a buck converter (MCP16301) like that:DC Jack --[18 V]--> (Buck) --[3.3 V]--> (MCU)Next thing to do is place an ISP header for programming. However, most programmers supply 5V and I'd like to avoid any damage in that case.So I guess I need a VReg (LDO) for 5V->3.3V conversion (and a logic level converter, but that I manage), right?DC Jack --[18 V]--> (Buck) --[3.3 V]--> (MCU) <--[3.3 V]-- (LDO) <---- ISPSo I'd end up having both regulator outputs in parallel powering VCC, which is a bad idea(FET reverse body diode would conduct through the inductor, LDO could also go up in smoke, ...)To resolve this situation, my first thought was to use two diodes as a "wired-OR".However introducing a Vf drop after regulation is nonsense.https://www.maximintegrated.com/en/app-notes/index.mvp/id/636explains how to make use of a FET for reverse polarity protection. Using the circuit from fig 5 after each of the regulators, however, I end up having both FET's gates and sources in parallel, making them both conduct at the very same time => short circuit between both regulator outputs, again (Screenshot 1).I came up with a solution after all (Screen 2). But it seems overcomplicated, doesn't it?What do you guys think? Is there an easier way out?Being a newbie, I'm grateful for ANY feedback. Thanks!Cheers,Felix

author: sleemanj
author_rank: Super Contributor
timestamp: October 14, 2015, 12:58:45 am
content: Quote from: thunderbolt87 on October 13, 2015, 11:41:04 pmJust because your programmer CAN supply power doesn't mean it HAS to supply power. Just power it from your power supply during both programming and normal operation, ignore the 5v output from your programmer entirely, leave it unconnected. As long as the grounds are referenced (or even more ideally optically isolate your signals) then that's all you need.

author: con-f-use
author_rank: Unknown
timestamp: October 14, 2015, 05:53:13 am
content: As above, plus we have plenty of buck chips that can use both input voltages (18V and 5V). E.g. the AOZ1280 has an input range of 3-26V.

author: Simon
author_rank: Unknown
timestamp: October 14, 2015, 07:01:10 am
content: what family of uC are you using ? AVR programmers start at 1.8V and PIC programmers can go low as well, certainly to 3.3V, last time I used one you could make it output a certain voltage.

author: thunderbolt87
author_rank: Contributor
timestamp: October 15, 2015, 06:27:21 am
content: Thanks for the comments given so far!Quote from: Simon on October 14, 2015, 07:01:10 amI'm using the Atmega32u4, which has a safe operating range of 2.7V ~ 5.5V. However, it is interfaced to various circuitry that is 3.3V only. So, I'm also worried about those components.Quote from: con-f-use on October 14, 2015, 05:53:13 amThanks for the hint but that would just relocate the problem to before the buck. Again, I'd have to think about reverse current flow.(There's more circuitry on the 18V rail which I did not mention.)Quote from: sleemanj on October 14, 2015, 12:58:45 amYeah, I thought it'd be nice to have the ISP programmer power the microcontroller while programming, leaving the rest of the circuit unpowered.Now I feel like it's more sensible to do as you suggest. I will have the other circuitry turn off while RESET is LOW.As I mentioned in the OP, I will use a "logic level converter" (SN74LVC125AD, 5V-tolerant buffer).I think it might also be sensible to power it off when no ISP is connected, because the datasheet discourages leaving inputs floating.I'm going to use the ISP's supplied VCC only to detect the ISP. When present, the buffer will be powered (from the 3.3V).Please judge the solution in the attachment ;-)

author: Simon
author_rank: Unknown
timestamp: October 15, 2015, 06:44:25 am
content: I still don't see the problem. the programmer will work with 3.3V, you power on your circuit and program it, simle as.

author: thunderbolt87
author_rank: Contributor
timestamp: October 15, 2015, 07:00:48 am
content: Quote from: Simon on October 15, 2015, 06:44:25 amYeah tell that to my stupid USBasp china clone crap, for example. It has a selection jumper 5V / 3.3V. Awesome!I was lucky to not trust it and put the signals on the oscilloscope before connecting it to a 3.3V circuit.The Vcc was 3.3V, nice. But the MOSI, CS, etc. were all at 5V.