Question about microcontroller

Status
Not open for further replies.

hayowazzup

Advanced Member level 4
Joined
Oct 9, 2010
Messages
117
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,136
1. Could the microcontroller be blown up if a 5V signal from a signal generator is feeded to one of the MCU's output pin which is also outputting 5V?
2. When driving a MOSFET h-bridge on low side, is it necessary to have a resistor between the mosfets and the MCU's output pin?
 
Last edited:

1. Could not, It can work.
2. A resistor is need between the mosfets and the MCU's pin
 

Hi,
2. What will happen if the resistor omitted? because for my circuit I wanted to have more current for faster switching, and the MCU can only feed milliamps current.
 

MOSFET works on volts not on current like transistors
 

MOSFET works on volts not on current like transistors

In order to turn on/off the mosfet you have to charge/discharge the gate capacitance and this means that you have to source/sink current.
For high speed switching and low switching losses you need high current drivers, that is why you will find hundreds of dedicated mosfet driver chips that can give a few Amperes to the gates.

Alex

---------- Post added at 14:21 ---------- Previous post was at 14:16 ----------

Hi,
2. What will happen if the resistor omitted? because for my circuit I wanted to have more current for faster switching, and the MCU can only feed milliamps current.

Can you define the fast switching because the 20mA of the mcu will not be able to give you fast switching, how fast do you mean?
 

Hi,
I am trying to make the switching as fast as possible, lowering the resistor value is the only way to go, as we are not allowed to add any driver chip/totem pole to the circuit. I am intended to drive the bridge with pwm. So would you recommend shorting the gates to the uC's pins?
 
Last edited:

The use of mosfet without the resistor may stress the mcu output but I can't tell you for sure, It will probably not be a problem.
Which mcu do you have?
You say that you want the switching as fast as possible but that doesn't mean that the switching speed you will get with be enough for your application, what are you doing with that mosfet, is it PWM or something else?
 

Sorry I have just edited post #6.
Yes I am trying to generate pwm with atmega8.
 
Last edited:

I don't think you will be able to do it without external driver, you will probably not be able to get an output that resembles a square wave.
What is the intended frequency and duty range?
Is it a high current application?

I suppose you have seen what happens to the output of the mosfet when you drive the gate with a low current.
The example below is with 20KHz switching frequency at 50% , things will be actually worse if you use a lower frequency like 5KHz but with a duty or 2% or 3%


red is input voltage , bleu is output current

Alex
 
From post #7,
What do you mean by the mosfet may stress out the mcu's output?

The current for the application is around 800mA - 1A, and the voltage is 50V.
Frequency and duty cycle can be set to any, as long as the mosfets and the controller can handle.
I will test out 1-2KHz and 30-80% duty cycle.
 

Stressing the output is when you operate it beyond the limits specified by the manufacturer, you can say over the recommended limits.

The datasheet of mega8 has as absolute max I/O current 40mA but as you can see in the graph below the output can be much higher is you don't limit it using a resistor, this is what I mean by stressing the output.


for 2Khz you have a period of 1/2000= 500us but you are swithing the mosfet in every half period so it is every 250us for 50% duty if you go to 80% it will be 400us off and 100us on
Which mosfet are you using?

Alex
 
Reactions: dselec

    dselec

    Points: 2
    Helpful Answer Positive Rating
I am using the mosfet below.
 

Attachments

  • FQP17N08L.pdf
    563 KB · Views: 69
Last edited:

with the described total gate charge of 11.5ns if we assume a 20mA current it will take about (1/0.02) * 11.5= 575ns , I think it can work but I don't know the answer to your original question, if the current peak that the I/O will give to the gate will cause problems, there is no exact description of the duration that you are allowed to go over the specified 40mA current.

Alex
 
Thanks heaps for the help, Lastly,
safety wise, should I put a 120ohms gate resistor (5/0.04) ?
 

The input capacitance of the mosfet is about 500pF, I think that the I/O will be able to charge it without problem, also note that at 20mA the output voltage will be 4.5v as shown in the previour graph.
I seem to remember a similar conversation in the past and I think that the conclusion was that is was probably OK to use direct connection, let me get some help from FvM.
 

If you connect the MOSFET without current limiting means, you can expect IO peak currents up to about 100 mA. I don't expect, that you'll damage the IO drivers, because it's only lasting for 25 ns. But you generate respective high pulse currents through the µC supply or ground pins. It will surely affect the performance of ADC operation and may even cause false input signals at other µC pins.

For this reason, I would connect a series resistor, that keeps at least the maximum output rating of 40 mA, results in 100 ohm minimum when considering the driver resistance. You have to determine if the respective slower FET gate control is a problem for your application, if so, you should go for external gate drivers. If switching speed isn't critical, higher series resistor values would be preferred to keep the processor enviroment clean.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…