WeatherShield - Battery voltage monitoring / Temperature readings [answered]

Started by darkcurrent, July 30, 2015, 09:10:18 AM

darkcurrent

Hello,

I have more questions about the WeatherShield:

1) I'm trying to monitor the battery voltage with the on-board voltage divider but the ADC reading always returns its max value of 1023 (same when I plug the Moteino to the USB port). The battery is made of 4 AA batteries providing about 6.1Vdc. How can I fix this problem ?
2) @Felix: How do I know that my WeatherShield boards are equipped with the new 1K FET pull-up resistor (I bought them early February).
3) During my tests, I noticed that the temperature readings were converging to finally become steady after, let say, 10 loops of 8sec. Is this normal ? For the future, I intend to read the sensors once every 5 or 10 min...

Thanks for your answers!

Felix

Hi darkcurrent,
The only way to know the 1K resistor is there is by measuring it.
See this forum post for the explanation of how the battery ratio is calculation and the limits where it maxes out.
There's a sample sketch I provided to read the WeatherShield via Moteino+RFM69 and one that is just Moteino standalone (no radio). The first sketch also shows how to read the battery correctly (enabling/disabling the FET circuit).
Please also visit this WeatherShield blog post for the latest updates for this sensor board.
The readings will stabilize depending on the environment. Even being closer to them your body heat/humidity might influence them. So a few loops is normal to see temps stabilize.

TomWS

Quote from: darkcurrent on July 30, 2015, 09:10:18 AM
Hello,

I have more questions about the WeatherShield:

1) I'm trying to monitor the battery voltage with the on-board voltage divider but the ADC reading always returns its max value of 1023 (same when I plug the Moteino to the USB port). The battery is made of 4 AA batteries providing about 6.1Vdc. How can I fix this problem ?
You need to replace at least one of the resistors in the divider network.  The WeatherShield divider network is only good to read up to 4.85 volts (assuming the Moteino is operating at 3.3V), anything above this will overdrive the analog input (and saturate the reading at 1023).  For 6.1 volt power source, identical resistors will give you a max reading of 6.6V.  You can fine tune this if you want, but it's probably easier just to use matched resistors.  As I've stated elsewhere, there is very little value in using 4 batteries in this case.  3 AA battteries will give you essentially the same battery life (probably longer due to PMOS transistor leakage - see next answer) and won't require any resistor changes.
Quote
2) @Felix: How do I know that my WeatherShield boards are equipped with the new 1K FET pull-up resistor (I bought them early February).
It's unclear exactly where the PMOS transistor threshold is, but the 1.5K/1K network is probably not sufficient to cut off the transistor with a 6.1V voltage source.

Tom

Felix

I endorse what Tom said about using 3xAA/AAA instead of 4x, and the WShield was designed to work with input voltages up to 5V, battery operated nodes, ideally Lithium polymer cells that have excellent energy density and are compact, providing 4.2v when fully charged and down to 3.3 when discharged. They last a long time and are great companions for Moteino/Weathershield as shown in my recent blog post about attic temp readings.

However because of the saturation limit on the WeatherShields at ~5V i might change the resistor network to 1Meg:2Meg and remove the need of the PFET in a future revision. This would allow a range up to about ~9V.

darkcurrent

@Felix

Still have a problem with the temp reading. See the graph that I did today.
The weather shield is sitting by itself, away from drafts. The sensor is still covered with its white protective cover.
I also modified the code for sampling 10 times then averaging but it doesn't change much...

Any clue ?
Thanks a lot.

Felix

You should not need to sample the temp readings. The sensor's job is to give you an accurate reading which you don't need to do any post processing on, that's why it's such an "expensive" sensor.
I'm not sure I understand what the issue is, from your last post you were concerned that it takes so long for the temperature to settle?
That's not really unusual, it depends on other factors like humidity and temperature of surroundings. So a 10 minute span to get a steady reading is not out of the ordinary although in general it should settle pretty quickly, within a few minutes as I've seen in my own practice.

darkcurrent

Thanks for your answer Felix.
To make it clear, the issue is that I'm really surprised that such a sensor takes so long to stabilize... (in this case 20 minutes considering one reading per minute). What would be the outcome if I would sample every 10 minutes as I wanted to do... Should I give a try with the protective cover removed and check if the readings converge faster?
As you suggested, I will remove the sampling and averaging loop.

Felix

Yes try taking off the cover filter. That's there to protect from excessive dust and humidity. Under normal circumstances that's not needed and all new WeatherShields don't have it.
You only have this one unit? Having another would allow a benchmark to see if anything is different under the same circumstances. Otherwise it's hard to guess why it's behaving that way.

All sensors are factory calibrated. They are reflowed here as part of the assembly, but are stored properly in advance to avoid any die delamination. They are then tested after assembly and cool down to ensure they are functional and read the expected room temperature. Since the readings are consistent (although "slow") I don't think there's any indication of a problem with the sensor die itself being damaged or anything like that.

darkcurrent

Right, I forgot to mention that I bought two Weathershields, both behaving the same way ;). So I will experiment without the cover filter and let you know through this tread.

Thanks again!

darkcurrent

Felix,

I took the cover filter off and it now works perfectly!

Cheers,
darkcurrent

TomWS

Quote from: darkcurrent on August 18, 2015, 01:15:32 PM
I took the cover filter off and it now works perfectly!
Seriously? Really?   Wow, these are supposed to work with the cover on!  The batch I just bought I purposefully paid more just to have the cover!  Go figure...

Tom

Felix

Oh interesting... that was from the first batch of WeatherShields where I used sensors with filters.
From my initial tests readings from with/without the filter were very similar so I didn't remove the filters.
All further batches were made with sensors with no filters.
Maybe that filter somehow got saturated from skin fats from touching it or something else?
Anyway good to know this is solved... thanks for the follow up.