Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Tools
Old 26th May 2009, 01:25 PM   #1
Default 555 timer causing PIC to reset

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.

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. 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.
gabeNC is offline  
Old 26th May 2009, 01:40 PM   #2
Default

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.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 26th May 2009, 01:43 PM   #3
Default

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.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 26th May 2009 at 01:44 PM.
Sceadwian is offline  
Old 26th May 2009, 02:13 PM   #4
Default

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.
gabeNC is offline  
Old 26th May 2009, 02:19 PM   #5
Default

Quote:
Originally Posted by gabeNC View Post
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.?
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 26th May 2009 at 02:20 PM.
ericgibbs is offline  
Old 26th May 2009, 02:25 PM   #6
Default

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?
gabeNC is offline  
Old 26th May 2009, 02:25 PM   #7
Default

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 26th May 2009, 02:34 PM   #8
Default

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 =)
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 26th May 2009 at 02:35 PM.
Sceadwian is offline  
Old 26th May 2009, 02:37 PM   #9
Default

Quote:
Originally Posted by gabeNC View Post
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.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 26th May 2009, 03:44 PM   #10
Default

Quote:
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.
gabeNC is offline  
Old 26th May 2009, 04:07 PM   #11
Default

Quote:
Originally Posted by gabeNC View Post
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.
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.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 26th May 2009, 04:20 PM   #12
Default

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.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 26th May 2009, 04:53 PM   #13
Default

Quote:
Originally Posted by Sceadwian View Post
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?
gabeNC is offline  
Old 26th May 2009, 05:37 PM   #14
Default

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 =)
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 26th May 2009, 06:06 PM   #15
Default

Quote:
Originally Posted by Sceadwian View Post
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 =)
Quote:
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.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Reply

Tags
555, causing, pic, reset, timer

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
555 timer reset mlt57sooner General Electronics Chat 2 22nd April 2005 04:26 PM
LCD backlight causing problems MrMikey83 Micro Controllers 6 6th February 2005 11:12 PM
JDM ICSP programming ok, but causing reset of circuit anthonybradley Micro Controllers 2 4th January 2005 12:31 PM
Power-On Reset & Brown-Out Reset hantto Micro Controllers 5 31st August 2004 12:14 PM
555 timer circuit reset function Uman Electronic Projects Design/Ideas/Reviews 1 24th May 2004 05:38 AM



All times are GMT. The time now is 03:45 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker