TIP120 Question or alternative

Before I post my bigger problem, I wanted to ask about the usage of a TIP120.

All the examples I see switch the ground. Is it possible to switch the positive? I am having issues with switching the ground because I have 2 batteries and therefore it still gets a connected to ground else where, in this case the TX wire from the Mega to the Motor controller. The TIP120 is controlling power to a SparkFun serial motor controller which has its own battery. I am trying to switch the power before my step-up instead of the connection to the motor controller so that I can completely cut power. The Mega is powered by its own battery and has a master power switch and therefore needs to control power to the motor controller. Otherwise the motor controller is on all the time.

I will try to get a diagram of my step up soon.

I am not sure what you are trying to do but I think you mean "high side switching", that is sourcing current rather than sinking it. For that you need a PNP transistor rather than the NPN that is the TIP120. Then the emitter goes to +, the collector to the + side of the load and the other side to ground. The base through a resistor goes to an arduino output, with a high to turn it off and a low to turn it on. You can also use P-channel FETs to do the same thing.

Thanks! I didn't know the right terminology to use. I think this will work much better with high side switching. Then I don't have to worry about the grounds and they can all be connected.

I hope RadioShack sells them? Want to get the hardware part of my robot completed so I can dive into lots more programming!

Will this work? TIP42G PNP

And its in stock locally ;)

It depends on the current but I have just got some UDN2981 drivers to play with. http://uk.farnell.com/allegro-microsystems/udn2981a-t/ic-driver-led-relay-2981-dip18/dp/1193495?Ntt=1193495

However I doubt it is a Radio Shack part - they don't seem to sell much in terms of components these days.

Yea I need more current, the one at RS is 6A. Which is perfect. I shouldn't be more then 3A or so.

Yeah its unforunate that RS is lacking in that area as sometimes that is all I have. Fry's is like an hour away. Too far for a $2 part, but also Fry's does't have a lot that RS has like this stuff.

So to get this straight,

Pin 1 goes to the arduino via a resistor. Will 1K be good?

Pin 2 goes to the load(project)

Pin 3 goes to the power source?

Is it the same pin out as the TIP120?

I didn't ground the screw hole, so that does have to be ground in this case?

Grumpy_Mike: with a high to turn it off and a low to turn it on.

I didn't read that part carefully enough.... I need low to be off!!!! When the mega is off the motor controller should be off because otherwise the motor controller will be on when the robot is off... what can I use?

I tired and it does work where when the robot is off the motor controller is on, so no more ground issues. Just need the opposite.

Except if the TX/RX is connected the motor controller turns on, do I need a diode so keep that from happening? Which one?

I need low to be off!!!! When the mega is off the motor controller should be off because otherwise the motor controller will be on when the robot is off... what can I use?

You should not be powering anything when the arduino is off. You have to switch all the power sources at the same time. It can potentially damage a chip to feed a voltage signal into it when it has not got it's power connected.

Grumpy_Mike:

I need low to be off!!!! When the mega is off the motor controller should be off because otherwise the motor controller will be on when the robot is off... what can I use?

You should not be powering anything when the arduino is off. You have to switch all the power sources at the same time. It can potentially damage a chip to feed a voltage signal into it when it has not got it's power connected.

I have 2 power sources, the motor controller has its own and the mega/sensors/servos are on there own.

I am trying to control the power state of the 2nd battery for the motor controller. I don't have a way to have a master switch for all unless I have 2 master switches. Each battery is connected to a step-up and then the load.

The only connection between the two is the TX from the mega to the motor controller(RX) and the grounds are connected.

Also the chargers share the same power source. So i can charge both batteries from a single plug on the back of the robot.

How about this approach?

Can you add pin numbers to the diagram? 1 Being the connection to the Mega.

I a little confused at the diagram...

Would 1k work for R, or what should I use?

Thanks for the help.

Where does positive and ground connect to?

I take it positive connects to the NPN and then the ground is connected to the PNP?

