Controlling a High Voltage/Amp Load with a Transistor

Hey ya’ll! I’m kind of a newbie to Arduino and electronics, and I have a question about a circuit I’m trying to build. I want to control the speed of a DC motor using my Arduino and a transistor.
I have searched around on the internet and come up with a plan, but I feel like it will burn out my board. Can anyone help me?
My setup is this:
-I have the base of my transistor connected to an analog pin.
-The positive end of a RC battery (above 5V) connected the my motor
-The other terminal of the motor is connected to the collector of the transistor
-The emitter of the transistor is connected to Arduino ground and the negative terminal of the battery.
This is where I get worried. Will the power from the battery go into my Arduino and hurt it? This circuit is mainly from the internet and I really don’t trust it.
Will it damage my board, or even work at all?
And should I change up the whole idea?
Any help is greatly appreciated :slight_smile:

Can you post a drawing of what you exactly want to do?

I have the base of my transistor connected to an analog pin.

Arduino only has analog INPUT no outputs???

You may check this drawing - Arduino Playground - HomePage - controlling a motor is quite similar if you use an Arduino PWM signal.

That won't work, the Arduino can't output analog values.

The best it can do is a PWM output (and you need to use the digital pins with a "~" next to the number).

Thank you, that was an accident in my typing. I'll try to post a picture tonight, thank you for your responses!

-I have the base of my transistor connected to an analog pin.

It needs to go through a resistor it should not be directly connected to the transistors base.
Apart from that is sounds fine.

It would help to know which DC motor, power source, and transistor.

What sort of transistor are you trying to use, and what are the voltage and current? If it really is a high voltage/high current, you should be using a mosfet.

you can have an external power sources and then use the arduino to control a series of larger transistors by taking advantage of gain

Thank you for the information guys! I’m not sure about the current yet, but the voltage will be 10V+. I was planning on using a MOSFET on a heat sink, but maybe it’s not necessary for this application. I know I don’t have much information for you yet, but can anybody tell me what value resistor to use, or how to figure it out? I have a crude diagram here. But looking at it’s file name it might only be on my computer, so I hope it works to post it, haha.

Diagram.bmp (385 KB)

but can anybody tell me what value resistor to use,

You need a resistor in the base.

Normally 1K will do but it should be be half the value needed to drive the transistor into saturation. This means the current flowing into the base should be ( 2 X Current load ) / transistor Gain. The resistor will have 5 - 0.7 = 4.3 V across it so you can work it out.

However if you use a FET then a 120R resistor to limit the peak current surge on switch on will suffice.