Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MOSFET and PIC

Status
Not open for further replies.

merk

Member
I need to draw a circuit diagram how to connect pickup coil (2 wire tacho generator) to a 8 bit PIC microcontroler in order to read the signal.
I found some schematics on the internet (attachment 1), that I don't see being correctly done. I don't understand why there is a rectifier diode and 10k resistor on the source pin of mosfet, when source should go to ground. Also don't understand why author uses 220 resistor on the gate.

On the attachment 2 (from wikipedia) there is a simple circuit using MOSFET to switch a LED, so according to this I draw my own schematics (attachment 3), that I would like to discous if it will work to connect AC signal from pickup coil to INT pin of the PIC microcontroler (I intend to use INT interrupt).

On the last attachment I posted the schematics for 2N7000 N channel MOSFET from the datasheet, that I also don't really understand. I don't see why a Rgen resistor is needed and what is the purpouse of Vin.

As far as I understand, MOSFETs work in a way where voltage on the gate open/close the barrier between drain and source. On a N channel MOSFET load is on the drain pin, source goes directly to ground. If I am not mistaken you also don't need to limit current through gate to source as there is sufficient internal resistance.
 
Before worrying about how FETs work, what does the pick-up coil put out? Voltage, current, frequency, waveform, amplitude?

How much voltage gain do you need?

Do you need to "rectify" the output?

What is the pic trying to detect?

Why do you think you even a FET?
 
Last edited:
I need to draw a circuit diagram how to connect pickup coil (2 wire tacho generator) to a 8 bit PIC microcontroler in order to read the signal.
I found some schematics on the internet (attachment 1), that I don't see being correctly done. I don't understand why there is a rectifier diode and 10k resistor on the source pin of mosfet, when source should go to ground. Also don't understand why author uses 220 resistor on the gate.

Source is connected to ground. Check the schematic again. The 10K produces a voltage drop that is Vgs for turning on the mosfet. The diode is to rectify the input. The 220 Ω resistor is the gate resistor. The gate acts as a capacitor. A gate resistor acts to limit its charging current. That slows down the turn on, and it also acts to limit oscillation of the gate ("ringing"). Sometimes it is not required.

On the attachment 2 (from wikipedia) there is a simple circuit using MOSFET to switch a LED, so according to this I draw my own schematics (attachment 3), that I would like to discous if it will work to connect AC signal from pickup coil to INT pin of the PIC microcontroler (I intend to use INT interrupt).

If you add a gate resistor, your circuit is just like the input shown in attachment 1.

As far as I understand, MOSFETs work in a way where voltage on the gate open/close the barrier between drain and source. On a N channel MOSFET load is on the drain pin, source goes directly to ground. If I am not mistaken you also don't need to limit current through gate to source as there is sufficient internal resistance.

There is no current from gate to source. You can charge the gate, and it will stay charged (i.e., turned on) for a long time. The gate resistor is primarily to reduce or eliminate ringing. There may also be designs where you need to limit the gate current for other reasons.

John
 
Look at the circuit I posted in #6 of this old thread and the follow-on discussion.

There ain't no such thing as a new thread. No Fet required, either.
 
Last edited:
Firs thanks for explanation, I had a second look at the schematics and I see it is the same as mine apart from the 220 resistor.

The 10K produces a voltage drop that is Vgs for turning on the mosfet.
I don't see how 10k provide voltage drop, since it is not in series with 220 resistor. Isn't 10k a gate bypass resistor (discharging the gate)?
I only know voltage divider that uses two resistors in series and where voltage drop occurs between two resistors.


The 220 Ω resistor is the gate resistor. The gate acts as a capacitor. A gate resistor acts to limit its charging current.
that i didn't know. Now being explained I see the mosfet very diferently (till now I was seeing it pretty much same as BJTs). Now I also understand why there is the need to have 10k gate bypass resistor. So if gate acts as a capacitor being constantly discharged throug bypass 10k resistor, 220 resistor is to limit speed and current by which the "capacitor" is charged?


That slows down the turn on, and it also acts to limit oscillation of the gate ("ringing"). Sometimes it is not required.
can you explain this "ringing" and oscilation a bit more. My pickup will produce AC signal of freq up to 1kHz (don't know the voltage level since I just have a simple multimeter). Each rising edge on INT pin of PIC microcontroller will generate the external interrupt. INT pin is schmitt triggered.
 
Last edited:
I will get to your other questions in more detail later, if someone else doesn't chime in. As for the 10K resistor, just look at a resistor as a device to convert current to voltage. Mosfets are voltage controlled.

As for gate ringing, here is my favorite article: https://www.electro-tech-online.com/custompdfs/2012/12/Fairchild_AB-9.pdf
You will notice that the gate resistor recommended is considerably less than 220 Ω. A lot of designers use higher resistances.

John
 
how about reverse zener diode or shotky diode directly on the gate, to guard MOSFET over those high voltage spikes from pickup coil?
 
Last edited:
There is a lot written about voltage clamps. A zener can help. What magnitude of spikes are you expecting? How wide are they?

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top