Shop OBEX P1 Docs P2 Docs Learn Events
Propeller reset problems - Page 2 — Parallax Forums

Propeller reset problems

2»

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-05-26 19:17
    PhiPi, that has got me thinking more. Ok, any wire is an antenna. On your drawing you have a ground, but what is "ground"? On my circuit it happens to be floating, and for a mobile robot or something battery powered it would also be floating.

    So - the reset pin cant have wires attached as that is an antenna. Could "ground" be an antenna also, if what we call "ground" is not actually connected to ground?

    Would solution(s) be
    i) to make sure the circuit truly is gounded? and/or
    ii) if not possible due to using a battery powered circuit, whether an optocoupler could be a solution?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-05-26 19:55
    "Ground" in my circuit is just Vss. No ground rods implied!

    The key to reliability is the differential signaling over a twisted pair, which has good common-mode noise immunity.

    -Phil
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-05-26 20:02
    Good point - twisted pair should help. I might do some more experiments with twisting the Vss/Reset wires...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-05-26 20:08
    Here's a simpler circuit with a comparable amount of noise immunity:

    attachment.php?attachmentid=101877&d=1369624089

    Rather than a differential driver on the switch end, it uses a current loop.

    -Phil
    569 x 345 - 4K
  • jmgjmg Posts: 15,173
    edited 2013-05-26 22:46
    Dr_Acula wrote: »
    ii) if not possible due to using a battery powered circuit, whether an optocoupler could be a solution?

    A manual reset does not need to be fast, and is better not fast...

    Spice says a Logic Level fet, ( eg FDV30x series from Fairchild, which have ESD included ), can easily be made slow.
    Such small FETs are cheap, and easy to get.

    A 330K series R with a smallish LL-FET, shows a Delay tau of ~30us, and a Rise/fall time of ~30us.
    This also gets high RFI and ESD tolerance.


    Or, a few more cents, will get a 1G17, which will give fast rise/fall times, but a similar series resistor low pass action.

    Then there is the TC4S584F, which is a Single gate, 4000 series part, slow-by-design :)
  • archer1424archer1424 Posts: 7
    edited 2013-09-12 08:05
    I know this is resurrecting an older thread, but I feel obliged to respond because it has helped me out with this reset issue. I frequently use the propeller in applications that have high voltage and inductive loads. I usually cannot space them sufficiently apart to provide protection from EMI at a distance. I made a custom board that picked up the EMI on my via my 'reset' trace. The fix, was to add a 22nf cap and 1K pull up resistor from the reset pin to VDD as close to the chip as possible. I have a 1/2 HP AC motor 1.5" away from the board and this fix seems to do the trick. Having anything connected to the reset pin needs to be protected from EMI.

    Thanks All

    Dan
  • David BuckleyDavid Buckley Posts: 12
    edited 2014-07-11 18:49
    Thank you to Dan for this solution. I have a board with a 40 pin prop, and a fairly long reset trace to the propplug socket, and also on the board are the FETs and drivers for a low power inverter, and a few relays. I was getting reset probnlems I couldn't track down, and 1K to Vdd and 100nF to ground on reset has made all the problems go away.

    I've read the Prop data sheet on this, and there is no hint on there that the reset pin is noise sensitive, and neiother have any of the reference designs got any componentry to stop resets.

    Please can Parallax make a note on the data sheet in table 1-1 recommending a pull up with decoupling on the description of the pin. Such a note would have saved a bunch of people a load of time.
  • Mark_TMark_T Posts: 1,981
    edited 2014-07-13 05:55
    Dr_Acula wrote: »
    Good point - twisted pair should help. I might do some more experiments with twisting the Vss/Reset wires...
    You should always be using twisted pair or shielded cable for any signal/ground connection to a front panel in the first place.
    Perhaps you had ground return via the case, thus making a massive magnetic loop antenna.
  • MahonroyMahonroy Posts: 175
    edited 2014-11-06 17:37
    Hey guys,
    I am experiencing a reset problem due to my device being close to a high powered device that is emitting a high frequency. Rather than starting a new thread, it seemed like I should post in here instead.

    I attached a photo of what my device looks like, and the box that the board is in. I have a ground wire connecting the ground of the board to the case. I also have the ground connected to the same ground that the high power device uses.

    I probed the reset pin of the propeller chip, and I am seeing a wave (the oscilloscope says that the wave is 1.1 Mhz, with an amplitude of 19 volts) I attached a photo of this wave.

    Sure enough when this wave comes in my device freezes and resets. I started probing other pins and locations throughout my board, and they all have this wave on them. Granted, I have to have the case open to probe, but the device resets with it all contained in the case.

    I am using these ferrite beads on some of the signals coming into the case, and I decided to try one out on the reset pin... though it didn't appear to do anything. Here is the link to ferrite beads I'm using:
    http://www.mouser.com/ProductDetail/Fair-Rite/2512063007Y0/?qs=%2fha2pyFadujv19aS51DBJI3oirOsBczUHF1lcKb30TttYGvgOW5d2g%3d%3d

    What is the best way to tackle this problem? Am I not grounding the case properly? Should I try a RC low pass filter on the reset pin like was mentioned to try and filter it out? How do I determine the proper capacitor and resistor, and what about the other pins throughout the board? Thanks and any help is greatly appreciated.
    p.s. I am still pretty new to the electronic world.
    1024 x 576 - 143K
    640 x 360 - 73K
    1024 x 536 - 118K
    1024 x 553 - 128K
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-11-06 18:39
    If the HV is on the same board as the Propeller you might need a metal fence tied to ground for a shield (See video)
    https://www.youtube.com/watch?v=aeSOCR9mmzM&feature=youtu.be

    ...Also, those wires make for good antenna's which should also probably be shielded.

    Without a schematic it's hard to determine where any electrical HV leak might be entering.
  • MahonroyMahonroy Posts: 175
    edited 2014-11-06 18:49
    If the HV is on the same board as the Propeller you might need a metal fence tied to ground for a shield (See video)
    https://www.youtube.com/watch?v=aeSOCR9mmzM&feature=youtu.be

    ...Also, those wires make for good antenna's which should also probably be shielded.

    Without a schematic it's hard to determine where any electrical HV leak might be entering.

    Hi Beau, the HV (as in "high voltage" right?) is not on the board. There is a device in the room that is high voltage and its this device that emits the high frequency wave that is ended up in the reset pin (as well as any other line I probe as well). Is it interesting to note that when my board is powered down, the wave does not appear anywhere on the board?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-06 18:51
    Without reading all the posts except the top one of course I can see your folly. Putting aside all the shielding and RC schemes just feed the reset button from +3.3 or more and then at the Prop end have an NPN with around 3K3 in the base. The low input resistance of the NPN won't be as sensitive to induced spikes plus add a 0.1Uf cap from the input of the resistor to ground for extra measure. The other way around this is to just RC the input enough that it takes a proper press of the button to effect a reset. However I would always use a much lower pull-up on such a line. The thing is to keep all this stuff at the reset pin, don't let the reset pin become an antenna.

    Text circuit for a simple RC:
    GND---->BUTTON--->220R
    >1K PULLUP<
    RESET
    1uF
    GND

    You may still need to run shield cable to the button anyway, especially with fluros and inductive loads, they can be very nasty.
  • MahonroyMahonroy Posts: 175
    edited 2014-11-06 18:58
    Without reading all the posts except the top one of course I can see your folly. Putting aside all the shielding and RC schemes just feed the reset button from +3.3 or more and then at the Prop end have an NPN with around 3K3 in the base. The low input resistance of the NPN won't be as sensitive to induced spikes plus add a 0.1Uf cap from the input of the resistor to ground for extra measure. The other way around this is to just RC the input enough that it takes a proper press of the button to effect a reset. However I would always use a much lower pull-up on such a line. The thing is to keep all this stuff at the reset pin, don't let the reset pin become an antenna.

    Text circuit for a simple RC:
    GND---->BUTTON--->220R
    >1K PULLUP<
    RESET
    1uF
    GND

    You may still need to run shield cable to the button anyway, especially with fluros and inductive loads, they can be very nasty.
    Hey Peter, I was not the original poster, I just came in and mentioned a similar problem I had. My post is #40 of this thread. You are correct though as far as the original poster is concerned.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-06 19:34
    Mahonroy wrote: »
    Hey Peter, I was not the original poster, I just came in and mentioned a similar problem I had. My post is #40 of this thread. You are correct though as far as the original poster is concerned.

    Good, I should mention too with shielded cable that what works best is to tie the shield to chassis ground and preferably have an extra core for the signal ground. So the areas to look out for are where the system is most sensitive:

    • The reset line as it only needs a sub-microsecond glitch to reset the processor (wish they all filtered this signal).
    • The crystal in pin as that is a very sensitive "analog" input essentially which the whole system depends upon, so keep it tight and well shielded.
    • The 3.3V supply to the CPU should not be shared with "noisy" components or loads, they can have their own 25c regulator thank-you.
    • Use the right caps in the right place, keep it tight. Over-capping "over there" is a waste of time and doesn't work.
    • Keep power grounds and signal grounds separate so that they only meet up at the supply. Never let current from power loads run back through signal grounds (and circuits).
  • Heater.Heater. Posts: 21,230
    edited 2014-11-06 23:52
    I to have been fighting with unwanted resets with a DIP Propeller welded to a protoboard.

    I was programming from a serial link to a hacked WIFI router running OpenWRT and the propeller loader from PropellerIDE. The reset being driven by a GPIO output from the SoC in the router.

    Well any way, bottom line is that I had one foot of cable carrying serial and reset from router to Propeller. Any time that wire was connected to the reset it did trigger a reset even when not commanded.

    My solution was a 10K pull up to reset, 100nF to ground and 100 ohms in series. These values being chosen very scientifically, cough, they were what I had to hand at the time.

    @Peter,

    You have suggested almost the same solution 220R
    >1K PULLUP<
    RESET
    1uF
    GND

    How did you arrive at those values?

    I was worried that making the cap too big might not be good for the RESET pin.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-07 00:07
    Heater. wrote: »
    I to have been fighting with unwanted resets with a DIP Propeller welded to a protoboard.

    I was programming from a serial link to a hacked WIFI router running OpenWRT and the propeller loader from PropellerIDE. The reset being driven by a GPIO output from the SoC in the router.

    Well any way, bottom line is that I had one foot of cable carrying serial and reset from router to Propeller. Any time that wire was connected to the reset it did trigger a reset even when not commanded.

    My solution was a 10K pull up to reset, 100nF to ground and 100 ohms in series. These values being chosen very scientifically, cough, they were what I had to hand at the time.

    @Peter,

    You have suggested almost the same solution 220R
    >1K PULLUP<
    RESET
    1uF
    GND

    How did you arrive at those values?

    I was worried that making the cap too big might not be good for the RESET pin.

    How? Very scientifically, cough.....

    You could make the reset cap larger but it would pay to put a series resistor in there with it to limit the discharge energy, so it should be fine to have say 220R in series with the cap but it always pays to characterise the Prop's actual reset levels with a scope etc. The reason for the 1K pullup is to make it harder for any little stray voltage to have it's way, so the combination of the 100nF and 1K plus the 220R from the line means that crosstalk and glitches are going to be swamped. Well, that's the simple "scientific" solution.
  • Heater.Heater. Posts: 21,230
    edited 2014-11-07 00:26
    Peter,

    Oh good. That concurs with my extensive and rigorous analysis of the situation, ...cough, choke...I didn't want to get into adding a transistor or "reset management" chip unless I really had to.

    My first home made DIP Prop on a strip board effort used to reliably reset whenever the refrigerator in the apartment started or stopped it's motor. Even if that had no "antenna" on the reset. Now I think I know why that was...
  • Heater.Heater. Posts: 21,230
    edited 2014-11-07 00:54
    Ah now I remember. I was so frustrated by this little reset problem that my "extensive analysis" was fiddling around with a simulation in LTSpice.

    I just wanted to convince myself that pulses on the reset "antenna" would have to be pretty long to cause a reset. Whilst not wanting a big capacitor that would slow the resets rise time or in the extreme damage the Prop. The input resistor would not have to be such a high value as to stop the thing working. Turns out the Prop's reset has a shmitt trigger so the rise time is not really a concern.

    Here we see a 6uS transient does not get the reset pin below the reset threshold. Good enough for me I thought.
    attachment.php?attachmentid=111851&d=1415350527
    601 x 891 - 15K
  • ggysbersggysbers Posts: 13
    edited 2014-11-07 14:17
    I come from a broadcast radio and telco background. This may seem too simple yet, have you tried shielding the box and then just grounding the shield? Can't tell you how many of the oddest quarkiest issues have been resolved just by simple EARTH grounding.

    g
  • ggysbersggysbers Posts: 13
    edited 2014-11-07 20:51
    ggysbers wrote: »
    I come from a broadcast radio and telco background. This may seem too simple yet, have you tried shielding the box and then just grounding the shield? Can't tell you how many of the oddest quarkiest issues have been resolved just by simple EARTH grounding.

    g

    And obtaining the pre regulated current by way of a step down isolation transformer w/ filtering caps instead of using only a heafty bridge rec w/ resistor(s).

    g
  • MahonroyMahonroy Posts: 175
    edited 2014-11-09 12:57
    Hey guys, thanks for the advice. I made a RC low pass filter using a 220 ohm resistor, and a 0.0047 uF capacitor. I also added the 10k pullup. This completely solved the problem of the device resetting from this interference.

    However... there is another interference in the room (a spark), and instead of this causing the device to restart, the device actually freezes (e.g. no more communication with the screen, user interfaces appear to do nothing). Do you know what could be causing this? Honestly I don't even know where to start looking. Is it possible that this interference is getting to an IC (such as an ADC, DAC, etc.) and causing that to freeze? Which then might cause the spin program to freeze? I don't really know.

    Also, one more question... this board is inside an aluminum box. I have a wire running from the aluminum box and attaching to the circuit board ground. Is this the proper way to ground the case? So far, grounding the case has not seemed to help with any of these interference problems.

    EDIT:
    After going through my code, the only conclusion I can come up with is that this interference is causing one or all cogs to stop. For example, I am using 1 cog to handle the display to the screen. The only thing it does is read variables and interact with the screen. I put a counter in the main loop of this cog, and displayed it to the screen constantly. The counter stops when the spark occurs, so the cog has to of been terminated somehow.

    EDIT #2:
    I made a new topic for these questions since it seemed like I was getting too far off the original topic of this thread:
    http://forums.parallax.com/showthread.php/158109-What-can-cause-a-propeller-chip-to-freeze-and-stop-working-until-reset
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-09 15:51
    Mahonroy wrote: »
    Hey guys, thanks for the advice. I made a RC low pass filter using a 220 ohm resistor, and a 0.0047 uF capacitor. I also added the 10k pullup. This completely solved the problem of the device resetting from this interference.

    However... there is another interference in the room (a spark), and instead of this causing the device to restart, the device actually freezes (e.g. no more communication with the screen, user interfaces appear to do nothing). Do you know what could be causing this? Honestly I don't even know where to start looking. Is it possible that this interference is getting to an IC (such as an ADC, DAC, etc.) and causing that to freeze? Which then might cause the spin program to freeze? I don't really know.

    Also, one more question... this board is inside an aluminum box. I have a wire running from the aluminum box and attaching to the circuit board ground. Is this the proper way to ground the case? So far, grounding the case has not seemed to help with any of these interference problems.

    EDIT:
    After going through my code, the only conclusion I can come up with is that this interference is causing one or all cogs to stop. For example, I am using 1 cog to handle the display to the screen. The only thing it does is read variables and interact with the screen. I put a counter in the main loop of this cog, and displayed it to the screen constantly. The counter stops when the spark occurs, so the cog has to of been terminated somehow.

    Fault tolerance needs to be built into software as well as hardware, it is no good for instance if you have a simple loop that waits forever for a busy bit, either have time outs or design it so it doesn't need to read that bit etc. Do you know if the whole Prop has stopped or is it just your code which the Prop is faithfully executing. Have another cog blink a status LED or talk to you on a serial link to find out more.

    BTW, a "wire" can be many things but a copper braid I believe is best. Anyway, the box is of no use if you have antennas in the way of cables and even buttons and other front panel hardware which can pick up EMI from outside the case. Once again a photo or two would be extremely beneficial.
Sign In or Register to comment.