<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[coin-cell (CR2032) powered temperature sensor]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I would like to share my experience with coin-cell (CR2032) powered temperature sensors:</p>
<p dir="auto"><img src="/uploads/files/1439716547878-dsc_0970.jpg" alt="DSC_0970.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/uploads/files/1439716564839-dsc_0971.jpg" alt="DSC_0971.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">The reason for my use of a CR2032 coin cell is that I am really bad at building cases. So I wanted a sensor that will fit into a kinder-surprise egg.</p>
<p dir="auto">To maximize battery life I did some modifications to the pro micro clones:</p>
<ul>
<li>I removed all the leds</li>
<li>and also the 3.3v-regulator</li>
<li>I used a digital pin for the voltage divider so I can turn the divider off</li>
<li>I changed the efuse value to 0x07 (BOD off)</li>
</ul>
<p dir="auto">For easier connections I use digital pins to provide the DS18B20 temperature sensor with VCC and GND. I also got rid of the 4k7 resistor by using a modified version of the onewire.h library which uses the internal pullup instead.</p>
<p dir="auto">Temperature is transmitted every 5 minutes and battery level every hour.</p>
<p dir="auto">For the battery level I used software bounderies: 3.3V is 100%, 2.6V is 0%.</p>
<p dir="auto">If anyone is interested, here is the code. It is based on the old example sketch.</p>
<pre><code>#include &lt;MySensor.h&gt;
#include &lt;SPI.h&gt;
#include &lt;DallasTemperature.h&gt;
#include &lt;OneWire.h&gt;

#define ONE_WIRE_BUS 4 // Pin where dallase sensor is connected
#define ONE_WIRE_GND 5
#define ONE_WIRE_VCC 3
#define BATT_IN_PIN A0
#define BATT_VCC_PIN 6
#define MAX_ATTACHED_DS18B20 16

#define SLEEP_TIME 300000  // Sleep time between reads (in milliseconds)
#define BATT_TIME 12  //when also BATT-LEVEL is reported

#define BATT_100 3.3
#define BATT_0 2.6

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&amp;oneWire);
MySensor gw;
float lastTemperature[MAX_ATTACHED_DS18B20];
uint8_t numSensors = 0;
boolean receivedConfig = false;
boolean metric = true;
// Initialize temperature message
MyMessage msg(0, V_TEMP);
uint8_t battReport = 0;
int oldvalue = 0;

void setup()
{
  // Startup OneWire
#ifdef ONE_WIRE_VCC
  pinMode(ONE_WIRE_VCC, OUTPUT);
  digitalWrite(ONE_WIRE_VCC, HIGH);
#endif
#ifdef ONE_WIRE_GND
  pinMode(ONE_WIRE_GND, OUTPUT);
  digitalWrite(ONE_WIRE_GND, LOW);
#endif

  analogReference(INTERNAL);
  pinMode(BATT_IN_PIN, INPUT);
  pinMode(BATT_VCC_PIN, OUTPUT);
  digitalWrite(BATT_VCC_PIN, LOW);

  sensors.begin();

  // Startup and initialize MySensors library. Set callback for incoming messages.
  gw.begin();

  // Send the sketch version information to the gateway and Controller
  gw.sendSketchInfo("Temperature Sensor", "1.0");

  // Fetch the number of attached temperature sensors
  numSensors = sensors.getDeviceCount();

  sensors.setWaitForConversion(false);//saves a few mAs per read :-) to debug

  // Present all sensors to controller
  for (int i = 0; i &lt; numSensors &amp;&amp; i &lt; MAX_ATTACHED_DS18B20; i++) {
    gw.present(i, S_TEMP);
  }
}


void loop()
{
  // Process incoming messages (like config from server)
  //gw.process();

  // Fetch temperatures from Dallas sensors
  sensors.requestTemperatures();

  gw.sleep(750);//wait for conversion in sleep mode

  // Read temperatures and send them to controller
  for (int i = 0; i &lt; numSensors &amp;&amp; i &lt; MAX_ATTACHED_DS18B20; i++) {

    // Fetch and round temperature to one decimal
    float temperature = static_cast&lt;float&gt;(static_cast&lt;int&gt;((gw.getConfig().isMetric ? sensors.getTempCByIndex(i) : sensors.getTempFByIndex(i)) * 10.)) / 10.;

    // Only send data if temperature has changed and no error
    if (lastTemperature[i] != temperature &amp;&amp; temperature != -127.00) {

      // Send in the new temperature
      gw.send(msg.setSensor(i).set(temperature, 1));
      lastTemperature[i] = temperature;
    }
  }
  if (++battReport == BATT_TIME) {
    digitalWrite(BATT_VCC_PIN, HIGH);
    delay(1);
    int value = analogRead(BATT_IN_PIN);
    digitalWrite(BATT_VCC_PIN, LOW);
    if (value != oldvalue)
    {
      int percent = (( value * 3.36e-3) - 2.6) / (3.3 - 2.6) * 100;
      percent = (percent &gt; 100) ? 100 : percent;
      percent = (percent &lt; 0) ? 0 : percent;
      gw.sendBatteryLevel(percent);
    }
    oldvalue = value;
    battReport = 0;
  }
  gw.sleep(SLEEP_TIME);//wake on interrupt or after sleep-time
}
</code></pre>
<p dir="auto">My experience so far:<br />
On the good side: the first sensor I built started operation on May 23 (about 3 months ago) and is still working great with the same coin cell. I first hoped for a month or two because of the small capacity of a CR2032 coin cell, so my expectation is already exceeded.</p>
<p dir="auto">On the bad side: Some other sensors I built later had problems. They worked well with the fresh battery but stopped working after a day or two. After this time they went into a boot loop (serial monitor reads "sensor started, id ..." over and over again) so apparently the startup of the radio somehow triggers a reboot.<br />
As a modification to prevent this I resoldered the input capacitor of the raw-pin (which is unused) directly to the radio.<br />
For most sensors this worked fine.<br />
But one sensor did keep rebooting. I had to change it to a 2xAA-powered sensor. I later used the same CR2032 coin cell, which powered a reboot loop for about 24 hours to power another, newly built sensor and it worked on that one.</p>
<p dir="auto">I don't know what the reason for this is, but it has to have something to do with the voltage drop made by the radio. Either some radios are bad and drawing a higher current or some of the pro micro clones are bad and maybe not accepting the changed efuse values.</p>
<p dir="auto">Has anyone had similar issues? Are there counterfeit atmega328 around which do not work up to specifications?</p>
]]></description><link>https://forum.mysensors.org/topic/1813/coin-cell-cr2032-powered-temperature-sensor</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 09:11:51 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/1813.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Aug 2015 09:49:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Mon, 07 Jan 2019 14:25:10 GMT]]></title><description><![CDATA[<p dir="auto">Hello fleinze,<br />
What about this project? Your sensors still working?<br />
I'm trying to build the same but I have some problem to change the efuse value:<br />
"I changed the efuse value to 0x07 (BOD off)"</p>
<p dir="auto">I' dont know how to edit the boards.txt file and how to install it in the arduino pro mini.</p>
<p dir="auto">Could you explain the procedure step by step or link me a good complete tutorial ?</p>
<p dir="auto">Thank you very much</p>
]]></description><link>https://forum.mysensors.org/post/96369</link><guid isPermaLink="true">https://forum.mysensors.org/post/96369</guid><dc:creator><![CDATA[Edoardo Vogna]]></dc:creator><pubDate>Mon, 07 Jan 2019 14:25:10 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Sun, 14 May 2017 17:01:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tango156157" aria-label="Profile: tango156157">@<bdi>tango156157</bdi></a><br />
Look you have more than one library for si7021.<br />
Move one library and then try again.<br />
If that doesn't help.</p>
<p dir="auto">Move back the first library and move the second one, try again and see if that helped</p>
]]></description><link>https://forum.mysensors.org/post/66744</link><guid isPermaLink="true">https://forum.mysensors.org/post/66744</guid><dc:creator><![CDATA[flopp]]></dc:creator><pubDate>Sun, 14 May 2017 17:01:46 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Sun, 14 May 2017 11:43:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a>   thanks for sharing your code for Si7021 sensor. I tried compiling but getting below error. Not sure if I am using incorrect header file for Si7021 sensor. I am using MySensors ver 2.1.0 for compiling. Any view? Thanks</p>
<pre><code>C:\Users\abc\AppData\Local\Temp\arduino_modified_sketch_641038\sketch_may14a.ino: In function 'void loop()':

