Author Topic: choosing the transistor?  (Read 9323 times)

0 Members and 1 Guest are viewing this topic.

Offline MeckelBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
choosing the transistor?
« on: April 15, 2011, 07:23:26 PM »
Hi guys.

I´d like to control some DC motors using my Arduino Duemilanove board, and so far, i think the only/best way to do it is using a transistor.

From what i´ve read, i need to use a NPN.

I went to a couple of stores here, but just by telling them what I wanted, they couldnt help me. They said I needed to give them a serial so they could get me that one, or equivalent. Thing is, how am I supposed to know the right transistor for me?

So, i want to close the circuit when theres an output from the board ( 5V I suppose) . the circuit to be closed will have around 5W of power ( 6 to 7.2V). I have somewhere a site where it explains how to calculate something called hfe, which im not sure quite sure what it is, but just to tell you I have this info to find the transistor.


What advice can you give me?


Thanks

Offline aruna1

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: choosing the transistor?
« Reply #1 on: April 15, 2011, 08:55:00 PM »
well for 5W with 6V is 833mA,assuming its 1A I suggest a transistor like 2SD313, it can handle current upto 3A which is more than enough for you.
Hfe is the ratio between collector current to base current  (known as DC current gain)
that is Ic/Ib
for D313 its between 40 - 320
I have added datasheet link for D313 here
hope this will help
www.datasheetcatalog.org/datasheet/WINGS/2SD313.pdf
I'm Me

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #2 on: April 15, 2011, 10:05:21 PM »
Hi,

And if the 2SD313 should be hard to find, a TIP120 is very common.
TIP120 is a power Darlington (meaning that the hFE is high, around 1000 to 3000) and you just need a resistor, say 10k, between the output pin and the base of the transistor.
The emitter goes to ground and the collector goes to your other circuits ground connection (to open/close that).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline aruna1

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: choosing the transistor?
« Reply #3 on: April 16, 2011, 12:54:05 AM »
well in here it's the other way. D313 is common and TIP transistors are hard to find  ;D
I'm Me

Offline MeckelBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: choosing the transistor?
« Reply #4 on: April 16, 2011, 06:34:48 AM »
Hi guys.

Thanks fr your replies.

I got the TIP120 (actually, a similar one, according to the seller), and i was trying to mount it, but it didnt work. what am i doing wrong?




ive connected the ground on the other end of the transistor (i dont know how to see which one is collector or emitter, even with the datasheet).


the arduino is connected to my pc by USB.

Ive tried a digitalWrite command, and a PWM.


ive never used transistors, and i have a lot to learn about electronics, so forgive me if this is a blatantly obvious mistake :P


thanks

Offline aruna1

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: choosing the transistor?
« Reply #5 on: April 16, 2011, 07:27:19 AM »
please post the number of the transistor
I'm Me

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: choosing the transistor?
« Reply #6 on: April 16, 2011, 08:40:42 AM »
If the transistor you have has the same pin out as a TIP120 then you have it wired wrong.
In your diagram the transistor pins are from left to right: Base, Collector, Emitter.

I found this on the first page of the data sheet from Fairchild.
http://www.fairchildsemi.com/ds/TI/TIP120.pdf

If you are using a different transistor post the number and a link to the data sheet.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #7 on: April 16, 2011, 12:12:40 PM »
Hi,

I got the TIP120 (actually, a similar one, according to the seller), and i was trying to mount it, but it didnt work. what am i doing wrong?
If the pinout is equal to the TIP120 (post the name of the actual transistor you got), you couldn't have gotten it more wrong.
The green wire from the motor goes to the middle pin of the transistor.
The I/O port via the resistor should go to the left pin of the transistor.
The right pin of the transistor should go to ground (0V).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline MeckelBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: choosing the transistor?
« Reply #8 on: April 16, 2011, 07:01:59 PM »
thanks a bunch for your assistance.

The transistor says:

BOX33C
CC096
MAR 520.

