PIC18 protoboard Issue, Soldering problem?

Thread Starter

urb-nurd

Joined Jul 9, 2014
269
Hey guys, i have a problem with a circuit assembled for my PIC18f2455 MCU.

I have made the circuit twice now and seem to have some issues when i power it with with my assembled supply circuits.

The MCU ceases to function and playing with the power plug often fixes the issue. I have a dc jack connected to the board which is connected to a 24V SMPS - if i unplug and re-plug the connector cleanly it works, though if i wiggle the connector (disconnecting and reconnecting power rapidly i imagine) it seems to have issues.

Sometimes it stops functioning all together i have to power it with the pickit3 to get it to work again, sometimes re-flashing it.

I did notice this issue on the first circuit i assembled which was powered with a 9v battery going through a 7805 5v regulator ( as is the 24V supply). I found that quickly shorting out the battery fixed the issue also.

This along with the fact the MCU also stops functioning leads me to believe that the power supply is causing some issues on VDD and VSS?

I have a cap across Vdd and Vss as per the datasheet though none of my unused pins are hooked up to anything.

Is it likely that it is my circuit construction that is causing the issue? I dont believe it to be software as i can use simple example code and get the same issue.

Cheers!
 

spinnaker

Joined Oct 29, 2009
7,830
And that 7805 is going to drain your 9V battery in no time. You are talking a drop of 4V. Why do you need a 9V battery? The PIC18f2455 is a 2 to 5.5V device. You could power it with a couple of AAs or even a coin cell and run it at 3V.

If you need the 5V for some other reason then do with a switching regulator. You might be bale to use one of those USB chargers for a car. Or a switching regulator can be bought from eBay.
 

Thread Starter

urb-nurd

Joined Jul 9, 2014
269
And that 7805 is going to drain your 9V battery in no time. You are talking a drop of 4V. Why do you need a 9V battery? The PIC18f2455 is a 2 to 5.5V device. You could power it with a couple of AAs or even a coin cell and run it at 3V.

If you need the 5V for some other reason then do with a switching regulator. You might be bale to use one of those USB chargers for a car. Or a switching regulator can be bought from eBay.
The 9v was just used for testing to see if the 24v smps was the issue and the 5v is required for programming with the pickit 3.

I can get up a schematic to help, but i am sure everything is connected correctly.
I do have the MCLR held high and confirm this with my DMM.
The oscillator and caps are connected to the osc1/2 pins and the caps to VSS as per the data sheet.

I have vdd and two vss pins hooked up and then an LED out of my PWM pin to VSS through a resistor.

Lastly there is a pot connected across VDD and VSS with the slider going to an analogue input pin to control the duty of the PWM (though this issue persists with a simple blink LED sample program).

VSS is tied directly to the -VE output of the 24V SMPS due to the nature of the 7805s common ground.

Let me get on a schematic.
 

spinnaker

Joined Oct 29, 2009
7,830
Yes you need a schematic.

You still should not be using a 7805 to regulate a 9V battery.

Start simple. Create a simple program to do nothing but maybe turn a binary out on.

And where is your code?

No one here has the ability to see into your house and see your project (except for maybe Max, he is watching you right now ;) ) . So the schematic and code are our only pictures of what is going on.
 

Thread Starter

urb-nurd

Joined Jul 9, 2014
269
OK so i think i isolated the issue today.

I noticed that when holding the dc power plug in one hand and the protoboard in the other, the LED would flicker.

I then realised that the led was going off when my hand was close to the header connected to PGD, PGC, VDD, MCLR and VSS.

The MCLR resistor was switched from 1k to 10k and the jumpers to the header have been removed. Now the issue is directly attributed to my dc jack having a bad connection (probably a 2.1mmID jack with a 2.5mm plug).

So i will grab another at work tomorrow and hook it up. Hopefully this will remedy the issue for now.

Cheers!
 

Twigg

Joined Jul 25, 2015
23
What you're describing isn't necessarily a sure sign of a bad DC jack. In my experience, whenever my hands have started magically making LEDs turn on and such, it's usually a sign that something nearby is sensitive to minute fluctuations in voltage. For instance, put an LED in series with the CE channel of an NPN transistor, touch the positive terminal of a 9V battery with one finger and then touch that finger to the base and the LED'll light up. Based on the fact that you still had issues on the first build without the DC jack power supply, I don't think that's it. Can't say for sure until we get some pictures and a schematic, but shorting out the battery like you described actually makes the regulator not regulate for a short period of time. It's a line reaction. The fact that this made your circuit "work" would seem to suggest that the 7805 regulator is actually stifling it. Again, can't say for sure without more info.
 

Thread Starter

urb-nurd

Joined Jul 9, 2014
269
You may be correct.

I replaced the jack today which solved the the inconsistencies of operation stemming from that, however as you suspected - moving my hand close to the board (or sometimes laying it on a wooden table) makes the MCU operation start and stop.

As this issue isnt present when powered from the pickit 3, it would seem like it is indeed the 7805 causing the issue.

Is there a reason for this? i have seen this chip being used to power MCU's all over the place.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
You may be correct.

I replaced the jack today which solved the the inconsistencies of operation stemming from that, however as you suspected - moving my hand close to the board (or sometimes laying it on a wooden table) makes the MCU operation start and stop.
Is there a reason for this? i have seen this chip being used to power MCU's all over the place.
On the odd occasion it has happened to me exactly as you describe, it is the MCLR pin floating or not biased properly.
Max.
 

spinnaker

Joined Oct 29, 2009
7,830
My guess is you have cold solder joints and or poor connections.

The pickit can barely provide enough power to run most chips let alone any associated hardware. You will need an external supply for sure.

We are now at post number 10 and you have still not supplied a schematic. I am still confused if you are trying to use a 9V battery to power this or you have something else going on.
 

Twigg

Joined Jul 25, 2015
23
I would guess that whatever operation the pic is doing calls for a flexible supply current. For instance, it might be drawing 10mA at one point and need 20mA immediately after. To the regulator this looks like a load fluctuation, so it fights the change in current, and the board doesn't get the juice it needs. If you have a good bench supply, try powering the board with that directly starting with the current limit at 0 and working your way up.
 
Top