Maker Pro
Maker Pro

Why Circuit not outputting max voltage?

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Hello!

I am using the following circuit, with a LiPo 3S 11.1V (which charged, outputs 12.5V), with a split from the bat, one side to a regulator, that converts to 5V towards the Arduino and rest of chip legs, that need 5V and the other split side, stays 12.5V, for the motor that is switched on/off, by the chip via the Arduino, here is the schematics (in case you can't see the link, a picture is attached) :

http://fritzing.org/projects/drive-motor-using-l293d-sn754410

I have 2 questions, regarding this circuit:

1. Why when bat is fully charged (12.5V), still, the motor gets only about 10.5V? Is it the grade of the pot i am using? should i use a higher quality pot? What would happen, if i used instead of that 10k pot a 5k pot? How can i get the full 12.5V?

2. If i want to have this circuit without a pot, just switch the max 12.5V on/off, without changing the voltage, what should i change in the circuit?

Thanks a lot!
 

Attachments

  • Switch_circuit.JPG
    Switch_circuit.JPG
    101.6 KB · Views: 235
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
See the specs page 5.

Specifically look at the typical high level output voltage and the typical low level output voltage. These add up to a typical voltage drop of 2.6V.

You're seeing 2V -- you might count yourself lucky.

For a lower voltage drop you would need to use a different driver, possibly one with mosfet outputs. The voltage drops could then potentially be much lower.
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Hey Steve,
Thanks for replying!

I am a beginner, so please bare with me.

Are the terms "typical high level output voltage and the typical low level" a technical terms, derived from the chip specs?

I have a very important weight issue with my application.
Could i just as easily find a mosfet that will do the job, that weight is less than 0.5 grams, just as that chip is?

Will it be just as easy to find a mosfet switch circuit schematic on the web, that works with an Arduino?

Thanks!
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I am a beginner, so please bare with me.

Sorry, I hardly even know you.

Are the terms "typical high level output voltage and the typical low level" a technical terms, derived from the chip specs?

They're not derived from them, they ARE them.

I have a very important weight issue with my application.
Could i just as easily find a mosfet that will do the job, that weight is less than 0.5 grams, just as that chip is?

Depending on what you want to do, it could be almost trivial.

Will it be just as easy to find a mosfet switch circuit schematic on the web, that works with an Arduino?

Yes, probably.

But what is it that you want to do? Just switch it on and off?

What current does it require?

How often do you intend to turn it off an on (like once per minute, or 10,000 times per second)?
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Steve, thanks, did some searching:

Attached is a circuit i found with a mosfet.

Will this circuit do the exact same thing, as the circuit with the chip and pot, just without the pot function (which i don't need anyway), and give me switching for max voltage? If so it is good for me, but a few more questions:

1. Will it work also with 12.5V battery and motor or just with up to 9V bat and motor? The mosfet type is: irf540n, mofet weight: 3 grams.

2. Can i find a mosfet that will do the same thing, but weight less? Do you know that mosfet model number? If there exists such a mosfet, should the circuitry be just the same, just replace the mosfet model?

3. i intend to switch it once every 2-10 seconds.

Thanks.
 

Attachments

  • wHFchDt1.JPG
    wHFchDt1.JPG
    116 KB · Views: 753
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Other than the threshold voltage, you'd be fine as long as you keep away from the upper limits of 100V and 33A (although I wouldn't actually plan on getting close to these).

I would recommend a logic level mosfet, but more on that after you've answered the final question.

Oh, and you also need a catch diode across the motor. And it may be safe to install a resistor between gate and source to hold the device off when power is removed from the circuit (10k would be fine).

You can easily find lighter mosfets, but you'll have to answer all my questions first (I don't ask them for fun you know). I need to know the maximum motor current.
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Hey Steve,
Of course for every question you ask, there is an exact reason! absolutely clear!

I didn't notice the motor current question.

The motor current is around 3 Amps.

The motor will be switched on for 2-10 seconds and then off for 2-10 seconds and so on and off, for several minutes at each run...

Wrote down the diode and resistors recommendations! What kind of diode would that be?

Thanks!

P.S.

I am intending to use a LiPo 1A 25C 3S 11.1 volts (charged 12.5 volts).

The Arduino is for switching the motor on and off, from a bluetooth.

