Shop OBEX P1 Docs P2 Docs Learn Events
Power fluctuations caused strange behavior afterwards — Parallax Forums

Power fluctuations caused strange behavior afterwards

T ChapT Chap Posts: 4,223
edited 2013-09-14 00:06 in Propeller 1
A client called me and stated that a system has stopped working. The only real processing is on the Propeller and on 2 remote modules have use Qprox QT1081 capacitive touch sensors, these are really Atmel processors. There is no way to determine what was locked up. But, power off the whole system, power on, everything worked. I asked if there were any recent power outages, he said yes the same day it locked up, the whole neighborhood was flicker on and off. This leads me to a question. If the Atmels were locked up due to the fluctuation, there is no built in way for the Prop code or hardware to power cycle the main 5VDC rail that powers the Prop board and remote Atmel(Qprox) boards. I can easily add a hack to the main Prop board and set a pin to fire a transistor or mosfet to short the entire 5V rail to GND for a split second, which in turn will reboot the Prop and remote Atmels. The switching 5V regulator can deal with a temporary short, I do it all the time.

The question is, what is the trigger event/decision to shunt the 5V to gnd?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-12 09:40
    How about just switching the 5V power to the remote boards? You could just use a MOSFET or PNP transistor to switch the 5V on and off using a Prop pin with a pull-down to make the default state as on ... much better than shorting the 5V supply.

    You could use a timeout on responses from the remote boards. If the timeout expires, you could log that either to an SD card file or just to the program EEPROM, reset both remote boards, then do a reboot of the Propeller (using the reboot statement). That way the Propeller retains control ... might even be able to recover without rebooting.
  • T ChapT Chap Posts: 4,223
    edited 2013-09-12 16:57
    Thanks Mike. Good ideas.
  • jmgjmg Posts: 15,173
    edited 2013-09-12 17:43
    Power Removal Watchdog/resets are common in the Alarm industry, for exactly this type of recovery.

    Usually they are discrete blocks, designed to briefly remove all power. (so your Prop would also reset in this case)

    I am surprised more Regulator Vendors do not handle this properly.
  • kwinnkwinn Posts: 8,697
    edited 2013-09-14 00:06
    You can have a simple software watchdog timer that can monitor tasks and reset the prop if any one of them gets hung up. The watchdog timer can run in it's own cog or share a cog with other software.
Sign In or Register to comment.