In deep Sleep the cunsumption is below 19µA, but i have to send with PA_MAX. On some Windows the open/close frequency is verry high, so the battery is to fast emty.
The CR2032 is good, but i want more "lifetime"
In deep Sleep the cunsumption is below 19µA, but i have to send with PA_MAX. On some Windows the open/close frequency is verry high, so the battery is to fast emty.
The CR2032 is good, but i want more "lifetime"
Yes the consumption is still at 19µA, but while sending it increase up to 100mA. The Standby Time is depends on the interval of open/close Windows. For me it was not really ennoth (2-3 month), so i redesigned this Project.
Just look in my Projects -> Door/Windows AAA
Greetings
Insert an delay between sends will help to refresh the load in the capacitor. I prefer to wait for 100ms before send a new message. And increase the capacitor. My Sensor (not battery) works fine until -15°C.
@egadgetjnr where dit u come from?
Look at my node: I used HW-Debounce and deep sleep.
Sketch inside.
I was a little bit bussy the last days.
My Nodes are completed installed right now, it works well. BUT, i had to change some thinks.
I had the Probleme of automatic reset of the device if i set the shutter to 50% or anythink else 0% or 100%.
The Diode alone dont solve these Probleme. I think the Problem is to stop the shutter while running. If i set it to 100% or 0% the shutter shut of before the relay falls down.
I solve the Problem with a 220uF Capacitor at the 3.3V Out and deactivate the BOD.
My Fuses right now: L: CF // H:DA // E:07
Now it works very well!!
@Fabien: I dont change the amp . . i just tested some thinks but it wont work . . for i dont use the current messurment and setup the Node with the manual endstop. It works realy good!
Finaly again, Thanks @scalz
The Temp. of the devices is below 30°C ;-)
In the picture the green temp.

Final Version is tested and released. Have fun!
@Alex-B-Goode Yes this is the Way. If you dont like to disconnect the Gateway from Pi you Can use my procedure was i wrote some posts before. If the nodes discovered One time you dont need to wait again. MYScontroller save the discovered nodes.
For OTA Update under Rpi i used this: http://www.virtualhere.com/
wget http://www.virtualhere.com/sites/default/files/usbserver/vhusbdarmpi2
vhusbdarmpi2 -> for Pi2 only (see homepage for other platforms)
sudo chmod +x ./vhusbdarmpi2
sudo ./vhusbdarmpi2
now you have to reboot your rpi, stop virtualhere server its not enoth, cant mount device again. After restart everythinks works well.
Greetings
Dont Care :-) its cool. Zenner its not enoth but dont worry. I need it .. the nrf is verry "female" :-D (sensible). But i think for both version, you have to modify the current messurment. No Roller shutter has >200w so u are on the Limit below 100w of adc scale.
But hey it Works and your Layout is verry cool and Safe.
@scalz said:
for the wheeling diode if i remember it's integrated in the relay driver. depends what you mean
It isn't :-)
With a Little Bit Trouble yes. The Problem is the Dimension of the amplifier. Below 60W the messured voltage is to Low.
I think it is netter the Diode must be in the Feedback cycle of the amplifier. But in my case the Free running voltage is below 6 and with running Roller above 20. So it is possible to detect the End stops. Just modify the variables.
I will Test it in the"real" System tomorow. If it Works i will post the Sketch.
I am finished and everythink is working well right now.
I dit some modifications on PCB:
And some changes in your example code :+1:
Thanks for the Layout, thanks for the code, thanks for help!
I design a 3D Case, but only the bottom side. . . but not tested right now . .

