Author Topic: Help with simple mosfet switch  (Read 850 times)

0 Members and 1 Guest are viewing this topic.

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Help with simple mosfet switch
« on: October 18, 2020, 12:00:06 am »
Hello,

I am using the following circuit to turn a MAX31855 thermocouple amplifier on and off from a microcontroller:

.

The microcontroller will supply 0V to keep the NMOS turned off, and thus the PMOS, or 3.3V to allow the PMOS to supply 3.3V to the MAX31855.

When booting up, everything looks fine, I get 0V out of the PMOS drain, switch on the NMOS for a bit, but when I switch the NMOS off again, the PMOS output is held at roughly 1.85V:


(CH1 = gate of PMOS, CH3 = drain of PMOS)

Subsequent toggles look like this:



I admit, I don't know why that's happening. I expected the PMOS to shut down fully because of its pullup to 3.3V.

What am I doing wrong?

TIA!
Edit: I realize I can probably drive the PMOS directly from the microcontroller, huh?
« Last Edit: October 18, 2020, 12:06:10 am by mayor »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3083
  • Country: us
Re: Help with simple mosfet switch
« Reply #1 on: October 18, 2020, 12:18:25 am »
I would check the actual current draw when the PMOS is off. The MAX31855 might not draw that much current if not selected and the cap C2 might be holding a residual voltage.

That said, I would check the current draw of the MAX31855 when not selected. If it is low enough you might not need to power it down.

 

Offline SmokedComponent

  • Regular Contributor
  • *
  • Posts: 60
  • Country: si
  • Emitting smoke
Re: Help with simple mosfet switch
« Reply #2 on: October 18, 2020, 12:22:36 am »
Maybe that's actually coming from MAX31855's Vcc pin, getting power through its data pins?
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1902
  • Country: us
Re: Help with simple mosfet switch
« Reply #3 on: October 18, 2020, 12:28:15 am »
I haven't looked that that Maxim part, but might there be internal input protection diodes on the CS#, SCK, and SO pins?  If so, these (especially CS#, which is normally pulled high) will feed current into the VCC pin, bringing it partially high.  This by itself wouldn't explain why the VCC pin starts out at 0V though...

[SmokedComponent beat me to it]
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Online Peabody

  • Super Contributor
  • ***
  • Posts: 2056
  • Country: us
Re: Help with simple mosfet switch
« Reply #4 on: October 18, 2020, 12:32:58 am »
If the voltage on the PMOS gate is 3.3V when you see 1.85V on the drain, then current may be flowing through the SO, SCK and CS pins (if any of them are high), through their protection diodes to Vcc, then back to the PMOS drain.
 
But yes, it looks like you could power the MAX31855 directly from a GPIO pin provided you also bring those serial pins low when you want to power it down.
 

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: Help with simple mosfet switch
« Reply #5 on: October 18, 2020, 01:13:36 am »
@ledtester: it draws roughly 1.5mA (from the data sheet), which is too much for the application.

@SmokedComponent, thanks for the suggestion! I was keeping CS high even when the MAX31855 was shutdown. So boom that was it!

@fourfathom: the reason it starts ok is software. The first read happens at time "t", and CS was low until that first read.

@Peabody: yep, as you can see above!

Thanks all.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf