Using MOS-FET driver modules with external power for a servomotor and a DC motor

Hi there,

Me and my friend are having a pretty hard time figuring out how to use this MOS-FET driver module we’ve bought. The module is made by the company Velleman, product code is VMA411. It uses an IRF520N. I have attached a diagram of the module and also a picture of the module itself. I’ve spent multiple hours looking for tutorials and explanations, but ended up empty-handed, so this is my last resort.

I have two of these modules, one for a DC motor and one for a servo motor. I’m using an Arduino Uno, by the way, and an external battery holder. The eventual goal of our project is to build a small, wirelessly controllable boat for a physics class.

So, how do I use this module? How and where to do I connect the pins that are on the module?

In few words: how do I connect the power supply, the arduino, the MOS modules, the DC motor and the servo motor to eachother (to create one big, working circuit)?

I realize I may be asking for a lot here, but I believe that it isn’t all too complicated, so I hope anyone can help me, because I’m lost and desperate!

P.S. Some extra info:
— the power supply is 4 AA batteries (4 * 1.5 V)
— the servo motor is 4,8 / 6 V.
— the DC motor is 2.4-6 VDC, 340 mA
— the MOS-FET driver module specifications:
-operating voltage: 3 to 5 VDC
-max. load voltage: 0 to 24 VDC
-input: SIG pin, logic level 3 to 5 VDC
-max. load current: 5 A (a heatsink is required for loads > 1 A)
-used MOSFET: IRF520

You don't use this module, its not a logic level MOSFET and its no good for high current.

You buy a decent MOSFET instead, such as: https://www.adafruit.com/products/355 (Although that has a 30V abs max - but it will handle 8A without a heatsink as its 9 milliohm)

To drive a MOSFET from an Arduino it must be logic level, which the Velleman one isn't. Even driven from 12V the Velleman module will struggle over 1.5A as its on-resistance is a shocking high 270 milliohms.

[ perhaps you should explain what you are trying to do, then we can suggest the right way to do it, I am sensing xy-problem here ]

Thanks for replying. I edited my original post, hoping to clear up some misunderstandings or foggy areas. The electrics store owner told me that I could use this module. Once again, I'm not using a massive amount of power. How could I make this work?

By the way, I could upload the picture of the module because the file was too large.

Thanks.

That doesn't change the fact its not suitable.

Strange motor controller..You could make it function but you would need much more supporting circuitry. A logic level MOSFET as Mark suggested is a very easy solution.

When you say servo motor do you just mean a hobby servo? They would not need a separate switching device like this module. Just need to supply power and a servo signal.

This module has 500ohm gate pull-down to ground? Weird

Do you want bidirectional motor control?

alka: When you say servo motor do you just mean a hobby servo? Do you want bidirectional motor control?

It is just a small hobby servo, yes. Bidirectional motor control is unnecessary. I'm using the module because I figured I would need an external power supply (I have 4 1.5V AA batteries). I can't connect those batteries that power supply directly to the servo motor, right? That is, connecting the '+'-wire to the servo's voltage input, connecting the '-'-wire to the servo's voltage output and connecting the Arduino to the servo's 'signal'-wire. Or would that not be a problem?

Also, I have a DC motor that I want to use in the same circuit/project. Am I correct saying that this motor definitely does need the Velleman module between it and the power supply?

Thanks in advance.

P.S. I'm also looking for a way to power the Arduino with the same power supply, so that it doesn't have to be wired to my computer (perhaps I need the Velleman module for this, instead of the servo?). However, I can't seem to find a way without having to solder, for which I don't have the equipment or skills, so if anyone happens to have a URL or just an explanation/some advice laying around, it would be much appreciated if you shared it with me. Cheers! :)

That module is sold as a Arduino compatible 3-5 volt power switching device. The Mosfet IC would not switch on very well and will disparate power as heat though the back of it. The current of just a few hundred mA would be OK but a logic level Mosfet would be better as MarkT says. The IR520 requires +-20Vc on the gate switch correctly and that module has no circuits to do that.

Is the servo motor a model type servo, pulse width control?

You need to invest in a soldering iron and solder, side cutters and pieces of wire. Its not hard to learn to solder and not very expensive.

Geoff.

SemWassim:
I can’t connect those batteries that power supply directly to the servo motor, right? That is, connecting the ‘+’-wire to the servo’s voltage input, connecting the ‘-’-wire to the servo’s voltage output and connecting the Arduino to the servo’s ‘signal’-wire. Or would that not be a problem?

Also, I have a DC motor that I want to use in the same circuit/project. Am I correct saying that this motor definitely does need the Velleman module between it and the power supply?

A direct connection from the batteries to the servo works just fine as long as you are within voltage tolerance, You do need to also have a ground wire common between the arduino and the servo too.

The motor does need something to control it LIKE the velleman, there is just so many other choices out there that are much better ( pretty much anything ). The motor in question is a pretty tiny so you never know it might work with what you have. The circuit below pretty much how you connect that module if you want to try it. Its hard to recommend a gate resistor as the 500 Ohm pulldown won’t leave much enough voltage at the gate if you do… why would they do that?

Or you can get a nice logic level mosfet and make a simple circuit like this.
mostfetAsSwitch.PNG

Electronic1Dude:
Is the servo motor a model type servo, pulse width control?

Yes, it is.

alka:
A direct connection from the batteries to the servo works just fine as long as you are within voltage tolerance, You do need to also have a ground wire common between the arduino and the servo too.

The motor does need something to control it LIKE the velleman, there is just so many other choices out there that are much better ( pretty much anything ). The motor in question is a pretty tiny so you never know it might work with what you have. The circuit below pretty much how you connect that module if you want to try it.

I have made a diagram (see attachment) of how I think I could power the Arduino, the Velleman+DCmotor and the servo. I’m using a proto shield with a breadboard. If I connected the components according to this diagram, would it work? If not, please do correct me. (I’m afraid I shouldn’t supply power to the Arduino that directly, but what do I know. Have a look at the diagram, if you will. I believe I’ve made it very clearly.) Thank you very much! :slight_smile:

SemWassim:
Thanks for replying. I edited my original post, hoping to clear up some misunderstandings or foggy areas. The electrics store owner told me that I could use this module.

So? Just because they own an electronics store doesn’t mean they know shit. If you showed them this graph, do you think they would understand it or would their eyes glaze over in confusion?

screenshot.123.jpg

This graph shows the reason why that FET is unsuitable for use with a logic level signal, and is taken directly from Infineon’s datasheet for the IRF520N.

That is not a MOSFET driver module (which you might reasonably expect to have some form of gate driving circuitry), it’s just a MOSFET module. And selling it as logic level is misleading advertising at best and fraud at the worst. Probably not the store’s fault since they’re just going off the specs on the package, but the supplier is definitely scummy.

Once again, I’m not using a massive amount of power. How could I make this work?

Do you know how much power you’re using, or are you just guessing?

Get a logic level FET (for Infineon ones like this, something named IRL), or use a level shifting circuit to drive the gate with more than 10V.

I would suggest this graph as a clearer indication that the MOSFET is not 5V capable:

The plateau is clearly well above 4.5V

SemWassim: I have made a diagram (see attachment) of how I think I could power the Arduino, the Velleman+DCmotor and the servo. I'm using a proto shield with a breadboard. If I connected the components according to this diagram, would it work? If not, please do correct me. (I'm afraid I shouldn't supply power to the Arduino that directly, but what do I know. Have a look at the diagram, if you will. I believe I've made it very clearly.) Thank you very much! :)

On the diagram you attached you have the power for the servo and the mosfet coming from the arduino 5v out. They should be connected to the battery directly. The 5v regulator on the arduino can't handle the current of the motor and servo.

All other parts that are on that simple low side switch diagram that I posted in #7 above need to be added too even if you do attempt to use the mosfet you have or any other. ( diode, caps and resistors)

Are you intending to control the speed of the motor with this circuit or just turn it on and off?

Thank you for everyone's responses. It's shockingly clear that I'm more of a dummy in this than I considered myself.

Jiggy-Ninja: Do you know how much power you're using, or are you just guessing?

Get a logic level FET (for Infineon ones like this, something named IR*L*), or use a level shifting circuit to drive the gate with more than 10V.

The power supply is 4 AA batteries, so 6V. So, concluding from your reaction and MarkT's (who mentioned 4.5V(?)), that isn't good for the Velleman module..? I would think that 6V is fairly close to the 7V that is indicated in MarkT's diagram, resulting in a less effective but nonetheless working transmission - or am I utterly wrong in thinking that? I'd love to hear your thoughts. Cheers.

alka: On the diagram you attached you have the power for the servo and the mosfet coming from the arduino 5v out. They should be connected to the battery directly. The 5v regulator on the arduino can't handle the current of the motor and servo.

All other parts that are on that simple low side switch diagram that I posted in #7 above need to be added too even if you do attempt to use the mosfet you have or any other. ( diode, caps and resistors)

Are you intending to control the speed of the motor with this circuit or just turn it on and off?

So how would I power the Arduino, the servo and the DC motor with the same two wires from the (6V) power supply? I have a proto shield breadboard on the Arduino; can't I use that? Would I have to get a separate mini bread board to do that, then? I will try to upload a picture of the proto shield when I get the chance.