Soeren, ive tried those changes, and it still doesnt work :(. is there any way you could tell me or show me the complete wiring?


Thanks

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #9 on: April 16, 2011, 10:42:18 PM »
hI,

The transistor says:

BOX33C
CC096
MAR 520.
If I'm not mistaken, you misread it and it should be a BDX33C. They can sometimes be very hard to read and the numbers/letters a bit "splattered" and it would be easy to misinterpret a "D" for an "O".
The rest looks like production batch/date code.

If it is a BDX33C, the pinout is the same as the TIP120.


Soeren, ive tried those changes, and it still doesnt work :(. is there any way you could tell me or show me the complete wiring?
I thought I already did.

Well, start with the transistor, the motor and the resistor and leave the controller board aside for a while.

Holding the transistor with the letters towards you and the pins pointing down, they are:
Left pin: Base
Middle pin: Collector
Right pin: Emitter
The metal tab you use to bolt it onto a heatsink is connected to the middle pin and is thus collector as well.

Connect the resistor (eg. 10k) to the transistor base pin
Connect a wire to the free end of the resistor
Connect the negative wire from the motor to the transistors collector pin
Connect the transistors emitter pin to 0V/Gnd
Connect the positive wire from the motor to +5V (preferably through a switch for now)

Touch the free end of the wire to +5V to open the transistor.

I just mucked up this with a TIP120 and a 10k resistor and in less than 2 minutes, I had it control a motor, so you really ought to be able to do it, but don't rush it, it's not a race and I probably have a bit of a head start, having soldered for around 44 years.


Be careful how you solder it and use heat shrink tubing or tape if needed, to make sure you don't make any short circuits.
Can you get this to work?

Don't hold the soldering iron on any pin for more than a few seconds (3 seconds max.) and let it cool down after each soldering - heat kills.
You may have killed the transistor if you have connected it wrong at an earlier attempt.

If possible, post a (sharp and focused) picture of how you soldered it up.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline MeckelBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: choosing the transistor?
« Reply #10 on: April 17, 2011, 06:50:14 PM »
Hi.


So, the motor is spinning with current flowing from the transistor, which is a good thing, but the wire from the resistor (wihch i thought to be in the output pin of the arduino) makes no difference.
Its kinda late and my energy source of the motors are two battery packs which i tried to "add", and i have no idea in the end which becomes positive or negative, which i dont think is the problem, but just adds confusion to my head.

So, i have one end of the battery pack connected to the motor. the other end connected to the emitter.
the other end of the motor connection is in the collector (this was the last thing i connected. if these two touch, the motor starts spinning, regardless of any other wires except the ones referred so far).
The base is connected to resistor, which in turn leads to the pin (from where i hope to control the transistor).
The emitter of the trans is also connected to the GND of the board.


im pretty sure im making another dumb mistake because im trying to get it already connected to the board.


All-Mighty Soeren, I beg for your insight  :-\ (any helpful remark is thanked, ofc).


Thanks, and sorry for all the newbie hassle

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #11 on: April 18, 2011, 02:24:01 PM »
Hi,

So, the motor is spinning with current flowing from the transistor, which is a good thing, but the wire from the resistor (wihch i thought to be in the output pin of the arduino) makes no difference.
It is going to be wired to the Arduino I/O pin, but not until you get it working.
What happens if you connect the wire to 0V/Gnd first (it should make sure no current is flowing through the transistor) and then to B+ (this should open the transistor and make the motor run).


So, i have one end of the battery pack connected to the motor. the other end connected to the emitter.
the other end of the motor connection is in the collector (this was the last thing i connected. if these two touch, the motor starts spinning, regardless of any other wires except the ones referred so far).
The base is connected to resistor, which in turn leads to the pin (from where i hope to control the transistor).
The emitter of the trans is also connected to the GND of the board.
Sounds right to me, but just in case, here's a schematic and some pics...



Red wire is from the motor to the positive side of the battery
Black wire is emitter to gnd/0V
Green wire is collector
White wire is the input wire - connect it to B+ (the red wire) to run the motor
If the motor don't stop when the wire is removed from B+, try connecting it to 0V (black wire)

If you get any other response, the transistor is ready for an "oil change".





(Remember that the tab of the transistor is connected internally to the middle pin).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline MeckelBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: choosing the transistor?
« Reply #12 on: April 18, 2011, 05:39:46 PM »
Alright, so that got the motor spinning. btw, I still have the negative wire of the battery connected to emitter. hope that was not a mistake


How could the motor keep running without the white wire?


and again,if I remove all the white wiring, as long as resistance is between base an analog pin, it spins non stop (the emitter also connected to ground).

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #13 on: April 18, 2011, 06:15:50 PM »
Alright, so that got the motor spinning. btw, I still have the negative wire of the battery connected to emitter. hope that was not a mistake
That's exactly where it should be.


How could the motor keep running without the white wire?
The basis may hold enough charge. With such high gain, even touching it with as finger may turn it on and the piece of wire act like an antenna, catching any electrical fields near it.

When you use the controller, the basis will be held low when it's not high, but with the wire, it's floating another 10k resistor from the resistor/wire node to gnd (B-) will hold it off when you don't touch the wire to B+ (but you can just touch the wire to B- for now and when on the controller, it's not gonna happen).


and again,if I remove all the white wiring, as long as resistance is between base an analog pin, it spins non stop (the emitter also connected to ground).
Analog pin?  What do you mean?
Analog pins are input and as such high impedance, so it will act like the basis is floating.

You need an output pin to control it.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline MeckelBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: choosing the transistor?
« Reply #14 on: April 18, 2011, 07:45:26 PM »
My bad, i meant digital Pin.

What I have right now is screwing at least one of my basic ideas on how this whole thing works. The resistor is, still, between base and the digital pin. even if theres no program running (while writing this, I stopped, and decided to change the pin i was using for control for another digital one (i was using pin 6 and changed to 11) )

ITS WOOOOOORKING, :D YAAAAAAAAAAAAAAAAAAAAAAY  :D

Dont know whats wrong with pin 7, but its always on, ive tested it with a LED.

I´ve finaly got the motors under control :).