The continuous current of the motor is around 3 Amps, as indicated, and the stall current is somewhere between 40-60 Amps, but i don't believe it will get any close to that, since it will run a liquid pump and either pump the liquid or be shut off, as indicated.

But, maybe i don't understand well enough the term 'stall'.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I'm going to assume that 3A is the maximum current, if not, you'll have to recalculate.

The diode would be one rated for something in excess of your motor voltage (50V would be fine) and preferably the motor current, so anything more than 3A is fine.

And because you're counting grams, I assume you're not actually using an arduino board, right?

Anyway...

for the diode:

1) go to http://digikey.com
2) search for "diode"
3) click on "Diodes, Rectifiers - Single"
4) select every reverse voltage from 35V up to 100V (click, shift click)
5) select every average rectified current from 3A to the 10A
6) select "in stock"
7) click "Apply Filters"
8) select a quantity of 1
9) click submit.
10) sort by increasing price

The top one is this one: http://www.digikey.com/product-detail/en/S3B-13-F/S3B-FDICT-ND/750035

It's surface mount (it will be lighter) but you can choose another one with leads if you desire. (A 1N5401 would then be your likely choice).

Now for the mosfet.

1) go to http://digikey.com
2) search for "mosfet"
3) click on "FETs - single"
4) select all the "MOSFET N-Channel" type fets under "FET Type"
5) select "Logic Level Gate" under "FET Feature"
6) select all Vdss from 35V to 100V
7) select all Id's from 6A to 20A
8) select "In stock"
9) click "Apply filters"
10) enter a quantity of 1
11) click Submit
12) order by increasing price

The first device listed is this: http://www.digikey.com/product-detail/en/NTD5867NL-1G/NTD5867NL-1GOS-ND/2401422

scanning a little further, this would be lighter.

By reducing the amount of over-speccing these components you could choose lighter alternatives.

Are you sure your original part was 1/2 gram?
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Steve,
I am so grateful for such a detailed response!

Since in the place on the globe that i live, it is very late now, i must go over what you write here only tomorrow, and very thoroughly i will.

Then, i will return with answers to your questions and new questions of my own.

Hope you will be able to reply tomorrow, as well!

BTW, did you read my above P.S. addition, about the stall current and bat current?

P.S.2

Might be wrong about the SN754410 chip being 0.5 grams, will recheck it again on my digi scale tomorrow, but the irf540n mosfet, is most probably 3 grams, and every gram i can take off, might help.

Much obliged!
Roi.
 
Last edited:

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Hello Steve!

1. I am using an Arduino board: a 1 gram Arduino Pro Mini 5V.

2. The original part, the SN754410 chip, weight, is 1 gram and not 0.5 gram.

3. Since i found out that there is a term coined 'stall current' and that regarding this term, the motor can take up to 40 or 50 Amps, and that there is another term: 'continuous' current draw and in this regard, the motor draws 3 is Amps, but it might be even more, up to 5 Amps, does it change the filters i should apply to the DigiKey filters? Does it render the NTMS5835NLR2G, which you helped me identify, not good enough? If so, could you help me identify a new lightweight as possible mosfet, that does apply to these figures? The NTMS5835NLR2G 0.1gram weight is fantastic!

4. If we do change the mosfet type, should the diode and resistors type, change as well?

5. Is it more complicated to solder wires to a surface mount mosfet, than on to a leads one? Otherwise, what other considerations should one have, if he is choosing a surface mount or leads, if he knows that he is going to solder the ends with wires? Is the leads mosfet much heavier?

I tried to recalculate the spec filters on DigiKey myself, but got lost in understanding and choosing all the spec options.

6. Just as one example, of the problems of understanding the specs on my own:
Why is it, that if the said current was 3 Amps, you asked me to filter, on 'id' field, 6-20 Amps?

Another example, out of many, about my difficulty of understanding the specs would be:

7. I want to switch the motor from the Arduino via the mosfet, using the Arduino 5V PWM or analog signal. What spec filter should i apply, to be sure that the mosfet can react to 5V and that 5V is not too high or too low for it?

Another question i have, would be:

8. If (with your help, i hope), a mosfet is identified, that is rated continuous 5 Amps and stall 50 Amps, would such a mosfet also be good, for a much less stronger motor, for example a 1 Amps continuous and 5 Amps stall, or does a weaker motor, also require a new type or mosfet?

