Sensebender Micro
-
@gloob said:
I have just a question about the default sketch.
Doesn't the following code influence the sleep time?
It's the watchdog that is used for calculating the sleeptime, which is running independently from the CPU oscliator (which is lowered here).
If i lower the clock speed I would expect a lower processing time.
Also, the threshold for temperature and humidity is set to 0.5 and the humidity is read in percent as an integer. Doesn't this mean that even when the humidity changes by less than 1 percent I get an update of the values. I would expect that the noise of the humidity sensor is around 1%.
Humidity is using a running average, it starts with taking average of the previous two measurements, put in the current measurement, and takes a new average (meaning this measurement, and the previous measurement). Then it takes the difference between those two averages, and this needs to be above 0.5.
In theory it should lower the number of transmissions, if the humidity fluctuates, like: 50%, 51%, 50%.. without the running average, this would trigger 3 transmissions.
You are welcome to suggest another method of limiting "spurious" transmissions :)
-
@gloob said:
I have just a question about the default sketch.
Doesn't the following code influence the sleep time?
It's the watchdog that is used for calculating the sleeptime, which is running independently from the CPU oscliator (which is lowered here).
If i lower the clock speed I would expect a lower processing time.
Also, the threshold for temperature and humidity is set to 0.5 and the humidity is read in percent as an integer. Doesn't this mean that even when the humidity changes by less than 1 percent I get an update of the values. I would expect that the noise of the humidity sensor is around 1%.
Humidity is using a running average, it starts with taking average of the previous two measurements, put in the current measurement, and takes a new average (meaning this measurement, and the previous measurement). Then it takes the difference between those two averages, and this needs to be above 0.5.
In theory it should lower the number of transmissions, if the humidity fluctuates, like: 50%, 51%, 50%.. without the running average, this would trigger 3 transmissions.
You are welcome to suggest another method of limiting "spurious" transmissions :)
@tbowmo hmmm haven't looked at the details in the sketch but suppose we have 50, 50 , 51, 50, 51, 51, 51 wouldn't the results be:
50, 50 = 50
50, 50, 51 = 50.3
50, 51 = 50.50
50, 51, 50 = 50.50
51, 50 = 50.50
51, 50, 51 = 50.6
50, 51 = 50.50
50, 51, 51 = 50.6
51, 51 = 51
51, 51, 51 = 51so no over 0.5 fluctuation?
I think a threshold would work better. can be by running average but from a fixed, last reported temp. -
I started it plugged to a vinduino like schema, so I had this :
Sensebender Micro FW 1.2 - TestMode Testing peripherals! -> SI7021 : ok! -> Flash : failed! -> SHA204 : Ok (serial : 01232F36E159E8ADEE) Test finished ----> Selftest failed!I read your posts, replaces 1.4.1 libs by 1.5, reflashed it with the demo code and here is what I have:
Sensebender Micro FW 1.2radio init failis that because I don't have a 1.5 serial gateway ?
I have the socket and the FTDI on the same side so I may avoid the above ?
-
Finally got around to hooking one of these up last night. I soldered in the socket for the radio and the wires for my battery pack and uploaded the latest version of the sketch by just holding the FTDI connections in place. The sensor is working great. Thanks to @hek and @tbowmo for making it available!
I'm capturing the data including battery percentage to track how long it will last. One thing is that the battery percentage is jumping around quite a bit. It started at around 93%, dropped below 90, jumped backup to 95, etc. so I'll need to do some investigation as to why. This is happening with brand-new Duracell copper-top batteries. Also, for any future enhancements to the board, I would love to see a couple of mounting holes.

Cheers
Al -
Finally got around to hooking one of these up last night. I soldered in the socket for the radio and the wires for my battery pack and uploaded the latest version of the sketch by just holding the FTDI connections in place. The sensor is working great. Thanks to @hek and @tbowmo for making it available!
I'm capturing the data including battery percentage to track how long it will last. One thing is that the battery percentage is jumping around quite a bit. It started at around 93%, dropped below 90, jumped backup to 95, etc. so I'll need to do some investigation as to why. This is happening with brand-new Duracell copper-top batteries. Also, for any future enhancements to the board, I would love to see a couple of mounting holes.

