Go Down

Topic: PWM 12v Motor Control (Read 170 times) previous topic - next topic

alphacheese

Feb 01, 2016, 05:56 pm Last Edit: Feb 01, 2016, 06:01 pm by alphacheese
I'm struggling with a setup I've build to control eight 12v motors with TIP120 transistors. I've included a fritzing sketch so you can see my wiring setup. I know you experts don't like fritzing so please forgive me I can't draw a wiring schematic. I'm using an Arduino Mega with the transistors plugged into pins 3, 5, 6, 7, 8, 9, 11, and 12. There is a 2.2K resistor between the TIP120 base and the Arduino. Each motor has a diode to prevent voltage kickback to the TIP120. The motors are powered via a 12v power supply (the sketch shows 9v battery) and the Arduino is powered via USB but is grounded to power supply. One thing to note that is not depicted is that all of the TIP120's are mounted to a single aluminum heat sink with silicone grease.

Through out my project I will be changing the PWM of each motor. Currently I am trying to power 4 while the other 4 are turned off. The sketch is as follows:
Code: [Select]
const byte Motor1 = 3;
const byte Motor2 = 5;
const byte Motor3 = 6;
const byte Motor4 = 7;
const byte Motor5 = 8;
const byte Motor6 = 9;
const byte Motor7 = 11;
const byte Motor8 = 12;

void setup(){
  pinMode(3, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);

  analogWrite(Motor1, 0);
  analogWrite(Motor2, 0);
  analogWrite(Motor3, 0);
  analogWrite(Motor4, 0);
  analogWrite(Motor5, 100);
  analogWrite(Motor6, 100);
  analogWrite(Motor7, 100);
  analogWrite(Motor8, 100);

}

void loop() {
 
}


Here's my problem: No matter what I set the PWM to on any of the pins, ALL of the motors will power at that speed. I want motors 1-4 off and 5-6 PWM to be 100. With this sketch all motors are powered at PWM 100. What am I doing wrong?

I noticed that the back of the transistors has continuity to the collector pin. The silicone grease should prevent any contact to the heatsink. However, if the transistors are all shorted to the heatsink via the collector, could this be my problem?


If you don't have anything helpful to contribute, then DON'T post anything at all.

CrossRoads

The collector of the TIP120 is bolted to the heatsink? That connects all the collectors together. Turn on one TIP120, it sinks current thru all the motors, see attached.

You need an insulator kit for each TIP120 to isolate from the heatsink.
http://www.digikey.com/product-detail/en/4724/36-4724-ND/109792
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

alphacheese

#2
Feb 01, 2016, 09:12 pm Last Edit: Feb 01, 2016, 09:17 pm by alphacheese
The collector of the TIP120 is bolted to the heatsink?
Not bolted but apparently connected internally by design. I tested continuity of the back metal portion of the transistor and there is connection from the collector pin to the back of the TIP120:


After running through my setup several times I decided to test this. If all the collectors are connected through the heatsink, could this be my problem?

I was hoping that the heatsink grease would prevent this but I will look into insulating them. My current setup will take a while to break it down and test them not connected to the heatsink. This will be my next step. I just wanted to see if you experts already knew that was a problem.
If you don't have anything helpful to contribute, then DON'T post anything at all.

CrossRoads

#3
Feb 01, 2016, 09:49 pm Last Edit: Feb 01, 2016, 09:49 pm by CrossRoads
The tab is the collector, you can see that from a datasheet, some are more clear than others:
http://www.onsemi.com/pub_link/Collateral/TIP120-D.PDF
It the screw holding the tab to the heatsink is not isolated from the tab, the silicon grease won't matter, you have already shorted the tab to the heatsink with screwhead and threads on contact with the tab.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

alphacheese

The tab is the collector, you can see that from a datasheet, some are more clear than others:
You can say that again. I don't see that anywhere on the datasheet I was using

Confirmed: this was my problem. All of my collectors were connected via the heatsink. I'm getting some insulators to fix this.
If you don't have anything helpful to contribute, then DON'T post anything at all.

MarkT

I think you are assumed to know that the transistor die is physically mounted to the
metal tab and that current flows vertically through the die in a power transistor or FET.

MOSFET tabs are the drain, Bipolar/IGBT tabs are the collector.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy