I'm back again with another headache of my own creation. It seems I'm constantly learning things the hard way.

Straight to the point questions:

  1. I've noticed that my reverse voltage protection mosfet interacts with another p-mosfet switch in a bad way (yikes!). Does making the mosfets identical help with this interaction / do I want the switch to be more / less capacitive than the other?

  2. I've made four copies of this design. One "works" and the others (that are in my opinion much more cleany routed) don't. Can sloppiness in soldering ever contribute to system performance?

  3. Are there any easy ways to tell if a microcontroller is browning out vs resetting? (I'm thinking just scope the reset line / add a cap and see if it goes away?)

How I got here:

I'm making microcontroller switch boards. The design utilizes three mosfets: 1: Reverse voltage protection (p-mosfet) 2/3: n-mosfet / p-mosfet pair to turn on a 12V rail.

Here is the full diagram of the circuit: Circuit layout

It seems like a simple circuit! I have used this type of circuit all the time (minus the reverse voltage protection). I figured everything would be aok. I constructed one, and it worked as expected. All good, right? So I made three more. None of the new ones work. The microcontroller resets when the switch is thrown (brownout?). After some head scratching I got out the oscilloscope and attached the leads to the 12V rails after each mosfet, the 3v3 rail after the first regulator, and the flip signal to the n-mosfet gate:


Looks innocent enough. ENHANCE!

uh oh

Uh oh. Is that a wiggle? ENHANCE!

enter image description here

Great. So I have a HUGE ripple going through my system. That needs to get fixed, right? I'm assuming this is part of the problem. (4V overshoot on the 12V... and a 3v3 ramping to 5v5... ouch). The 5.5v might significant because the microcontroller is rated for 1.8-5.5V? I know the controller shuts down if it's below 2v7. I'll change the brown-out level and see if that helps, but figure I should address the ripples head on.

I've researched the options.
1. Put a cap on my reset line (2V might be reading as logic low?)

  1. Put larger caps on v_out for regulators. Currently I have the recommended 2uF, but it's not looking like it's enough?

  2. Slow down the turn-on:

I plan on going with swapping the n-mosfet with a transistor (and maybe an rc circuit to drive as well). It's a battery operated circuit, so I'd like to save current (hence the n-mosfet). I'll watch the spec's for the mosfets to make sure I don't fry them on the way up, but this is a once/day thing so they have plenty of time to cool. Are there any tips / things I'm overlooking?

Also one other thing: The first circuit I built has WORSE swings (on the 12V rail) but seems to hold it's own / doesn't reset. I'm unsure of whether the reset is because of brownout, or because of the reset switch (I will add those pictures soon). The reset area is a little bit of a maze, so maybe the capacitance of the wiring is helping out? Any thoughts on this?

successful switch

Many many thanks as always. Matt

UPDATE: Sure enough, sometimes you gotta slow down. I'll let the data speak for itself:

Fast and slow

"Quick" bootup of 40uS

I put a 100k resistor on the gate of the large mosfet. Slowing that down prevented squeezing the system all at once. Great response. Clear as night and day. I'm going to get started on chapter 2 of horowitz. Really should get a solid grasp on this stuff. Thanks jp!


The ringing is possibly because you have long wires at your input or output, but that is not generally a problem. Do you have a good ground connection when doing those measurements ? It is possible that the ringing is not real.

Consider slowing down the turn-on of the high side PMOS -- put 10k .. 100k in series with its gate.

  • \$\begingroup\$ I believe the ringing was real? (although you did make me doublethink about over-trusting my equipment). Any rules of thumb for osclliscope values being non-sensical? (I have a 200MHz scope, so I should be good up to timescales of... 100Mhz -> .01uS?... as far as grounds, are you referring to them shifting around, thereby creating the illusion of a wiggle?) I have three wires soldered together and looped around the edges of the board. I was clipped into one of them with all 4 probe-leads. The response is WAYYYYY better now (like wayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy). Thank you very much. \$\endgroup\$
    – bathMarm0t
    Dec 2 '15 at 4:56
  • \$\begingroup\$ One way is to probe 'ground' with the probe tip. If you see something, it's not grounded with the clip properly, or 'ground' isn't ground ! \$\endgroup\$
    – jp314
    Dec 2 '15 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.