MOSFET N channel transistor curiosity

Hello 17nico17

Welcome to the Arduino fora.
Before you do anything else please take a moment to read General guidance
And
How to use this forum

You are asking us to help without seeing a schematic or code, which makes helping difficult. We get frustrated and move on to a different question, you don't get good answers.

Thank you.

PS. Your English is fine :slight_smile:

Wrong transistor for 0V..5V PWM
U'll need a logic level transistor (IRL..) or additional transistor (or MOSFET driver) to allow better control over gate voltage

Hi both of you, and thank you for your replies! :slight_smile:

Sorry for the presentation, I attach the code I have. It is very simple thing so I did not attached it in the first post.

I think the program is not the problem. Maybe this is not perfect but thank to the monitor I can see that the correct information are sent to the transistor.

My connections are the same as the schematic attached (copied from the internet). The only thing is for the moment I did not linked the motor. I want to understand what happens before adding the motor. I just measure the tension that the motor will receive.

Thank you Knut_ny, you confirm what I have read on some posts. :slight_smile:
I still have a question. In my mind, if MOSFET Vgs is too high, Arduino is not able to allow the transistor to be as its lowest resistance. So it would be impossible for me to reach 12v on final output, right? (maybe here is my mistake). In fact I notice that my issue is quite the contrary. I do not reach the 0-7v range. But I have the 7-12v one...

I have seen some guys advising for some logic level transistor but when I look at the datasheet I always see Vgs = 10v, Vgs (th) mini 2v and maxi 4v.... so quite the same as what I currently have.

Could you advise for a precise transistor that would work fine? :slight_smile:

Really thank you for your help, you are really my last hope on this topic! :o

Montage_2.JPG

17Nico17:
Hi both of you, and thank you for your replies! :slight_smile:

I attach the code I have.

Why have you attached an image of text? You have not read and followed the forum instructions have you? Attaching an image of your code is daft.

Your schematic has connections to something on the right hand side that cannot be seen.

As I have already said:

We get frustrated and move on to a different question, you don't get good answers.

Yes, I have read the 2 documents :wink:

Oh sorry, I have used "attachement" tool. It was part of the 2nd document. As I had two pictures, I have chosen this option. Did not know it was prefered to add as text instead, sorry again.

The connection on the right hand side is just a diode for the motor (called "diode de roue libre" in french, do not know the english expression). I cut it to not overload the scheme. As for the moment the issue is present without the motor, this diode does not really matter.

Yes, I understand for the rules, this is normal. This is more clumsiness from my side, sorry. :confused:

Here with the good shape :

#include <Servo.h>


int Valeur_analogique_moteur = 0;

//---------------------------------------------------------------------------------
void setup() {
 

pinMode(11, OUTPUT);
pinMode(41, INPUT);
   Serial.begin(9600); 
  
}

//---------------------------------------------------------------------------------


void loop() { 
  
	unsigned long Haut = pulseIn(41, HIGH, 1000000) ;
	unsigned long Bas = pulseIn(41, LOW, 1000000) ;
                               
	Valeur_analogique_moteur =  Haut*255 / (Haut + Bas); 
	Serial.println(Valeur_analogique_moteur);
                                     
	analogWrite(11,Valeur_analogique_moteur);
  
}

And the picture of the circuit (hope this will work, the preview does not show it):

One of very many better MOSFETs would be the IRLZ44. The L means 'logic level' and you'll see that the Rds is quoted for 5V and that is the best thing to look for.

Steve

That's better :slight_smile:

The replies from knut_ny(!?!) and slipstick are probably what you need, I have nothing more to add.

Posting images is a pain on here. Upload the image to your post and save. Then right click on the file name of the image and select 'copy link location' (or the equivalent in your browser). Go back and edit your post. Use the 'insert an image' icon from the tool bar at the top of the edit box (roughly in the middle) and use the link you copied.

17Nico17:
I have seen some guys advising for some logic level transistor but when I look at the datasheet I always see Vgs = 10v, Vgs (th) mini 2v and maxi 4v.... so quite the same as what I currently have.

Which FET was this? Sounds like they got it wrong too.

The only specifications you need to look at for a MOSFET are the polarity, max Vds and the Rds(on), you should ignore the others until/unless you know what they mean!

If and only if the datasheet has a resistance value for Rds(on) quoted at "Vgs = 4.5V" is the MOSFET logic-level.

If that 4.5 is even lower, then its also logic-level, but you'll need to check the absolute max Vgs isn't too small (+/-20V is good, +/-10V or so is borderline).

Voltage ratings should be at least double the operating voltage to allow for inductive ringing on fast switching edges. So a minimum Vds rating of 25/30V is advised for 12V operation for instance.

Could you advise for a precise transistor that would work fine? :slight_smile:

Describe the requirements accurately then, max stall current of the motor for instance.

BTW measuring voltages of switching waveforms with a multimeter just gives the average over the waveform, doesn't tell you the actual voltages. A 'scope is needed for this.

Thank you for your help, really, I better understand now. Thank you MarkT and Slipstick!! :slight_smile: :slight_smile:

I have found IRLZ34 in a workshop in my city, the guy told me it was the closest he had for IRLZ44. I will try that today evening and tell you if it works.

PerryBebbington, sorry but I am stuck to the link stuff when the picture is on my computer :o I got the rest I guess anyway.

Really thank you for these precise and complete answers. I really hope that everything is going to work fine now! :wink:

