Go Down

Topic: Pins Stuck MEGA 2560 (Read 2452 times) previous topic - next topic

Coding Badly

It was working perfectly, until I used it as the base of an NPN transistor to regulate current to a DC motor.


Which transistor?

frice2014

You are right. The 9 pin is also bad, because I tested it as such.

The code below returns 1V with a multimeter
Code: [Select]

void setup()
{
 for(int i = 2; i <= 53; ++i)
   pinMode(i, OUTPUT);
 digitalWrite(9,HIGH);
}

void loop()
{
 for(int i = 2; i <= 53; ++i)
   if(i != 9)
     digitalWrite(i, LOW);
 delay(100);
}



The code below produces 3V with a multimeter
Code: [Select]

void setup()
{
 for(int i = 2; i <= 53; ++i)
   pinMode(i, OUTPUT);
 digitalWrite(9,LOW);
}

void loop()
{
 for(int i = 2; i <= 53; ++i)
   if(i != 9)
     digitalWrite(i, HIGH);
 delay(100);
}


Thanks for all the help!

frice2014


It was working perfectly, until I used it as the base of an NPN transistor to regulate current to a DC motor.


Which transistor?



MMPS U01A


dlloyd

Not looking good (for the board).

Other checks:
Does the MCU feel overheated while running the test? Is the power supply voltage and current within spec?
Otherwise, you could try cleaning the board, then re-test to see if the signals have recovered.

frice2014

http://pdf1.alldatasheet.com/datasheet-pdf/view/113388/MOTOROLA/MPS-U01A/+01_49-VKMyOyRx.eyVap+zwM+/datasheet.pdf

I only gave the collector 12 Vdc.

It doesn't feel overheated.  The power supply is from my computer now that you mention it. I just have it powered with USB.  Is that not enough?

dlloyd

Quote
The power supply is from my computer now that you mention it. I just have it powered with USB.  Is that not enough?

Sometimes it isn't - The USB ports on notebooks and PCs are coming from a "bus powered" hub on the motherboard and it may only deliver 100mA to each port. With an external hub with its power supply connected, it will deliver the full 500mA to each port.

Go Up