Pin numbers? It's 2 transistors and 2 resistors. There's no pin numbers. 1K would probably be fine - when the NPN turns on, it will draw ~ (Vsource - 0.7V)/1K = XmA of current.

How big is the battery? With 6V => (6-.7)/1000 = 5.3mA of current when the NPN is on. You really have 3A you are turning on/off? The PNP will get hot. According to the RS data will have 1.5V across the emitter/collector, leaving 4.5 V for your circuit (with the same assumption of 6V battery). Power dissipated = Voltage (V) x current (I) = 1.5V x 3A = 4.5W You'd really be much better off with a p-channel MOSFET here. A part with a low Rds of say 10mohm (0.01 ohm) and 3A of current will only dissipate: Power dissipated = VI, or doing some ohms law substition = IxIxR = 3Ax3Ax0.01 = 9mW, and the voltage drop across it will be V=IR = 3*.01 = 0.03V, leaving 5.7V for your circuit.

See figure 3 in this application note http://www.datasheetcatalog.org/datasheet/vishay/70611.pdf and see if you can locate a P-channel MOSFET with low Rds to use.

CrossRoads: Pin numbers? It's 2 transistors and 2 resistors. There's no pin numbers. 1K would probably be fine - when the NPN turns on, it will draw ~ (Vsource - 0.7V)/1K = XmA of current.

How big is the battery? With 6V => (6-.7)/1000 = 5.3mA of current when the NPN is on. You really have 3A you are turning on/off? The PNP will get hot. According to the RS data will have 1.5V across the emitter/collector, leaving 4.5 V for your circuit (with the same assumption of 6V battery). Power dissipated = Voltage (V) x current (I) = 1.5V x 3A = 4.5W You'd really be much better off with a p-channel MOSFET here. A part with a low Rds of say 10mohm (0.01 ohm) and 3A of current will only dissipate: Power dissipated = VI, or doing some ohms law substition = IxIxR = 3Ax3Ax0.01 = 9mW, and the voltage drop across it will be V=IR = 3*.01 = 0.03V, leaving 5.7V for your circuit.

See figure 3 in this application note http://www.datasheetcatalog.org/datasheet/vishay/70611.pdf and see if you can locate a P-channel MOSFET with low Rds to use.

I mean in reference to the part, the package has 1 being the base 2 being the collector and 3 being the emitter. Just so I know I have it right.

The batteries are both 3.7 lithiums being stepped up to 7v for the Arduino/Motor Controller.

It might peak to 3A for the motors when they are loaded. For probably for short periods of time not constant.

Where can I get P-channel MOSFET? I saw Radio Shack has some, need to check if they are P-Channel.

4.5v would be find since its been stepped up to 7 anyway. I could put the "Switch" on the other side of the step-up and the controller directly but then the step-up will be charged when everything else if off.

Pin numbers being equal to BCE or GDS will depend on the parts selected, you'll have to determine that when you select your parts.

Browse digikey.com, search for p-channel mosfet, look for in stock parts, FETs-Single, filter on logic level and through hole

This one looks good: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=869-1055-ND

CrossRoads: Pin numbers being equal to BCE or GDS will depend on the parts selected, you'll have to determine that when you select your parts.

Browse digikey.com, search for p-channel mosfet, look for in stock parts, FETs-Single, filter on logic level and through hole

This one looks good: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=869-1055-ND

I got it working with the NPN/PNP and you werent kidding the TIP120 got super hot.

So with the MOSFET it will run cooler and then would I connect it the same way? Or would it just be 1 MOSFET? I guess I have some reading up to do.

Replace the PNP with a P-channel MOSFET - will run cooler as the calculations show. Coolness will depend on the Rds of the selected part, the lower the cooler. Just make sure it is logic level MOSFET, otherwise it needs 10V to turn on full, and you only have 7V.

Where do the Emitters connect to? The one the NPN and PNP/MOSFET? Just so its clear.