How Do I Use A Transistor?

okay i am a huge noob when it comes to general electronics.

so I am currently working on a robot, i got the code done, but i have been have trouble with motors.
I am using a NPN Darlington Tip131 transistor details: http://www.farnell.com/datasheets/296714.pdf
The power source is 4 aa battery.
the load is currently a single 130 motor, but i need to power 2 later. details:https://www.onsemi.com/pub/Collateral/TIP131-D.PDF

So the problem is when the transistor is powered(it gets pretty hot) and the output is the motor is only 1.54v??? the setup is down below(i don't have the button or the diode). Can anyone help me? I am guessing it's probably the transistor's resistance.

i am open to any solutions.

TransistorMotor_bb.png

The solution is to use the best parts for the job and don’t omit parts that are used in a circuit. You absolutely need the diode across the motor, without it things go poof as in blow up, fail. You’re also missing a current limiting resistor between the Arduino output and the transistor base. That’s another no-no which can wipe out your Arduino.

While you could probably make that circuit work with the Darlingtion transistor, you’ll not get full battery voltage to the motor. You’ll typically loose 1.2 volts out the 6 volts available with a Darlington. Once upon a time, they had their place in electronics but that era passed at least twenty years ago. Today, the far better part would be a logic level N channel mosfet, something like this:

And connected per this drawing:

uh what value should i use for the flyback diode?

4AA batteries means any diode with an amp or so rating will do, the voltage isn't going to be an issue with
6V.

1N4001 through 1N4007

okay i have some MOSFET IRF540 N-CHANNEL, will that do the trick?

IRF540 N-CHANNEL

Use

IRL540 N-CHANNEL

Frank_Peng123:
okay i have some MOSFET IRF540 N-CHANNEL, will that do the trick?

Not logic level...needs 10V to switch on fully. Arduino can't provide 10V.

IRL540 is logic level...switches on at 5V which Arduino can provide.

Steve