sketch_may14a:91: error: 'si7021_thc' was not declared in this scope

   si7021_thc temphum = sensor.getTempAndRH();

   ^

sketch_may14a:91: error: expected ';' before 'temphum'

   si7021_thc temphum = sensor.getTempAndRH();

              ^

sketch_may14a:95: error: 'temphum' was not declared in this scope

   float temperature = (float)(temphum.celsiusHundredths) / 100.0;

                               ^

Multiple libraries were found for "SI7021.h"
 Used: C:\Users\abc\Documents\Arduino\libraries\SI7021
 Not used: C:\Program Files (x86)\Arduino\libraries\SI7021
exit status 1
'si7021_thc' was not declared in this scope

Insert Code Here
</code></pre>
]]></description><link>https://forum.mysensors.org/post/66710</link><guid isPermaLink="true">https://forum.mysensors.org/post/66710</guid><dc:creator><![CDATA[tango156157]]></dc:creator><pubDate>Sun, 14 May 2017 11:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Sun, 07 May 2017 18:11:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">this is my code working with 2.1 version. The code is not tidied up, please excuse.</p>
<pre><code>/*
   MySensors-Node for DS18B20 Temperature-Sensors.
   Mysensors.Library-Version 1.6
*/

#define MY_RADIO_NRF24

#define MY_TRANSPORT_UPLINK_CHECK_DISABLED

//#define MY_DEBUG


#include &lt;MySensors.h&gt;
#include &lt;SPI.h&gt;
#include &lt;Wire.h&gt;
#include &lt;SI7021.h&gt;

#define BATT_SENSOR
//#define VCCGND_PINS

#ifdef VCCGND_PINS
const uint8_t GND = A2;
const uint8_t VCC = A3;
#endif

#ifdef BATT_SENSOR
#define REPORT_VOLTAGE
#endif

const unsigned long SLEEP_TIME = 300000; // Sleep time between reads (in milliseconds)

const uint8_t TEMP_TIME = 12; //at least every nth time battery is reported
const uint8_t HUM_TIME = 12;
const uint8_t BATT_TIME = 12; //when also BATT-LEVEL is reportet
const float BATT_100 = 3; //3.3V for CR2032, 3V for 2xAA
const float BATT_0 = 2.2;

SI7021 sensor;

float lastTemperature, lastHum;
uint8_t lastTempSent = 0;//, lastHumSent = 0;
uint8_t numSensors = 0;
boolean receivedConfig = false;
boolean metric = true;
// Initialize temperature message
MyMessage msgTemp(0, V_TEMP);
MyMessage msgHum(0, V_HUM);
#ifdef REPORT_VOLTAGE
MyMessage msgBatt(1, V_VOLTAGE);
#endif
#ifdef BATT_SENSOR
uint8_t battReport = BATT_TIME - 1; //First report at startup
long oldvalue = 0;
#endif


void setup()
{

  #ifdef VCCGND_PINS
  pinMode(VCC, OUTPUT);
  digitalWrite(VCC, HIGH);
  pinMode(GND, OUTPUT);
  digitalWrite(GND, LOW);
  #endif
  
  if (!sensor.begin()) {
    Serial.println("No Sensor found!");
    while (true);
  }
  

}