0_1478263225360_RollerShutter_back.stl
0_1478263256093_RollerShutter_Back.123dx
Level detection work right now . . .
my modifications:
// send % progression for controller widgets NOT TESTED
static uint8_t oldpos = getPosition();
if (oldpos != getPosition() && getCalibrationState()==0) {
send(msgShutterPosition.set(getPosition()));
send(msgPercent.set(getPosition()));
oldpos = getPosition();
}
Dont know why but while autocali. they stop messurement of current . . .
If i start the process the first is go UP, my messurment of power is: 30W
if i Power of the attached Bulb the value stays on 30W, so it is normal he cant detect anythink
In your loop:
// Read current sensor, endstop
uint16_t acsread = 0;
acsread = readAdcWithFilter(ACS712_SENSOR, PS_64);
if (acsread < ACS712_LEVELDETECT) {
// Endstop detected
if (getCalibrationState() > 0) setEndStopState(true);
else {};
}
I modified for debug like this:
// Read current sensor, endstop
uint16_t acsread = 0;
acsread = readAdcWithFilter(ACS712_SENSOR, PS_64);
Serial.print(F("ACS712: READ DEBUG: "));
Serial.println(acsread);
if (acsread < ACS712_LEVELDETECT) {
// Endstop detected
if (getCalibrationState() > 0) setEndStopState(true);
else {};
}
It never change the value of acsread after the init process is started. . .
LOG:
TSP:MSG:READ 0-0-50 s=2,c=1,t=2,pt=0,l=1,sg=1:1
CMD: Autocalibration
ACS712: READ DEBUG: 7
ACS712: READ DEBUG: 29
ACS712: READ: 29
TSP:MSG:SEND 50-50-0-0 s=6,c=1,t=17,pt=3,l=2,sg=0,ft=0,st=ok:29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
ACS712: READ DEBUG: 29
29 will stay until timout stop. . . between this i power of the attached test bulb (20W)
Yes, i work on it . . . still my ACS wont work well. At the moment i init the node with the Endstop Bool, that works fine.
I work also on an delay between the UP/DOWN States, i don't like it if the shutter change the direktion directly. But . . . not find the right way yet :-)
EDIT: ACS works right now!!! :+1: I think my IC was defective :-1:
@tonnerre33 Thanks, i solved it already, but you are right that was my Problem :-)
It is possible that you dont use the asc for the autocalibration yet? I cant find it in your Code .... I found only the read process.
Corect me if i am wrong. :-)
I will try it direct on the CR2032.
You are right, OTA not needed and not possible. The second Reed is for a second Window, i would trace it seperatly.
It's for a doble Window, the sensor is placed in the middle of booth windows.
Yaah dont hurry :D
here is the log:
[2016-11-01 10:49:04.702 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:465
[2016-11-01 10:49:04.727 Info] RX 50;6;1;0;17;465
[2016-11-01 10:49:04.728 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:466
[2016-11-01 10:49:04.728 Info] RX 50;6;1;0;17;466
[2016-11-01 10:49:14.731 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:49:28.130 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:445
[2016-11-01 10:49:28.137 Info] RX 50;6;1;0;17;445
[2016-11-01 10:49:28.265 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:446
[2016-11-01 10:49:28.267 Info] RX 50;6;1;0;17;446
[2016-11-01 10:49:54.722 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:425
[2016-11-01 10:49:54.727 Info] RX 50;6;1;0;17;425
[2016-11-01 10:49:54.787 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:426
[2016-11-01 10:49:54.788 Info] RX 50;6;1;0;17;426
[2016-11-01 10:50:14.760 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:50:23.029 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:405
[2016-11-01 10:50:23.032 Info] RX 50;6;1;0;17;405
[2016-11-01 10:50:23.054 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:406
[2016-11-01 10:50:23.055 Info] RX 50;6;1;0;17;406
[2016-11-01 10:50:53.223 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:385
[2016-11-01 10:50:53.226 Info] RX 50;6;1;0;17;385
[2016-11-01 10:50:53.261 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:386
[2016-11-01 10:50:53.262 Info] RX 50;6;1;0;17;386
[2016-11-01 10:51:14.788 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:51:25.712 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:365
[2016-11-01 10:51:25.718 Info] RX 50;6;1;0;17;365
[2016-11-01 10:51:25.725 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:366
[2016-11-01 10:51:25.732 Info] RX 50;6;1;0;17;366
[2016-11-01 10:51:59.985 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:345
[2016-11-01 10:51:59.989 Info] RX 50;6;1;0;17;345
[2016-11-01 10:52:00.013 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:346
[2016-11-01 10:52:00.014 Info] RX 50;6;1;0;17;346
[2016-11-01 10:52:14.818 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:52:36.088 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:325
[2016-11-01 10:52:36.091 Info] RX 50;6;1;0;17;325
[2016-11-01 10:52:36.117 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:326
[2016-11-01 10:52:36.119 Info] RX 50;6;1;0;17;326
[2016-11-01 10:53:14.248 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:305
[2016-11-01 10:53:14.251 Info] RX 50;6;1;0;17;305
[2016-11-01 10:53:14.278 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:306
[2016-11-01 10:53:14.279 Info] RX 50;6;1;0;17;306
[2016-11-01 10:53:14.848 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:53:54.586 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:285
[2016-11-01 10:53:54.590 Info] RX 50;6;1;0;17;285
[2016-11-01 10:53:54.613 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:286
[2016-11-01 10:53:54.614 Info] RX 50;6;1;0;17;286
[2016-11-01 10:54:14.876 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:54:36.813 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:265
[2016-11-01 10:54:36.817 Info] RX 50;6;1;0;17;265
[2016-11-01 10:54:36.843 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:266
[2016-11-01 10:54:36.845 Info] RX 50;6;1;0;17;266
[2016-11-01 10:55:14.904 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:55:21.198 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:245
[2016-11-01 10:55:21.202 Info] RX 50;6;1;0;17;245
[2016-11-01 10:55:21.223 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:246
[2016-11-01 10:55:21.224 Info] RX 50;6;1;0;17;246
[2016-11-01 10:56:08.275 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:225
[2016-11-01 10:56:08.278 Info] RX 50;6;1;0;17;225
[2016-11-01 10:56:08.304 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:226
[2016-11-01 10:56:08.306 Info] RX 50;6;1;0;17;226
[2016-11-01 10:56:14.934 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:56:58.403 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:205
[2016-11-01 10:56:58.406 Info] RX 50;6;1;0;17;205
[2016-11-01 10:56:58.432 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:206
[2016-11-01 10:56:58.434 Info] RX 50;6;1;0;17;206
[2016-11-01 10:57:14.963 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:57:51.378 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:185
[2016-11-01 10:57:51.381 Info] RX 50;6;1;0;17;185
[2016-11-01 10:57:51.403 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:186
[2016-11-01 10:57:51.404 Info] RX 50;6;1;0;17;186
[2016-11-01 10:58:14.991 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:58:47.254 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:165
[2016-11-01 10:58:47.280 Info] RX 50;6;1;0;17;165
[2016-11-01 10:58:47.281 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:166
[2016-11-01 10:58:47.282 Info] RX 50;6;1;0;17;166
[2016-11-01 10:59:15.019 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 10:59:46.972 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:145
[2016-11-01 10:59:46.977 Info] RX 50;6;1;0;17;145
[2016-11-01 10:59:47.040 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:146
[2016-11-01 10:59:47.041 Info] RX 50;6;1;0;17;146
[2016-11-01 11:00:15.047 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 11:00:52.176 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:125
[2016-11-01 11:00:52.181 Info] RX 50;6;1;0;17;125
[2016-11-01 11:00:52.244 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:126
[2016-11-01 11:00:52.245 Info] RX 50;6;1;0;17;126
[2016-11-01 11:01:15.076 Info] RX 0;255;3;0;9;TSP:SANCHK:OK
[2016-11-01 11:02:08.445 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:105
[2016-11-01 11:02:08.449 Info] RX 50;6;1;0;17;105
[2016-11-01 11:02:08.505 Info] RX 0;255;3;0;9;TSP:MSG:READ 50-50-0 s=6,c=1,t=17,pt=3,l=2,sg=0:106
[2016-11-01 11:02:08.506 Info] RX 50;6;1;0;17;106
Bootup Log:
57 01.11.2016 12:34:04 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 62
59 01.11.2016 12:34:05 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 63
61 01.11.2016 12:34:05 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 64
63 01.11.2016 12:34:06 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 65
65 01.11.2016 12:34:07 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 66
67 01.11.2016 12:34:08 TX 50 50 0 3 C_SET V_TEMP BYTE 1 NO 25
69 01.11.2016 12:34:08 TX 0 0 50 50 3 C_SET V_TEMP BYTE 1 NO ok 25
71 01.11.2016 12:34:08 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 67
73 01.11.2016 12:34:09 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 68
75 01.11.2016 12:34:10 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 69
77 01.11.2016 12:34:11 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 70
79 01.11.2016 12:34:12 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 71
81 01.11.2016 12:34:14 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 72
83 01.11.2016 12:34:15 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 73
85 01.11.2016 12:34:17 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 74
87 01.11.2016 12:34:19 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 75
89 01.11.2016 12:34:21 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 76
91 01.11.2016 12:34:24 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 77
93 01.11.2016 12:34:26 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 78
95 01.11.2016 12:34:30 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 79
97 01.11.2016 12:34:33 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 80
99 01.11.2016 12:34:38 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 81
101 01.11.2016 12:34:43 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 82
103 01.11.2016 12:34:50 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 83
106 01.11.2016 12:34:59 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 84
108 01.11.2016 12:35:10 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 85
110 01.11.2016 12:35:23 TX 50 50 0 6 C_SET V_WATT UINT16 2 NO 86