Jump to content

Recommended Posts

Geschrieben

Hi,

 

For the first time I had my Dual Relay activate my water pump, and then something happened which resulted in the monoflop behaviour failing miserably. Result: water pump kept running, and running, and running, ... until a poor resident went into cellar and yanked the power cable out of the mains plug.

 

I imagined the monoflop API to be 100% safe.. but it seems it isn't. Does the above scenario mean that the Master Brick connected to the relay actually crashed, preventing it from switching the relay OFF? Is there any API allowing a controlling program to detect stack resets?

 

If I cannot absolutely guarantee that my system never fails to switch the pump off after a reasonable amount of time, then my whole system is dangerously flawed. I cannot have a pump burn out and potentially start a fire...

 

Any ideas on how to solve this problem? Seems to me the TF architecture is missing some auto-reset mechanism (watchdog).

 

Geschrieben

You did add a 4m long antenna (the LCD20x4 Bricklet). It is possible that the long cable increased the inductive load problems.

 

But you could easily try that out by disconnecting the long cable (at the stack, not at the LCD). Do the problems disappear then?

 

Edit: A watchdog could indeed have helped in your scenario.

Geschrieben

The log below shows the stack running almost 24 hours without the (admittedly) horror cable I made, and without the physical LCD attached. So those elements are taken out of the equation.

 

Whenever any exception occurs you get an exception summary line (without stack trace info) starting with a [n(x/y)] prefix. The n is just tracking how many exceptions occurred in total. The x and y are more interesting: y means that the stack has suffered y DIFFERENT exceptions up to that point, and x is an exception type. So when my BrickletDistanceIR getDistance() call blows with a TimeoutException, that's one type of exception. When my BrickletDualRelay getState() call blows, that's another type.

 

So from the log you can see that the code sees four different kinds of exception. The log also shows that the program mostly sees exception kind #1... and that's always the Distance IR getter. Statistically, I think this is really saying something.. but what? That Distance IR is some kind of problem element in the configuration?

 

Anyway, we're digressing again. My hope was that TF adds a top-level auto-stack resetting mechanism. Any chance of that?  :'(

 

Starting Cellar Water Pump Control System @ Tue Mar 26 21:06:46 CET 2013
Running on Java 1.7.0_04 hosted by Mac OS X 10.7.5
Initializing TinkerForge stack..
Aha. Connected @ 20:06:46 because: CONNECT_REASON_REQUEST
Done.
[1(1/1)] Ouch.. exception @ Tue Mar 26 21:23:25 CET 2013
Switching pump ON @ Tue Mar 26 21:36:47 CET 2013. Time since last: 21:36:47,551. Air: 1010.84,Temp: 12.62,Humid: 71.7,Light: 0.0,Heap: 3.53 MB,
[2(1/1)] Ouch.. exception @ Tue Mar 26 21:52:32 CET 2013
Switching pump ON @ Tue Mar 26 22:12:28 CET 2013. Time since last: 00:35:40,947. Air: 1010.84,Temp: 12.43,Humid: 68.4,Light: 0.0,Heap: 2.22 MB,
[3(2/2)] Ouch.. exception @ Tue Mar 26 22:21:57 CET 2013
[4(1/2)] Ouch.. exception @ Tue Mar 26 22:37:03 CET 2013
Switching pump ON @ Tue Mar 26 22:49:15 CET 2013. Time since last: 00:36:47,106. Air: 1010.72,Temp: 12.31,Humid: 67.0,Light: 0.0,Heap: 2.04 MB,
[5(1/2)] Ouch.. exception @ Tue Mar 26 22:53:15 CET 2013
[6(1/2)] Ouch.. exception @ Tue Mar 26 22:58:22 CET 2013
[7(1/2)] Ouch.. exception @ Tue Mar 26 22:59:35 CET 2013
[8(1/2)] Ouch.. exception @ Tue Mar 26 23:26:47 CET 2013
Switching pump ON @ Tue Mar 26 23:27:23 CET 2013. Time since last: 00:38:08,365. Air: 1010.64,Temp: 12.18,Humid: 67.8,Light: 0.0,Heap: 1.46 MB,
[9(1/2)] Ouch.. exception @ Tue Mar 26 23:38:37 CET 2013
Switching pump ON @ Wed Mar 27 00:06:27 CET 2013. Time since last: 00:39:04,013. Air: 1010.62,Temp: 12.12,Humid: 67.1,Light: 0.0,Heap: 1.82 MB,
[10(1/2)] Ouch.. exception @ Wed Mar 27 00:40:57 CET 2013
Switching pump ON @ Wed Mar 27 00:46:28 CET 2013. Time since last: 00:40:00,082. Air: 1010.58,Temp: 12.06,Humid: 67.3,Light: 0.0,Heap: 1.68 MB,
[11(1/2)] Ouch.. exception @ Wed Mar 27 01:08:24 CET 2013
Switching pump ON @ Wed Mar 27 01:27:32 CET 2013. Time since last: 00:41:04,892. Air: 1010.40,Temp: 11.93,Humid: 67.9,Light: 0.0,Heap: 993.01 KB,
Switching pump ON @ Wed Mar 27 02:10:12 CET 2013. Time since last: 00:42:39,914. Air: 1010.13,Temp: 11.87,Humid: 67.9,Light: 0.0,Heap: 3.05 MB,
[12(1/2)] Ouch.. exception @ Wed Mar 27 02:47:25 CET 2013
Switching pump ON @ Wed Mar 27 02:52:54 CET 2013. Time since last: 00:42:41,323. Air: 1009.86,Temp: 11.81,Humid: 67.3,Light: 0.0,Heap: 1.93 MB,
[13(1/2)] Ouch.. exception @ Wed Mar 27 02:55:19 CET 2013
[14(3/3)] Ouch.. exception @ Wed Mar 27 03:05:07 CET 2013
[15(2/3)] Ouch.. exception @ Wed Mar 27 03:36:57 CET 2013
Switching pump ON @ Wed Mar 27 03:36:58 CET 2013. Time since last: 00:44:04,375. Air: 1009.69,Temp: 11.75,Humid: 67.9,Light: 0.0,Heap: 871.14 KB,
[16(4/4)] Ouch.. exception @ Wed Mar 27 03:39:14 CET 2013
[17(1/4)] Ouch.. exception @ Wed Mar 27 03:41:17 CET 2013
Switching pump ON @ Wed Mar 27 04:22:02 CET 2013. Time since last: 00:45:03,828. Air: 1009.44,Temp: 11.68,Humid: 66.7,Light: 0.0,Heap: 817.41 KB,
[18(1/4)] Ouch.. exception @ Wed Mar 27 04:40:45 CET 2013
[19(1/4)] Ouch.. exception @ Wed Mar 27 04:56:05 CET 2013
[20(2/4)] Ouch.. exception @ Wed Mar 27 05:03:11 CET 2013
Switching pump ON @ Wed Mar 27 05:08:32 CET 2013. Time since last: 00:46:29,773. Air: 1009.41,Temp: 11.62,Humid: 65.9,Light: 0.0,Heap: 1.77 MB,
[21(1/4)] Ouch.. exception @ Wed Mar 27 05:10:51 CET 2013
[22(1/4)] Ouch.. exception @ Wed Mar 27 05:32:41 CET 2013
[23(1/4)] Ouch.. exception @ Wed Mar 27 05:54:30 CET 2013
Switching pump ON @ Wed Mar 27 05:54:32 CET 2013. Time since last: 00:46:00,707. Air: 1009.53,Temp: 11.56,Humid: 67.7,Light: 0.0,Heap: 894.96 KB,
[24(1/4)] Ouch.. exception @ Wed Mar 27 06:05:22 CET 2013
Switching pump ON @ Wed Mar 27 06:41:27 CET 2013. Time since last: 00:46:55,102. Air: 1009.57,Temp: 11.56,Humid: 67.3,Light: 0.0,Heap: 2.50 MB,
[25(1/4)] Ouch.. exception @ Wed Mar 27 06:46:49 CET 2013
[26(1/4)] Ouch.. exception @ Wed Mar 27 06:47:53 CET 2013
[27(1/4)] Ouch.. exception @ Wed Mar 27 07:03:10 CET 2013
Switching pump ON @ Wed Mar 27 07:27:24 CET 2013. Time since last: 00:45:56,023. Air: 1009.77,Temp: 12.12,Humid: 71.3,Light: 0.0,Heap: 1.70 MB,
[28(1/4)] Ouch.. exception @ Wed Mar 27 08:03:32 CET 2013
[29(1/4)] Ouch.. exception @ Wed Mar 27 08:06:55 CET 2013
Switching pump ON @ Wed Mar 27 08:11:26 CET 2013. Time since last: 00:44:02,398. Air: 1009.71,Temp: 12.06,Humid: 67.9,Light: 0.0,Heap: 3.20 MB,
[30(1/4)] Ouch.. exception @ Wed Mar 27 08:36:28 CET 2013
Switching pump ON @ Wed Mar 27 08:50:33 CET 2013. Time since last: 00:39:06,717. Air: 1009.87,Temp: 12.31,Humid: 69.4,Light: 0.4,Heap: 1.93 MB,
Switching pump ON @ Wed Mar 27 09:31:27 CET 2013. Time since last: 00:40:54,876. Air: 1009.88,Temp: 12.50,Humid: 73.0,Light: 2.0,Heap: 2.25 MB,
[31(1/4)] Ouch.. exception @ Wed Mar 27 09:50:20 CET 2013
[32(1/4)] Ouch.. exception @ Wed Mar 27 10:09:46 CET 2013
Switching pump ON @ Wed Mar 27 10:13:37 CET 2013. Time since last: 00:42:09,026. Air: 1009.66,Temp: 12.68,Humid: 80.1,Light: 6.3,Heap: 3.97 MB,
[33(1/4)] Ouch.. exception @ Wed Mar 27 10:41:22 CET 2013
[34(1/4)] Ouch.. exception @ Wed Mar 27 10:54:28 CET 2013
Switching pump ON @ Wed Mar 27 10:57:08 CET 2013. Time since last: 00:43:31,044. Air: 1009.50,Temp: 12.87,Humid: 79.7,Light: 1.7,Heap: 1.07 MB,
[35(1/4)] Ouch.. exception @ Wed Mar 27 11:27:12 CET 2013
Switching pump ON @ Wed Mar 27 11:43:34 CET 2013. Time since last: 00:46:26,135. Air: 1009.06,Temp: 13.06,Humid: 75.8,Light: 0.9,Heap: 2.21 MB,
[36(1/4)] Ouch.. exception @ Wed Mar 27 11:50:32 CET 2013
Switching pump ON @ Wed Mar 27 12:29:38 CET 2013. Time since last: 00:46:04,445. Air: 1008.70,Temp: 13.06,Humid: 68.2,Light: 0.8,Heap: 2.01 MB,
[37(1/4)] Ouch.. exception @ Wed Mar 27 12:46:15 CET 2013
Switching pump ON @ Wed Mar 27 13:19:09 CET 2013. Time since last: 00:49:30,626. Air: 1008.40,Temp: 12.93,Humid: 68.4,Light: 0.1,Heap: 858.89 KB,
[38(1/4)] Ouch.. exception @ Wed Mar 27 13:30:31 CET 2013
[39(1/4)] Ouch.. exception @ Wed Mar 27 13:37:51 CET 2013
Switching pump ON @ Wed Mar 27 14:09:10 CET 2013. Time since last: 00:50:00,793. Air: 1008.01,Temp: 12.68,Humid: 65.8,Light: 0.0,Heap: 3.15 MB,
Switching pump ON @ Wed Mar 27 15:00:10 CET 2013. Time since last: 00:51:00,169. Air: 1007.90,Temp: 12.56,Humid: 66.8,Light: 0.1,Heap: 2.55 MB,
[40(2/4)] Ouch.. exception @ Wed Mar 27 15:44:05 CET 2013
Switching pump ON @ Wed Mar 27 15:51:17 CET 2013. Time since last: 00:51:07,372. Air: 1007.82,Temp: 12.43,Humid: 70.8,Light: 0.0,Heap: 1.84 MB,
[41(1/4)] Ouch.. exception @ Wed Mar 27 16:07:45 CET 2013
Switching pump ON @ Wed Mar 27 16:39:50 CET 2013. Time since last: 00:48:33,390. Air: 1007.76,Temp: 12.31,Humid: 68.5,Light: 0.0,Heap: 3.21 MB,
[42(1/4)] Ouch.. exception @ Wed Mar 27 16:41:34 CET 2013
[43(1/4)] Ouch.. exception @ Wed Mar 27 16:45:02 CET 2013
Switching pump ON @ Wed Mar 27 17:29:57 CET 2013. Time since last: 00:50:06,953. Air: 1007.84,Temp: 12.31,Humid: 69.3,Light: 0.0,Heap: 2.70 MB,
[44(1/4)] Ouch.. exception @ Wed Mar 27 17:32:09 CET 2013
Switching pump ON @ Wed Mar 27 18:19:12 CET 2013. Time since last: 00:49:14,987. Air: 1007.91,Temp: 12.43,Humid: 70.5,Light: 0.0,Heap: 2.94 MB,
[45(1/4)] Ouch.. exception @ Wed Mar 27 18:26:03 CET 2013

 

Geschrieben

I think we will add a watchdog feature for the next Master Brick Firmware release. We currently have not agreed internally if the watchdog should be on or off by default, we will have to discuss that again tomorrow.

Geschrieben

@CD108: After doing some reading on your varistor suggestion, would the use of a simple surge-suppressing power strip not be the quickest solution (assuming I've got such a strip lying around) ?

 

2nd question: my Tinkerforge stack is powered with a Step-Down Brick that is fed by the DC output of a little AC-DC transformer. Are these two components transparent for a surge? I would have thought (with my naive electronics knowledge) that a Step-Down should be able to block any surges, if providing stable Voltage is one of its key functions.

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...