I'll let you know anyway!

Grrrr bad news, I have the same issue..... :cry:
In the Arduino monitor my 8 bits value is 5 / 255 and the tension between the Drain and the + is around 8v....

Really do not understand why. No motor to simplify the system, only a PWM and the transistor...

17Nico17:
Really do not understand why. No motor to simplify the system, only a PWM and the transistor...

Do you have any load on it at all? Even just a resistor, maybe 100 Ohms or something?

Can't believe it, it works fine with a 3300kohm resistance!!! I did not know it could change the result! Thank you PerryBebbington!

As I am here, maybe you could advise me a diode for the motors? :grinning: I will have 2 motors in parallel. These motors are 12v ones, around 2A in total maximum (they are almost turning without resistancy). They are brushed style 775 type.

What a pleasure to see the tension from 0v to 12v following the % indicated by the PWM generator! 8) 8)

You've not provided a schematic but from your description I suspected you had an open drain you were expecting to have a changing voltage on. With no load there was nothing to provide a complete circuit, so the voltage you were getting was whatever stray voltage you happened to pick up.

Do you understand Ohm's Law and Kirchhoff's circuit laws? They are key to your problem.

As I am here, maybe you could advise me a diode for the motors? :grinning: I will have 2 motors in parallel. These motors are 12v ones, around 2A in total maximum (they are almost turning without resistancy). They are brushed style 775 type.

You need to know the stall current (current with the output shaft locked so it can't turn). The diode must be able to carry at least the stall current +, maybe, 50%.

Thanks for your help PerryBebbington! Ohm's law yes :wink: Kirchoff's law too, but not studying that for 10 years :roll_eyes:
All I remmember is that tensions are the same potential at the same nodes and in the different "loops" and that we have current additions at these same nodes.

Regarding my motors, stall current is 20A per motor.

I try again for the circuit picture (this time with the link from my PC). Picture is also attached in case :

The usual convention is positive at the top, negative at the bottom of the schematic, the opposite to what you have.

Regarding my motors, stall current is 20A per motor.

Then the diodes need to be rated for at least 25A. I don't have a specific diode in mind, time for you to do some research, unless someone here can suggest one.

Ok, I have so many things to learn :o
I have found some diods, do not know if it should to the job...?

1st : DIOTEC SEMICONDUCTOR P2500K
2nd : MBRB2545CT (seems to be two diods inside?

I guess that I do not have the good key words in Google to find what I need because I do not know much about this domain unfortunately... If some guys know about diodes, I take :smiley:

Thank you again (+ for the picture)!

Something I didn't pick up on in my previous post:
You have 2 motors in parallel that between them might draw 40A. Is the power supply and the device switching the power capable of supplying 40A?

Also, now I am thinking about it, I am not sure about using 2 diodes that will be in parallel as the motors are in parallel. I can see a risk that one diode will end up carrying the kick back from both motors, which is potentially 40A. I think one 50A capable diode is needed, not two 25A diodes.

One point for you PerryBebbington! My general switch is 20A... :confused:

Ok, for the diode, I also thougth about something similar for the parallel/serie stuff. As I do not know how it has to be cabled in the case of 2 motors in parallel, I supposed it was a good idea two have 2 diodes.

My motors will turn freely in a normal use. The only duty they have is to send a ball that will be sent by friction with 2 wheels. Using a instrumented alimentation, current is lower than 1A even when the ball is launched (max normal current).

It could be a good idea to add a fusible (20A) before the motors maybe? A fusible that can be reingaged (I have some like that, they do a "click" when above the indicated current and you can re-engage them). The only way the current is 40A is if a ball is stuck or something like that.

Edit : I forgot to say that my alimentation will be a LI-PO battery, 3S 5000 mAh 20C (11.1V).
So I search for a 50A diode now? :grinning: Do you have an idea of the scheme with only one diode?

My general switch is 20A...

It's not going to last long... Maybe you need one for each motor.

My motors will turn freely in a normal use. The only duty they have is to send a ball that will be sent by friction with 2 wheels. Using a instrumented alimentation, current is lower than 1A even when the ball is launched (max normal current).

When the motor is stationary and you apply power it will draw its stall current, even if only for a fraction of a second. This probably won't show on a multimeter. You have to account for this. Also, you cannot ever guarantee that 'normal use' will always apply.

If you put the motors in parallel and the diode across each motor then the diodes are in parallel. The electricity won't care which diode is where, it'll just follow the rules of Ohm's law. If that means more current in one diode than the other and the diode is overloaded then it goes pop, quickly followed by the other diode and the driver. I think probably you should have separate drivers for each motor and a diode for each motor. If the motors have a 20A stall current then I suggest drivers rated for at least 25A and diodes the same.

It could be a good idea to add a fusible (20A) before the motors maybe? A fusible that can be reingaged

It won't protect your diodes or drivers. Silicon blows a lot faster than any fuse. Fuses are mainly for protecting against fires caused by overloaded cables. The battery you suggest is easily capable of starting a fire if shorted out; you should use fuses for that reason, but don't expect them to protect your silicon devices, they won't.

alimentation

That's a new word to me, what does it mean?

So I search for a 50A diode now? Do you have an idea of the scheme with only one diode?

The more I think about it the more I think you need 1 driver and 1 diode per motor, not 1 driver and 1 diode shared between them.

If there is someone reading this with a different perspective please will you comment and help?