PIC24FJ over heating - Page 1
Forum section: electronics / general

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 03:33:15 pm
content: 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??Thanks a lot!!!schematic:https://www.dropbox.com/s/3nwk6rgya87xie5/TF.pdf?dl=0Solder list:caps: C1, C2, C3, C4;r: R5, R6(ran out of 470, so used a 4k7 instead);pic;P8 header;ICSP header;

author: SteveyG
author_rank: Unknown
timestamp: April 06, 2015, 05:16:54 pm
content: 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.

author: 22swg
author_rank: Frequent Contributor
timestamp: April 06, 2015, 07:28:16 pm
content: R6 and R7 50R + LEDs are these in place , don't think pin can sink that many mA ?

author: Ian.M
author_rank: Super Contributor
timestamp: April 06, 2015, 07:39:55 pm
content: Are there any floating input pins?

author: mazurov
author_rank: Frequent Contributor
timestamp: April 06, 2015, 08:52:54 pm
content: post your code

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 09:05:11 pm
content: Quote from: SteveyG on April 06, 2015, 05:16:54 pmYes, the pickit is set to 3.3v. I didn't solder the voltage regulator to the board yet.Quote from: SteveyG on April 06, 2015, 05:16:54 pmI think so, the datasheet states that:Caps C2, C3 and C4 : 0,1 uF, ceramic;Cap C1: 10 uF, tantalum;So used those.Quote from: SteveyG on April 06, 2015, 05:16:54 pmmy 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.Quote from: SteveyG on April 06, 2015, 05:16:54 pmReally crappy photo, sorry:https://www.dropbox.com/s/3d050olp1q1sppv/IMG_20150406_180001423.jpgThanks a lot SteveyG =D

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 09:15:54 pm
content: Quote from: 22swg on April 06, 2015, 07:28:16 pmR6 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

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 09:17:03 pm
content: Quote from: mazurov on April 06, 2015, 08:52:54 pmCode:#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 basicThanks a lot mazurov

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 09:18:32 pm
content: Quote from: Ian.M on April 06, 2015, 07:39:55 pmI don't have any inputs, see the code above.Thanks a lot Ian.M

author: elgonzo
author_rank: Unknown
timestamp: April 06, 2015, 09:20:48 pm
content: 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?

author: Wilksey
author_rank: Super Contributor
timestamp: April 06, 2015, 09:24:11 pm
content: 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.

author: elgonzo
author_rank: Unknown
timestamp: April 06, 2015, 09:24:18 pm
content: Quote from: raphaeldavidf on April 06, 2015, 09:18:32 pmAhem... 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...)

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 09:30:53 pm
content: Quote from: elgonzo on April 06, 2015, 09:20:48 pmYou'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

author: Ian.M
author_rank: Super Contributor
timestamp: April 06, 2015, 09:49:46 pm
content: Quote from: elgonzo on April 06, 2015, 09:24:18 pmPIC 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.

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 09:51:19 pm
content: Quote from: Wilksey on April 06, 2015, 09:24:11 pmYep, I checked all pads, only the ground ones beepedYep, 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

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 10:04:45 pm
content: Quote from: elgonzo on April 06, 2015, 09:24:18 pmQuote from: Ian.M on April 06, 2015, 09:49:46 pmJust tried this code:Code:#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 problemThanks a lot

author: mazurov
author_rank: Frequent Contributor
timestamp: April 06, 2015, 10:06:45 pm
content: 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#L208Quote from: raphaeldavidf on April 06, 2015, 09:17:03 pm

author: mazurov
author_rank: Frequent Contributor
timestamp: April 06, 2015, 10:10:46 pm
content: Also, what happens when you plug an empty (erased) micro into the board? If it heats up the issue is not in the code.

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 10:17:07 pm
content: Quote from: mazurov on April 06, 2015, 10:06:45 pmJust tested with this code:Code:#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 problemThanks a lot mazurov

author: raphaeldavidf
author_rank: Contributor
timestamp: April 06, 2015, 10:20:40 pm
content: Quote from: mazurov on April 06, 2015, 10:10:46 pmHeats up

author: Ian.M
author_rank: Super Contributor
timestamp: April 06, 2015, 10:23:30 pm
content: Does it still heat up with /MCLR tied low?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 06, 2015, 10:40:47 pm
content: 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"

author: Wilksey
author_rank: Super Contributor
timestamp: April 07, 2015, 01:29:21 am
content: 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.

author: Muxr
author_rank: Super Contributor
timestamp: April 07, 2015, 01:38:19 am
content: You might have a short in one of your capacitors. You can try running without them.

author: SteveyG
author_rank: Unknown
timestamp: April 07, 2015, 01:14:37 pm
content: Can you measure the voltage on the Vddcore pin and measure the total current being drawn by the MCU?

author: raphaeldavidf
author_rank: Contributor
timestamp: April 07, 2015, 07:31:55 pm
content: Quote from: Ian.M on April 06, 2015, 10:23:30 pmYep

author: raphaeldavidf
author_rank: Contributor
timestamp: April 07, 2015, 07:35:13 pm
content: Quote from: mikeselectricstuff on April 06, 2015, 10:40:47 pmSorry about the file, my bad, I'm quite new to the forum. Didn't see that I could upload the files here. I'm going to edit and upload the files to the first post.Thanks a lot mikeselectricstuff

author: raphaeldavidf
author_rank: Contributor
timestamp: April 07, 2015, 07:45:07 pm
content: Quote from: mikeselectricstuff on April 06, 2015, 10:40:47 pmQuote from: Wilksey on April 07, 2015, 01:29:21 amQuote from: Muxr on April 07, 2015, 01:38:19 amQuote from: SteveyG on April 07, 2015, 01:14:37 pmMurphy got me and it is really stupid.The problem is that the VReg tantalum cap was backwards. In the case A smd cap the ground is on the side without the mark, not with the mark like an electrolytic capIt's working like a charm now!Many thanks to all for all the help and patience

author: Howardlong
author_rank: Super Contributor
timestamp: April 07, 2015, 07:59:38 pm
content: Been there, done that, and almost certainly others on here have too.Not really sure WTF they were thinking to mark tantalums the opposite way to non-tantalums but what I will say is that I will never forget the experience, and I'm pretty sure you won't either.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 07, 2015, 08:06:38 pm
content: Why are you using a tant on Vreg ? a 10uf ceramic works fine.

author: raphaeldavidf
author_rank: Contributor
timestamp: April 07, 2015, 08:26:53 pm
content: Quote from: Howardlong on April 07, 2015, 07:59:38 pmHahahahahaha I'll never forget, the fire of shame burned it into my mind

author: raphaeldavidf
author_rank: Contributor
timestamp: April 07, 2015, 08:30:39 pm
content: Quote from: mikeselectricstuff on April 07, 2015, 08:06:38 pmThis was my first try with this pic, so I just copy the datasheet. The next board I'll try with a ceramic, thanks for the tip

author: Howardlong
author_rank: Super Contributor
timestamp: April 07, 2015, 09:05:36 pm
content: I haven't designed in tantalums for some years now, favouring ceramics, and as Mike says ceramics are fine in this application. On a product I've had in the field for over four years which uses a PIC24FJ64GB002 I use an 0603 10uF Farnell part number 1760126, they are a couple of pennies each by the reel. It's worked fine in many, many thousands of units, and DC bias effects often cited about using MLCCs haven't caused any problems. You don't need to voltage derate MLCCs like you do electrolytics either.