Author Topic: WeatherShield!  (Read 34949 times)

A

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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: 6358
  • 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

  • Newbie
  • *
  • 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: 6358
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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

  • Newbie
  • *
  • 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: 6358
  • 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).

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield?
« Reply #15 on: February 09, 2014, 06:33:32 PM »
So I've designed a board that has a footprint for a DHT22 (pin A3); 1-wire (pin A2) routed to a TO-92 DS18*20, and to a uMAX8 MAX31826; a footprint for a BMP180 via i2c; and Vin monitoring that is connected to A6 for battery users (h/t LazyGlen). The i2c and 1-wire each go to 0.1" pin headers. The board measures 2.02x1.34 inches (51.21x33.91 mm) and has through hole and surface mount options for everything but the BMP180 and support capacitors, which are SMD only. If you're anti-surface mount, you can order a BMP180 breakout board from many different sites and use the i2c pin headers.

The first version of the board should be back from oshpark in a few days, and I've just ordered a set of revision 2 boards. Assuming things test out well I'll make the oshpark project available for order and upload the eaglecad files.

Here are some images of the second revision of the board:

Front:


Back:


LazyGlen

  • Newbie
  • *
  • Posts: 48
Re: WeatherShield!
« Reply #16 on: February 10, 2014, 01:17:24 PM »
A,

That looks nice! Is there a reason you have it set up for 4 different temp sensors? I did a quick perusal of the data sheets, I guess looking at the table shows each has a potentially valuable unique function.

DeviceTempHumidityPressureExtras
DHT22XX
DS18*20XTemp alarms
MAX31826X128B EEPROM
BMP180XX

LG

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #17 on: February 10, 2014, 04:28:03 PM »
That looks nice! Is there a reason you have it set up for 4 different temp sensors?

While both the DHT22 and the BMP180 have temperature sensors on them, the 1-wire sensors have higher resolution and accuracy over a greater temperature range. I also like that they unique serial numbers.

My design goal for this was to give people lots of flexibility in what they choose to monitor. I'm only going to use one or two barometric pressure sensors, but plan on having quite a few humidity/temperature sensor nodes. The surface mount element also played a part in my design choice for so many options as it still scares off lots of folks; but if someone like Felix where to pick up the design as a commercial offering, they might prefer to use SMD.


ColinR

  • Full Member
  • ***
  • Posts: 176
Re: WeatherShield!
« Reply #18 on: February 11, 2014, 06:02:59 PM »
Thought about using a 1Wire master like the i2c S2483? No need to hardcode sensors in this way if it works.
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #19 on: February 11, 2014, 07:49:27 PM »
Thought about using a 1Wire master like the i2c S2483? No need to hardcode sensors in this way if it works.

I don't understand your use of the term hardcode. AVRs are good at interfacing with 1-wire devices and there is a great library here for doing so.

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: WeatherShield!
« Reply #20 on: February 11, 2014, 08:32:16 PM »
Hey, that's great. I didn't realize these were all on the same pin. I've done single DS18B20s, but only as proof of concept. I never planned on this as a long-term solution, instead looking forward to a dedicated master.

Regardless, has anyone employed a 1Wire master on AVR?

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

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #21 on: February 11, 2014, 09:49:47 PM »
Hey, that's great. I didn't realize these were all on the same pin. I've done single DS18B20s, but only as proof of concept. I never planned on this as a long-term solution, instead looking forward to a dedicated master.

Regardless, has anyone employed a 1Wire master on AVR?

Thanks,
C

No problem. I've protoboarded it up quite a few times in development of this board.

Here are a few other examples from these forums:
http://lowpowerlab.com/forum/index.php/topic,256.0.html
http://lowpowerlab.com/forum/index.php/topic,261.msg1340.html#msg1340
http://lowpowerlab.com/forum/index.php/topic,219.0.html

and a few external links:

http://playground.arduino.cc/Learning/OneWire
http://bildr.org/2011/07/ds18b20-arduino/

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: WeatherShield!
« Reply #22 on: February 11, 2014, 10:30:44 PM »
Thanks for the links. I did use the OneWire library on an ATTiny to read a DS18B20, but couldn't fit the DallasTemperature library on there with my bootloader. Moving onward and upward..

