Author Topic: Outdoor sensor node (Relatively low cost)  (Read 18756 times)

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Outdoor sensor node (Relatively low cost)
« Reply #30 on: December 18, 2014, 03:35:27 PM »
What I was trying to say was that the battery dropoff is bad enough when the battery is fresh, but after 3000 charge cycles, the voltage drop off rate is significantly worse.  Further, the fact that the voltage would drop below your 3.3V limit after just a few transmits (even with a fresh battery) at very cold temperatures, means that you will need to charge much more frequently than once a day, hence, battery life won't be anywhere close to the 8 year life you're calculating.

One thing I don't know is which radio you're using?  Is it the RFM69W or the RFM69HW?

Tom


davinci

  • NewMember
  • *
  • Posts: 12
Re: Outdoor sensor node (Relatively low cost)
« Reply #31 on: December 18, 2014, 03:53:20 PM »
Allright. Sure, I would never believe a battery would last for 8 years..

I'm using the RFM69W on my nodes and RFM69WH on the gateway, flashing a SD Card with raspbian wheezy right now. Have not yet decided what solution to run on the RPi.

The system Felix built is quite interesting with NodeJS. But I also think OpenHAB is a good alternative with its modular/plugin based architecture and support for many home automation systems.




ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Outdoor sensor node (Relatively low cost)
« Reply #32 on: December 18, 2014, 04:01:40 PM »
I think the real answer is what you want to write code in, and how much tinkering you want to do.

I use python server-side and keep javascript on the client side, and have a handler for moteinos specifically that squirts data into databases for display. Works with stock code I've written for remote nodes as well.

The serial handler on the gateway is here:
https://github.com/iinnovations/iicontrollibs/blob/master/mote/serialhandler.py

The mote and gateway sketches are on there as well, but I have made a few edits since. The nice part is that if you have the handler running on the pi, when you connect a mote node and enable reporting, the io just magically appear as inputs on the Pi web interface and you may use them in channels.

I just set up a laboratory monitoring system for a buddy that I'll post about shortly that demonstrates, but this gives you a basic idea of how it works:
http://www.cupidcontrols.com/2014/08/adventures-in-moteino-remote-temperature-monitor/

Cheers,
C
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

kiwisincebirth

  • Jr. Member
  • **
  • Posts: 69
Re: Outdoor sensor node (Relatively low cost)
« Reply #33 on: December 19, 2014, 12:10:49 AM »
Just though I would I would share my (short) experience with battery powered Moteino.

I use 3 x AA Eneloop cells powering a remote temperature (DS18B20) sensor. The code sleeps puts the moteino to sleep as much as possible, but wakes up the radio to relay temperature value every minute, and battery voltage every 10 minutes, so 66 messages per hour in total. Every message is exactly 4 bytes. The battery voltage is monitored via 2 x 1 meg ohm series resistors (voltage divider), so there is a few micro Amps constant battery drain. I am located in Sydney, temperature ranges between 10 and 30 degrees C, as measured by the sensor itself.

See attached battery voltage profile.


TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Outdoor sensor node (Relatively low cost)
« Reply #34 on: December 19, 2014, 07:43:50 AM »
Thanks for telling us about your project.  I just wanted to let you know that there is a way to measure the voltage at the Moteino (won't be battery voltage if you're using the LDO) that doesn't require an external divider or added current.  Basically you read the internal voltage reference and calculate the analog reference voltage from the resulting ratio (because the internal reference is very accurate).

Here's some code that does it:
Code: [Select]
/******************************************************************************
*
* readVcc()
*
******************************************************************************/
unsigned int readVcc() {
  unsigned int result;
  byte saveADMUX;
 
  saveADMUX = ADMUX;
 
  // Read 1.1V reference against AVcc
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
  delay(2); // Wait for Vref to settle
  ADCSRA |= _BV(ADSC); // Convert
  while (bit_is_set(ADCSRA,ADSC));
  result = ADCL;
  result |= ADCH<<8;
  result = 1126400L / result; // Back-calculate AVcc in mV
 
  ADMUX = saveADMUX;  // restore it on exit...
  return result;
}

Cheers!

kobuki

  • Sr. Member
  • ****
  • Posts: 289
Re: Outdoor sensor node (Relatively low cost)
« Reply #35 on: December 19, 2014, 08:09:50 AM »
I'd like to add that on an unmodified Moteino this is not very useful as you also pointed out since it powers the chip via the 3.3V LDO. OTOH, the internal referenec sadly has some variance on the 328p, from ~1.0 .. ~1.2 V, so it should be calibrated before use. More info here.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Outdoor sensor node (Relatively low cost)
« Reply #36 on: December 19, 2014, 12:30:36 PM »
I'd like to add that on an unmodified Moteino this is not very useful as you also pointed out since it powers the chip via the 3.3V LDO. OTOH, the internal referenec sadly has some variance on the 328p, from ~1.0 .. ~1.2 V, so it should be calibrated before use. More info here.
Well I know that the specification table says 1.0-1.2V, but you look at any of the curves in the detailed part of the data sheet you will see that the range is more like 1.126-1.137 over voltage and temperature range, which makes sense since it is a bandgap source.  And it's also good enough for me to monitor battery degradation   ;)

Tom

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Outdoor sensor node (Relatively low cost)
« Reply #37 on: December 19, 2014, 03:05:34 PM »
Just though I would I would share my (short) experience with battery powered Moteino.
I use 3 x AA Eneloop cells powering a remote temperature (DS18B20) sensor. The code sleeps puts the moteino to sleep as much as possible, but wakes up the radio to relay temperature value every minute, and battery voltage every 10 minutes, so 66 messages per hour in total. Every message is exactly 4 bytes. The battery voltage is monitored via 2 x 1 meg ohm series resistors (voltage divider), so there is a few micro Amps constant battery drain. I am located in Sydney, temperature ranges between 10 and 30 degrees C, as measured by the sensor itself.
See attached battery voltage profile.

Wow pretty nice performance, thanks for sharing, still going strong at 3.65v, would be nice to hear back again about the performance, how long before it dies.