What is this FET doing? (new question)

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I'm researching and trying to understand ELM's schematic for interfacing with an MMC/SD card and not quite sure what the P Channel MOSFET (Q1 located by coordinates C2) is doing.

I understand the basic use of FETs but I've never seen it used like this.

I found the part at Digikey http://search.digikey.com/script... but I'm looking for a through hole replacement. Would any >1.4A P Channel MOSFET work?

Would this be an adequate replacement? http://search.digikey.com/script...

http://elm-chan.org/fsw/ff/00ind... is where the project is originally from for anyone that is interested.

Thanks a lot for your time.

Attachment(s): 

Last Edited: Wed. Aug 6, 2008 - 04:07 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Q1 simply enables/disables the card.

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hehe now I feel a bit dumb for not seeing that. Setting PE7 high would disable the SD the card right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is a P-Channel mosfet and it is used to control the power supply of the SD Card circuitry including it's peripheral passive components. As you see you can the power supply is 3.3V, this means that you can feed the whole circuit from a battery, so there is a reason for low power consumption. Telling you the truth, I never used a memory like this, I don't know if there is an other reason.

There is no need of a high power MOSFET, because the current must be low. You can find mosfets for your needs from www.irf.com or you could use even a p-channel bjt transistor for doing the same thing (by keeping it in the saturation area).

I hope this helps.

Michael.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anything that passes 200mA (maximum peak the card will ever take) with minimal voltage drop will do. My device has some random 200mA PNP transistor. Note that the big hefty 4.7uF cap will draw a lot of current when the FET is turned on, so the peak current might be like 1A for a microsecond. I guess that is why the inductor is there too, to limit the inrush current. It might blow some normal small signal transistor if it can't handle the current.

But in the schematics the FET gate must be pulled low (not high) to turn the FET on - it's a P-FET.

I would not drive a LED with the CS signal by the way. At least not with so big current.

Apart from the LED part, the SD card interface is done by the book! Use it without modification and it will work. Perhaps smaller capacitor or omitting the inductor are the only modifications I would let anybody do there :)

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Anything that passes 200mA (maximum peak the card will ever take) with minimal voltage drop will do. My device has some random 200mA PNP transistor. Note that the big hefty 4.7uF cap will draw a lot of current when the FET is turned on, so the peak current might be like 1A for a microsecond. I guess that is why the inductor is there too, to limit the inrush current. It might blow some normal small signal transistor if it can't handle the current.

There i no possibilty for high peak currents. That's why there is an L-C low pass filter that feeds the circuit.

Quote:

But in the schematics the FET gate must be pulled low (not high) to turn the FET on - it's a P-FET.

No, it's a p-channel MOSFET and it's pulled fine. When the AVR set the PE7 to '0', then the MOSFETs GS voltage is near 0V. Also you must have seen that there is no gate resistanse, that's why it's a MOSFET and it's gate need to sinc of it a very low current, to be active.

Quote:

I would not drive a LED with the CS signal by the way. At least not with so big current.

If this LED is red, then it's current will be at 15mA. Probably you can feed it with lower current (make the resistanse 330 Ohms). But there is no problem for 15mA more to flow throu the MOSFET, also the LC filter will make no effect to the LED circuit.

Michael.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

icarus1 wrote:

There i no possibilty for high peak currents. That's why there is an L-C low pass filter that feeds the circuit.

And the inductor is so big that yes it propably will. I am mostly got used to see ferrites there instead of real inductor, so with only a ferrite there would be surge currents.

icarus1 wrote:

Quote:

But in the schematics the FET gate must be pulled low (not high) to turn the FET on - it's a P-FET.

No, it's a p-channel MOSFET and it's pulled fine. When the AVR set the PE7 to '0', then the MOSFETs GS voltage is near 0V. Also you must have seen that there is no gate resistanse, that's why it's a MOSFET and it's gate need to sinc of it a very low current, to be active.

We are talking about same thing here I suppose. Yes you are right again, there is no such thing as a P-FET, it is a P-channel enhanced type metal oxide semiconductor field-effect transistor. And it is turned on by pulling the gate voltage low, like you and I described earlier. I've said nothing about gate resistor or current - but now that you mentioned it, FETs are actually charge controlled devices (not voltage) so in some applications (not here?) there would be a need for a gate resistor in the 10R-100R range to limit the gate charging current to some safe level so that the AVR IO buffers don't burn out and also to prevent ringing of the switched voltage.

icarus1 wrote:

Quote:

I would not drive a LED with the CS signal by the way. At least not with so big current.

If this LED is red, then it's current will be at 15mA. Probably you can feed it with lower current (make the resistanse 330 Ohms). But there is no problem for 15mA more to flow throu the MOSFET, also the LC filter will make no effect to the LED circuit.

Michael.

I am not worried about the FET, I am more worried about the I/O pin on the AVR, driving a 15mA LED while the output voltages and signal fall and rise times should still be in spec for the memory card.

Although I like the LED idea, it can be used to quicly drain the storage cap when the FET turns off. I would not drive the LED with a IO pin but directly with card's supply, so every time the card is powered the LED is on.