My question regarding a dedicated master is based on a recommendation I had to not rely on the uC as a bus master for load considerations. I'll sift through the links, but do you know of any problems with 1Wire network length and nodes, or considerations otherwise? In practice, I'm sure I'll keep adding until I have problems and then deal with adding a master, but any existing data are helpful.

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

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #23 on: February 11, 2014, 11:39:43 PM »
'll sift through the links, but do you know of any problems with 1Wire network length and nodes, or considerations otherwise?

I could see this for long runs, timing and waveform shaping would be bigger concerns at distance. I've only gone a few feet between my AVRs and 1-wire devices, but have done so without issue.

A quick search turned up no hits for using a DS2483 with an arduino, so you might be writing your own libraries for that if you need it.

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: WeatherShield!
« Reply #24 on: February 11, 2014, 11:50:30 PM »
Oh yes, I spent loads of google-time on that. I2C libraries exist, so I don't think it would be terrible. Would be better if I could write it in Python ... coding an arduino takes me back a decade (more, to be accurate).
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: WeatherShield!
« Reply #25 on: February 12, 2014, 01:07:35 AM »
Promising:

http://forum.arduino.cc/index.php/topic,37333.0.html

https://code.google.com/p/arduino-ds2482/source/browse/trunk/DS2482.cpp?r=2

Code should port easily. I remembered the other comments had to do with echo and reflection suppression , as well as shape tolerance/handling. I'll see what happens.

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

sketchy

  • Newbie
  • *
  • Posts: 37
Re: WeatherShield!
« Reply #26 on: February 16, 2014, 07:49:27 AM »
i'm trying to get a better handle on picking parts for breakout boards and other pcbs...
For temp sensing, why not use the MAX7500 instead of the MAX31820?  Besides package, it seems the biggest difference is it uses i2c = which should be easy to read by an arduino sketch.

On digikey,
Max7500  at a qty 1 costs $1.73
MAX31820 at a qty 1 costs $2.97

DeKay

  • Newbie
  • *
  • Posts: 10
    • Mad Scientist Labs
Re: WeatherShield!
« Reply #27 on: February 16, 2014, 12:40:21 PM »
Hey guys.  I tripped over this thread by accident but it comes at a good time.  I have been working on some code that uses a Moteino to pick up the wireless transmissions from my Davis weather station.  Check it out here.  It is possible that you might have one of these outdoor units in your neighborhood and could leach off of it for free  ;)  Otherwise, the outdoor unit can be bought separately, and that gets you a high quality, solar powered instrument for giving you wind speed, wind direction, rain, outdoor humidity and optionally UV, solar, leaf wetness, and ground moisture readings.

I am now in the middle of writing up a blog post that details how I have emulated the serial interface used by the Davis console so that the Sandaysoft Cumulus weather station software can read from it and collect not only the outdoor data, but data from a BMP085 and a DHT22 to get indoor data as well.  This will go online today or tomorrow and I'll post a link when it is up.

It would be great if we could work together here to come up with something that would work for your needs for a transmitter and mine for a receiver.  Let me suggest the following.
- provision for a DS3231 clock module with something like this.  This would allow a receiver to track things like daily highs and lows, accurately timestamp observations, etc when not connected to a PC.  The Memory Module is bound to come in handy.  And this module takes a battery backup to keep time when powered off.
- why not just design for a header for a BMP180 module (three bucks on EBay) so you don't need to do the tricky soldering that package requires?
- just use the temperature data from the humidity sensor DHT22 if you are running tight on space or pins.  It isn't expensive and you often want to know one when you know the other.  It is accurate enough, and you get temperature when you read humidity anyway.
- consider standing the DHT22 upright on the board to make room for other stuff if necessary

I like the idea of designing for these inexpensive modules rather than discrete parts when you can.  That way stuff can easily be populated at a later date if you like and it keeps the overall build simple.

