Author Topic: PIC24FJ over heating  (Read 9965 times)

0 Members and 1 Guest are viewing this topic.

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
PIC24FJ over heating
« on: April 06, 2015, 03:33:15 pm »
Hey guys!

I'm doing this project and I'm using the PIC24FJ64GA004 to control it. When the boards arrived from the board house I solder only the pic essentials, ICSP header, and one test header, and using PicKit3 with the ICSP I've managed to program a blinky test code on it, powering through the pickit. The problem is that the pic is heating up really fast. It start to blink for a few seconds and then it stops when is pretty hot. Looks like some kind of short, but i've already checked the board tracks(tracks are ok), tried with another pic (same problem), and even with another board(same problem). I'm putting a link to my schematic and all the components I've solder into the board.

Can anyone give me some light please  ;D??

Thanks a lot!!!

schematic: https://www.dropbox.com/s/3nwk6rgya87xie5/TF.pdf?dl=0
Solder list:
caps: C1, C2, C3, C4;
r: R5, R6(ran out of 470, so used a 4k7 instead);
pic;
P8 header;
ICSP header;
« Last Edit: April 06, 2015, 09:07:56 pm by raphaeldavidf »
 

Offline SteveyG

  • Supporter
  • ****
  • Posts: 987
  • Country: gb
  • Soldering Equipment Guru
Re: PIC24FJ over heating
« Reply #1 on: April 06, 2015, 05:16:54 pm »
Do you have your PICkit3 correctly set to 3.3V rather than 5V? Is your regulator actually working - I'm assuming you've checked the supply voltages?

Check your bulk capacitors - are they actually suitable?

Have you set your oscillator correctly? If you overclock the MCU it may fail early.

A picture of the board might reveal something.
YouTube Channel: https://www.youtube.com/user/sdgelectronics/
Use code: “SDG5” to get 5% off JBC Equipment at Kaisertech
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: PIC24FJ over heating
« Reply #2 on: April 06, 2015, 07:28:16 pm »
R6 and R7  50R  + LEDs  are these in place , don't think pin can sink that many mA ?
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12853
Re: PIC24FJ over heating
« Reply #3 on: April 06, 2015, 07:39:55 pm »
Are there any floating input pins?
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
Re: PIC24FJ over heating
« Reply #4 on: April 06, 2015, 08:52:54 pm »
post your code
With sufficient thrust, pigs fly just fine - RFC1925
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #5 on: April 06, 2015, 09:05:11 pm »
Do you have your PICkit3 correctly set to 3.3V rather than 5V? Is your regulator actually working - I'm assuming you've checked the supply voltages?

Yes, the pickit is set to 3.3v. I didn't solder the voltage regulator to the board yet.


Check your bulk capacitors - are they actually suitable?

I think so, the datasheet states that:
Caps C2, C3 and C4 : 0,1 uF, ceramic;
Cap C1: 10 uF, tantalum;
So used those.


Have you set your oscillator correctly? If you overclock the MCU it may fail early.

my compiler is the CCS C compiler and I'm usinf this line to configure the internal oscillator to 32M: #use delay(clock=32M, internal). I've always used this to configure the internal oscillator and never had a problem.


A picture of the board might reveal something.
Really crappy photo, sorry: https://www.dropbox.com/s/3d050olp1q1sppv/IMG_20150406_180001423.jpg

Thanks a lot SteveyG =D
« Last Edit: April 06, 2015, 09:06:59 pm by raphaeldavidf »
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #6 on: April 06, 2015, 09:15:54 pm »
R6 and R7  50R  + LEDs  are these in place , don't think pin can sink that many mA ?


R6 is 4k7 because I ran out of 470. Even then, 470 was the value from the datasheet :/

I didn't solder R7 plus the led to the board yet.

Thanks a lot 22swg ;D
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #7 on: April 06, 2015, 09:17:03 pm »
post your code

Code: [Select]
#include <24FJ64GA004.h>
#fuses FRC_PLL, NOJTAG, NODEBUG, NOWDT, NOPROTECT

#use delay(clock=32M, internal)


void main(void) {
    while(true) {
        output_toggle(PIN_C0);
        delay_ms(5000);
    }
}

its pretty basic

Thanks a lot mazurov ;D
« Last Edit: April 06, 2015, 09:19:21 pm by raphaeldavidf »
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #8 on: April 06, 2015, 09:18:32 pm »
Are there any floating input pins?

I don't have any inputs, see the code above.

Thanks a lot Ian.M ;D
 

Offline elgonzo

  • Supporter
  • ****
  • Posts: 688
  • Country: 00
Re: PIC24FJ over heating
« Reply #9 on: April 06, 2015, 09:20:48 pm »
In your schematic, you connected the anode of the LEDs through a resistor to Ground. Either your LED symbol is backwards, or the ground symbols connecting with the current-limiting resistors are wrong. What is your real circuit with regard to the LEDs? Do the respective two I/O pins responsible for the LEDs source or sink current?
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: PIC24FJ over heating
« Reply #10 on: April 06, 2015, 09:24:11 pm »
Have you checked for shorts between GND and VCC when the chip is powered off and on?
Have you checked for solder bridges on the PIC?

Sounds like when the PIC is turning on it is shorting something out.
 

Offline elgonzo

  • Supporter
  • ****
  • Posts: 688
  • Country: 00
Re: PIC24FJ over heating
« Reply #11 on: April 06, 2015, 09:24:18 pm »
Are there any floating input pins?

I don't have any inputs, see the code above.

Thanks a lot Ian.M ;D

Ahem... according to your code, you do not do anything with most of the I/O ports/pins. I/O pins are inputs by default after a reset. (It is always wise to read the datasheet if you get stuck with a problem... ;) ). Hence, you probably have lot's of I/O pins being configured as inputs (though i would not expect this to cause the problems you experience, but still worth to know for trouble-shooting...)
« Last Edit: April 06, 2015, 09:37:50 pm by elgonzo »
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #12 on: April 06, 2015, 09:30:53 pm »
In your schematic, you connected the anode of the LEDs through a resistor to Ground. Either your LED symbol is backwards, or the ground symbols connecting with the current-limiting resistors are wrong. What is your real circuit with regard to the LEDs? Do the respective two I/O pins responsible for the LEDs source or sink current?

You're correct, the leds in the schematic are backwards(fixed), but right now neither of then are solder to the board.

Thanks a lot elgonzo ;D
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12853
Re: PIC24FJ over heating
« Reply #13 on: April 06, 2015, 09:49:46 pm »
Are there any floating input pins?

I don't have any inputs, see the code above.

Thanks a lot Ian.M ;D

Ahem... according to your code, you do not do anything with most of the I/O ports/pins. I/O pins are inputs by default after a reset. (It is always wise to read the datasheet if you get stuck with a problem... ;) ). Hence, you probably have lot's of I/O pins being configured as inputs (though i would not expect this to cause the problems you experience, but still worth to know for trouble-shooting...)

PIC I/O pins in general come out of reset configured as inputs.  Analog capable pins in Analog mode are safe at voltages between the logic '0' and '1' thresholds, but digital pins have input buffers that may pull excessive supply current if they are allowed to float at an invalid level.  The standard recommendation to avoid this is to leave unused I/Os N/C, set them as outputs and set them low. 

I doubt its your whole problem, but it could be contributing.
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #14 on: April 06, 2015, 09:51:19 pm »
Have you checked for shorts between GND and VCC when the chip is powered off and on?
Have you checked for solder bridges on the PIC?

Sounds like when the PIC is turning on it is shorting something out.

Yep, I checked all pads, only the ground ones beeped   ;D

Yep, checked visually and with the multimeter(each pin with the pins next to it)

I think it is probably that, but I just can't find it =/

Thanks a lot Wilksey;D
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #15 on: April 06, 2015, 10:04:45 pm »
Are there any floating input pins?

I don't have any inputs, see the code above.

Thanks a lot Ian.M ;D

Ahem... according to your code, you do not do anything with most of the I/O ports/pins. I/O pins are inputs by default after a reset. (It is always wise to read the datasheet if you get stuck with a problem... ;) ). Hence, you probably have lot's of I/O pins being configured as inputs (though i would not expect this to cause the problems you experience, but still worth to know for trouble-shooting...)


Are there any floating input pins?

I don't have any inputs, see the code above.

Thanks a lot Ian.M ;D

Ahem... according to your code, you do not do anything with most of the I/O ports/pins. I/O pins are inputs by default after a reset. (It is always wise to read the datasheet if you get stuck with a problem... ;) ). Hence, you probably have lot's of I/O pins being configured as inputs (though i would not expect this to cause the problems you experience, but still worth to know for trouble-shooting...)

PIC I/O pins in general come out of reset configured as inputs.  Analog capable pins in Analog mode are safe at voltages between the logic '0' and '1' thresholds, but digital pins have input buffers that may pull excessive supply current if they are allowed to float at an invalid level.  The standard recommendation to avoid this is to leave unused I/Os N/C, set them as outputs and set them low. 

I doubt its your whole problem, but it could be contributing.

Just tried this code:
Code: [Select]
#include <24FJ64GA004.h>
#fuses FRC_PLL, NOJTAG, NODEBUG, NOWDT, NOPROTECT

#use delay(clock=32M, internal)


void main(void) {
set_tris_a(0x0); /* output */
set_tris_b(0x0); /* output */
set_tris_c(0x0); /* output */

output_a(0); /* 0 */
output_b(0); /* 0 */
output_c(0); /* 0 */

while(true) {
output_toggle(PIN_C0);
delay_ms(5000);
}
}

