unknown reason for prop reseting
krazyideas
Posts: 119
I have the prop driveing a driver switch which drives a relay that runs an AC circut.
My power comes through the 5 volt reg then the 3.3 volt reg
The relay draws 75 milliamps, the other componets I have no idea how much they draw.
Other componets that I'm running with the prop
-2X16 LCD
-4X4 keypad
The problem is sometimes when the relay is triggered the Prop resets.
What I have tried
-Put a batter in line with my power supply thinking to make the power more stable and constant even if the AC to the supply drops off for some strang reason
-Put Caps over every positive and negative draw point
-Put a massive Cap over the power supply
-Put a diode over the relay to catch the back emf when the relay is turned off
Any ideas???
Question
What are the things that will cause the prop to reset?
I know power drop will. Will a power spike?
Thanks Guys
My power comes through the 5 volt reg then the 3.3 volt reg
The relay draws 75 milliamps, the other componets I have no idea how much they draw.
Other componets that I'm running with the prop
-2X16 LCD
-4X4 keypad
The problem is sometimes when the relay is triggered the Prop resets.
What I have tried
-Put a batter in line with my power supply thinking to make the power more stable and constant even if the AC to the supply drops off for some strang reason
-Put Caps over every positive and negative draw point
-Put a massive Cap over the power supply
-Put a diode over the relay to catch the back emf when the relay is turned off
Any ideas???
Question
What are the things that will cause the prop to reset?
I know power drop will. Will a power spike?
Thanks Guys
Comments
A 0.02uF cap from RSTn to VDD works for me. (Not VSS)
Duane J
Sometimes it will switch at different phases of the Mains Cycles.
Check it never happens with no AC connections, and try a Solid state relay instead.
Once the cap is charged, what difference does it make? Both Vdd and Vss are AC ground.
In either event, a stiffer external pullup should work just as well.
-Phil
Not to a fast edge, coupled via small parasitic C/L but high dV/dT's - if that is the pathway, then a 20nf cap on reset will work nicely.
I recall early AVR's were very touchy about spikes on their reset pins, until Atmel added a deliberate tens-of-ns filter.
You didn't say how you were driving the relay... does the Propeller still reset even if there isn't a load on the AC line? In other words just the relay without any AC attached to the relay?
It was mentioned that the timing of the relay might have to coincide with the zero-crossing of the AC. This would be typical if the relay was switching a large load. What can happen here, even though you have an isolation of the relay, you can still generate large amounts of RF energy capable of 'transmitting' to the Propeller, or for that matter another micro controller. By making the relay closure or opening during the zero cross of the AC, this RF energy can be minimized. 'Hardening' the reset line to the Propeller in the case of an RF transmission reset can be done by selecting a lower value resistor for the reset line and/or adding a capacitor as suggested.
However, many of the spikes from relay contacts arching on the AC side can have rise times considerably faster than 1nS. We measured some as short as 50pS, (that was the limit of our sampling scope). And the amplitudes can be hundreds of volts.
I witnessed a demo done by a Dr. Honda of really fast pulses produced when some quarters were jingled in a felt bag 20 feet away. He showed the pulses on his 10pS detector were a couple of hundred volts. Just from the static charge caused by the felt.
Very cool!!
OK, the Prop should in theory not be able to see this. But what happens is the high energy pulse gets integrated and is enough to bump the RESn pin.
These fast pulses disturb both the VDD and VSS rails even with lots of ceramic caps. With fast scopes the voltage can be seen to be as much as 10 volts. Ya, this sounds destructive of the chip but generally not as they are so short. Since the RESn pin is normally at 3.3V a cap connected to VDD will not be influenced by pulses on the VSS buss.
I have found that using the cap in this way greatly improves the susceptibility from relay arch noise. I first did it on Z80s and other micros since. I have tested this on my plugboard Props and I have found this to be quite a bit better than going to VSS.
Besides, the VDD pin is just next door.
And, I find the smaller caps, 10nF to 22nF or so are better than the larger 100nF ones. Presumably the impedance is lower to these fast pulses.
And yes, I agree, an extra 5K or 10K pull up really helps. I guess I just don't trust the internal 5K pullup.
Duane J
I hate to disagree with your analysis, but a cap that's charged to Vdd via a pullup is just as stable as one that is completely discharged via the same pullup. In both cases, it takes the same amount of current-integrated-over-time to to drive the pin below the trip point.
-Phil
.
I take back my previous claim... both circuits do the same thing. (see attached ... 5kV simulation) ... should not matter connecting capacitor between reset and Vdd or reset and Vss
K well I don't actualy have anything on the Res pin at present. It is hooked up just like is shown on the education board, and it is on a bread board. I can't belive that didn't cross my mind. I guess when your staring so hard at a bird you don't see the moose cross the road right in front of you. I was begining to think I was somehow reseting it unwittingly in the software.
Any way
The prop triggers my little driver switch that bumps the voltage up to 5 volts and takes the current for driveing the relay. I will get part number off my driver switch next time I look at it for you guys.
The prop will reset even if there is no AC load on the relay.
The power to the prop, the driver switch, the relay, everything is all run through the 5 volt and 3.3 volt regulators
As for some of the other comments that were a little deeper, just imagin a deer in the head lights look.
I'm still very new at all this, and have already made lots of cool stuff. I can't wait till I understand more.
I'll let you know if a pull up and a capp does the trick, I'm sure it will.
Thanks again.
Ps why do you guys always ask if it is on a bread board?? Are they unstable or something?
So as for what I have.
All on a bread board. The prop set up as shown in the education kit, then off of pin 13 it goes into my driver switch a 74ACT244P which pulls the voltage up to 5. Then from the output from the driver stright into a relay that has a diode across the coil just outside of the relay. The relay is really close to the one digikey has listed as Z3108-ND and the relay output is AC or DC depending on what I want. With all the things that came up about AC I change the relay load to a DC test just until I get this working.
Besides that I have an LCD screen hooked up and a 4x4 keypad and that is the kit and kaboodle.
Any other thought's. Cuz this is the last bug on my project and is driveing me nuts
Thanks
You never want ground currents from your external load running through your logic ground.
You might also consider adding an RC snubber circuit across the relay contacts to prevent arcing and the resulting EMI.
-Phil
but did you remove all the AC connections to the relay ?
just removing the load, can still have the relay switching AC power.
Try a solid state relay, as that removes contact issues - anyone running breadboard + relay contacts is what I'd call 'an optimist'.
-Phil
If I used a 5 volt regulator that solely supplyed the relay. While I had another 5 volt reg running the LCD screen and driver switch, then a 3.3 volt reg running the prop alone. And of corse keeping each of those ground for the regs as close to the supply as I can. (it definaly makes a difference where a ground hooks up. Before I moved my grounds it would reset 1 in every 8 cycles of the relay. Ya learn something niffty everyday)
But do you think running those regs like that would help? or would it just be a waste of time? would the regs act like buffers that would stop any left over whatever is causing the problem?
But I would still really like to get this working with my contact relay.
I now know what I fighting for sure though. It's nice to know your not looking at a reflection of your opponent but the real one.
What is a RC snubber circuit? what's it do? and how would I hook it up?
What is inductance?
So am I right if I say that the two main grimlins that I am fighting are
1- the spike
2- the RF (which I don't really get) The RF is kinda like a electro magnectic pulse right?? It's energy that is being passed through the air to say the least and the prop picks it up via the Tracking lines of the bread board like was mentioned above.
Could I solve the RF problem by moveing the relays a greater distance from the prop?
Then at least I could fight one thing at a time.
Thanks
But I would still really like to get this working with my contact relay.
I now know what I fighting for sure though. It's nice to know your not looking at a reflection of your opponent but the real one.
What is a RC snubber circuit? what's it do? and how would I hook it up?
What is inductance?
So am I right if I say that the two main grimlins that I am fighting are
1- the spike
2- the RF (which I don't really get) The RF is kinda like a electro magnectic pulse right?? It's energy that is being passed through the air to say the least and the prop picks it up via the Tracking lines of the bread board like was mentioned above.
Could I solve the RF problem by moveing the relays a greater distance from the prop?
Then at least I could fight one thing at a time.
Good, How does it compare in price with your relay ?
Another test you should do, is drive the SSR and also the relay coil, but have no contact connections at all.
It should help and be easy to try. Also dress the mains cables well clear of any Prop cables.
What load is the relay driving ?
BTW the L is after the German physicist Lenz (I didn't know that till just now, wikipedia is handy sometimes!)
The cap will have to be 600+ (DC)Volts rated for 220-240 mains, there are units that have both integrated in the same package.
What will driving both kinds of relays together do or test? I'll give it a try though
Thanks for the input I'll let ya know how it turns out
It isolates/confirms the issue as the relay contacts dV/dT.
If you can drive SSR + only the coil (all contacts disconnected) with no failures, that leaves the contacts.
So all this time I have been fighting a spike. The problem was that the spike was not the problem.
I talked to my uncle and he said there are two things you have to worry about when turning off a coil. One is a spike, which I fixed by a diode across the relay terminals and a diode going from the power supply into my positive infeed into my regulator.
The other was I think he called it RF. Energy being thrown out in the air anyway. So he suggested I sheild the relays.
So I wraped the relays up in aluminum foil and ran a wire from the foil to ground as close to the power supply as I could get. Now the prop does not reset anymore. I went though 620 relay cycles, the load being 8 amps (AC) and no problems.
A week and a half and I was fighting the wrong problem the whole time. LOL. Then the soultion as simple as aluminum foil. HAHA well live and learn.
But I thought that someone else might be able to make use of above knowledge.
Hope I save someone some time.
Thanks
Do you know that relays are used all the time on pcbs next to MCUs? Guess what? They're not shielded but they don't have a problem. You can wrap foil around your relay bur what you needed to get rid of is that "RF energy" that interferes or just EMI as it's referred to. Except for hobby circuits all electronic stuff that gets manufactured needs to be compliant to EMI regulations otherwise we would have planes falling out of the sky, pacemakers going wacky, etc.
Snubber circuits were mentioned earlier and this will reduce the spark across the contacts when they open. At the moment you have an illegal transmitter operating every time your contacts open. Plus the sparking will wear out the relay contacts. Did you install a proper snubber with the correct value and type of capacitor?
BTW, SSRs are cheap, I don't know which ones are $25. Here's a zero-cross switching 8A SSR that will never burn out "contacts" and will not transmit RF every time it breaks a circuit.
http://www.crydom.com/en/Tech/Newsletters/Solid%20Statements%20-%20SSRs%20switching%20types.pdf
http://relays.te.com/appnotes/app_pdfs/13c3206.pdf
Just said I'd throw in my two cents worth here ..
Regards,
John Twomey
BTW, yes