As an aside, it is very dry here and I've found that as I move my breadboarded prototype around, I often get a false burst of receive packets.  I think what might be going on is spurious RFM69 interrupts being generated thanks to static electricity.  I am going to try a pulldown on the interrupt line to ground to see if this cleans things up.  Anybody else ever see this?
« Last Edit: February 16, 2014, 12:55:59 PM by DeKay »

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #28 on: February 16, 2014, 06:41:00 PM »
For temp sensing, why not use the MAX7500 instead of the MAX31820?

MAX7500 is only 9 bits of resolution, mediocre accuracy, and lacks the unique serial number aspect of 1-wire devices. If you're goal is to tell if your PC, or industrial system is overheating then this chip would meet that goal. I'm happy to pay a few bucks extra when my goal is indoor temperature and outdoor weather sensing.

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #29 on: February 16, 2014, 06:48:50 PM »
- provision for a DS3231 clock module with something like this.  This would allow a receiver to track things like daily highs and lows, accurately timestamp observations, etc when not connected to a PC.  The Memory Module is bound to come in handy.  And this module takes a battery backup to keep time when powered off.

In my system I've got a raspberry pi with a RTC chip (and NTP) that I'm going to use for data recording. If you want to use my board design but with a real time clock, I've broken out the i2c headers and you can wire in one of these modules.

- why not just design for a header for a BMP180 module (three bucks on EBay) so you don't need to do the tricky soldering that package requires?

See above, re: i2c headers. As there isn't exactly a standard for pinout, I just did was was easiest based on the other components and traces.

- just use the temperature data from the humidity sensor DHT22 if you are running tight on space or pins.  It isn't expensive and you often want to know one when you know the other.  It is accurate enough, and you get temperature when you read humidity anyway.

I answered this in an earlier post, but in summary, I wanted higher resolution/accuracy than the DHT22 could offer and I've got plans for the unique serial number aspect of the 1-wire temp sensors.

- consider standing the DHT22 upright on the board to make room for other stuff if necessary

I thought about it but it was going to be awkward with how I planned on mounting the board + Moteino.

I like the idea of designing for these inexpensive modules rather than discrete parts when you can.  That way stuff can easily be populated at a later date if you like and it keeps the overall build simple.

And I like the idea of having things more compact and structurally secure without having to worry about jumper wires or building a board around a certain breakout board, but to each his own. With that said, getting your hands on BMP180s is nigh unto impossible these days so my SMT footprint for that sensor will remain untested.

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #30 on: February 16, 2014, 06:53:28 PM »
I got my order of rev1 boards in the mail and built one up. I've already got a couple of assembly/cosmetic things I'm going to change on the board for a revision 3 (pad size on the ds18b20 and DHT22 being most notable). But I think I'll wait for the r2 boards to come in to see if there are any more changes I want to make before ordering/publishing it.

Thanks for all of the feedback so far, keep it coming!


DeKay

  • Newbie
  • *
  • Posts: 10
    • Mad Scientist Labs
Re: WeatherShield!
« Reply #31 on: February 17, 2014, 12:15:04 PM »
I've finally completed my latest blog post that discusses how I use my Moteino to pick up wireless transmissions from my Davis hardware in the front yard, combine that with a couple sensors hooked up to the Moteino itself, and then emulate the Davis indoor console well enough that it works with Sandaysoft's Cumulus weather software.  Check it out if you are interested.


kobuki

  • Sr. Member
  • ****
  • Posts: 289
Re: WeatherShield!
« Reply #32 on: February 17, 2014, 05:43:17 PM »
I got my order of rev1 boards in the mail and built one up. I've already got a couple of assembly/cosmetic things I'm going to change on the board for a revision 3 (pad size on the ds18b20 and DHT22 being most notable). But I think I'll wait for the r2 boards to come in to see if there are any more changes I want to make before ordering/publishing it.

Thanks for all of the feedback so far, keep it coming!

Nice design! I'm in the middle of a project with a Davis weather station (inspired by the great work of DeKay) and the indoor sensors are going to be something similar to your design which actually has many similarities to the EmonTH, which is part of the Open Energy Monitor project, and I originally planned to buy that. Now I'm undecided :)