9. I think that perhaps i should indicate again, that i will be using a LiPo 3S 25-30C 1-1.5 Amps 11.1V (12.5 V charged) battery.


Thanks a lot!
Roi.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1. I am using an Arduino board: a 1 gram Arduino Pro Mini 5V.

Excellent. I use these when I'm not using the chip on it's own. Not sure what your application is (RC plane?) but They're a good low weight solution.

The specs I've seen say they weigh between 1 and 2 grams. There are some variants without the USB interface or controller that are even lighter (I have some of these).

If I find myself in the vicinity of both some of these and a precision balance today I'll do some measurements (if only for my own curiosity)

2. The original part, the SN754410 chip, weight, is 1 gram and not 0.5 gram.
Yeah, I thought that may have been a little optimistic.

I would advise you to use something like wire wrap wire (very thin and light) and not to solder the pins into the Pro Mini board to save more weight.

3. Since i found out that there is a term coined 'stall current' and that regarding this term, the motor can take up to 40 or 50 Amps, and that there is another term: 'continuous' current draw and in this regard, the motor draws 3 is Amps, but it might be even more, up to 5 Amps, does it change the filters i should apply to the DigiKey filters?
You will note that I required a minimum spec of 6A rather than 3A. This was so that the mosfet would not be overly stressed in supplying 3A.

You need to consider the maximum current which the mosfet will be called on to carry. This is best achieved either through measurement, or by assuming it will be the stall current. In either case, you should then add a significant margin.

Does it render the NTMS5835NLR2G, which you helped me identify, not good enough?
This is where we need to delve into the specifications. Digikey is a great site for doing searches like this, and also because it provides links to the datasheets.

What you'll notice is that the maximum continuous current is 9.2A with a package dissipation of 1.5W and an rds(on) (the on resistance) if 0.014 ohms. If you're expecting the device to operate at high ambient temperatures, then it would be best to increase this.

I would probably be happy with this device being used for a 5A load at 25C, but less so at 70C.

However the problem with a motor is that it's going to draw peak currents near the stall current (it may be limited somewhat by inductance) as it starts.

This device has a maximum pulsed current drain of 48A, but note that this is for a 10uS pulse. It's likely that the motor will draw large current for longer as it starts up.

So, perhaps we should pick something with better (higher) maximum current ratings (I prefer to stay within the continuous rating if possible -- however in this case you're most likely not going to be able to do that.

The NTMS5835NLR2G 0.1gram weight is fantastic!
Yes, these small mosfets are great. However they have very low thermal mass (they heat up fast) and can very easily emit a small puff of smoke if you don't treat them just right.

I am already concerned that you would need to use a gate driver to be able to switch the mosfet fast enough to keep it's body and soul (silicon and smoke?) together.

If so, could you help me identify a new lightweight as possible mosfet, that does apply to these figures?
Have a go yourself.

Look for a diode that can carry 5A (or more) continuously with a pulse current rating of 50A or so. The former can be searched for directly, the latter will probably require you to look into the datasheets. This diode only ever carries brief pulses of current, so you can go closer to the maximum rating of the device.

Once you're skilled doing that, try for a mosfet. Look for 10A or more continuous (or whatever is double the maximum expected continuous current.

Look then for a continuous current (for t <= 10 secs) exceeding the stall current. Sometimes this is not given near the top of the datasheet and you need to go looking for a graph showing maximum drain current against pulse length. Typically several curves are shown, each for a different duty cycle. For your situation, you might need to look at the 10 second pulse time and the duty of 0.5. (and then for safety, halve it!)

These figures will assume some heatsinking, the SO8 package provides limited opportunities for this. The larger TO-220 package allows you to bolt it to something.

4. If we do change the mosfet type, should the diode and resistors type, change as well?
I've mentioned the diode earlier. The short answer is yes.

The resistor is only a belt and braces safety measure. It need not change. And it can be pretty much the smallest component you can find :)

5. Is it more complicated to solder wires to a surface mount mosfet, than on to a leads one?
Yes. the leads are short and stumpy and designed to sit flat on a PCB. Presumably you're not using a PCB. This means "dead bug" wiring (google it). You'll need a steady hand, fine wire (wire wrap wire is ideal) and some patience.

