Author Topic: WeatherShield!  (Read 51825 times)

A

  • NewMember
  • *
  • Posts: 43
WeatherShield!
« on: December 16, 2013, 07:08:45 PM »
Felix,

Not trying to rush you or commit you to anything for a future product; but what are your current thoughts regarding sensors if you ever put out a temperature/weather shield?

There are a few posts talking about DS 1-wire sensors, and at least one where you said you're a fan of the TMP36. I'm not opposed to spending some time and effort putting together my own shields for monitoring environmental conditions, I'd just rather any effort I spend to line up with the direction you think you'll go if you ever put out an item I'll be able to order pre-assembled down the road.


So this isn't another "quiz Felix to see why he hasn't give me a pony yet" posts, here are my limited observations based on the sensors I've played with. Some sensors are either humidity or barometric pressure in addition to temperature:

DS18x20 - Reasonable price. Nice resolution and accuracy, but like you've pointed out it isn't very friendly for battery operated devices. Unique serial number is a bonus.
DHT11 - Cheap, but it has crap resolution and accuracy and takes up a pin per sensor.
DHT22 - More expensive brother of the DHT11, Acceptable resolution and accuracy, still needs a pin per sensor.
TMP102 - Cheap. i2c but only has a couple of address options. Very nice accuracy & res, but comes in one of the smallest SMT packages I've ever seen so a breakout board is a must for prototyping.
MPL115A2 & BMP085 - Both of these are reasonably priced and provide decent temperature in addition to pressure. i2c, though the cost per sensor makes having multiple on a single uC unreasonable for just measuring temperature. Good candidates for outdoor weather sensors.

Also a page somewhere that has a list of all of the pins you're using across all of your projects would be awesome. I think I picked a good one to use with a DHT22 in D17/A3, but wasn't sure if you've got plans for it on an unreleased project.

(edit: Make title a statement not a question.)
« Last Edit: February 09, 2014, 08:43:23 PM by A »

hexibot43

  • Jr. Member
  • **
  • Posts: 78
Re: WeatherShield?
« Reply #1 on: December 16, 2013, 10:55:38 PM »
     I'm working on such a project right now.  I've started with a DS18S20  because it was locally available.  I have ordered 10 @ DS18B20 , and one DHT22.  I ordered them from Amazon and for some strange reason I'm being told I won't be receiving any of them until after the new year.  I'm guessing they are trying to get me to pay for delivery.  Not going to happen.  Anyway.  I got one node working well as a broadcaster of temperature.  It sleeps the majority of the time and every 5 minutes provides an update to the gateway.  I am still powering via USB.  I haven't yet moved to powering by battery.  When the DHT22 arrives I will  be setting up another NODE with that sensor, or perhaps just switching over.
     
     I'm not that far into this project that I wouldn't be opposed to making it more on a common structure.  Something that could be easily used by all.  So if you want any help I'm up for it.  I'm still getting use to Arduino coding, but I'm learning fast.  I've done most of my micro work in assembly so this is much faster.  So although I'm no Arduino expert and I'm not a beginner with micros at all.  These Moteinos with transceivers  are what I've been looking for a long time.  I can see a lot of project centered around them.   

     I was going to make another node that was to be a display unit.  And the gateway would be set up to deliver web pages of data.  Haven't done either of these yet.  Still working on getting the power usage down and as much as possible for the temperature node first and then move on.   

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #2 on: December 17, 2013, 01:16:39 AM »
Are you planning on having a Linux computer in the mix at all or is your project going to be uC only? My goals are mostly data collection for looking for home energy optimization opportunities, so I'm planning on feeding all of my data into a RaspberryPi with a Moteino-USB acting as an RF modem.

I've been following your DS18S20 thread waiting for an update on how your powering a DS18S20 via an IO pin experiment went. I'd recommend keeping the discussion about that in that thread though for some consistency. The SOIC-8 package (priced at <$3 in larger quantities) would work nicely for a production run of a temperature only shield.

The DHT22 is my current favorite sensor, as it seems to be in a sweet spot of price/performance and I think humidity is just as important as temperature for my project. I've got a HTU21D breakout on order from Sparkfun though with the holidays it might take a while to show up. It is in the $5 range at quantity, but it doesn't look like any of the usual places have any in stock, so lead time might be a pain.

tve

  • NewMember
  • *
  • Posts: 14