I'd like to have a few suggestions:

- IIRC the DHT22 contains a DS18B20/DS18S20 sensor for temperature measurements, so including another one as a discrete part is probably not necessary (the RH sensor needs a temp. sensor for linearity compensation)
- I'd also suggest looking at supporting another sensor, the Sensirion SHT11, which is used in the aforementioned Davis station, and said to be more accurate than the DHT22, also easily available and frequently can be obtained for a bargain on Ebay

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #33 on: February 17, 2014, 09:09:34 PM »
Nice design!

Thanks!

- IIRC the DHT22 contains a DS18B20/DS18S20 sensor for temperature measurements, so including another one as a discrete part is probably not necessary (the RH sensor needs a temp. sensor for linearity compensation)

While it does have a temperature sensor, it is not a DS18x20. The temperature resolution and accuracy are not as good as a DS18B20 and lacks a serial number. However my idea with the board is to let folks order them from oshpark and populate only what they want, so if the accuracy from a DHT22/DHT11 is good enough for your needs then you can save a couple of bucks by not populating all of the parts.

- I'd also suggest looking at supporting another sensor, the Sensirion SHT11, which is used in the aforementioned Davis station, and said to be more accurate than the DHT22, also easily available and frequently can be obtained for a bargain on Ebay

The datasheet for the SHT1x says that it can share a bus with i2c, though you'll have to swap protocols. Not sure how well this would work with the i2c code folks are using. Otherwise Felix's power shield (http://farm3.staticflickr.com/2830/11145098386_74c8cd41e9_o.jpg) would be a good option for a Moteino with a single SHT11 breakout board once he releases it.

KanyonKris

  • Full Member
  • ***
  • Posts: 113
Re: WeatherShield!
« Reply #34 on: February 18, 2014, 01:52:02 AM »
DeKay, wow, you dig deep. Some fine hacking to get a Moteino to receive the data from your Davis weather station. I'm tempted to get one just to see your hard work operate, but alas I've got too many projects as it is. Still, I admire what you accomplished.

DeKay

  • Newbie
  • *
  • Posts: 10
    • Mad Scientist Labs
Re: WeatherShield!
« Reply #35 on: February 18, 2014, 07:47:24 PM »
DeKay, wow, you dig deep. Some fine hacking to get a Moteino to receive the data from your Davis weather station. I'm tempted to get one just to see your hard work operate, but alas I've got too many projects as it is. Still, I admire what you accomplished.

Thanks KK!  The Davis stuff is pretty good, and you can buy it at a substanital discount if you go through places like Archer Trading Post.  I think you can also buy just, say, the outdoor unit from them to get your foot in the door.  But the console, as old and crunchy as it is, is really nice to have.  First thing we do when waking up in the morning is check it to see how heavy a winter jacket we need to put on!

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #36 on: February 25, 2014, 09:14:15 PM »
I built an R2 board over the weekend, here are some photos:




Please excuse the potato quality photos and the less than spectacular SMD soldering, I didn't bother with a stencil since I've already got changes planned.

As you can see in the first photo, the pads for the DHT22 & DS18x20 are smaller than ideal. The other issue that a friend pointed out is that I haven't added any way to power down the external sensors. The 1-wire devices have a small enough idle drain, but the DHT22 and the BMP180 (if I can ever source any) are sucking down way to much for long term battery power.

I'm thinking of using a mosfet off of D3 to turn on and off all of the non-1-wire sensors. Anyone see an issue with this? I might even add in a second fet in the style of http://jeelabs.org/2013/05/18/zero-power-measurement-part-2/ to rework the battery sensor pin.

Felix, and anyone else who wants to chime in, do you have a preferred SMD mosfet? It looks like p-channel is ideal for the battery voltage sensing, but I am more flexible for the sensor power.

pko

  • Newbie
  • *
  • Posts: 12
Re: WeatherShield!
« Reply #37 on: February 25, 2014, 11:44:37 PM »
D3 is also tied to INT1.  So I suggest you start from D4 and up and only use D3 if you run out of pin.  This will reserve the Interrupt pin for future use without the hassle of reassigning the pin.

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #38 on: February 26, 2014, 01:08:52 AM »
D3 is also tied to INT1.  So I suggest you start from D4 and up and only use D3 if you run out of pin.  This will reserve the Interrupt pin for future use without the hassle of reassigning the pin.

D3 is the last pin that isn't being used by something onboard or the garagemote and I'd like to be able to stack a weathershield and a garagemote to get data in my garage. Though now that I'm typing this up, I will have wall power in my garage. Alright, D4 with the ability to not have the aux-power fet and bypass it so that the sensors are always on.

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #39 on: March 01, 2014, 11:33:37 PM »
Rather than adding in a transistor to turn on and off the DHT22, I added in a footprint for a very low power humidity/temp sensor, the Si7021. I've done my best to follow the design guide and put it on a semi-isolated island of PCB, but OSHPark doesn't guarantee cutouts, so it is a bit of an adventure. It has the same footprint and a the same basic i2c command set as the HTU21D which can be purchased on a breakout board from Sparkfun if anyone wants to try one out. The price for the sensor from Mouser is only $4.27, much better than the ~$10 for the DHT22.

I also added in a 3.5mm screw terminal for power, with a solder blob selector to go between using VIN and connecting directly into the 3.3V line, bypassing the voltage regulator (useful for AA battery power from what I understand.) Another addition is a second method for measuring VIN voltage, this time using a design from JeeLabs. Though I didn't have room for a through hole mosfet without increasing the board footprint, so if you're not keen on surface mount, you'll have to stick with the always on voltage divider.



A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #40 on: March 14, 2014, 12:26:13 AM »
I've just built a couple of these, and everything seems to be working great. At this point the only thing I'd change is the screw terminal type up a size from 2.54mm to 3.5mm pitch.



I've set the project on OSHPark to public, pricing is currently "$13.45 per set of three."

I'm still working on combining all of the different sensor code blocks together, once I'm happy with that I'll toss it up somewhere.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6358
  • Country: us
    • LowPowerLab
Re: WeatherShield!
« Reply #41 on: March 14, 2014, 07:22:17 AM »
That's really nice outcome, thanks for sharing this project!

V00d00blues

  • Newbie
  • *
  • Posts: 2
Re: WeatherShield!
« Reply #42 on: April 15, 2014, 11:09:39 AM »
Hello, I'm new around here, but I've been lurking for a while now.  What I was wondering is if you could post up the board file for your Weathershield? I'm interested in ordering/building one, but I'd need to get a stencil done up from Oshstencils before I would even begin to attempt to solder any of the SMT devices. 

Thanks!

Andy

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #43 on: April 15, 2014, 01:05:41 PM »
What I was wondering is if you could post up the board file for your Weathershield?

Hit the download button at the bottom of the OSH Park page to download the .brd that I uploaded.

V00d00blues

  • Newbie
  • *
  • Posts: 2
Re: WeatherShield!
« Reply #44 on: April 16, 2014, 01:02:49 AM »
Thanks a bunch!

Andy

hexibot43

  • Jr. Member
  • **
  • Posts: 78
Re: WeatherShield!
« Reply #45 on: April 17, 2014, 03:26:18 AM »
A,

     I still can't believe how small some of these devices on your WeatherMote are.  The Si7021 is making me realize how much I need glasses!  Almost 50 and feeling it.  Thank you.  I'll definitely be moving away from the DHT22.  Your board was perfect for me.  I liked the BMP085 too.  When I started all this I was looking for commonly used sensors that work easily with the Arduino.  I wish I had thought more of power consumption when I started all this knowing I wanted to run on battery power.  I really like the footprint of the Si7021 over the DHT22 too.  But I would never have been able to get that chip on the board.       

     Is there a schematic to the R3 board?  And do you have a direct link to your OSH files?  I see you have set up a voltage divider circuit, and was interested in giving that a go.

      I am really liking the Ds18b20s and they will work perfect for me to monitor temperatures within my Aquaponics system.  I'm thinking of having 11 three pin headers all connected in parallel.  One to connect to your weathermote, and the others for DS18b20s        Also thinking of using a simple micro to allow mapping based on position on this board, rather than by ID numbers of the DS18b20s.  Postion 1 temp, position 2 temp, etc,..  I don't want to have to change my code if I have to change out one of the sensors.  Just change out the sensor, and I'm done.  I was thinking of mimicking the DS18b20s on the 1 wire bus with simplified ids of 0 through 9.  And make it so the whole thing could be plugged in like a single DS18b20. 

     Keep up the good work. 

     And Yes I am using a Raspberry PI as my gateway.  Almost ready for prime time.  I haven't gone live online yet.  Been testing the database and webpages.  Not sure how it will deal with public access.  Perhaps not even a good idea.

.   

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #46 on: April 17, 2014, 12:11:14 PM »
I still can't believe how small some of these devices on your WeatherMote are.  The Si7021 is making me realize how much I need glasses!  Almost 50 and feeling it.  Thank you.  I'll definitely be moving away from the DHT22.  Your board was perfect for me.  I liked the BMP085 too.  When I started all this I was looking for commonly used sensors that work easily with the Arduino.  I wish I had thought more of power consumption when I started all this knowing I wanted to run on battery power.  I really like the footprint of the Si7021 over the DHT22 too.  But I would never have been able to get that chip on the board.       

It was how quickly a DHT22 drained a 9v on a buddy's board that made me want to find a lower power option for humidity sensing. The size was a bit intimidating, but after watching videos about SMT soldering from Felix and others, I figured it was worth a shot. Now it feels like I'm working with giants when I have to use through hole parts.

Is there a schematic to the R3 board?  And do you have a direct link to your OSH files?  I see you have set up a voltage divider circuit, and was interested in giving that a go.

I'll put up the schematic as soon as I remember to.

I am really liking the Ds18b20s and they will work perfect for me to monitor temperatures within my Aquaponics system.  I'm thinking of having 11 three pin headers all connected in parallel.  One to connect to your weathermote, and the others for DS18b20s        Also thinking of using a simple micro to allow mapping based on position on this board, rather than by ID numbers of the DS18b20s.  Postion 1 temp, position 2 temp, etc,..  I don't want to have to change my code if I have to change out one of the sensors.  Just change out the sensor, and I'm done.  I was thinking of mimicking the DS18b20s on the 1 wire bus with simplified ids of 0 through 9.  And make it so the whole thing could be plugged in like a single DS18b20. 

Quite a few of the 1-wire parts have address pins to address (rimshot) this issue. The MAX31826 for example has 4 bits of address so that you can get info on position in the circuit in addition to unique serial number. Since you're doing probes, the best idea I can come up with is a 1-wire thermocouple breakout like this guy: https://www.adafruit.com/products/1727 where each position has values set via the address pin. Looks like that might be a spendy option though.

Keep up the good work.

Will do, I'm actually waiting on some boards from OSH Park that are Moteinos with an line of sensors above the upper pins.

And Yes I am using a Raspberry PI as my gateway.  Almost ready for prime time.  I haven't gone live online yet.  Been testing the database and webpages.  Not sure how it will deal with public access.  Perhaps not even a good idea.

Screen shots (with addresses blurred) would be nice. Otherwise having your raspberry pi push the data to an AWS instance if you want to show off without tipping over your RPI.

thinkpeace

  • Newbie
  • *
  • Posts: 27
Re: WeatherShield!
« Reply #47 on: April 24, 2014, 06:24:41 PM »
This project is of interest to me, as I am working on a garden sensor which measures soil moisture along with temperature and humidity.  I'm using the DH22 for temperature and humidity.

I am curious as to what is a good solar radiation shield to use with the sensors?

It looks like the cost anywhere from $30 to $130.  Are you using a ready-made shield, or are you building your own?

Eric

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #48 on: April 27, 2014, 04:01:51 PM »
Here are the schematic and board file of R4 for this board. Sorry that I was so long in getting these uploaded, I wanted to clean up the schematic a bit before releasing it.



I think that this will be my last project with through hole options. Between component options getting more and more limited in through hole packages and how easy it is to do at home surface mount, it just isn't worth it. Being able to order boards and stencils for mere pennies of what they used to cost sure helps a bunch as well.

Here is a teaser of the evolution of this project:


A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #49 on: April 27, 2014, 04:03:00 PM »
It looks like the cost anywhere from $30 to $130.  Are you using a ready-made shield, or are you building your own?

I actually haven't yet. I've been having so much fun making boards that I've kind of lost sight of the original goal I set out with.

Let us all know what you come up with and how it works out for you.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6358
  • Country: us
    • LowPowerLab
Re: WeatherShield!
« Reply #50 on: April 28, 2014, 08:30:03 AM »
Sweet ! ;)

andrewmoss

  • Newbie
  • *
  • Posts: 1
Re: WeatherShield!
« Reply #51 on: July 12, 2014, 04:55:28 AM »
any news on your newest prototype?  It looks awesome. 

A

  • Newbie
  • *
  • Posts: 43
Re: WeatherShield!
« Reply #52 on: July 12, 2014, 03:57:49 PM »
any news on your newest prototype?  It looks awesome.

No news, sorry. I had to shelve this guy to work on a project with a definite timeline. I hope to get back to this fall, though with all of the empty board space on Felix's Moteino MEGA I think I might take it in that direction.

2cvman

  • Newbie
  • *
  • Posts: 9
Re: WeatherShield!
« Reply #53 on: December 28, 2014, 09:25:04 AM »
Am I correct in thinking that the shield contains the remote sensors and a TX?
What is at the Rx end of things???
Any links to code?

Cheers
Peter

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6358
  • Country: us
    • LowPowerLab
Re: WeatherShield!
« Reply #54 on: December 28, 2014, 09:41:53 AM »
What is a "TX" and an "RX"? You mean the transceivers?
This is a shield and a Moteino mounts above or below it, that is how you get the data to your receiver (Moteino or RFM69 powered arduino).
A weather shield simiar to this is in the beta at LowPowerLab and is expected to be produced sometime in the near future. It will contain a BMP180 temp/pressure and si7021 temp/hum sensors.

2cvman

  • Newbie
  • *
  • Posts: 9
Re: WeatherShield!
« Reply #55 on: December 28, 2014, 10:55:49 AM »
@Felix tanks for reply.
By Tx I mean Transceiver sorry.
Interested in remote the  Temp/Humidty module.

steve v

  • Newbie
  • *
  • Posts: 18
  • Country: us
Re: WeatherShield!
« Reply #56 on: August 09, 2016, 03:39:51 PM »
I see in the SI7021 data sheet that it has an embedded  64 bit unique serial number.  As I am building a network of 60+   weathershield nodes, I would like to have them each self identify their  unique serial number, and then send the temperature.

I haven't seen any examples of people reading SI7021 Serial numbers over I2C yet.   Has anyone here seen similar code and if so can they point me to it please ?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6358
  • Country: us
    • LowPowerLab
Re: WeatherShield!
« Reply #57 on: August 10, 2016, 10:35:55 AM »
I see this is actually a serial number specific to si7021, mentioned on p24 of the DS.

I haven't tried this but there are 2 functions in the si7021 library which you can use to read those registers that hold these bytes:

Code: [Select]
int SI7021::getSerialBytes(byte * buf) {
    _writeReg(SERIAL1_READ, sizeof SERIAL1_READ);
    _readReg(buf, 6);
 
    _writeReg(SERIAL2_READ, sizeof SERIAL2_READ);
    _readReg(buf + 6, 6);
   
    // could verify crc here and return only the 8 bytes that matter
    return 1;
}

int SI7021::getDeviceId() {
    byte serial[12];
    getSerialBytes(serial);
    int id = serial[6];
    return id;
}

FWIW the 4MBIT flash mem chips on the Moteinos also include a 64bit MAC id. There are examples how to read that in the RFM69 Node example.

FYI There will be a new WeatherShield rev which will rely on BMP280 rather than Si7021.