Weather station - design help requested

I'd like to use an Arduino to create a wifi weather station. Here's what I need: Wifi (TCP) to send and receive data. A one-wire interface to several weather devices. 2 interrupt lines, to handle signalling from other weather devices. An analog input to handle yet another weather device.

I've hit a wall trying to design a solution. The TCP wifi is non-negotiable; which seems to limit me to a Uno or Mega, since the Wifi shield apparently does not work with anything else. I don't see a one-wire solution for Arduinos in general (why??), so I was expecting to to use a Peter Anderson chip that converts serial commands to one-wire signalling. But to use serial ports I have to give up debugging over USB (except on the Leonardo, but the Leonadro doesn't seem to have a wifi solution.)

Am I using the wrong processor? I didn't expect this to be complex.

I suspect it doesn't need to be complex though. Now, you say you need to use WiFi, but there are a few solutions to having WiFi.

We need to know a bit more of the criteria of your project; Firstly, with the WiFi, what range do you need as a minimum? Is the WiFi to connect to a computer of sorts for display and other fancy stuff? Can you explain in more detail about your planed WiFi and or network topology? What reasons do you need to communicate back to the weather station, for polling for setting alarm trip points or other things? Is the weather station and its WiFi only communicating with one other device, say a computer, or is it more complex? Have you thought of not using a WiFi shield but a standard WiFi device, say Ethernet to WiFi unit. If the required range is long then you need to think about antenna type as well, directional or omnidirectional?

How do you plan to power the weather station, solar/batteries or on mains?

When you say

A one-wire interface to several weather devices

Can you describe more detail about that device, I assume it's an input sensor to the weather station, am I right?

The same for the

2 interrupt lines, to handle signalling from other weather devices

But can you explain why you need to use interrupt for what ever these devices are?

Ok, I can understand you want yet another weather device on a analogue input. Have you considered the type of data you are wanting to observe and collect, such as accuracy, repeatability, and resolution of data. When thinking of this, you need to match your sensors and the hardware that is going to read its data. Distance of sensors to weather station, are we talking a metre or 10 metres or more? On board storage? What happens on power outages. Is the weather station going to exposed to extreme weather conditions or other environmental conditions?

So, you see, for me, I would need more detailed information about what you are planning and about the situation before good advice may be offered.

It's great that you want to see if an Arduino will fit the bill, and I would say yes, definitely, but each project has its specific areas that need real consideration.

rockwallaby . . .

The TCP wifi is non-negotiable; which seems to limit me to a Uno or Mega, since the Wifi shield apparently does not work with anything else

Sound like you're sure about that. I'm not. At least the Leonardo work with the WiFi shield as well as most other Arduinos.

Your sentences give me the impression you already know everything about your project (although at least part of that knowledge is wrong) and you don't really need any help. There are several OneWire library out there but you haven't specified which sensors you wanna connect over the Dallas Semiconductor OneWire bus, so it's very difficult to help you there too.

According to SparkFun, where I planned to buy stuff, the current Wifi shield doesn’t work on a Leonardo because the Leonardo puts the relevant communications pins on a header that the shield doesn’t use.

Yes, I absolutely want to use TCP over Wifi. I had a commercial weather station that used something closer to Xbee, and reliability was horrible. Data routinely got lost, even over the small (< 100’) span. TCP will give me the retries and checksumming I need to get data reliably, and I already have a wireless network at the site, so I’d like to use it.

I want interrupts for the rain gauge and anenometer because polling for changes isn’t much of an option, not when the processor will occasionally be busy with analog inputs and TCP and one wire stuff. Interrupts are a simple way to get the data regardless of what’s going on, and allow simple debouncing of the inputs. I could use counter chips to keep count of the rain gauge and anonemeter events, but I don’t know how I’d debounce the inputs going to the counters. It’s easy in software.

I want one-wire for temperature and humidity because I already have one-wire devices for those things. Once I have the basic one-wire interface working, I can write the code to handle individual devices myself.

I was looking at offloading one-write to a one-wire controller chip (with a serial connection to the arduino) because the one-wire library I saw turned off interrupts for over 60 microseconds at a time, and I didn’t know how well that would go over with TCP code. But if people have had no problem combining TCP and the one wire library, I’ll happily dump the controller chip.

I want analog input for wind direction because I already have a sensor that reports direction with a varying resistance, so I can get varying voltage easily.

I have no immediate use for communicating back to the weather station, but since I’ll be using TCP anyway and TCP is bidirectional, I’m sure I’ll find uses for it eventually.

So I suppose my only remaining question is whether anyone’s had problems doing TCP and One-wire in the same processor. If not, I can probably use an Uno and a Wifi shield and get everything I need. (Or a Leonardo if someone can convince me SparkFun has it wrong.)

According to SparkFun, where I planned to buy stuff, the current Wifi shield doesn't work on a Leonardo because the Leonardo puts the relevant communications pins on a header that the shield doesn't use.

In this case, SparkFun is wrong. The WiFi shield is communicating over the SPI bus with the Arduino and is using the pins of the ICSP header which are available on all Arduinos. Check the schematics of the Leonardo and the WiFi shield to inspect it.

the one-wire library I saw turned off interrupts for over 60 microseconds at a time, and I didn't know how well that would go over with TCP code

That shouldn't pose any problems because the Ethernet shield code doesn't use interrupts but is polling the WizNet5100 chip.

I want interrupts for the rain gauge and anenometer

There are posts that the implementation of attachInterrupt in the current IDE is wrong for the Leonardo, so if you wanna use both interrupts you may have to use the low level functions and not the Arduino API.