void presentation() {

  // Send the sketch version information to the gateway and Controller
  sendSketchInfo("TempHumSi7021", "0.1a");

  // Present all sensors to controller
  present(0, S_HUM);
  //present(1, S_HUM);
#ifdef REPORT_VOLTAGE
  present(1, S_MULTIMETER);
#endif
}


void loop()
{
  //delay(2000);//for sensor to start up
  boolean tempsent = false;

  // Fetch temperatures from Dallas sensors
  si7021_thc temphum = sensor.getTempAndRH();

  // Read temperatures and send them to controller
  // Fetch and round temperature to one decimal
  float temperature = (float)(temphum.celsiusHundredths) / 100.0;
  float humidity = (float)(temphum.humidityPercent);
  // Only send data if temperature has changed and no error
  if ((lastTemperature != temperature) || lastHum != humidity || (++lastTempSent &gt;= TEMP_TIME)) {
    // Send in the new temperature
    send(msgTemp.set(temperature, 1));
    send(msgHum.set(humidity, 1));
    lastHum = humidity;
    lastTemperature = temperature;
    lastTempSent = 0;
    tempsent = true;
  }


#ifdef BATT_SENSOR
  if (++battReport &gt;= BATT_TIME &amp;&amp; tempsent) {

    //gw.sleep(10);
    long value = readVcc();


    if (value != oldvalue) {
      int percent = (( (float)(value) / 1000 ) - BATT_0) / (BATT_100 - BATT_0) * 100;
      percent = (percent &gt; 100) ? 100 : percent;
      percent = (percent &lt; 0) ? 0 : percent;
      sendBatteryLevel(percent);
#ifdef REPORT_VOLTAGE
      send(msgBatt.set((float)(value) / 1000, 2));
#endif
    }
    oldvalue = value;
    battReport = 0;
  }
#endif
  sleep(SLEEP_TIME);//wake on interrupt or after sleep-time
  //delay(2000);//for sensor to start up
}