Soeren, im very, very thankful for all your patience and help.

Tomorrow ill start looking into the other ideas, and chances are, ill be begging for your help again :P.


uh, just a thing, did you guys know this trans would work by experience, or did you look it up?

when I try another thing, with different tensions, my only hope is to ask experienced people? :O

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #15 on: April 19, 2011, 05:33:57 AM »
Hi,

ITS WOOOOOORKING, :D YAAAAAAAAAAAAAAAAAAAAAAY  :D
Great.


Dont know whats wrong with pin 7, but its always on, ive tested it with a LED.
That's why you should always test peripheral stuff on its own before hooking it up to a controller.


Soeren, im very, very thankful for all your patience and help.
You're welcome :)


Tomorrow ill start looking into the other ideas, and chances are, ill be begging for your help again :P.
We're scared already  ;D


uh, just a thing, did you guys know this trans would work by experience, or did you look it up?
Over time, you tend to get some preferred components for sub circuits like this, since you cannot stock all components and it's cheaper to buy and stock a few selected types, so for that reason, I have around 500 pcs of the TIP120 (and of the TIP125).
The one bad thing about using Darlington transistors is their higher voltage drop (around 1.5V), but it's simple to use and because of its high gain and resilience towards abuse, it is a good choice for beginners as well.


when I try another thing, with different tensions, my only hope is to ask experienced people? :O
The BDX33C is good for up to 100V and 10A, but isn't well suited for really low voltages (due to the Darlington drop of 1.5V).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Billy

  • Robot Overlord
  • ****
  • Posts: 132
  • Helpful? 2
Re: choosing the transistor?
« Reply #16 on: April 21, 2011, 09:54:56 PM »
Add a diode across your motor terminals so you don't destroy the transistor or your uC.
When you turn the motor off, you'll get a voltage rise at the output. This rise can be suprisingly large. The diode will clamp the voltage to less than a volt and greatly increase reliability. You want to connect the cathode of the diode to the power supply and anode to the transistor collector.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: choosing the transistor?
« Reply #17 on: April 22, 2011, 06:09:13 AM »
Hi,

Yes, a diode (or a zener, or a snubber network) is mandatory in (most) motor apps, so often don't get mentioned.
However, with a small motor I doubt that the BDX33C (100V) will be in trouble.
I used a TIP120 (60V) with a quite large motor and provoked it with lots of on/off without any issues.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


data_list