Same problem  :-[ |O |O |O |O

Thanks a lot ;D
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
Re: PIC24FJ over heating
« Reply #16 on: April 06, 2015, 10:06:45 pm »
You need to switch your pins to output and remove analog function for pins that don't need it. This is how I do it for GB series (IIRC GA is similar) -> https://github.com/felis/cdb/blob/master/fw/minimal/bsp.c#L208


post your code

Code: [Select]
#include <24FJ64GA004.h>
#fuses FRC_PLL, NOJTAG, NODEBUG, NOWDT, NOPROTECT

#use delay(clock=32M, internal)


void main(void) {
    while(true) {
        output_toggle(PIN_C0);
        delay_ms(5000);
    }
}

its pretty basic

Thanks a lot mazurov ;D
With sufficient thrust, pigs fly just fine - RFC1925
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
Re: PIC24FJ over heating
« Reply #17 on: April 06, 2015, 10:10:46 pm »
Also, what happens when you plug an empty (erased) micro into the board? If it heats up the issue is not in the code.
With sufficient thrust, pigs fly just fine - RFC1925
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #18 on: April 06, 2015, 10:17:07 pm »
You need to switch your pins to output and remove analog function for pins that don't need it. This is how I do it for GB series (IIRC GA is similar) -> https://github.com/felis/cdb/blob/master/fw/minimal/bsp.c#L208


post your code

Code: [Select]
#include <24FJ64GA004.h>
#fuses FRC_PLL, NOJTAG, NODEBUG, NOWDT, NOPROTECT

#use delay(clock=32M, internal)


void main(void) {
    while(true) {
        output_toggle(PIN_C0);
        delay_ms(5000);
    }
}

its pretty basic

Thanks a lot mazurov ;D


Just tested with this code:

Code: [Select]
#include <24FJ64GA004.h>
#fuses FRC_PLL, NOJTAG, NODEBUG, NOWDT, NOPROTECT

#use delay(clock=32M, internal)


void main(void) {
set_tris_a(0x0); /* output */
set_tris_b(0x0); /* output */
set_tris_c(0x0); /* output */

output_a(0); /* 0 */
output_b(0); /* 0 */
output_c(0); /* 0 */

setup_adc_ports(NO_ANALOGS);

while(true) {
output_toggle(PIN_C0);
delay_ms(5000);
}
}

Same problem  :-[

Thanks a lot mazurov ;D
 

Offline raphaeldavidfTopic starter

  • Contributor
  • Posts: 35
Re: PIC24FJ over heating
« Reply #19 on: April 06, 2015, 10:20:40 pm »
Also, what happens when you plug an empty (erased) micro into the board? If it heats up the issue is not in the code.

Heats up  |O
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12853
Re: PIC24FJ over heating
« Reply #20 on: April 06, 2015, 10:23:30 pm »
Does it still heat up with /MCLR tied low?
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13740
  • Country: gb
    • Mike's Electric Stuff
Re: PIC24FJ over heating
« Reply #21 on: April 06, 2015, 10:40:47 pm »
Quite apart from the heating issues, 50R is ridiculously low for a LED resistor for what appear to be status LEDs. You rarely need anywhere near 20mA for modern LEDs.

And you may get more help if you uploaded the PDF here instead a site with a lame PDF viewer and login required to download to a decent viewer.

How much current is it pulling from the supply ? That info would be far more useful than "getting too hot"
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: PIC24FJ over heating
« Reply #22 on: April 07, 2015, 01:29:21 am »
You say you haven't really connected anything up apart from the few capacitors and pull up resistors, a PIC will run with a 10k or so pull up to VCC, decoupling caps near the power in and a 3.3 / 5V power source depending on the variant.

In that case the 50R resistors should not be fitted, thus not causing issue, I wouldn't connect those 50R resistors by the way, I would use more 270 - 330 depending on the Vf of the LED.

Things tend to heat up when shorted, even if the PIC was in permanent reset it should still stay cool to the touch, if you have no external oscillator and no code running it won't even be really doing anything apart from running it's internal regulators etc, certainly not enough to start heating up.

You may have to post your board files.

Did you mention you were powering from a pick kit or programmer?  Try programming the device then powering it from a different bench PSU or something to see what current is drawn, put the current limit on low!! You will soon know if it goes short circuit, the current limiter will kick in.

Even the low spec regulators when shorted can draw 100mA, if it is higher it can theoretically draw more, a USB port is capable of drawing over 1 Amp (out of spec but it can still draw over this!), and that will do unknown damage to your chips.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: PIC24FJ over heating
« Reply #23 on: April 07, 2015, 01:38:19 am »
You might have a short in one of your capacitors. You can try running without them.
 

Offline SteveyG

  • Supporter
  • ****
  • Posts: 987
  • Country: gb
  • Soldering Equipment Guru
Re: PIC24FJ over heating
« Reply #24 on: April 07, 2015, 01:14:37 pm »
Can you measure the voltage on the Vddcore pin and measure the total current being drawn by the MCU?
YouTube Channel: https://www.youtube.com/user/sdgelectronics/
Use code: “SDG5” to get 5% off JBC Equipment at Kaisertech
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf