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

I re-built the circuit to run a motor depicted in the book “Getting started with Arduino” (ex. 5-7, page 69)
As my motor doesn’t work, I am looking for how to find the error.

I am a beginner and would much appreciate your opinion and advice.

This is the sketch I used:

const int MOTOR = 9;

void setup() {
pinMode (MOTOR, OUTPUT);

digitalWrite (MOTOR, HIGH);
}
void loop(){
}

Assume that

  • the MOSFET (and the diode) is the one used in the book
  • I use a 9V battery as a power supply
  • The MOSFET gets hot, the diode as well.
  • The motor (an old hairdryer motor) is correctly connected, (though I do not know its polarity, I just connected it in both ways, in which noone worked).

Might it be useful to use a multimeter? What should I measure (voltage, current), and what should be the result?

Thank you very much for your help!

I use a 9V battery as a power supply

The motor (an old hairdryer motor)

I don't really see those statements as mutually compatible.

You mean I should use another motor? If yes, how I see which one is the right one (please consider that I like to disassemble old devices and use their parts with Arduino) ?

A small DC motor would be a good idea.

Mark

If you're powering the motor from a battery then it needs to be a DC motor and the battery needs to be able to supply the voltage the motor needs to run, and it needs to be able to supply as much current as the motor draws at that voltage. If they're correctly rated for each other, you would be able to connect the motor directly to the battery and it will run. (In this case the Arduino and transistor just provide a means for you to turn the motor off under electronic control.)

3Design: - The motor (an old hairdryer motor) is correctly connected, (though I do not know its polarity, I just connected it in both ways, in which noone worked).

A hairdryer might use 10 amps or thereabouts, so I'm not surprised the MOSFET got hot. What does surprise me is that the battery didn't explode. ;)

If you have any old RCs, you can get the motor from them. Or just go to the nearest RadioShack and get one for $2.

[quote author=Nick Gammon link=topic=188098.msg1393154#msg1393154 date=1379311118]

A hairdryer might use 10 amps or thereabouts, so I'm not surprised the MOSFET got hot. What does surprise me is that the battery didn't explode. ;) [/quote]

Beginner's luck, certainly :D

I might not had connected it long enough... maybe just for half a minute, when realising that it doesn't work I removed the connections.

So I will trying it with a smaller one. I hope it will be strong enough for what I intend to build: a "wind machine" where the air current goes vertically up, and you let a ping-pong ball dancing on it. Keep your fingers crossed for me ^_^

A hairdryer might use 10 amps or thereabouts,

Yes, but to be fair, very little of that will go to the motor. ;)

cooling fan from a computer?

AWOL:

A hairdryer might use 10 amps or thereabouts,

Yes, but to be fair, very little of that will go to the motor. ;)

That's what I guessed, as well, without knowing however. I suppose most of the current goes into the heating element.

mmcp42: cooling fan from a computer?

Very clever, thank you for the hint. In this way, I don't need to mount a fan on the motor.

AWOL: Yes, but to be fair, very little of that will go to the motor. ;)

Indeed. In most hairdryers (except the antiques), the motor is a DC motor running at something like 12 volts derived through a bridge rectifier from a tap off the "low" element. The half to one amp or so it draws is fairly small compared to the total element current.

As always, you need to take this step by step. First connect the motor directly to the 9V battery. Does it run (and how fast)? No point adding any other circuitry until this is determined. Note that a stalled motor represents an almost short circuit across the power supply, so if you think this will run from a "PP3" battery, think again!

Paul__B: Indeed. In most hairdryers (except the antiques), the motor is a DC motor running at something like 12 volts derived through a bridge rectifier from a tap off the "low" element. The half to one amp or so it draws is fairly small compared to the total element current.

As always, you need to take this step by step. First connect the motor directly to the 9V battery. Does it run (and how fast)? No point adding any other circuitry until this is determined. Note that a stalled motor represents an almost short circuit across the power supply, so if you think this will run from a "PP3" battery, think again!

Thank you, again a beginner's lesson I learned. Fortunately, when connected directly to the battery, the motor runs quite fast - and after half a minute of running, no sign of getting slower or starting to smell, I suppose that's already a good sign. Another thing I noticed is that there is no "wrong" polarity - connecting the wires reversely results in turning the fan in the other direction - I hope this does not bring the motor to a stall.

Anyway, thank you for your help, I will now continue to check which other element in the circuit might not work properly. The best thing might be to measure the tension between all of the elements - if not, feel free to comment ;)

Perhaps you better post your exact circuit, or better still a photo of it.

I re-built the circuit to run a motor depicted in the book "Getting started with Arduino" (ex. 5-7, page 69)

Perhaps. Let's see a picture of it.

Sure. See the picture here: pic.twitter.com/Bm9v9R7OCr

I'm afraid the focus and/ or resolution of that picture is rather inadequate to figure out what is connected to what!

Sure, sorry. I didn’t realize that Twitter automatically scales down a picture so much.

I did it now manually with the original size, and attached it here.

You can attach pictures or files here, you know. People don't necessarily trust off-site sites.

How to use this forum

[quote author=Nick Gammon link=topic=188098.msg1395924#msg1395924 date=1379496170] You can attach pictures or files here, you know. People don't necessarily trust off-site sites.

How to use this forum

[/quote]

Point taken, I didn't know this option. I adapted my post above.