Re: WeatherShield?
« Reply #3 on: December 17, 2013, 02:55:31 AM »
Are you looking for a weather station or just temperature & humidity? I've been doctoring a 1-wire weather station with temperature, humidity, barometric pressure, rainfall, wind speed, wind direction for a number of years. I started with a 1-wire kit, then added a bunch of hobby-board sensors, then bought inspeed wind vane/anemometer when the old one I died, and now rebuilt the whole thing with the sensors I have, a JeeNode and a BBB to send the stuff off to CWOP, etc. It used to run with a 200 foot 1-wire cable from my basement linux box to the top of the hill, now I have the jeenode and BBB up there on ethernet. I've rewritten the code 3 times by now, porting from one platform to the next. Fun Stuff!
My recommendation would be not to skimp on the sensors. I really like the inspeed wind sensors and I love the DS temperature sensors. I have an HIH-4000 humidity sensor and I find it so-so. The hobby-boards barometric pressure sensor is very nice too.
At the end of the day, I'm measuring 4 analog voltages (humidity, wind vane, barometer, and soon solar radiation), I have two counters (rain and anemometer) and the 18S20 1-wire temperature. These things can be hooked up to anything pretty easily. I decided to do it all through 1-wire because I have the hobby-boards and attach that to the jeenode for expediency, but it would probably make more sense to hook the raw sensors all up to the BBB I/O directly.
WRT software, I've had to look at the code for each sensor at one time or the other to troubleshoot and calibrate. So by now rewriting it on a new platform is a piece of cake. It's actually also interesting to understand how it works.
I'm not giving you any answer really, but I hope this helps somehow...

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: WeatherShield?
« Reply #4 on: December 17, 2013, 08:34:04 AM »
Lots of nice input guys. I have somehow kept away from weather type data monitoring for a while because I was very focused on trying to get other things built. I have my kill-a-watt node that gathers my refrigerator consumption and also has a TMP36 in there reporting temp. That's about all I got right now in terms of temperature. I have played with DS18B20 sensors but I didn't really like them b/c they are slow. I have used i2c MLX90614/90615 infrared temp sensors, which are pricey but are instant and super accurate, used for medical apps.

Will something come up at lowpowerlab? Good question. It might, but probably not in the next few months. I see the PowerShield as a charger/booster/proto platform for people to use for such weather stations. You can just solder or connect your 2-3 weather sensors to the little proto area, coupled with a small lipo you can get 5V for the sensors that need that, and also feed the Moteino and anything else you need. Hoping to have that available soon.

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #5 on: December 21, 2013, 11:32:28 PM »
The MAX31826 1-wire temp sensor looks very interesting. Same 12-bit resolution, 0.5C accuracy as the DS18b20; but only 350-1000nA standby current (vs. 750-1000na), 650-1200uA active current (vs. 1000-1500uA) and it only takes 150ms to do a 12-bit temperature conversion (vs. 750ms).

Here is the datasheet: http://www.maximintegrated.com/datasheet/index.mvp/id/7400

I couldn't find any example code for arudino, but OWFS has support to reference if needed.

I think I'll get a couple ordered, and if I don't make a mess of soldering the smallish package, give them a try.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: WeatherShield?
« Reply #6 on: December 22, 2013, 06:19:55 PM »
More affordable too, the drawback being the TSOP package which is not breadboard friendly.

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #7 on: December 23, 2013, 12:58:00 AM »
Yeah, I'm going to solder on some (very small) wires, pick up a SMT breakout board, or have some boards for a shield made at OSHPark.

That last one will require expanding my workshop to include a toaster oven, but I've been looking for an excuse to do just that.

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #8 on: January 03, 2014, 01:02:40 AM »
I'm going to solder on some (very small) wires

I have some breakout boards on order, but I got a bit impatient so I did some of the finest pitch hand soldering I've ever done, and these are the results:

Code: [Select]
ROM = 28 8C F7 58 5 __ __ __
  Chip = DS18B20
  Data = 1 7F 1 4B 46 7F FF 1 10 33  CRC=33
  Temperature = 23.94 Celsius, 75.09 Fahrenheit
ROM = 28 E5 79 2F 5 __ __ __
  Chip = DS18B20
  Data = 1 80 1 4B 46 7F FF 10 10 C6  CRC=C6
  Temperature = 24.00 Celsius, 75.20 Fahrenheit
ROM = 28 23 F6 58 5 __ __ __
  Chip = DS18B20
  Data = 1 81 1 4B 46 7F FF F 10 71  CRC=71
  Temperature = 24.06 Celsius, 75.31 Fahrenheit
ROM = 3B E6 F 15 0 __ __ __
  Chip = DS1825/MAX31826
  Data = 1 77 1 FF FF F0 FF FF FF D0  CRC=D0
  Temperature = 23.44 Celsius, 74.19 Fahrenheit
No more addresses.

That is one DS18B20, two MAX31820s, and the MAX21826. The temperature variation could be due to the cyanoacrylate glue I used to try to support the hookup wires.

I used the library and example code from http://www.pjrc.com/teensy/td_libs_OneWire.html but added in a case for this chip after the other cases but before the default statement.

Code: [Select]
case 0x3B:
      Serial.println("  Chip = DS1825/MAX31826");
      type_s = 0;
      break;

It might not be the easiest to work with because of the tiny form factor, but the price might make it an attractive add-on for temperature or serial number needs for future shields.

pko

  • NewMember
  • *
  • Posts: 12
