Shop Learn
Propeller resets... — Parallax Forums

Propeller resets...

In another post, I pictured a house thermostat that I built to control my oil fired furness. The prop monitors the temperature in the house, and when the temperature drops below the set temp, the furness turns on until the set temperature is reached. At this point a relay on the board will open a single contact (a SPST relay) and turn off the furness. Now the problem the point of shutdown, the propeller will reset and go back to the COG 0 page, which indicates "POWER FAILURE" and sit there, until I push a reset button to get things going again.

The 12 volt control relay, mentioned above, is controlled by a optoisolator, so the relay is isolated from the Propeller. The contacts of the relay, are opening and closing only 24 volts AC. Which turns on and off the 24 volt relay in the furness. I fear there is some sort of inductive spike taking place in the wires to the relay, which is mounted on the PCB.

I am wondering if anyone else has had this problem with something that they built. I have turned on and off alot of stuff with STAMPS and PROPS, and never had this problem. Also, I should add that I do have alot of filtering capacitors on the supply voltage to the PCB.

Any thoughts...?


  • Posting a schematic or the link to the previous post would be a great help.
  • kwinnkwinn Posts: 8,688
    edited 2020-12-28 16:27
    I would suggest you replace the 12V spst relay with an MOC3041 or similar zero crossing optoisolator. Since they are turning the current to the furnace relay on and off at the zero crossing point of the 24VAC there is no inductive spike from the furnace relay or your controller board. See "" for more detail.

    PS - the link shows a more complex system than what you need. For your application all that is needed is a current limiting resistor for the MOC3041 led and possibly a resistor on the AC side.
  • Duane DegnDuane Degn Posts: 10,451
    edited 2020-12-28 18:11
    denno wrote: »
    In another post, I pictured a house thermostat that I built to control my oil fired furness.

    I'm guessing this is your earlier post with the photo?

    Do you have a diode across the coils of the relay?


    When a relay turns off, the current continues to flow through the coil and builds a large voltage spike. The diode allows some current to flow and reduces the voltage spike. Most (all?) electromechanical relays need this sort of flyback diode.

    Edit: The red text "GND" is the low side of the relay coil. It may not be circuit ground. There may be a resistor in series with the coil to limit current.
    405 x 510 - 11K
  • AC loads can be a problem with the prop resetting, good grounding helps, on your opto isolation have a seperate power supply drive the relay coils, and no common connection with the prop.
  • I had a similar issue. Without seeing a schematic I would guess that your prop is fed from the same power as is driving the relay. The relay is causing some bounce and it resets the prop. Try putting a buck converter between the power supply and the prop. Or drive the prop and the relays from different power supplies.

  • Peter JakackiPeter Jakacki Posts: 10,166
    edited 2020-12-29 03:46
    A photo of your setup should shed some light on your problem. For instance, is it a breadboard? Oh yeah, big problem right there etc.

    btw, when I say "photo" I really mean clear and sharp and well lit and from different angles, top, bottom etc.
  • Hi
    Had similar problems with my micro hydro power control. This was caused by a ac contactor in generator circuit.
    Is there a ac load contactor/relay in your furness, that controls fan/burner? Then this could be the problem. Noise from this one when turning off, will be airborne and influence the Propeller controller.
    I resolved this problem with a snubber circuit mounted on the ac contactor coil. Snubber made of 100R resistor and 100n capacitor (400V) in series.
  • Yes Duane, I do have the "snubber" diode across the relay coil. I do not believe it is the relay in my circuit on the PCB causing the RESET of the Prop. As, I have used this same situation, many times before on different circuits.

    I am beginning to think that I have the twin lead thermostat wires coming into the housing on the wall, and these two wires are close to the PROP and also, close to the wires running from an external programming port. The reset does not happen all the time, which is the puzzling part. I am wondering if there is in fact an inductive spike transmitting away from the 24 volt AC thermostat wires into the wires that normally reset the PROP when programming the PROPELLER. ???????

    IF one looks at the PCB, you can see where the thermostat wires come into the terminal strip, then the PCB traces run under the PROPELLER, on there way to the relay. Perhaps the inductive spike is so great, as to generate a pulse that resets the PROP.

    So, the next thing I have done is install a spike suppression device across the two screw terminals where the thermostat wires connect inside the furness. I'll let you know

    And, thank you Kwinn for your input also.
    4096 x 3072 - 4M
    3072 x 4096 - 3M
    4096 x 3072 - 7M
  • Greg LaPollaGreg LaPolla Posts: 257
    edited 2020-12-29 16:07
    I think the issue is that you are driving the relay directly from the prop pin. Here is how I did it

    After a second look It is isolated. Pretty sure you are getting a bounce from the relay. You need to clean up the power going into the prop.
  • It looks to me as the reset pin is left floating which could easily pickup some noise.

  • Silly question: with the thermostat wires disconnected (but the relay still attached to the board), what happens if you trigger the relay say... 25 times? If the prop resets without the thermo wires attached, you’ve narrowed the field considerably.
  • Peter JakackiPeter Jakacki Posts: 10,166
    edited 2020-12-29 22:58
    Anyway, you can wonder why the Prop is resetting or you can be methodical and do a couple of very simple things to find out the source of the reset. I'm not sure what kind of Prop module you have though.

    1 - Tie the reset pin high through a 1k resistor and if it still resets then add a 100nF to ground and repeat.
    Still resets?

    2 - Power the Prop from a battery, even those USB battery packs are great.
    Still resets? Then it's not your power supply or reset line. It could be radiated EM or a poor ground. Can you post the schematic and pcb layout?

    btw, the crystal circuit is a very sensitive amplifier and using HC49 crystals with their wide spacing exposing the XI trace just doesn't make any sense in 2020, or even back in 2010. I always use a tiny SMD or even through-hole radial type and keep those lines very short and very tight. The large metal can of the HC49 is also a great antenna (not good). You could try grounding it.

    One of the mysteries of the embedded world is why RTC chips are supplied with massive standby batteries when watches run "on standby" for years on tiny ones.
  • It was my understanding, and correct me if I am wrong, but the RESET pin is already pulled HIGH by a resistor to Vcc on the PROPMINI.

    I did put a Transient Suppression Device, not sure that is what it is call, but they are used alot in control boards for lawn water systems. Lots of inductive spiking going on there when the sprinkler water valves get turned on and off. They are also 24 volts. I installed in in/on the furness board where the terminals are for the thermostat wires inside the furness.

    I'll let you know if I solved the problem..thanks again for your help..stay safe...
  • The snubber on the AC relay or cantactor coil should work
  • Is it me or is the diode across the relay coil the wrong way round?
  • To answer my own question - yes, the diode across the relay coil is the wrong way around. The opto turns on and shorts the Vin rail to 0V via the diode.
  • A lower value pull-up will be harder for a small em spike to overdrive. A small cap to ground will help too. This and the external power tests are just that, the real fix is in identifying the vector and taking measures in those areas at the source. TSDs can only clamp a transient to prevent damage but they cannot prevent a "logic low" appearing on the reset line for instance.

    May I ask once again "schematic"?
  • Thank you Brian for noticing the diode in backwards. But, I too, noticed the silkscreen was backwards, and did in fact turn the diode around in populating the PCB.

    It seems that adding the Transient Suppression Device has done the trick.

    Peter, I will have to photo the schematic and then upload it to my email, and then put it on this laptop, desktop, and then attach it to another thread. My schematics are always drawn by hand on graph paper. However, the PCB from ExpressPCB, is basically the schematic itself, with the silkscreen. When I order my boards, I opt out of the silkscreen, as it is cheaper to buy.

    Thanks again to all

  • dennodenno Posts: 201
    As a final footnote, installing the spike suppression device did the trick...see blue item in photo...Placed across the relay terminals at the heater itself...
    3072 x 4096 - 3M
  • tritoniumtritonium Posts: 444
    edited 2021-01-02 19:15

    I think it didn't help mounting the relay on one side of the pcb and then routing the connection to the heater across the pcb, under the cpu to the connection strip on the other side. Better to put the relay right next to the connection strip well away from the sensitive low viltage stuff.

  • dennodenno Posts: 201
    Live and learn, as they say. I do agree with you tritonium. I was not sure what the voltage was across the contacts. Tried to measure it, but with the heater off, it was an open circuit. Later on, when I started reading about the furness itself, and it is old, but still works well...(1985)...the voltage is 24 volts AC.
  • TubularTubular Posts: 4,331
    I've seen sporadic resets in an industrial setting due to large current surges coupling across to the propeller reset line. In that case I strengthened the RESet by pulling up to 3v3 with an additional 30k resistor. You could probably go even smaller.

    The internal reset pullup resistor on the P1 chip is a few hundred kohms, from memory.

  • Cluso99Cluso99 Posts: 17,686
    I put a 10K pullup on the P2 reset line.
  • Peter JakackiPeter Jakacki Posts: 10,166
    edited 2021-01-21 01:09
    The P2D2 was designed with industrial applications in mind, that is one of the reasons why the P2D2 reset is pulled low by a resistor and driven high by the UB3 with no external connection. A reset I/O pin is used for external debounced reset request as well as providing a reset output whenever the P2 is reset. A serial load (not just toggling) is detected in the UB3 internally (rather than DTR + circuit) and this also overrides Flash/SD boot to allow for serial load.

    The active reset drive with a pull-down resistor ensures that the P2 does not hiccup during ramping on/off or brown-outs.

    @Tubular - Why stop at 30k? What's wrong with 3k3 for instance? It's only a 1ma load.
  • TubularTubular Posts: 4,331
    Yes you might be able to go lower. You need to check the prop plug RES pulse transistor still performs a reliable reset, which it should
  • Keep the impedance as low as possible, make the reset circuit compact and do not allow noisy circuits to couple into it by electrostatic or magnetic coupling. Remember, the energy in any non-dc circuit flows around as well as in the skin of the wires. Wires are not like water-pipes! Any pin on the P2 requires very little stray energy to push it through it's logic threshold, so the industrial electronics designer should be thinking about the 'moat' of protection around the chip. Such protection comes in the form of separation of circuits, optocouplers, relays, transformers, low pass filters, decoupling, shielding, keeping 'go' with 'return' wires and so on. It only takes a small breach in that moat to reduce the system reliability. Outputs are somewhat hardier than inputs but still susceptible to energy backfed from the loads.
  • I spent the last twenty years of my career ensuring that railway signalling microcontrollers behaved properly in the very noisy environment that is near to an electrified railway line. That's one good thing the European Union did for the UK - it imposed the EMC Directive on us - and testing railway signalling products to the Railway EMC Standard raised the level of reliability to everyone's benefit. (Safety was never an issue - the products always failed safe - but too often, disrupting the railway timetable every time)
Sign In or Register to comment.