3
\$\begingroup\$

I am looking for a high side switch to turn a Bluetooth module off when not in use. The module uses 100mA at most and runs on 3.3V. I am using a ATMega328 to talk to the module and it runs at 5V.

How can I use a P-MOSFET in a high-side switch circuit to switch these low current levels using 5V logic?


Lacking the ability to add an answer:

Would this work, perhaps?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 1
    \$\begingroup\$ I am confused. Do you have 3.3V on your board already, and you just want to put a switch between 3.3V main rail and bluetooth? Also, are you sure it is OK to use 5V IO talking to a 3.3V module? Anyway, there are hundreds of suitable parts available, and the circuit is dead easy. \$\endgroup\$ – mkeith Feb 26 '15 at 6:48
  • 1
    \$\begingroup\$ Here is a MOSFET that might work: diodes.com/datasheets/DMG2305UX.pdf \$\endgroup\$ – mkeith Feb 26 '15 at 7:23
  • 3
    \$\begingroup\$ @Bertus - Almost any P Channel MOSFET will do. The one that MKeith suggests is OK but many others will do. You probably want say <= 0.1V drop when on so Rdson <= V/I. For eg 20 mA R = 0.1V/0.020 A = less than 5 Ohms which is a very easy spec to meet. The DMG1013 T will do the job and costs 31 cents in 1's in stock Digikey Datasheet \$\endgroup\$ – Russell McMahon Feb 26 '15 at 10:23
  • 1
    \$\begingroup\$ @mkeith the RX/TX is covered with level shifters(BSS138). \$\endgroup\$ – Bertus Kruger Feb 27 '15 at 0:28
4
\$\begingroup\$

Your schematic is largely OK, with these issues:

  1. Lose D1. It is doing nothing useful. You already have a only 3.3 V to switch the FET with. D1 will eat up another 600 mV or so. Just direct connect the digital output to the gate of the PFET. R1 is still a good idea since that will keep the FET off during startup before the pin is actively driven one way or the other.

  2. Make sure the FET can switch well enough with only 3.3 V gate drive. There are certainly FETs that can do this, but it is not something you expect a randomly picked FET to do.

  3. Check the FET's on resistance with 3.3 V gate drive. Make sure the voltage drop caused by that times the 100 mA current is acceptable.

Added:

Russell pointed out that the digital signal to control the gate is 0-5 V. I guess that you think the diode is there to protect the gate from reverse voltage. That is very likely unnecessary. As always, read the datasheet for the parts you are using. 1.7 V reverse on the gate is probably fine.

If you're worried about the processor dumping current onto the 3.3 V line thru R1, then make R1 bigger. It only functions when the processor pin is not driven, which should only be for maybe a few 10s of ms while the processor starts up and before the firmware gets around to driving the pin one way or the other. Does it matter if the bluetooth module powers up and draws 100 mA for a few 10s of ms at power up? If not, then you can leave off R1 altogether. Since both the FET gate and the processor output will be high impedance when the processor pin is configured as input, a rather high value resistor will do. 100 kΩ should be fine. Probably even 1 MΩ would be fine, but check the input pin leakage current in the processor datasheet.

\$\endgroup\$
  • 1
    \$\begingroup\$ He's driving the circuit from a 5V processor and wanted minimum power. While driving the gate above 3.3V is tolerable, D1 keeps the 3V3 area at 3V3 max (which may not matter) and removes dissipation in R1 when off. (R1 could be say 100k in most cases.) \$\endgroup\$ – Russell McMahon Feb 26 '15 at 14:34
  • 1
    \$\begingroup\$ @Russell: I didn't notice the 5 V output level. Answer updated accordingly. \$\endgroup\$ – Olin Lathrop Feb 26 '15 at 14:50
  • 1
    \$\begingroup\$ Full disclosure :-) - I put that circuit there "in a rush" as the question had been "accidentally" put on hold as a shopping question. I agree with your points. 10k was a default value that I missed erasing. The D1 addition was to cover all bases when giving a circuit to an inexperienced designer whose use and understanding thereof was not 100% certain. (Schottky would be even better). I agree that some MOSFETs would have low drive there. I suggested a DMG013 - datasheet as a low cost one that would do his job well. [Vds at 100 mA < 0.1V] \$\endgroup\$ – Russell McMahon Feb 26 '15 at 23:59
  • \$\begingroup\$ Thanks @RussellMcMahon and the rest. I am going to try out the suggestions and see that I can learn from it. \$\endgroup\$ – Bertus Kruger Feb 27 '15 at 1:17
2
\$\begingroup\$

You don't mention whether or not your 3.3V rail is used for anything else, but if not, I propose another solution.

Use a LDO with an enable, powered from your 5V rail, such as this LP38693. It's a little expensive for what you're doing, just thought of it since I used it recently. There a plenty of comparable regulators on the market.

schematic

simulate this circuit – Schematic created using CircuitLab

The inrush current will be fairly well behaved, which may or may not be an advantage depending on your power source. Since the part will be powered from 5V, a 5V logic enable signal will be fine.

\$\endgroup\$
  • \$\begingroup\$ Excellent point!!! I will investigate it, at the moment I am powering my AMS117 with a 12V power supply but I like the idea of reducing the part qty. (Only running the Bluetooth of the regulator) \$\endgroup\$ – Bertus Kruger Mar 1 '15 at 5:36

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.