Cheers
Al -
@Sparkman
I wounder if that is being caused by the loading of the battery and the moment the battery info is being calculated......@ServiceXp Good point. Maybe for the low values it's transmitting the temp/humidity when it's calculating the battery level. I'll take a look at the sketch to see if that could be the case.
Cheers
Al -
Hello
I found an error in the sensebender micro sketch in the latest release.
The calculation of the temperature change is wrong.
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths) / 100);needs to be replaced with
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths) / 100.0);The division with 100 needs to be 100.0 otherwise the result will be an integer instead of a float value and the difference will be the decimal places of the last temperature.
-
This should work as well and might be more clear:
float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths) / 100f);But I guess it is a matter of taste :)
-
Hi guys,
amazing board! But i have a question: The Arduino IDE offerst two options as destination - 8MHz and 1MHz. Which one should i chose? My board seems to work in general, but not very realiable... -
Hi guys,
amazing board! But i have a question: The Arduino IDE offerst two options as destination - 8MHz and 1MHz. Which one should i chose? My board seems to work in general, but not very realiable...@Stephan-Noller Out of the box, I had to use the 8MHz option to upload the sketch to it.
Cheers
Al -
The sensebender is set up to run at 8Mhz. There is an option to build it for 1Mhz, but you have to switch the prescaler yourself in your sketch.
However I think the current consumption saved by running on 1Mhz vs 8Mhz is very limited on the sensebender, as the oscillator is shut down the majority of time (when we are sleeping the MCU).
. I have not made any measurements on this yet (busy with a 1000 of other projects) -
@Sparkman
I wounder if that is being caused by the loading of the battery and the moment the battery info is being calculated......@ServiceXp Your hunch was correct. I built another Sensebender that only transmitted battery levels, and it's battery levels did not vary at all:

I then modified the sketch to put a short wait after the temp & humidity are sent to allow the voltage level to recover and the battery levels do not fluctuate so far. However, I'm thinking it would be better to always measure right after a transmit, but not sure if that's easy to do.
Cheers
Al -
@ServiceXp Your hunch was correct. I built another Sensebender that only transmitted battery levels, and it's battery levels did not vary at all:

I then modified the sketch to put a short wait after the temp & humidity are sent to allow the voltage level to recover and the battery levels do not fluctuate so far. However, I'm thinking it would be better to always measure right after a transmit, but not sure if that's easy to do.
Cheers
Al -
I started it plugged to a vinduino like schema, so I had this :
Sensebender Micro FW 1.2 - TestMode Testing peripherals! -> SI7021 : ok! -> Flash : failed! -> SHA204 : Ok (serial : 01232F36E159E8ADEE) Test finished ----> Selftest failed!I read your posts, replaces 1.4.1 libs by 1.5, reflashed it with the demo code and here is what I have:
Sensebender Micro FW 1.2radio init failis that because I don't have a 1.5 serial gateway ?
I have the socket and the FTDI on the same side so I may avoid the above ?
@hek can anyone help me, no unit is functionnal so far...
@epierre said:
I started it plugged to a vinduino like schema, so I had this :
Sensebender Micro FW 1.2 - TestMode Testing peripherals! -> SI7021 : ok! -> Flash : failed! -> SHA204 : Ok (serial : 01232F36E159E8ADEE) Test finished ----> Selftest failed!I read your posts, replaces 1.4.1 libs by 1.5, reflashed it with the demo code and here is what I have:
Sensebender Micro FW 1.2radio init failis that because I don't have a 1.5 serial gateway ?
I have the socket and the FTDI on the same side so I may avoid the above ?
-
@epierre said:
is that because I don't have a 1.5 serial gateway ?
Gateway version shouldn't matter if you get this message at startup of node.
I have the socket and the FTDI on the same side so I may avoid the above ?
I don't understand what you mean.
-
@epierre said:
is that because I don't have a 1.5 serial gateway ?
Gateway version shouldn't matter if you get this message at startup of node.
I have the socket and the FTDI on the same side so I may avoid the above ?
I don't understand what you mean.
@hek said:
@epierre said:
is that because I don't have a 1.5 serial gateway ?
Gateway version shouldn't matter if you get this message at startup of node.
what should I do from there ?
I have the socket and the FTDI on the same side so I may avoid the above ?
I don't understand what you mean.
this was related to the electric perturbation with headers close to the radio
-
@hek said:
@epierre said:
is that because I don't have a 1.5 serial gateway ?
Gateway version shouldn't matter if you get this message at startup of node.
what should I do from there ?
I have the socket and the FTDI on the same side so I may avoid the above ?
I don't understand what you mean.
this was related to the electric perturbation with headers close to the radio
@epierre Can you confirm the settings you used in the IDE to program it? Are you sure there are no solder bridges where you soldered the radio or socket for the radio? Have you tried powering it with a couple of AA batteries after you uploaded the sketch?
Cheers
Al -
Today I integrated my first 2 sensebender micros into my homeautomation and they almost worked out of the box. I like this board really much! Good work, I will order more!
Pitfall:
When updating the mysensors lib from 1.4.x to 1.5 the sensor failed to get an id from the controller which btw was still running on 1.4.x.
After having done all the things like "clearing eeprom", "soldering a capacitor to the radio" and so on... I noticed that I changed the RF_CHANNEL from the default 76 to some other value in MyConfig.h some months ago (probably for some paranoia reason).
When updating to lib 1.5 the sensor sketch got the 76 while the gateway still used the other one and so the communication between both failed. After changing the radio channel to the one the controller uses, everything worked very quickly!Probably this post helps someother guy who fell into the same trap.
-
Hi,
My sense bender works perfect when sending directly data directly to serial gateway (vera 5), however when I move it out of range to the serial gateway and want it to connect to my repeater node it does not want to discover the repeater node. Anyone else had this problem?