Otherwise, what other considerations should one have
One of the main considerations is that the leads are used to conduct heat away from the component onto an area of board which allow it to radiate (or conduct, or convect) away. You won't have that, so your power dissipation will need to be kept even lower.

As an example, consider 20A through a resistance of 0.02 ohms. The power dissipated is 20*20*0.02 = 8W -- This could be what happens during startup and even worse could happen if the motor is stalled. The SO-8 package (well, that device we looked at first) could only handle 1.5W max continuous dissipation. If we read further into the datasheet, this may have required connection to some particular area of PCB, without it the max dissipation would be much lower.

if he is choosing a surface mount or leads, if he knows that he is going to solder the ends with wires? Is the leads mosfet much heavier?
The main consideration is how much of the package's specification requires the leads to be connected to a large piece of PCB. The same thing applies to larger through-hole devices, but their larger size and mass normally allows them to have a higher dissipation without being connected to anything.

I tried to recalculate the spec filters on DigiKey myself, but got lost in understanding and choosing all the spec options.
The only real change is to increase the range of currents (so for the mosfet change from 6A to 20, to 10A to 50A or similar). You might consider reducing the minimum voltage from 35V down to 20V just to give you more low voltage (which tend to be high current) options.

6. Just as one example, of the problems of understanding the specs on my own:
Why is it, that if the said current was 3 Amps, you asked me to filter, on 'id' field, 6-20 Amps?
I may have covered this above a little, however there are several reasons:

1) you never want to design a circuit to use a device right up to its maximum ratings (50% of them is probably safer)
2) the maximum ratings are often not achievable easily (and almost certainly not without heatsinking)
3) there may be better (and even cheaper) devices available that can carry more current than you require.
4) there is no point in looking at devices many times larger in capacity because at some point they're going to just be bigger, heavier, more expensive, and have other limitations.

So I chose a range of between double (at the low end) to around 5 to 10 times (at the high end) the maximum typical current.

Another example, out of many, about my difficulty of understanding the specs would be:

7. I want to switch the motor from the Arduino via the mosfet, using the Arduino 5V PWM or analog signal. What spec filter should i apply, to be sure that the mosfet can react to 5V and that 5V is not too high or too low for it?
OK, to know that 5V is OK, look for a device labelled as a "logic level" device. In more detail, this means:

1) That Vgs(th) (the voltage that the device starts to turn on) is well below 5V (in the current case it is given as typically 1.85V -- see page 2 under "On characteristics").

2) You will also find that 5V is well within the range of Vgs(max) (The second parameter listed on page 1 under "Maximum ratings" is a Vgs of +/-20V).

3) Thirdly, that at 5V (often specified at 4.5V) the device is substantially turned on. In this datasheet we see on page 1 the headline figure of 14milliohm Rds(on) at Vgs of 4.5V. This means the resistance across the device is 14/1000 of an ohm when you apply 4.5V to the gate.

4) For more details you can also look at the Vds graph (Figure 1 in this datasheet) You'll notice that it shows voltage vs current for many gate voltages. You can see that for low gate voltages the graph rises then hits a knee and starts to ho substantially horizontally. You want to keep well away from the knee! You will note that the knee does not even appear on the graph for Vgs of 4.5V, and that is for currents well above what would destroy the device. This tells you that the device will drop about 0.7V at 50A with a Vgs of 4.5V leading to a power dissipation of 35W which is enough to destroy the component VERY quickly. (the spec tells us that we can do this for 1/100,000th of a second)

Now to the analog Vs PWM.

Let me tell you that analog is a loser out of the box.

PWM is better, but remember I asked you about how often the motor would be switched?

One of the issues with PWM is that you need to turn the device fully on to fully off and fully off to fully on lots and lots. And a mosfet doesn't do this instantaneously. Effectively it transitions from on to off (or off to on) and we can assume that the power dissipated during this time averages V * I / 2 (so if you're PWMing a load taking 5A at 12V, the average dissipation during switching is 5 * 12 / 2 = 30W) This might be compared to dissipation of 0 when the device is off and a dissipation of 5 * 5 * 0.02 = 0.5W when turned on.

So now we need to determine how fast the device turns on and off, multiply that by the frequency, then by 2, and then by the switching dissipation to calculate the average dissipation over a second.

I'll do this quickly...

From the datasheet (page 2 "Charges, capacitance and gate resistance") we see the total gate charge is up to 50nC. The arduino can supply 20mA, so the time to charge or discharge the gate capacitance is C/I = 50E-9/20E-3 = 2.5E-6. SO it will turn on or off in about 2.5uS. We check the datasheet to make sure that this isn't less than the device's rise or fall time (we would use these if it did). Note that these are specified with a gate current of 10A! we're using 20mA.

Now let's assume we're doing PWM at a frequency of 4000Hz (not real fast). The switching losses are 4000 * 2.5E-6 * 2 * 30 = 0.6W

Our total dissipation is 0.6 + 0.5 = 1.1W. Note that the switching losses are larger than the other losses. Also note that the switching losses depend on frequency and the static loss on duty cycle. If the duty cycle were 50% the switching losses would still be 0.6W, but the static loss would be 0.25W. If we reduced the frequency to 1000Hz, the switching losses would fall to 0.15W. If we could increase the gate current (perhaps by paralleling several arduino outputs or by using a gate driver) we could reduce it further (note that paralleling outputs requires that you can switch them all simultaneously or you may make things *MUCH* worse)

Another question i have, would be:

8. If (with your help, i hope), a mosfet is identified, that is rated continuous 5 Amps and stall 50 Amps, would such a mosfet also be good, for a much less stronger motor, for example a 1 Amps continuous and 5 Amps stall, or does a weaker motor, also require a new type or mosfet?
The stall current is the motor's rating, not the mosfet's but I understand what you're asking.

Yes, you could replace the motor with a smaller load of the same type with no further thoughts.

Mosfets do leak a small amount of current, so something rated to switch several hundred amps might leak a tiny current which would make it less suitable to switch a 20mA LED, but it's unlikely you'll try something so extreme.

9. I think that perhaps i should indicate again, that i will be using a LiPo 3S 25-30C 1-1.5 Amps 11.1V (12.5 V charged) battery.
Yeah, you'll need to be careful because if the motor draws 50A surge currents you'll get really odd things happening to your arduino's supply rail and something called "ground bounce" that may make switching the mosfet harder than you imagine.

As you may have noticed, there are many things to be aware of and (maybe you haven't noticed yet) but tradeoffs you need to make.

oh, and good questions by the way.
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Wow...!!

Steve,

Now i will probably need several days, to be able to return with a sensible reply, containing subjects that i did not understand and other questions.

I will probably not be able even to ask sensible questions, when it comes to most of the calculations, which assume i know what formulas stand behind them.

Specifically, the switching and dissipation at high frequencies and power and work consumption explanations and calculations, that are at least several months of learning at an academic level, before i can start to understand it. I have an 'ear' for these kind of 'tunes', but regrettably, not much more.

Will be back with questions, after being sure, that i could catch enough important and applicative stuff, out of all this abundant and rich information you replied with.


Thanks a lot for answering all the questions in detail!

Best regards,
Roi.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510

Yeah, I know, you just can't shut me up.

Now i will probably need several days, to be able to return with a sensible reply, containing subjects that i did not understand and other questions.
That's fine :)

I will probably not be able even to ask sensible questions,
Don't be so sure. The ones you've asked up to now have been very good.

when it comes to most of the calculations, which assume i know what formulas stand behind them.
Most of them are just applications of ohms law (V=IR, P=IV) and various things you can derive from them (P = I^2.R, P = V^2/R). Some other calculations (switching losses) are based on a heap of stuff that is kinda a level up from this, but I think I gave the basic rule of thumb calculations.

You're sure to be confused by some stuff though. Please feel free to ask questions. I didn't learn it in a week and I don't expect anyone else should either.

Specifically, the switching and dissipation at high frequencies and power and work consumption explanations and calculations, that are at least several months of learning at an academic level, before i can start to understand it. I have an 'ear' for these kind of 'tunes', but regrettably, not much more.
Fortunately much of this stuff can be calculated roughly using simple equations. If you use worst case figures from the datasheets then reality will almost always be better :)

Thanks a lot for answering all the questions in detail!
No problems. Like I said above, it can be hard to shut me up :D
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Steve, you're on a roll! That's the third excellent and helpful post I've seen from you in the past few days :)
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Steve hello!

Sorry for the delay, in getting back to you, to tell you how things are going on.