By the way controlling inductive loads that consume current in the max range of 200mA is like controlling a relay - just in case of an inductive kickback there should be a protection diode to GND from the FET drain.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've finished a fun project using Sparkfun's bluesmirf bluetooth module and want to continue using it for my projects. Since I'm a poor student and the module is $65 I'm looking into seeing if its possible to be able to use it in multiple projects with just one module. What I do is use my cellphone to serial to the uC and the phone would display parse and properly display the data.

From my previous question about the mosfet and the replies I got an idea to my problem and I was curious on your guys/gals feedback on whether it would work.

I made the simplest schematic of what I wanted. Note I forgot to put in the crystal it will need to be able to hit the 115k baud rate it needs to communicate with the bluesmirf.

What I'd like to do is make it that I can plug in and out the bluesmirf between projects while not having to power down the uC itself or damaging anything electrically.

Here is what I am trying to do:
if LED is off I can plug in module then hit SW1 and alert the uC that it needs to wakeup, set the proper properties for USART communication. Then set Q1 on, power bluesmirf wait 1 second, enable USART ISR. LED should be on now.

if LED is on hitting SW1 will turn turn off all the USART communication properties, disable USART ISR, turn off Q1, turn off LED. Sleep uC, remove the bluesmirf safely.

Will this work? One thing I am worried about is the forward voltage drop of the mosfet lowering the voltage the bluesmirf needs.

Thanks in advance :D

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When PE7 is pulled low, VGS is nearly (-)3.3V, not 0V. A minor point, but it might confuse those not comfortable with MOSFET biasing.

"It's easier to ask forgiveness than it is to get permission" - Admiral "Amazing" Grace Hopper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microsuffer wrote:
When PE7 is pulled low, VGS is nearly (-)3.3V, not 0V. A minor point, but it might confuse those not comfortable with MOSFET biasing.

A minor point, but it's an N-channel FET switching the bluetoot ground, pulling drain to ground when gate voltage is high (3V3), and not conducting when gate voltage is 0.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are confused. (Welcome to my world, I only visit clear thinking now and then.) PE7 is controlling a P-ch FET in the original schematic. The Bluetoot(h) schematic uses PB-0 for the N-ch. :-)

With respect to the latter, ground switching isn't generally a good idea when you have signals that need to cross between the two ground domains. The original circuit's VCC switch is a better bet.

"It's easier to ask forgiveness than it is to get permission" - Admiral "Amazing" Grace Hopper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay, so we were talking about different schematis - sorry.

Yes I'd suggest switching of VCC too, but in either case, the data pins have to be disabled (put to inputs) so that when power is disconnected, the bluetooth device does not get power via protection diodes in data pins (AVR TX outputs high when idle).

Far better idea would just be to disconnect and/or connect the bluetooth while power is off... from the whole circuitry. And use a connector which connects ground first, then supply, and then data pins (USB does this). And still you need to take care things like ESD, the modules are propably do not take lot of ESD spikes like for example USB bluetooth dongles. Accumulated charges may discharge via any pin if GND is not connected first, and even then if you happen to touch say VCC or data pins, the ESD pulse might go through VCC/data to GND, breaking something.

(Yes, I have a friend who touches people before giving anything electronic to them. He's not gay or anything, he just makes sure he and the other person are in the same potential so things like PCI cards don't get zapped when both touch the card.)

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, you have to be careful when designing things that plug in hot. Sneak paths can cause interesting problems. I prefer to look for ways to automagically discover the daughter has been removed or inserted so that the interface can be shut down or powered up properly and avoid potential unwanted interactions.

I too have excited a few people quite by accident. With real sparks. Great fun for the exciter, not the excitee.

Even without such obvious evidence of static discharge I have learned to treat semiconductors and boards as far more fragile than they are. When working in the lab I insist all who enter have smocks and heel straps. If you want to pick up something you have to use a wrist strap. This has a side benefit of keeping managers out.

"It's easier to ask forgiveness than it is to get permission" - Admiral "Amazing" Grace Hopper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks a lot for your comments Jani and Micro!

Since I really need only 4 pins to plug in I will look into using a USB plug itself if possible.

I also have a better idea of what I must do for the code.

Mind explaining why/how ground switching affects the signals between the ground domanis while high switching doesn't? (or what I'd want to goggle)

Thanks a lot for your help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The volts always want to find themselves a path back to 0V (ground) and as Micro explains, you can get 'sneak' paths - that is currents flowing in places you didn't anticipate and probably don't want. Switch Vcc and you don't have volts available to cause this problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
The volts always want to find themselves a path back to 0V (ground) and as Micro explains, you can get 'sneak' paths - that is currents flowing in places you didn't anticipate and probably don't want. Switch Vcc and you don't have volts available to cause this problem.

I see, thanks Kartman.

I've modified the schematic and will be using USB connectors this way I can get the benefits of their engineering for cheap :twisted:

The USB receptacle has a metal sheath that I will also connect to ground to hopefully reduce ESD issues.

I'm using the proper USB pinout so I can make sure the ground pin makes contact before the data lines.

Attachment(s):