Control a fan with external battery

HI guys, I am not very experienced with Arduino and for my project I want to toggle the fan connected to an external battery on/off using sketch instead of a normal switch. Any advice on how to do it would be great.

Thanks for your time. :confused:

Welcome to the forum.

This is a very basic use that has been covered many times. A simple search in the box above or reading the Learning tab contents will answer this question.

Look for "using a switch" and "turning on a motor".

We will be happy to help with any problems but you have to do some basic research first.

Weedpharma

My problem is i don't want to use resistors because it works perfectly with just battery.
I just need to control the motor with arduino. All the projects in the libraries and on the net have resistors but i don't. That's why i said to control the switch using codes.

Thanks anyway.

Edryu

You give insufficient information to give a precise answer to your problem. I will take a guess at what you want to do.

Use the Arduino output fed via a R of around 470 ohms to the gate of a logic level MOSFET. Use this to switch the motor on. Don't forget to put a reverse diode across the motor to prevent reverse voltage spikes.

You could also use a relay shield to drive the motor.

You do not even say if you are having trouble with the hardware or with the program.

Weedpharma

According to that tutorial , motor should be easily controllable bi-directionally , I want to create the same setup . How does it work on the software side because that tutorial doesn't work for my motors (two , both use less than 3 V.) That's all I have to say..

thanks,
Edryu

Please supply details on the motor as well as a circuit of how it is connected and powered.

Please put your code in its own window as seen in other posts. This can be done by placing     [code]  and [/code]  around the code or use the </> icon. This makes it easier for others to read.

Weedpharma