• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

555 timer causing PIC to reset

Status
Not open for further replies.

gabeNC

Member
Howdy,

I have a 555 timer wired as a astable, flashing a LED every second or so. I also have 16f876a wired on the same breadboard and working through a seven segment tutorial. Why both? I dunno... cause it's cool to have a bunch of flashing lights. Makes my kids think I know what i'm doing. :D

The PIC is programmed to display 0 through 9 on the seven segment and then loops back to 0 with a delay of a second or so. The display randomly jumps back to 0 part way through the sequence, to me indicating a reset. :confused: If I disconnect the power to the 555 circuit, the PIC is fine. I have a 4.7K resistor tied to MCLR and I disconnect the pickit2 before flipping the power supply switch.

Power is supplied from a 9V wall wart into a 7805. I just noticed I do not have any power decouping capacitors. Is that the idea behind it? For lack of a better term, "insulating" one circuit from another? Preventing noise or interference?

thanks.
 

ericgibbs

Well-Known Member
Most Helpful Member
hi gabe,

Caps on a 7805 are essential for PIC work.
A 100nF and 470uF on the input side of the 7805 and a 100nF and say 100uF to 220uF on the output side.
 

Sceadwian

Banned
The 7805 needs capacitors to be stable. A random 7805 PDF I pulled up suggested .33µ for input and .1µ for output. Decoupling caps directly on the 555 or micro controller circuit may be required as well. Make sure you read the recommended circuits in the PDF's for your chips as it's covered in most PDF's.
 
Last edited:

gabeNC

Member
Thanks gents for the replies. I believe you but i'm curious, is there a way to measure what is happening to the pic/power supply without an oscope? Is it a transient "spike" when the 555 discharges?

I'm going to add those caps but I really wanted to understand what is actually happening.
 

ericgibbs

Well-Known Member
Most Helpful Member
Thanks gents for the replies. I believe you but i'm curious, is there a way to measure what is happening to the pic/power supply without an oscope? Is it a transient "spike" when the 555 discharges?

I'm going to add those caps but I really wanted to understand what is actually happening.
hi gabe,
All the active devices on your pcb when switching tend to pull the supply rail down a little, as you say its a transient switching spike.

If a number of devices switch at the same instant they will be the rail down even further.

This transient pulldown can cause others devices to mistrigger and the system could latch up.

The caps provide the little extra current when a device switches on and so tends to keep the supply rail voltage steady.

The 100nF cap can also help to 'absorb' transients on the rail by providing a low impedance path to 0V..

Does this help.?
 
Last edited:

gabeNC

Member
Thanks Eric. The term "absorb" makes more sense to me. So if you continue to have issues do you just keep increasing the size of the cap?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
You shouldn't EVER use a 7805 without the required capacitors, they aren't optional, they are an essential part of the circuit.

But 555 timers cause large spikes on the power rail, it's a VERY well documented problem with them, and is something you should take account of in any design.

You should also have decoupling capacitors close to the PIC, and the 555 - it's standard practice.
 

Sceadwian

Banned
The output cap is required for stable voltage regulation of the 7805 as well. There's really no point in trying to study the circuit to understand what's going on, you're basically trying to understand why the car isn't driving so well without any tires on it. Put the tires on and see what happens next =)
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
Thanks Eric. The term "absorb" makes more sense to me. So if you continue to have issues do you just keep increasing the size of the cap?
hi,
As Nigel points out the early TTL version of the 555 does cause a transient on the supply rail when switching, the later CMOS 555 is not a problem.

Rather just added more caps, you should as explained decouple as close as possible to the PIC's power pins.

The 7seg led you are using could draw about 7 * 0.01 = 70mA when switching all the segments. I would always have a 470uF across the +5V, others dont agree..:).. placed near the high current device, the LED in your case.

The 7805 isnt blazing fast in responding to current surges and also the inductance/resistance due to the supply rail wiring can cause the voltage to drop. The 470uF will source that extra current for the device.
 

gabeNC

Member
The 7seg led you are using could draw about 7 * 0.01 = 70mA when switching all the segments. I would always have a 470uF across the +5V, others dont agree..:).. placed near the high current device, the LED in your case.
So are you saying put a 470uf cap next to the 7 segment? I'm using a common anode and so each cathode segment is tied directly to PORTC (which dims the display without a transistor). That's actually next on my list of things to do, wire it up like Nigel's tutorials, but i'm just experimenting and screwing around at this point.


Thanks for the admonishment gents, i'm sure there will be plenty more stupid questions to follow. :p
 

ericgibbs

Well-Known Member
Most Helpful Member
So are you saying put a 470uf cap next to the 7 segment? I'm using a common anode and so each cathode segment is tied directly to PORTC (which dims the display without a transistor). That's actually next on my list of things to do, wire it up like Nigel's tutorials, but i'm just experimenting and screwing around at this point.


Thanks for the admonishment gents, i'm sure there will be plenty more stupid questions to follow. :p
hi,
I havnt seen your layout, so all I am saying place the 470uF cap near the LED rail rather than directly on the 7805 output.
 

Sceadwian

Banned
Gabe are you using input/output caps on the 7805 yes or no? You said you weren't using any bypass caps but I'm not clear on weather you consider those bypass caps or not.
 

gabeNC

Member
Gabe are you using input/output caps on the 7805 yes or no? You said you weren't using any bypass caps but I'm not clear on weather you consider those bypass caps or not.

I'm not using any bypass caps. I will now.

I was under the impressions that the cap Eric was talking about was in addition and directly for the 7-segment?
 

Sceadwian

Banned
Yes, that's what eric was talking about. I just wanted to make sure you're going to add the 7805 bypass caps as well, as Nigel said, they're not really a suggestion they're required for proper predictable operation. Good luck =)
 

ericgibbs

Well-Known Member
Most Helpful Member
Yes, that's what eric was talking about. I just wanted to make sure you're going to add the 7805 bypass caps as well, as Nigel said, they're not really a suggestion they're required for proper predictable operation. Good luck =)
hi gabe,

Caps on a 7805 are essential for PIC work.

A 100nF and 470uF on the input side of the 7805 and a 100nF and say 100uF to 220uF on the output side.
I had already advised gabe about these capacitors.:rolleyes:
 

Sceadwian

Banned
Oh I know eric, I just wanted to make sure he was actually putting them in, not just thinking the big electrolytic on the 555 alone was going to solve the problem. Sorry if I seemed like I was trying to butt heads =)
 

ericgibbs

Well-Known Member
Most Helpful Member
Oh I know eric, I just wanted to make sure he was actually putting them in, not just thinking the big electrolytic on the 555 alone was going to solve the problem. Sorry if I seemed like I was trying to butt heads =)
It would be good if gabe lets us know how it goes.:)
 

gabeNC

Member
I've got a large 200volt 2800uf cap from an old UPS... would that keep the LED's from dimming?

I'm kidding :D

I'll let you guys know how it goes.
 

Sceadwian

Banned
Hey seriously if it fits throw it on <smirk> Just watch out for the brownout from the intial charging current =) Every time I plug an ATX supply in the lights in my house dim, biiiiig primary buffer caps.
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top