long readVcc() {
  // Read 1.1V reference against AVcc
  // set the reference to Vcc and the measurement to the internal 1.1V reference
#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
#elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
  ADMUX = _BV(MUX5) | _BV(MUX0);
#elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
  ADMUX = _BV(MUX3) | _BV(MUX2);
#else
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
#endif

  delay(2); // Wait for Vref to settle
  ADCSRA |= _BV(ADSC); // Start conversion
  while (bit_is_set(ADCSRA, ADSC)); // measuring

  uint8_t low  = ADCL; // must read ADCL first - it then locks ADCH
  uint8_t high = ADCH; // unlocks both

  long result = (high &lt;&lt; 8) | low;

  result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
  return result; // Vcc in millivolts
}```</code></pre>
]]></description><link>https://forum.mysensors.org/post/66079</link><guid isPermaLink="true">https://forum.mysensors.org/post/66079</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Sun, 07 May 2017 18:11:48 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 04 May 2017 13:49:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tango156157" aria-label="Profile: tango156157">@<bdi>tango156157</bdi></a>, I sometimes get similar errors while compiling the sketches. Mostly because I am still using the MySensors 1.5 library for my legacy network, 2.1.0b for the RFM69 network (working RSSI report) and 2.1.1 for the LoRa network.<br />
Mostly when dealing with MySensors 1.5 and/or older sensors libraries, I find the newer Arduino version to pop all sort of errors. But then I fire up one of the older Arduino IDE versions I have, 1.6.5, 1.6.9 and so on. Eventually one of them compiles the sketch without errors while the newer version don't work. This is far from being a solid solution for these errors, but it gets the job done.<br />
You should try that too, especially if you're using older libraries for your sensors.<br />
You can find them here: <a href="https://www.arduino.cc/en/Main/OldSoftwareReleases#previous" rel="nofollow ugc">https://www.arduino.cc/en/Main/OldSoftwareReleases#previous</a></p>
]]></description><link>https://forum.mysensors.org/post/65840</link><guid isPermaLink="true">https://forum.mysensors.org/post/65840</guid><dc:creator><![CDATA[mihai.aldea]]></dc:creator><pubDate>Thu, 04 May 2017 13:49:27 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 04 May 2017 12:41:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a>  Great work with the CR2032 coin cell temp. sensor. I am trying to do a similar exercise with Si7021 sensors but getting into issues while coding. The examples from other posts around Si7021 adapted for latest MySensor lib seem to get stuck in my IDE giving lot of errors. I have tried getting all the required Header files but still get stuck due to some random error. Is it possible for you to share your code based on CR2032 temp node running on Si7021? Thanks....</p>
]]></description><link>https://forum.mysensors.org/post/65836</link><guid isPermaLink="true">https://forum.mysensors.org/post/65836</guid><dc:creator><![CDATA[tango156157]]></dc:creator><pubDate>Thu, 04 May 2017 12:41:14 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 05 Jan 2017 10:04:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a> said:</p>
<blockquote>
<p dir="auto">I put the arduino to sleep during the conversion time, so this is not a big issue. But I agree that the DS18B20 is not the best, but it is widely available. For newer nodes I try to use the Si7021 where possible.</p>
</blockquote>
<p dir="auto">It goes without saying that the nodes are in sleep mode between reports. However, the conversion time has a great impact in the cycle math. I won't say that pulling the readings 10 times faster will give you 10 times more time on battery but if you'll get 5 times more time then it's something. Not to mention that the Si7021 works down to 1.9V unlike the DS18B20+ which works down to only 3.0V.</p>
]]></description><link>https://forum.mysensors.org/post/56168</link><guid isPermaLink="true">https://forum.mysensors.org/post/56168</guid><dc:creator><![CDATA[mihai.aldea]]></dc:creator><pubDate>Thu, 05 Jan 2017 10:04:03 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 05 Jan 2017 09:51:49 GMT]]></title><description><![CDATA[<p dir="auto">I put the arduino to sleep during the conversion time, so this is not a big issue. But I agree that the DS18B20 is not the best, but it is widely available. For newer nodes I try to use the Si7021 where possible.</p>
]]></description><link>https://forum.mysensors.org/post/56162</link><guid isPermaLink="true">https://forum.mysensors.org/post/56162</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Thu, 05 Jan 2017 09:51:49 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 05 Jan 2017 09:43:13 GMT]]></title><description><![CDATA[<p dir="auto">The DS18B20+ is not a great sensor for the battery powered nodes. It has a huge conversion time comparing to others.<br />
9-bit resolution | 93.75 ms | 0.5°C<br />
10-bit resolution | 187.5 ms | 0.25°C<br />
11-bit resolution | 375 ms | 0.125°C<br />
12-bit resolution | 750 ms | 0.0625°C<br />
The last column is the sensor's precision. So unless you're OK with a 0.5°C steps, the simple usage of DS18B20+ will kill your battery a lot faster.<br />
Don't use DHT22, that one is very slow too. BME280 does have a barometric pressure sensor but it's not very fast either.<br />
The best sensor for battery powered nodes is the the Si7021 which is rather old, but is the fastest.</p>
]]></description><link>https://forum.mysensors.org/post/56156</link><guid isPermaLink="true">https://forum.mysensors.org/post/56156</guid><dc:creator><![CDATA[mihai.aldea]]></dc:creator><pubDate>Thu, 05 Jan 2017 09:43:13 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 05 Jan 2017 09:00:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a><br />
:thumbsup:</p>
]]></description><link>https://forum.mysensors.org/post/56139</link><guid isPermaLink="true">https://forum.mysensors.org/post/56139</guid><dc:creator><![CDATA[flopp]]></dc:creator><pubDate>Thu, 05 Jan 2017 09:00:32 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Thu, 05 Jan 2017 08:49:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/flopp" aria-label="Profile: flopp">@<bdi>flopp</bdi></a> I added the capacitor and put the old battery in. By old battery I mean the one I had replaced a week earlier for a new one. Sensor running smooth since, so great success!</p>
]]></description><link>https://forum.mysensors.org/post/56136</link><guid isPermaLink="true">https://forum.mysensors.org/post/56136</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Thu, 05 Jan 2017 08:49:30 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Wed, 04 Jan 2017 21:58:45 GMT]]></title><description><![CDATA[<p dir="auto">There is a TI paper about adding a big capacitor in series with the coin-cell battery to minimize the voltage drop during high-current peaks: <a href="http://www.ti.com/lit/wp/swra349/swra349.pdf" rel="nofollow ugc">http://www.ti.com/lit/wp/swra349/swra349.pdf</a>, also another interesting article related to low-power and CR2032: <a href="http://www.low-powerdesign.com/121312-article-extending-battery-life.htm" rel="nofollow ugc">http://www.low-powerdesign.com/121312-article-extending-battery-life.htm</a></p>
]]></description><link>https://forum.mysensors.org/post/56116</link><guid isPermaLink="true">https://forum.mysensors.org/post/56116</guid><dc:creator><![CDATA[Moebius Lutching]]></dc:creator><pubDate>Wed, 04 Jan 2017 21:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Wed, 04 Jan 2017 09:16:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a> said:</p>
<blockquote>
<p dir="auto">I just added an 100uF capacitor to one of my sensors and put an old battery in. Let's see how much more life I can get out of this battery now.</p>
</blockquote>
<p dir="auto">Very interest work.<br />
Is it still working?</p>
]]></description><link>https://forum.mysensors.org/post/56045</link><guid isPermaLink="true">https://forum.mysensors.org/post/56045</guid><dc:creator><![CDATA[flopp]]></dc:creator><pubDate>Wed, 04 Jan 2017 09:16:09 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Wed, 04 Jan 2017 06:09:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello @carmelo42, pin 9 is supposed to be connected to the NRF24 (CE / Chip Enable) so it cannot work as ground for the sensor as it will be high (and so = to Vcc) most if not all of the time.</p>
]]></description><link>https://forum.mysensors.org/post/56037</link><guid isPermaLink="true">https://forum.mysensors.org/post/56037</guid><dc:creator><![CDATA[Nca78]]></dc:creator><pubDate>Wed, 04 Jan 2017 06:09:36 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Tue, 03 Jan 2017 14:40:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a><br />
Hi, do you think it's possible to connect de Dallas sensor to pin 7, 8 and 9 of the arduino ?</p>
<p dir="auto">Like this :</p>
<pre><code>#define ONE_WIRE_BUS 8 // Pin where dallase sensor is connected
#define ONE_WIRE_GND 9
#define ONE_WIRE_VCC 7
</code></pre>
<p dir="auto">I have tried, and the temperature is always 85°C ...</p>
]]></description><link>https://forum.mysensors.org/post/55958</link><guid isPermaLink="true">https://forum.mysensors.org/post/55958</guid><dc:creator><![CDATA[carleki]]></dc:creator><pubDate>Tue, 03 Jan 2017 14:40:22 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Sat, 17 Dec 2016 15:34:58 GMT]]></title><description><![CDATA[<p dir="auto">I just added an 100uF capacitor to one of my sensors and put an old battery in. Let's see how much more life I can get out of this battery now.</p>
]]></description><link>https://forum.mysensors.org/post/54763</link><guid isPermaLink="true">https://forum.mysensors.org/post/54763</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Sat, 17 Dec 2016 15:34:58 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Sat, 17 Dec 2016 15:33:39 GMT]]></title><description><![CDATA[<p dir="auto">@carmelo42 The fuses only are written when you burn the bootloader, not when uploading the sketch. The Arduino IDE takes the fuse bytes from the boards.txt files.<br />
It would also be possible to just set the fuse bytes by using the avrdude-program from a command line, but you will still need to use a programmer.<br />
The extended-fuse setting 0xFF is the same as 0x07 as only the last 3 bits of this bytes are used. Both values will give you BOD disabled.</p>
]]></description><link>https://forum.mysensors.org/post/54762</link><guid isPermaLink="true">https://forum.mysensors.org/post/54762</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Sat, 17 Dec 2016 15:33:39 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Fri, 16 Dec 2016 13:31:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a> said:</p>
<blockquote>
<p dir="auto">@carmelo42 sorry I somehow missed your post. I use the standard-bootloader as I did not get Optiboot to run on the 3.3V/8MHz pro minis. I set the extended fuse to 0x07 (BOD disabled) by editing boards.txt.<br />
thanks !</p>
</blockquote>
<p dir="auto">is is a bit confusing for me :</p>
<ul>
<li>we can burn the bootloader from the Arduino IDE : are the fuses written at this moment ?</li>
<li>we can upload a sketch with the arduino IDE : are the fuses written at this moment ?</li>
<li>with my researches, I found that for disabling BOD was possible with 0xFF value for efuse ?</li>
</ul>
<p dir="auto">I have some lifetime issues with my CR2032 sensor .. and I suspect the fuses are not correctly set ...</p>
<p dir="auto">If you can light up my mind it will be perfect :)</p>
]]></description><link>https://forum.mysensors.org/post/54711</link><guid isPermaLink="true">https://forum.mysensors.org/post/54711</guid><dc:creator><![CDATA[carleki]]></dc:creator><pubDate>Fri, 16 Dec 2016 13:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Fri, 16 Dec 2016 12:58:06 GMT]]></title><description><![CDATA[<p dir="auto">@carmelo42 sorry I somehow missed your post. I use the standard-bootloader as I did not get Optiboot to run on the 3.3V/8MHz pro minis. I set the extended fuse to 0x07 (BOD disabled) by editing boards.txt.</p>
]]></description><link>https://forum.mysensors.org/post/54708</link><guid isPermaLink="true">https://forum.mysensors.org/post/54708</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Fri, 16 Dec 2016 12:58:06 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Wed, 14 Dec 2016 19:59:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nca78" aria-label="Profile: Nca78">@<bdi>Nca78</bdi></a> said:</p>
<blockquote>
<p dir="auto">add a capacitor of 100-200µF</p>
</blockquote>
<p dir="auto">I will try this, thanks! Currently I use the 10uF capacitor which is on the arduino pro minis on the raw pin side.</p>
<blockquote>
<p dir="auto">in your code, add a sleep command between message sending</p>
</blockquote>
<p dir="auto">How long do you sleep? In normal operation there is only one send command per loop, I only send battery level once every hour. I try to read vcc after sending the temperature so the battery is under some load when measuring.</p>
<blockquote>
<p dir="auto">use a better sensor that can accept a lower voltage</p>
</blockquote>
<p dir="auto">I already built one with a Si7021 sensor. But I ran out of CR2032 so I powered it using two AA cells. I should solder it back to coin cell now I got some.</p>
<blockquote>
<p dir="auto">you can just get Vcc from the A0 pin</p>
</blockquote>
<p dir="auto">I don't know this method do you have a link or can you explain it?</p>
]]></description><link>https://forum.mysensors.org/post/54567</link><guid isPermaLink="true">https://forum.mysensors.org/post/54567</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Wed, 14 Dec 2016 19:59:23 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Wed, 14 Dec 2016 05:54:26 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">there are a few improvements you can do to make your CR2032 nodes last longer:</p>
<ul>
<li>add a capacitor of 100-200µF in parallel with your battery. Ceramic is better, but I have no problem with nodes using electrolytic capacitors.  This will help when there is a peak power consumption from the radio. If you do not put one, voltage will drop quickly and that's probably what is triggering reboot loop on one of your nodes: maybe radio is less efficient and needs to resend more messages. Or maybe your BOD is not updated so it resets when voltage drops at 2.7V...</li>
<li>in your code, add a sleep command between message sending to give time for your cell to rest, and for the capacitor to recharge. Do it also at the beginning of presentation method and between each message sending in presentation.</li>
<li>use a better sensor that can accept a lower voltage, they are more expensive that DS18 but they can work down to 2V and use much less current: BMP180/280 if you want to measure only temperature (with barometer as extra), SI7021 for temp/hum, BME280 for temp/hum more expensive but better.</li>
<li>do not use voltage divider at all, you don't need one as you can just get Vcc from the A0 pin (with it I have some change of voltage related to temperature but not as wild as you seem to get. Maybe it's related to the DS18 measurement also ?)</li>
</ul>
<p dir="auto">With these changes and a si7021 breakout board from which I removed the voltage regulator (it's not consuming much, but without it is even better), I can send every minute, flash a led and I hardly see any drop in voltage after a few weeks of running.</p>
]]></description><link>https://forum.mysensors.org/post/54489</link><guid isPermaLink="true">https://forum.mysensors.org/post/54489</guid><dc:creator><![CDATA[Nca78]]></dc:creator><pubDate>Wed, 14 Dec 2016 05:54:26 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Tue, 13 Dec 2016 13:58:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fleinze" aria-label="Profile: fleinze">@<bdi>fleinze</bdi></a> said:</p>
<blockquote>
<p dir="auto">@carmelo42</p>
<p dir="auto">The no-resistor-library can be found here:<br />
<a href="https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/" rel="nofollow ugc">https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/</a></p>
<p dir="auto">The resistors (there are two but the other one is barely visible) are for voltage-measurement. In a later version I got rid of them using this resistor-less method of measurement:<br />
<a href="http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/" rel="nofollow ugc">http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/</a></p>
</blockquote>
<p dir="auto">great :)</p>
<p dir="auto">Did you change the bootloader ? Which one did you use ?</p>
]]></description><link>https://forum.mysensors.org/post/54455</link><guid isPermaLink="true">https://forum.mysensors.org/post/54455</guid><dc:creator><![CDATA[carleki]]></dc:creator><pubDate>Tue, 13 Dec 2016 13:58:59 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Tue, 13 Dec 2016 05:10:59 GMT]]></title><description><![CDATA[<p dir="auto">Just found this post <a href="https://www.hackster.io/Talk2/temp-and-humidity-sensor-with-a-cr2032-for-over-1-year-580114" rel="nofollow ugc">https://www.hackster.io/Talk2/temp-and-humidity-sensor-with-a-cr2032-for-over-1-year-580114</a> showing some details about using a CR2032 to power a sensor node. By my calculations, if the author removed the LED at all the solution would last for over 2 years!</p>
]]></description><link>https://forum.mysensors.org/post/54424</link><guid isPermaLink="true">https://forum.mysensors.org/post/54424</guid><dc:creator><![CDATA[Moebius Lutching]]></dc:creator><pubDate>Tue, 13 Dec 2016 05:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to coin-cell (CR2032) powered temperature sensor on Mon, 12 Dec 2016 18:36:21 GMT]]></title><description><![CDATA[<p dir="auto">@carmelo42</p>
<p dir="auto">The no-resistor-library can be found here:<br />
<a href="https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/" rel="nofollow ugc">https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/</a></p>
<p dir="auto">The resistors (there are two but the other one is barely visible) are for voltage-measurement. In a later version I got rid of them using this resistor-less method of measurement:<br />
<a href="http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/" rel="nofollow ugc">http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/</a></p>
]]></description><link>https://forum.mysensors.org/post/54405</link><guid isPermaLink="true">https://forum.mysensors.org/post/54405</guid><dc:creator><![CDATA[fleinze]]></dc:creator><pubDate>Mon, 12 Dec 2016 18:36:21 GMT</pubDate></item></channel></rss>