Go Down

Topic: Getting started with Arduino: Figure 5-7 (Read 1 time) previous topic - next topic

Maxxforce

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..

Chagrin

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.

Graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

Maxxforce

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.

Graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

Chagrin


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.

Maxxforce

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.

kd7eir

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

Nikarus


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.

Maxxforce

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 :)

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.

Go Up