Re: WeatherShield?
« Reply #9 on: January 03, 2014, 03:23:36 AM »
I only see reading from 3x DS18B20 and 1x MAX31826.  Did you post the right temperature output? Or are the MAX31820 just a variance of DS18B20?
« Last Edit: January 03, 2014, 03:26:04 AM by pko »

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #10 on: January 03, 2014, 11:46:29 AM »
Or are the MAX31820 just a variance of DS18B20?

Exactly this. One of the 'Key Features' of the MAX31820 is "Software Compatible with the DS1822 and DS18B20" but with a lower budgetary cost. I had a couple on hand to test out (thanks Maxim!) so I figured I'd throw them into the mix as well.

Here is the datasheet if you're curious: http://datasheets.maximintegrated.com/en/ds/MAX31820.pdf

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #11 on: January 03, 2014, 12:19:49 PM »
I'm going to start laying out a shield with the intent of having it available on oshpark (open hardware/CC of course). Here is my list of priorities of what to cram onto the board; but if anyone has any input on what they would like, please chime in.

  • On board 1-wire temp sensor, footprint for multiple packages if possible.
  • Header for external 1-wire devices, not sure on connector type.
  • Header for DHT11/DHT22 humidity sensor.
  • On board BMP180.
  • Header for external i2c devices, not sure on connector type.

LazyGlen

  • NewMember
  • *
  • Posts: 48
Re: WeatherShield?
« Reply #12 on: January 03, 2014, 01:59:11 PM »
Ability to monitor Vcc? - Gives Moteino the opportunity to transmit "Please recharge or replace my battery!"
Micro SD card socket? - Allows nodes to store / archive data if no Gateway is available. Allows use of same shield on a Gateway to receive data from multiple nodes and store if no network is available. Allows Gateway to batch upload stored data (over say, a GSM link).
Real Time Clock? DS1337 or other 3.3v compatible clock. Data logging without an accurate-ish time stamp adds a big hurdle in interpreting the data.

Has anyone tried using a PCB trace antenna? I laid it out in AutoCAD and found that about 1.5 perimeters would provide the right length antenna for 413MHz. "Cut Here" marks could allow the other 2 frequencies to use the same trace. Analog RF design is WAY outside my knowledge base, so I don't know if this is even possible.

Clearly it depends on the situation, but I can envision a system of loggers on a nature trail that are out of range of any optimal receiver location. So they don't transmit regularly, but log data every period Tlog. During the wake up and log time they also activate the radio in receive mode. Every period Tcollect you travel the trail with a Gateway connected to a smartphone. When you come in range of a logger, it transmits a "Gimme data" request for 2X Tlog. Logger squirts data, you replace battery as needed and keep walking.

Hey, you asked! :P
« Last Edit: January 03, 2014, 02:08:20 PM by LazyGlen »

A

  • NewMember
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #13 on: January 03, 2014, 03:26:27 PM »
Ability to monitor Vcc? - Gives Moteino the opportunity to transmit "Please recharge or replace my battery!"

I think Felix has this planned for his power shield, and I'm already planning on ordering one of those for each of my sensor nodes, but I'll see if I can fit in two resistors and a capacitor for this function.

Quote from: LazyGlen
Micro SD card socket? - Allows nodes to store / archive data if no Gateway is available. Allows use of same shield on a Gateway to receive data from multiple nodes and store if no network is available. Allows Gateway to batch upload stored data (over say, a GSM link).

$4 for an SPI flash chip installed on a moteino is a great deal and can store gobs of readings.

Quote from: LazyGlen
Real Time Clock? DS1337 or other 3.3v compatible clock. Data logging without an accurate-ish time stamp adds a big hurdle in interpreting the data.

I like this idea, and I can see how this plus a uSD card slot would be great for a stand alone data logger, but it might be a bit more feature creep than I'd want in a weather shield. My intent is to always have this guys reporting data back to a gateway moteino + raspberry pi that will have NTP and possibly an RTC. A uSD datalogger+RTC shield would be a very cool separate project.

And as for your questions about the trace antenna, that might get more traction in a separate post.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: WeatherShield?
« Reply #14 on: January 03, 2014, 05:57:12 PM »
A few notes on your guys' conversation:

PowerShield:
It will contain a simple resistor divider+cap circuit for battery level detection, same as the one I used in the latest mailbox notifier project.
Been a bit lazy on this one but have a few minor tweaks to make and then have to order the PCBs, which is another 2 week wait. Sorry guys... lots going on.

4Mbit SPIFlash chips:
- the 4Mbit SPIFlash = 512KB, which is still plenty for lots of data logging, but not HUGE.
- the reason for a 4Mbit is because it's FAST as opposed to a larger chip, I did try several and I liked this one the most.
- you can always fit a 16, 64 or even 128Mbit flash chip on your Moteino but you'll have longer delays when erasing blocks or possibly huge delays when erasing the entire chip (I recall one chip I tried was 30 seconds).