Getting started: Why does my 5-7 example (motor) not work

You should not be powering the MOSFET off the Arduino 5V line, you can damage the arduino. Does the book say to power the MOSFET from the arduino? If your using an AC to DC wall plug around 6 - 9V, then move your 5V wire to Vin.

Also make sure your diode is connected correctly.

HazardsMind:
You should not be powering the MOSFET off the Arduino 5V line, you can damage the arduino. Does the book say to power the MOSFET from the arduino? If your using an AC to DC wall plug around 6 - 9V, then move your 5V wire to Vin.

Also make sure your diode is connected correctly.

The book does not exactly say how to power the mosfet - it only says that it gets its power feed from the Arduino 9V pin.
It might be poorly visible from the picture, but I connect the motor to the Vin pin (as told in the picture in the book (see attachment).

@ diode embarassing to say, that I mounted the diode in the wrong way. When I put it in inversely, the motor started! However, the voltage seemed to low to make it turn fast enough for lifting the pingpongball in the air.

What makes me really confused (and putting the diode in in the wrong way): I was convinced the power flows from the Vin through the diode to the mosfet, hence the diode’s anode must be connected to Vin and the cathode (with the ring) to the mosfet. Apparently, it is the other way round?

Please tell me where I made a mind mistake :blush:

3Design: The book does not exactly say how to power the mosfet - it only says that it gets its power feed from the Arduino 9V pin. It might be poorly visible from the picture, but I connect the motor to the Vin pin (as told in the picture in the book (see attachment).

Ah, now we get to see the circuit with some clarity. I was suspecting you had the diode wrong, but could not see the connections sufficiently clearly in any of the previous photos.

What has also been missing - as it is in that diagram - is the power feed itself - which should essentially be the same point as you are taking the power for the motor circuit.

3Design: @ diode embarrassing to say, that I mounted the diode in the wrong way. When I put it in inversely, the motor started! However, the voltage seemed to low to make it turn fast enough for lifting the ping pong ball in the air.

Again the question - can it do so simply connected across the battery?

3Design: What makes me really confused (and putting the diode in in the wrong way): I was convinced the power flows from the Vin through the diode to the mosfet, hence the diode's anode must be connected to Vin and the cathode (with the ring) to the mosfet. Apparently, it is the other way round?

Well the diode is not "feeding" the motor, it is connected across the motor. As the motor can be an inductive device, it may under some conditions generate voltage spikes which could be interfering with other parts of the circuit, if not actually damaging. The diode is to bypass such spikes.

As it was, it certainly was "feeding" power to the MOSFET, bypassing the motor and causing the overheating.

What are you using to power the arduino itself, a wall plug or your computer?

Also as Paul__B asked, does the motor lift the ping pong ball when directly connect to the battery?

HazardsMind: What are you using to power the arduino itself, a wall plug or your computer?

I use a 9V battery, connected to the adapter plug. However, yesterday I tried another power source to generate up to 12V (to make the fan blow stronger): A model railway transformer, which I adjusted to about 11V and connected to the 9V battery (the cathode with the cathode of the battery and the anode with the Vin of the arduino). The battery itself I connected as previously to arduino's adapter plug. And the fan blew stronger and somewhat lifted the ball or let it circle.

HazardsMind: Also as Paul__B asked, does the motor lift the ping pong ball when directly connect to the battery?

It doesn't, because the air current is too weak.

Paul__B: Well the diode is not "feeding" the motor, it is connected across the motor. As the motor can be an inductive device, it may under some conditions generate voltage spikes which could be interfering with other parts of the circuit, if not actually damaging. The diode is to bypass such spikes.

As it was, it certainly was "feeding" power to the MOSFET, bypassing the motor and causing the overheating.

Thank you very much for your explanations, Paul, I really appreciate that - however I might need some time to fully understand your explanations.

It needs to be set up like this. https://www.google.com/search?q=mosfet+motor&source=lnms&tbm=isch&sa=X&ei=yAM8UsG2G9jK4APqtYDABw&ved=0CAgQ_AUoAA&biw=320&bih=372&dpr=2#biv=i%7C0%3Bd%7C4w-UeDU_os_hhM%3A

HazardsMind: It needs to be set up like this. https://www.google.com/search?q=mosfet+motor&source=lnms&tbm=isch&sa=X&ei=yAM8UsG2G9jK4APqtYDABw&ved=0CAgQ_AUoAA&biw=320&bih=372&dpr=2#biv=i%7C0%3Bd%7C4w-UeDU_os_hhM%3A

Did you have a particular circuit in mind? When I use this link it only leads me to a general search, where among the results I see hundreds of circuits, each one looking differently.

3Design:

HazardsMind: It needs to be set up like this. https://www.google.com/search?q=mosfet+motor&source=lnms&tbm=isch&sa=X&ei=yAM8UsG2G9jK4APqtYDABw&ved=0CAgQ_AUoAA&biw=320&bih=372&dpr=2#biv=i%7C0%3Bd%7C4w-UeDU_os_hhM%3A

Did you have a particular circuit in mind? When I use this link it only leads me to a general search, where among the results I see hundreds of circuits, each one looking differently.

the 1st one of the page is OK : it shows the motor and mosfet wiring, and how the diode is wired accross the motor, its cathode connected to the +V .

edit : error correction ;)

Thank you.

To be on the safe side, as I use a IRF520 instead of the STP80NE06 you linked to: Is is always like described in the STP80NE06 datasheet (http://pdf1.alldatasheet.com/datasheet-pdf/view/24510/STMICROELECTRONICS/STP80NE06-10.html) that the pins 1,2 and 3 (counted from the left side, see datasheet) are assigned to gate, drain and source (in this order)?

That's what I see in the IRF520 datasheet (eg. http://www.datasheetdir.com/IRF520+Power-MOSFETs), but I'd like you to confirm this.

The IRF520 and the STP80NE06 have the same pinout , which seems to be widely used for mosfets, but I wouldn't bet it is always the case, and before I actually wire one on a breadboard or on a PCB, I always check with the datasheet .

As long as you know what pins on your MOSFET are, drain source and gate, you will be fine. Also you don’t need to use those exact same parts as in the link, I just want you to see the diode to MOSFET arrangement.