I have read several times, through your detailed explanations and then decided to applicate what you taught me and to go ahead and buy the NTD5867NL MOSFET, which is a bit heavier in weight, but has a better continuous drain and pulse drain current, than the NTMS5835NL. i also bought several units of NTMS5835NL, just in case i missed somthing in your responses.

Anyway, the problem, that also prevented me from getting back to you earlier, is that the delivery of the NTMS5835NL and the NTD5867NL, was delayed by two weeks, and i am supposed to get them only tomorrow or the day after.

In the meantime, i went to this local electronics shop and he thought there, that maybe the following MOSFET, which was in stock, would comply (weight is 1.5 grams), it is the IRF1310NS/L.

I am having trouble in trying to understand from the IRF1310NS/L datasheet, if this is a 'normal' MOSFET or a 'logic-level' MOSFET.

Anyhow, i was able to make the IRF1310NS/L partially work, but still have some problems, making it work exactly as needed. Here is a description of what happened:

At first, i tried to make the IRF1310NS/L switch the dc motor ON/OFF, from an Arduino UNO. I used the following drawing:

http://bildr.org/blog/wp-content/uploads/2012/03/rfp30n06le-arduino-motor.png


At the beginning, it didn't work. Then i tried to change the digitalWrite(Motor,HIGH) command to an analogWrite(Motor,255) command (in both cases, it is connected only through a PWM pin), and still nothing happened. But then i noticed, that when i keep the USB connected to the UNO, after uploading the sketch, and not trying to run the UNO only on the battery and regulator, which supply the UNO with 5V, the motor and MOSFET switching, do work.

So, i switched the UNO power supply, from the regulator 5V to direct battery (12.5V LIPO 3S) output (the same that the motor feeds on) and then, it was all working well, also without being connected to the USB.

As you already know, weight is critical for my application, so of course i had to move the MOSFET and motor, to work with the much lighter Arduino Pro Mini which will take only 5V and not higher.