About your diagram, I found it hard to figure it out, because you've drawn it differently from how I've learned it. The way I'm used to making and reading circuit diagrams is when they are drawn in such a matter that it's a closed circuit, i.e. it starts with a wire from the '+'-side of the power supply, and ends with a wire to the '-'-side of the power supply, and the whole cycle starts over. Would you be so kind as to write that diagram in this way?

I don't need to control the motor speed (as long as it isn't dangerously high), so I only intend to be able to switch the motor on and off.

I'm eager to read what you guys think! I understand if it's frustrating to deal with such a 'noob' like me, but I'm just very interested in learning about and understanding all of this. Besides, it's for a school project that I have to do. Thanks in advance.

The power supply is 4 AA batteries, so 6V. So, concluding from your reaction and MarkT’s (who mentioned 4.5V(?)), that isn’t good for the Velleman module…? I would think that 6V is fairly close to the 7V that is indicated in MarkT’s diagram, resulting in a less effective but nonetheless working transmission - or am I utterly wrong in thinking that? I’d love to hear your thoughts. Cheers.

“Close” isn’t good enough, especially when it’s too low. That flat spot is the bare minimum level you need to reach, and in normal use you will want a healthy margin above that. If you check the datasheet for the MOSFET, you will find that most of the test conditions is the Typical Characteristics table specify a VGS of 10V. That means the manufacturer designed this transistor to be used with at least that much voltage applied to the gate. This is not a logic level MOSFET, stop trying to use it as one. Get something that’s right for the job.

Without enough gate voltage to create the conducting channel, the VDS voltage will be much too high, causing excessive power dissipation in the MOSFET that could damage it if it is not cooled properly. Even if it is not damaged, it will take power away from the load and severely reduce efficiency.

About your diagram, I found it hard to figure it out, because you’ve drawn it differently from how I’ve learned it. The way I’m used to making and reading circuit diagrams is when they are drawn in such a matter that it’s a closed circuit, i.e. it starts with a wire from the ‘+’-side of the power supply, and ends with a wire to the ‘-’-side of the power supply, and the whole cycle starts over. Would you be so kind as to write that diagram in this way?

Alka’s circuit contains a standard convention for drawing power connection in schematics. Because power connections need to go everywhere, it would clutter up the drawing if you drew the wires out. So a shorthand is employed.

The V with a horizontal bar under it represents a connection to the positive power supply (in this case the + terminal of the battery pack). If there were any addition symbols drawn the same way, those would also represent a connection to the same terminal of the battery pack. All of those symbols representing the same power source are electrically connected together, even though an explicit connection is not drawn on the schematic.

It is the same for the two GND symbols on the bottom. They represent the same node, and are both connected together to the 0V circuit common, in your case the battery pack’s - terminal.

I recommend becoming familiar with this convention, as it will better help you draw subcircuits without having to snake unnecessary power wires all over the place.

The capacitors in alka’s circuit are relatively optional, but the diode is critically important. Without it, the motor could break the transistor when it gets switched off. Do not forget it.

I understand if it’s frustrating to deal with such a ‘noob’ like me, but I’m just very interested in learning about and understanding all of this.

Don’t worry, you’re not the worst I’ve had to deal with.

SemWassim: The power supply is 4 AA batteries, so 6V. So, concluding from your reaction and MarkT's (who mentioned 4.5V(?)), that isn't good for the Velleman module..? I would think that 6V is fairly close to the 7V that is indicated in MarkT's diagram, resulting in a less effective but nonetheless working transmission - or am I utterly wrong in thinking that? I'd love to hear your thoughts. Cheers.

No, you need 10V minimum, as stated in the datasheet. As I said the plateau is where the switching happens, and you need to be well above the plateau to ensure complete and rapid switching, and that graph is a "typical device" graph - in reality there is temperature dependence and manufacturing spread and device aging.

A non logic level FET is driven from 12V, basically. The Arduino cannot supply 7V, or even 6V, so this is beside the point.

I have been puzzling this whole day, trying to figure out how to use my breadboard proto shield for Arduino. I have created a picture of how I interpreted Alka’s diagram and how I implemented it in the breadboard shield. Did I do that correctly? If not, which mistakes did I make?

Also, on the picture, I’ve indicated the extra 5V and GND slots that the shield accommodates. As I understand, I should NOT use these with the DC and servo motor, correct?

How would I use the same power supply for the Arduino itself? Just connect the second most right row (the most right of the breadboard) directly to the Arduino’s V(in) port and connect the GND row on the breadboard to the Arduino’s GND port? Even if that connection is correct, would there have to be something inbetween? PLease tell me if I’m mistaken in thinking this is the way to power the Arduino with the same source.

I take it that the servo can also be powered with the same power supply via the same breadboard row - I can’t see any complications in that, really.

I now understand that I should forget about the Velleman modules (of which I apparently never needed two, right?) and just use the diode and capacitors like they’re shown on the picture that is attached to this post.

If I haven’t shown my gratitude enough yet: thanks a million for everyone’s help. I’m learning about my own project (and electronics in general) in a tough, but very efficient way! Cheers.

P.S. Perhaps a silly question, but the breadboard basically consists out of two compartments with ports. Is there a connection between the two compartments, or does the blank area inbetween cut off the connection, creating two ‘5 port rows’ instead of one ‘10 port row’? Just to be sure - there’s no harm in double-checking, is there?

I have been puzzling this whole day, trying to figure out how to use my breadboard proto shield for Arduino. I have created a picture of how I interpreted Alka's diagram and how I implemented it in the breadboard shield. Did I do that correctly? If not, which mistakes did I make?

I don't know the pinout of MOSFETs off hand, but assuming you know your drain from your source that looks right.

Which MOSFET are you going to use instead of the IRF one?

Also, on the picture, I've indicated the extra 5V and GND slots that the shield accommodates. As I understand, I should NOT use these with the DC and servo motor, correct?

Correct, those headers are just additional connections to the normal 5V and GND pins, they are only there to provide additional convenient connecting points.

Also, be careful before you use them. I believe LarryD found with one protoshield he used that the were labelled wrong (GND was actually 5V and 5V was actually GND). Double check yours before you plug anything into them.

How would I use the same power supply for the Arduino itself? Just connect the second most right row (the most right of the breadboard) directly to the Arduino's V(in) port and connect the GND row on the breadboard to the Arduino's GND port? Even if that connection is correct, would there have to be something inbetween? PLease tell me if I'm mistaken in thinking this is the way to power the Arduino with the same source.

Correct!

Except 6V isn't really enough for VIN. It's recommended that VIN be at least 7V for proper operation, and don't forget that battery voltage drops as they are used. The pack will be providing less than 5V for a large part of it's operating time. If you are using rechargeables it will be below 5V for most of the time.

P.S. Perhaps a silly question, but the breadboard basically consists out of two compartments with ports. Is there a connection between the two compartments, or does the blank area inbetween cut off the connection, creating two '5 port rows' instead of one '10 port row'? Just to be sure - there's no harm in double-checking, is there?

It's 2 '5 port rows'. This lets a DIP IC straddle the gap with all the pins still isolated from each other.

Looks like you are on the right track..

The large cap doesn't have to be 1000uf for such a small motor. A 100-200uf size would probably be sufficient.

With this circuit and the right mosfet you can do speed control using PWM too.

Jiggy-Ninja:
Which MOSFET are you going to use instead of the IRF one?

https://www.conrad.nl/nl/unipolaire-transistor-mosfet-infineon-technologies-irl520npbf-n-kanaal-soort-behuizing-to-220-ab-i-d-10-a-u-ds-100-v-161151.html I thought this would be a suitable MOS-FET. (It’s of the IRL kind, which you recommended, instead of the IRF kind.) Even though I hope you don’t mind that this URL links to a Dutch website, the code of the MOS-FET is the same universally.

Jiggy-Ninja:
Also, be careful before you use them. I believe LarryD found with one protoshield he used that the were labelled wrong (GND was actually 5V and 5V was actually GND). Double check yours before you plug anything into them.

I’ll be sure not to touch them. :slight_smile:

Jiggy-Ninja:
I don’t know the pinout of MOSFETs off hand, but assuming you know your drain from your source that looks right.

Jiggy-Ninja:
Except 6V isn’t really enough for VIN. It’s recommended that VIN be at least 7V for proper operation, and don’t forget that battery voltage drops as they are used. The pack will be providing less than 5V for a large part of it’s operating time. If you are using rechargeables it will be below 5V for most of the time.

The second quote is basically an elaboration of the first quote if I’m not mistaken (or am I? In that case, what do you mean with the first quote?).First of all, I’m not using rechargeable batteries. Secondly, albeit that my batteries aren’t rechargeable, would the fact that the battery voltage will practically be 5V (at least <6V) be an issue for the efficiency and/or productivity and/or the functionality? I’d be willing to sacrifice a hint of efficiency, as long as the eventual project is smoothly operational.
Just a reminder: I’d be supplying power to the DC motor and the servo motor, as well as to the Arduino itself - nothing more, nothing less. That’s probably useful to keep in mind.

I’m curious as to what answers you can give. Thanks (to you, too, Alka).