EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: thunderbolt87 on October 13, 2015, 11:41:04 pm
-
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) <--[5V]-- ISP
So 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/636 (https://www.maximintegrated.com/en/app-notes/index.mvp/id/636) explains 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
-
What do you guys think? Is there an easier way out?
Just 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.
-
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.
-
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.
-
Thanks for the comments given so far!
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.
I'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.
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.
Thanks 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.)
What do you guys think? Is there an easier way out?
Just 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.
Yeah, 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 ;-)
-
I still don't see the problem. the programmer will work with 3.3V, you power on your circuit and program it, simle as.
-
I still don't see the problem. the programmer will work with 3.3V, you power on your circuit and program it, simle as.
Yeah 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. :palm: