Mysterious Reset Revived!


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33

    Default Mysterious Reset Revived!

    Hello Helpful Friends,

    A while back I posted a problem that I was having with my PIC application.
    here's the thread if you want to catch up
    http://www.picbasic.co.uk/forum/show...ght=mysterious

    In a nutshell, I'm using the PIC16F88 to run a program that controls a large conveyor system, switching single phase 220 motors [1/2 horse]. There are other aspects to the system, including fans and small motors [110VAC pumps and gearmotors]. The resetting issue occurs because of blowback from relays I was naively using.
    I determined that the resetting issue was caused by a BOR. When I disabled the BOR my reset problem stopped, however I still got hit rarely. So, I replaced the mechanical relays with solid state zero-crossing models. The basic link from the PIC to the appliance is:

    PIC >> I/O Module [5VDC input, 110VAC output with ZeroCross] >> Solid State Relay [110VAC input, 220VAC output, with ZeroCross] >> Motor

    Success! well... that's why I'm writing...

    I have had one resetting with the Solid State relays in place. It happened when the relay was disabled...

    The Questions:
    Is there another circuit that i could attach to my cascade of doo dads? the relays and I/O mods all have snubbers built into them.
    OR, can I run the PIC with the BOR disabled? I've read that i could be placing some of my volatile memory at risk, but how risky is it? in all the time i've run with the BOR disabled, there have been no problems with loosing variable values.

    Is it just bad form to run the chip without the BOR?

    My system is an art project that is going to be installed in a major museum in Europe this summer. It can't really operate with this ghostly issue, and my client is worried.... always a bad sign.

    Thanks for your consideration with this,
    Joel

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JoelMurphy View Post
    The Questions:
    Is there another circuit that i could attach to my cascade of doo dads? the relays and I/O mods all have snubbers built into them.
    OR, can I run the PIC with the BOR disabled? I've read that i could be placing some of my volatile memory at risk, but how risky is it? in all the time i've run with the BOR disabled, there have been no problems with loosing variable values.
    Is it just bad form to run the chip without the BOR?
    Joel
    Another circuit - maybe a long distance opto-isolator? Fiber-optic type?

    BOR - I personally don't think it's bad form to run without the BOR enabled, especially if that's what works for you.
    But...I think I'd make sure you've got some extra error checking code in there to cover for you if you do get into a marginal power situation and your values are uncertain...some sort of recovery routine that gets executed once in awhile, maybe saves values in eeprom, then double checks current values against the eeprom, if any of them don't match, restore the whole bunch, use either onchip of offchip type eeprom. An idea I suppose...good or bad? I dunno...

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    if disabling the BOR solve the problem... i would monitor the whole hardware first to know WHY. Once you know why, this also solve any other potential problem.

    Any extra I/O? use it to do a Hardware Reset once in a while

    EDIT: any real schematic, pcboard and installation picture would be nice.
    Last edited by mister_e; - 15th May 2007 at 04:52.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Lightbulb Filters

    Hi Joel,

    If the PIC is really reacting to a brownout, either the Vdd (+) is dropping too low in voltage (compared to Vss) or Vss (-) is rising too high in voltage (compared to Vdd.

    The PIC sees the voltage across it’s supply pins at a level below what the PIC16F88 considers to be a brownout condition.

    The capacitors that we always suggest to bridge these pins, are intended to hold the voltage on the pins even if the rest of the circuit dips. That’s why the capacitors should be very close to the chip.

    The large capacitor is like a battery that holds it’s charge, even if the charge sags for a short time.

    The lower value capacitor is to trap any fast moving “transients” that whip through the circuit, snapping the voltage at a rate so fast, that the large capacitor’s inductance makes it too slow to react. The small capacitor should be a fast acting low inductance, low ESR type. Not just any old type.

    There are measures that can help problem circuits.

    If we visualize that the slow dip in the circuit voltage also discharges the larger value capacitor, along with pulling the PIC voltage. It would make sense to guard against this discharge. See Filter 1 The resistor allows the capacitor to slowly drain while the voltage sags. However, if the resistor is too large in value the PIC may not like the power up sequence. The resist affects both directions.

    There are other ways to increase the effectiveness of the filters. Filter 2 has an inductor. Inductors slow high speed changes in voltage.
    Filter 3 has a little of each.

    Filter 4
    Diodes allow the voltage to charge the capacitor and prevent the circuit from pulling it back down during the slow glitch.
    <img SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1630&d=1179204818">
    These are really just some of the common ways to prevent voltage at the pins of a integrated circuit from being affected by power sags and transient glitches that bother all types of sensitive circuits.
    Look for decoupling, bypass and blocking with Google.
    See: http://www.designers-guide.org/Design/bypassing.pdf
    There are a lot of other circuit problems that can plague a beginner. Mister_e is correct, please show us, some of the technical side, of your setup.
    Attached Images Attached Images  
    Ohm it's not just a good idea... it's the LAW !

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Smile

    Hi, Joel

    No mystery at all in this cruel world.

    "Mysteries" are only what our brain can't understand ... yes : understand

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Mar 2007
    Location
    Boston, MA USA
    Posts
    12


    Did you find this post helpful? Yes | No

    Thumbs up

    Pic_User, thanks for the information and the PDF file. Good stuff!

    --John

  7. #7
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default bypass

    Thanks muchos.
    i have a large cap across the rails, and a small one too, [.1uF]. i teach basic electronics and PIC programming at Parsons, and have been over and over the importance of placing capacitors as filters. now i guess it's time i did some learnin' too!
    so, it looks like i'll be putting together some more sophisticated filters.
    i don't own a scope, or anything really useful like that, so i'm not sure how well i can track down the actual noise in the circuit....

    the project i'm working with now is a prototype of a much larger installation.
    i will post a link to the latest images and video tonight.

    again, thanks for the help, i'm going to read Ken's noise reduction notes on the train today.

    back soon with pics,
    joel

  8. #8
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default OPTO's are good!

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1632&stc=1&d=117923716 3" align="right">
    I'd probably be inclined to use OPTO Couplers if I had a problem like this. In essence, an OPTO provides total electrical isolation between the control and switching circuit by using light to bias a zero gain internal transistor inside the OPTO. These devices are typically well insulated - not uncommon for a dielectric strength of 5KV or more!

    Sample pictured far right shows everything you need to safely switch a relay using an OPTO. As a general rule of thumb - you need to bias the internal LED with about 10 x the current that you require its internal transistor to switch. But in the case of the sample shown, the work around is to use an additional external transistor to beef things up. If you follow the formula for calculating R1, then Q1 will be happy to switch about 0.001 x Q1's ßeta value. Q1's ßeta could range anywhere between 100 - 1000 depending on the type of transistor you implement. The circuit is quite orthodox.

    You'll be very hard pressed getting an OPTO to respond to any noise or surrounding electrical interferences. OPTO's are cheap, come in a standard 6 pin DIL package, and most importantly they're easily implemented.
    <br/>
    Attached Images Attached Images  
    Last edited by T.Jackson; - 15th May 2007 at 15:16.

  9. #9
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Red face

    hi,

    i have some details of the conveyor system that i'm operating.
    first the fun stuff:
    go here for pictures and video http://solutions.joelmurphy.net
    click on Phoebe Washburn to get there.
    NOTE! the picture of the circuit is OLD. i've replaced the mechanical relays with I/O modules [5VDC in : 5A 28-280VAC out], fitted nicely with ZeroCross and RC snubber circuitry. here's the Mouser part number 655-OACM-5H.

    The PIC16F88 outputs that activate the I/O modules go 'through' a Darlington IC [ULN2004A], which is outfitted with snubber diodes, and can handle more than enough amps per pair. some of the PIC outputs that i will connect to I/O modules in the future will run through a SIPO before they get to the Darlington.
    Got me?

    .pbp code is zipped at the bottom.

    before y'all get started... i know it's a bit of a rats nest, and i think that might have something to do with my problem. i am an artist, not an EE.

    also to clarify: the I/O modules output 110VAC to solid state relays [90-280VAC in, 5A 48-660VAC out] the 110VAC is pulled from the AC input to the PowerSupply. PowerSupply is at the bottom of the circuit photo for your visref.

    i'm thinking about how to lace some WRITE/READ code into my program. the PIC16F88 has a whole bunch of EEPROM

    thanks for the help,
    go easy, huh?

    joel
    Attached Files Attached Files

Similar Threads

  1. IC12F508 with Internal Oscillator and Software Reset
    By karan123 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd October 2009, 16:13
  2. Mysterious Reset
    By JoelMurphy in forum General
    Replies: 24
    Last Post: - 24th February 2007, 23:37
  3. Software Driven Reset Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th April 2005, 00:53
  4. reset and interrupt vectors
    By dtoohey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th February 2005, 22:02
  5. Replies: 5
    Last Post: - 1st December 2004, 12:49

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts