1
\$\begingroup\$

I have a problem: I have a circuit with a MSP430 MCU. I have a sensor which is supposed to be powered in 3.3V. My main power rail in my circuit is 3.3V. I need to power on and power off this sensor using a GPIO to pilot the power, so I suppose I need to use a transistor BJT being controlled by GPIO to let go the current in on/off mode into the sensor. Problem is power rail value = sensor value and my transistor got VCEsat = 0.7V (or I can also change it to -0.7V) So how do I manage with the Resistor value (R208) ?

enter image description here

\$\endgroup\$
  • \$\begingroup\$ What sensor are you trying to turn on / off? If the sensor draws less than 3-4mA, you can power it straight off a pin on the MSP430. The datasheet specs a max current source of 6mA from a pin on the MSP430 \$\endgroup\$ – CHendrix Aug 4 '16 at 11:45
  • \$\begingroup\$ @chendrix the sensor draw 100mA \$\endgroup\$ – chris Aug 4 '16 at 11:59
0
\$\begingroup\$

With a collector current of 100 mA, the BC807 would have a typical saturation voltage of about 50 mV:
BC807 VCE(sat)

However, even if you can live with this 50 mV, this would require a base current of about 10 mA, which is too much for your MSP430FR2311.


A P-channel MOSFET can give you a smaller voltage drop:
switching power to sensor with P-channel MOSFET

This requires that Q1 is a FET with an RDS(on) value of much less than 500 mΩ; some widely-used models would be DMP2066, IRLML6401, or FDN338P.

\$\endgroup\$
  • \$\begingroup\$ Thank you very much;, I am going to implement this. Thank you for the scheme ,it helps a lot. \$\endgroup\$ – chris Aug 5 '16 at 7:51
  • \$\begingroup\$ I will go with th fairchild one. \$\endgroup\$ – chris Aug 5 '16 at 9:08
  • \$\begingroup\$ I have another question: I have similar concern with using a 3.3V relay instead. Should I use a Mosfet or a BJT ? \$\endgroup\$ – chris Aug 5 '16 at 9:09
  • \$\begingroup\$ Again, depends on how much of a voltage drop over the transistor you can afford. \$\endgroup\$ – CL. Aug 5 '16 at 9:10
1
\$\begingroup\$

Get rid of R208 and use a low on-resistance N channel MOSFET instead of the BC817. Make sure the MOSFET is turned on enough with a 3V3 IO line - look at Alpha and Omega - they have some low gate threshold devices.

\$\endgroup\$
1
\$\begingroup\$

I second Andy's answer. Here is how the LEDs on my CC3200 Launchpad are connected. You could use a similar arrangement and replace the LEDs with your sensor. VCC_BRD is 3.3V and the GPIO lines are active high at 3.3V.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ yes but your LED are not powered in 3.3V since you have the resistor there. in my case my sensor has to be powered by 3.3V \$\endgroup\$ – chris Aug 4 '16 at 12:16
  • \$\begingroup\$ @Chris: The resistors are current limiting resistors for the LEDs. You can remove them along with the LEDs (as long as your sensor does not need a current limiting resistor). \$\endgroup\$ – electrophile Aug 4 '16 at 12:47
  • \$\begingroup\$ what i don't understand is why use a mosfet instead of a bjt ? \$\endgroup\$ – chris Aug 4 '16 at 12:56
  • \$\begingroup\$ MOSFETs do not require much current on their gate pins to turn them ON. Since their Ron is quite low there is less drop across them which makes them more advantageous in low power applications. \$\endgroup\$ – electrophile Aug 4 '16 at 13:18
2
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

The sensor will always be connected to ground on one end. The power supply can be enabled or disabled by the MCU. this is just the basic FET based switch. Advantage here is that, the sensor can always have ground reference. FETs can be from TI. the threshold voltage is well with in 2 V to turn on the FET.

Correct me if i am wrong.

\$\endgroup\$
  • \$\begingroup\$ What is the purpose of the N-channel FET? \$\endgroup\$ – CL. Aug 4 '16 at 15:00
  • \$\begingroup\$ To turn on P Mosfet, gate has to be certain voltage below the source. Since source is at 3.3 V, N Mosfet helps in connecting gate of P Mosfet to ground. In order to turn off P Mosfet, N Mosfet is turned off by MCU. Assume, if the sensor supply would have been 5 V. Then, if we didn't had N Mosfet, the P Mosfet cannot be turned off by the MCU gpio. Because , maximum output voltage of gpio is 3.3. The voltage at the source pin of P fet is 5 V. It will not be turned off. Just a precaution. \$\endgroup\$ – Umar Aug 5 '16 at 3:47
  • 1
    \$\begingroup\$ In other words, you are using the N-ch FET as a level shifter. This is not necessary in this particular circuit. \$\endgroup\$ – CL. Aug 5 '16 at 6:30
  • \$\begingroup\$ Not necessary. Yes. \$\endgroup\$ – Umar Aug 5 '16 at 6:49

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.