So, now, again, i have a problem to operate the circuit, but this time, the problem is a bit different, since the motor does react to a turn ON command, but just for a very short pulse, and then stops turning (with the Uno, the motor didn't react at all, when the Uno was connected to 5V). And also, while the motor is switched to OFF, the motor is still turning slowly and not getting to a full stop.

My questions to you, are the following:

1. Could it be that this type of MOSFET (IRF1310NS/L) is not the correct one, either since it is maybe not a 'logic-level' type, or for any other reason, that has to do with its properties? In that case, do you think the MOSFETs, that are supposed to arrive soon (NTMS5835NL and NTD5867NL), will solve the problem, with exactly the same configuration, that seemingly (or not), is not working well now?

2. Could it be, that the way i connected the MOSFET, to the Arduino and to the electronic components (resistor and diode), is not the correct way to connect such a circuit or MOSFET of the kind i have?

3. Could it be somthing wrong, with the software commands ?


Thanks!
Roi.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
In the meantime, i went to this local electronics shop and he thought there, that maybe the following MOSFET, which was in stock, would comply (weight is 1.5 grams), it is the IRF1310NS/L.

Firstly, thanks for linking to the datasheet. I appreciate that.

I am having trouble in trying to understand from the IRF1310NS/L datasheet, if this is a 'normal' MOSFET or a 'logic-level' MOSFET.
Normally the datasheet will tell you. It will also normally give specs for Vgs in the range that logic signals supply, like 3 to 5 volts.

In this case the lowest voltage they show on their graphs is 4.5V, and most of the specifications are for a Vgs of 10V.

It's not a logic level device.

This doesn't mean it won't work, but you'd be better off switching a lighter load until you get the mosfet we discussed.

Anyhow, i was able to make the IRF1310NS/L partially work, but still have some problems, making it work exactly as needed. Here is a description of what happened:

At first, i tried to make the IRF1310NS/L switch the dc motor ON/OFF, from an Arduino UNO. I used the following drawing:

http://bildr.org/blog/wp-content/uploads/2012/03/rfp30n06le-arduino-motor.png
That looks like it's wired right.

At the beginning, it didn't work. Then i tried to change the digitalWrite(Motor,HIGH) command to an analogWrite(Motor,255) command (in both cases, it is connected only through a PWM pin), and still nothing happened. But then i noticed, that when i keep the USB connected to the UNO, after uploading the sketch, and not trying to run the UNO only on the battery and regulator, which supply the UNO with 5V, the motor and MOSFET switching, do work.

So, i switched the UNO power supply, from the regulator 5V to direct battery (12.5V LIPO 3S) output (the same that the motor feeds on) and then, it was all working well, also without being connected to the USB.
It sounds like you need the full 5V to make it work. Operating the arduino from 5V (presumably connected through the on-board regulator) may result in the actual voltage to the board being under 5V.

There is another pin that you can connect the 5V to, and I'd try that.

I'd also try replacing the motor with a very low wattage light bulb or similar since the mosfet is right on the limits of its threshold voltage.

Was the mosfet getting warm when you were using the 5V supply?

Did you measure the actual Vgs voltage in both cases? It might be instructive.

As you already know, weight is critical for my application, so of course i had to move the MOSFET and motor, to work with the much lighter Arduino Pro Mini which will take only 5V and not higher.
Yep, I think you're on the right track and you're doing sensible testing (and I admire your decision to grab another mosfet to speed up your testing -- even if it doesn't quite work)

So, now, again, i have a problem to operate the circuit, but this time, the problem is a bit different, since the motor does react to a turn ON command, but just for a very short pulse, and then stops turning (with the Uno, the motor didn't react at all, when the Uno was connected to 5V). And also, while the motor is switched to OFF, the motor is still turning slowly and not getting to a full stop.
OK, that seems like a problem

My questions to you, are the following:

1. Could it be that this type of MOSFET (IRF1310NS/L) is not the correct one, either since it is maybe not a 'logic-level' type, or for any other reason, that has to do with its properties? In that case, do you think the MOSFETs, that are supposed to arrive soon (NTMS5835NL and NTD5867NL), will solve the problem, with exactly the same configuration, that seemingly (or not), is not working well now?
Good question, but I suspect it's not the mosfet.

2. Could it be, that the way i connected the MOSFET, to the Arduino and to the electronic components (resistor and diode), is not the correct way to connect such a circuit or MOSFET of the kind i have?
If you've connected it similarly, then I would think, while this is more likely, that you did it right once, and I'm sure you've checked that you've done it right again.

3. Could it be somthing wrong, with the software commands ?
That's always what I consider first.

I recommend that you either use digital pin 13 as your output, or that you also switch this on and off with your output. This pin has a LED attached on the pro mini board, so you can visually check that your code is turning the output on and off correctly.

Another option is to have the output that drives the mosfet connected to a LED (and a series resistor). If you're using PWM (which isn't available on digital pin 13) then you'll see variation in brightness as the mark/space ratio changes.

It's also worth noting that:

a) the ardino pro mini may have its outputs in a different order than the uno you were using.
b) my Arduino pro mini's allow up to 12V on the "Raw" pin, and 5V on the Vcc pin. Which are you using?
c) I'm sure the uno can be correctly powered by 5V by connecting this up to the Vcc pin.

Note the following (for the uno)

http://arduino.cc/en/Main/arduinoBoardUno#.UxKeHoWdG9Q said:
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:

  • VIN. The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
  • 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

And for the pro-mini
http://arduino.cc/en/Main/ArduinoBoardProMini#.UxKexIWdG9Q said:
The Arduino Pro Mini can be powered with an FTDI cable or breakout board connected to its six pin header, or with a regulated 3.3V or 5V supply (depending on the model) on the Vcc pin. There is a voltage regulator on board so it can accept voltage up to 12VDC. If you're supplying unregulated power to the board, be sure to connect to the "RAW" pin on not VCC. The power pins are as follows:

  • RAW. For supplying a raw voltage to the board.
  • VCC. The regulated 3.3 or 5 volt supply.
  • GND. Ground pins.

I am unaware of any relevant difference between the UNO's power supply and the pro mini's. I think the warning on the UNO is because it is intended for use by people with a lower skill level.

As long as you don't exceed 5V you should be fine.

It is also worth noting that my pro-mini clones have ATMega328's on them, not ATmega186's
 

roineust

Jul 2, 2013
34
Joined
Jul 2, 2013
Messages
34
Steve,

Moving to pin 13 seems to solve the problem for some reason, besides giving a good LED indication.

Thanks a lot for helping, in such a generous and detailed way!
 
Last edited:
Top