Author Topic: WeatherShield!  (Read 51815 times)

A

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

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

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

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

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

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

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

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

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

  • NewMember
  • *
  • 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.