0
\$\begingroup\$

I'm using a 3.3V atmega2560 to disable a switching regulator that's operating on a ~12V battery. The EN pin on the switcher is pulled up to the battery voltage, and needs to be driven to ground to disable it. Clearly this is outside what the uC can do. My (very rudimentary) understanding is that I can achieve this with an N-MOSFET, by tying it to the enable pin like this:

enter image description here

Will this work? It looks a bit like I'm creating a short (V_BATT -> R1 -> Q1 -> GND), but I assume that's not an issue given the size of R1.

EDIT

I've got two such regulators: http://www.ti.com/lit/ds/symlink/lm2734.pdf http://www.ti.com/lit/ds/symlink/tps62125.pdf

One thing I'm not sure of is whether as asked in the comments, the EN voltage has to be tied to VIN, or if it just needs to be above some absolute value. There's discussion in the datasheets about EN thresholds, but they make no mention of whether these are thresholds relative to VIN or absolute values:

enter image description here

That said, TPS62125 does need to be tied to VIN to avoid a catch 22 - it powers the MCU, and a supercap that the MCU uses for power when it puts the system, and the regulator to sleep. So - until that supercap is charged for the first time, there is nothing to activate the regulator except the battery.

\$\endgroup\$
8
  • \$\begingroup\$ Any particular reason to prefer a MOSFET over a BJT? \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 6 '14 at 3:49
  • \$\begingroup\$ a bit more experience with using them, that's about it. plus, i already have a few in the design, so can just order a few more of the same part. any reason not to? \$\endgroup\$ – kolosy Aug 6 '14 at 3:50
  • \$\begingroup\$ Yes, it will work. \$\endgroup\$ – Mishyoshi Aug 6 '14 at 3:50
  • 1
    \$\begingroup\$ Does the EN pin need to be held to 12v or can it be tied to 3.3v? If the EN pin can be controlled by 3.3v you could just only the uC. \$\endgroup\$ – whatsisname Aug 6 '14 at 3:54
  • 1
    \$\begingroup\$ whatisname is probably right, you may tie your MCU directly to the pin and even use an internal pull-up from your MCU to drive the voltage regulator. Most voltage regulators check whether you are or not over a diode drop or two from 0V, but the actual voltage is only clamped by the Vin voltage. If @kolosy could provide the datasheet of its voltage regulator... \$\endgroup\$ – Mishyoshi Aug 6 '14 at 4:04
0
\$\begingroup\$

Yes, you can connect the EN pin to ground through a transistor, and control the transistor with the microcontroller. You are correct, the 100k resistor prevents a short circuit and the current will be quite low, so it will not damage anything.

You may use an NPN BJT or an N-Channel Enhancement mode MOSFET, assuming you are using a positive voltage to do the switching. If you wanted to use a negative voltage (which you probably wouldn't since you're using a uC), then you would want to use a PNP or P-channel Enhancement mode MOSFET.

As already mentioned, since the enable threshhold rising-edge voltage only has to be 1.8v, and the disable falling-edge voltage has to be a maximum of 0.4v, then you can control it directly with your microcontroller, but make sure you don't forget the pull-up (which you already have). If you left it floating, it could cause some funky behavior and possibly even damage your circuitry.

I realize I am not the first person to answer your question, so only accept my answer if the others who already posted comments don't re-post as answers.

\$\endgroup\$

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.