Pages: [1]   Go Down
Author Topic: Getting started with Arduino: Figure 5-7  (Read 1260 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In the book "Getting started with Arduino" (2nd Edition): Page 69 Figure 5-7, doesn't make sense to me on how to get it to work (turn the fan).

What's the sketch needed to make this work? Also where does the power come from? USB or 9v plug?

I have everything plugged in exactly as show in example and nothing happens when I plug in USB to Arduino. The MOSFET just gets SUPER hot.

Any input would be highly appreciated. Thank you. I am new to Arduino, Electrical Engineering, and electronics..
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The schematic assumes you're powering the Arduino with a 9V source. That 9V is what will be powering the fan.

What mosfet are you using in your build (what is the part number of the mosfet)? If your mosfet is not a logic level mosfet -- that is if it doesn't turn on when 5V is put to its gate -- then it will do nothing but get hot.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8512
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What's the sketch needed to make this work?
Doesn't the book have an example sketch? If not then

pinMode (9, OUTPUT);
digitalWrite (9, HIGH);

But what FET is that? you will need a logic level FET to work.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Chagrin, thank you very much for clarifying that it needs 9v, as I was only powering by USB. The MOSFET is the L7805VC full info here --> http://www.makershed.com/v/vspfiles/assets/images/l7805.pdf

Looks like the TO-220 in the datasheet.

It's from this kit http://www.makershed.com/Mintronics_Survival_Pack_Guts_p/mstin2r.htm

Graynomad, thank you very much also for the sketch sample. I am also new to the sketches. Is the following sufficient to upload to the Arduino Uno R3?:

void setup() {
pinMode (9, OUTPUT);
digitalWrite (9, HIGH);
}
void loop(){
 
}

That's all I have in the IDE

Again thank you both for taking the time to respond to me, it is very much appreciated.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8512
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is the following sufficient to upload to the Arduino Uno R3?:
Yep. It doesn't do anything except turn the motor on but that's the idea.

BTW, I think that circuit should have a pull down resistor on the gate because until you execute the pinMode() function it's floating.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Chagrin, thank you very much for clarifying that it needs 9v, as I was only powering by USB. The MOSFET is the L7805VC full info here --> http://www.makershed.com/v/vspfiles/assets/images/l7805.pdf

A 7805 is a voltage regulator, not a mosfet. Completely different things -- you've got the wrong part.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for helping me sort this out. I am new to all of this. Both of your help was much appreciated and I learned more than what was just in this figure.
Logged

Tucson, AZ
Offline Offline
Sr. Member
****
Karma: 8
Posts: 317
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Page 70 of the book recommends the IRF520 MOSFET.  Do you have one of those or anything similar?
Logged

New Hampshire
Offline Offline
Full Member
***
Karma: 4
Posts: 179
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A 7805 is a voltage regulator, not a mosfet. Completely different things -- you've got the wrong part.
Hehe, I made that mistake too when i started, cause the things look exactly then same as some mosfets. Then I started doing a big V in sharpie on the voltage regs i bought cause i know im still probably gonna grab one without thinking sometime.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

kd7eir,
     I don't have anything similiar. I will just have to get one. Will most likely need them in the future. I just had all the wrong parts to complete that figure. Rob also gave me the needed sketch as one wasn't provided. I guess Massimo expected you to know enough code by that point. I'm not that good yet smiley

Nikarus,
  That is a great idea of marking the voltage regulators with a V. Thanks for that. 

ALL help and comments were much appreciated. I think I can figure it out from here.
Logged

Pages: [1]   Go Up
Jump to: