WeatherDuino Forum
Another Oz build - Printable Version

+- WeatherDuino Forum (https://www.meteocercal.info/forum)
+-- Forum: Weather Stations - WeatherDuino Pro2 Line (https://www.meteocercal.info/forum/forum-4.html)
+--- Forum: General Talking (https://www.meteocercal.info/forum/forum-23.html)
+--- Thread: Another Oz build (/thread-525.html)

Pages: 1 2 3 4


Another Oz build - spudstrawb - 04-06-2016

Hi all
I've been building my boards slowly over the last couple of weeks (a few other things have been getting in the way). Tonight I gave everything a test run. The RX unit and WD unit appear to function fine at this early stage. The TX unit functions (TX led flashes every 5 or so seconds) but the temperature and humidity don't report correctly. The serial monitor gives me this output in debug mode:

DataPacket ID0: 161,0,-31272,-31272,0,0
Sensor 0 - Temp: -312.72 Hum: -312.72
Sensor 1 - Temp: 0.00 Hum: 0.00

The sensor is one of these:
http://www.ebay.com.au/itm/1PC-HTU21D-Temperature-Humidity-Sensor-Breakout-Board-Module-HOT-/400771977800?hash=item5d4fdf1248:g:rQUAAOSwGvhUEriX

I purchased 2. One is working just fine in the RX unit, the other is in the TX unit and gives the weird temperatures. If I swap them over, the RX unit still reports okay and the TX unit still reports incorrectly.

I have it configured as:
// --------------------------------------------------------------------------------------
// Define type of Temperature / Humidity sensor used as Sensor 0 and / or Sensor 1
// --------------------------------------------------------------------------------------
#define TH_Sensor0 1 // [SENSOR 0] - 0 for SHT2x sensor, 1 for HTU21 sensor, 9 for Not Used
#define TH_Sensor1 9 // [SENSOR 1] - 0 for SHT1x sensor, 1 for DHT22 sensor, 9 for Not Used

As the HTU21D has both SHT21 and HTU21 markings, I also tried
#define TH_Sensor0 0
but the unit seems to lock up. The TX led only gets through a couple of flashes (then no more) and nothing reports in Serial Monitor.

Any help would be appreciated.

I also hooked up the Davis anemometer. Wind direction seems to come through okay, but nothing comes up for wind speed.

Also, I understand that I have to adjust R6 to 10k. Where do I measure across for this reading?

Cheers
Graeme


RE: Another Oz build - AllanG - 04-06-2016

Hi Graeme and congratulations on being so close to complete success!!

Although not from the same ebay seller, I've also had problems with an identical board marked SHT21 and also HTU21. I'm fairly certain that if you get a (very strong in my case!) magnifying glass and have a look just under the tiny "window" on the chip you'll see it is SHT21.

I don't know why it's locking up when you define that sensor in software or why the Davis isn't registering windspeed but I'm sure Werk_AG or someone else will be along with some thoughts - which software version are you using and which TX PCB board??

Allan.


RE: Another Oz build - spudstrawb - 04-06-2016

Thanks Allan. As you say, it definitely has SHT21 and HTU21 markings. I tried once again setting it to SHT21 but the same thing happened. I got the first 2 flashes from TX led, then nothing.

The board is TX v3.1.2 and the software is TX_v2.0_b009.

This has all been a good experience for me. I'd not done anything with Arduino stuff before, so I've learnt a bit there. It was a bit confronting at first but it's quite simple once you've done it a couple of times.

This might be the problem... I found this quote from Werk_AG in another thread:
"The question is, the SHT2x series communicates using the I2C protocol, which implies that you also have to install the I2C bus extender Philips chip on the TX unit, which is not required for the SHT1X series."

I haven't installed an I2C bus extender. I'll either get hold of one or else get an SHT1X sensor.

I have another problem now. My WD unit is locking up. Once it gets the values from the RX unit, either the screen goes white or it locks up (the 2 dots stop blinking).

Hopefully there aren't too many more issues to overcome.


RE: Another Oz build - spudstrawb - 05-06-2016

One step forward, followed by another step backwards. I've ordered an I2C bus extender from ebay, so hopefully that sorts the outside temperature and humidity issue. I've also commented out some lines in the software so that the WD unit doesn't report the outside temp and humidity. That has stopped the WD from locking up (so hopefully that issue will also be sorted when the I2C bus extender turns up).

It's raining outside, so I've connected my existing Lacrosse rain sensor to the TX unit. No rainfall registered at first, so I took the cover off the rain sensor to make sure that the tipping buckets weren't being stopped by a spider web (it has happened before). Nothing there, so I tipped the buckets several times manually, then I cleaned the contacts on the RJ11 plug. After those things, the WeatherDuino reported 0.6mm of rain. It continued to rain but the quantity didn't go any higher. So I took the cover off the rain sensor again and this time checked the switch and magnet, plus tipped the buckets more times. This made the rainfall reading go up to 2.1mm but once again, additional rain hasn't seen the amount rise any further. I might check which way the arm is tipped and then check again a bit later to see if it is tipped over the other way or not. Once I get it all sorted I will have to calibrate the rain sensor.

Baby steps at this stage, but onward and upward.


RE: Another Oz build - werk_ag - 05-06-2016

Hi Graeme

(04-06-2016, 12:42)spudstrawb Wrote:  This might be the problem... I found this quote from Werk_AG in another thread:
"The question is, the SHT2x series communicates using the I2C protocol, which implies that you also have to install the I2C bus extender Philips chip on the TX unit, which is not required for the SHT1X series."

I haven't installed an I2C bus extender. I'll either get hold of one or else get an SHT1X sensor.

To use the HTU21 or an SHT21, the I2C bus extender chip is not absolutely necessary, but you have to connect your sensor to the connector marked as I2C, not the one marked with SHT2X/EI2C.
With a 2 par twisted cable up to 3 meters you shouldn't have any problem. (Ex: One par - VCC and SCL, other par - GND and SDA)

I don't know if the HTU21 share the same sensitive elements that the SHT21, but one, can't be read using the reference of other. So if you are using a HTU21, in the software, choice an HTU21, exactly as you did.

Quote:I have another problem now. My WD unit is locking up. Once it gets the values from the RX unit, either the screen goes white or it locks up (the 2 dots stop blinking).

This issue is happening certainly because the WD unit, is receiving a wrong temperature value. Don't do anything on it until the wrong temperature readings are solved.

Quote:I also hooked up the Davis anemometer. Wind direction seems to come through okay, but nothing comes up for wind speed.

Also, I understand that I have to adjust R6 to 10k. Where do I measure across for this reading?

If you are using a Davis Wind Vane, don't care about adjusting the R6 pot, it is only used for the the Fine Offset vanes. The JP2 jumper should also be left open.

Regarding the wind speed readings, recheck the connections again. Remember that the pin out of the original Davis RJ12 connector, is not compatible with the WeatherDuino Pro2 RJ12 connector. Please do a search on the forum, there is a topic about this matter with a diagram of the required connections.

Also check user configurable options on the software, default values are set for Fine Offset instruments. For Davis wind instruments they should be:

Code:
#define WSpeedSensor_Type 30  

#define WDirSensor_Type  30

Thank you, and please let us know how things are going.

Edited: Seems you have posted the last message, almost at the same than I wrote this one


RE: Another Oz build - spudstrawb - 05-06-2016

Quote:To use the HTU21 or an SHT21, the I2C bus extender chip is not absolutely necessary, but you have to connect your sensor to the connector marked as I2C, not the one marked with SHT2X/EI2C.

Success!! Thanks Werk_AG. That's one thing out of the way. I've changed my WD back to normal again and it is reporting properly now.

Quote:If you are using a Davis Wind Vane, don't care about adjusting the R6 pot, it is only used for the the Fine Offset vanes. The JP2 jumper should also be left open.

Thanks for this info. JP2 jumper was already open.

Quote:Regarding the wind speed readings, recheck the connections again. Remember that the pin out of the original Davis RJ12 connector, is not compatible with the WeatherDuino Pro2 RJ12 connector. Please do a search on the forum, there is a topic about this matter with a diagram of the required connections.

I had already replaced the plug with an RJ12 plug with the different pin configuration. I couldn't find my crimping tool though, so I just used multi-grips to attach it. I'll have another look for my crimping tool and have another crack at it.

Code:
#define WSpeedSensor_Type 30  

#define WDirSensor_Type  30

This had already been set in the config stage.

There might be a problem with my rain sensor as it just stopped reporting to the Lacrosse station in the last week or so as well. So I don't know if the problem is with the Lacrosse rain sensor, the Lacrosse external unit or the Lacrosse internal unit. It regularly loses the connection so that's all I thought it was, but I haven't been able to get it to report rainfall again.

Thanks for your help Werk_AG.


RE: Another Oz build - spudstrawb - 05-06-2016

I found my crimping tool, so I cut the RJ12 plug back off again and put a new one on. Wind direction and speed are now working. I just need to get the rain sensor sorted now and then I can progress to boxing it all up and installing sensors, sorting RPi etc. Slowly getting there.

I'm not planning to have any UV or solar radiation sensors at this stage. We don't have town water where we are, so we rely on catching rainwater from the roof and storing it in tanks. I currently have a tank water level device which is connected to my main PC via serial cable (15m) and a USB to serial adaptor. Is there any way that I can get that to report onto the WD display in place of the Srad and UV rows? It would be great if I could.


RE: Another Oz build - Wizza - 05-06-2016

Spuds, Did you get your rain sensor working..??? Is it a wired typed, to the external unit..??? The rain sensor should be pretty easy to work out. Basically, its like a switch, and simply closes then opens again, each time the bucket tips. You should be able to set your multimeter to 'ohms' or continuity, and see/test if the switch is closing on each tip. When the bucket sits at rest, you should see no continuity or an open circuit, then just at the point of tipping from one side to the next, hold the bucket there, and you should see zero ohms (or thereabouts), or a short circuit / tone (depending on your meter and how it operates). I bought a second hand rain sensor, and had to replace the little reed switch to get it going. I picked one up from Altronics, but should be easy enough to find.

Mark R


RE: Another Oz build - werk_ag - 05-06-2016

(05-06-2016, 07:40)spudstrawb Wrote:  ... I currently have a tank water level device which is connected to my main PC via serial cable (15m) and a USB to serial adaptor. Is there any way that I can get that to report onto the WD display in place of the Srad and UV rows? It would be great if I could.

Hi Spuds,

With some code customization almost everything will be possible to do with the WeatherDuino Pro2.
What type of output you get from your tank water level device?
Is it a voltage output? Is it linear with the water level?


RE: Another Oz build - spudstrawb - 05-06-2016

(05-06-2016, 21:47)Wizza Wrote:  Spuds, Did you get your rain sensor working..???

Not yet Mark. I'll bring it inside and give it a birthday. Hopefully I can get it operational again, otherwise I'll have to buy a new one.

(05-06-2016, 22:51)Werk_AG Wrote:  Hi Spuds,

With some code customization almost everything will be possible to do with the WeatherDuino Pro2.
What type of output you get from your tank water level device?
Is it a voltage output? Is it linear with the water level?

Thanks Werk_AG. If I connect to the gauge using hyperterminal, I get the following output:
Code:
a2586b0c0d0e0f0g0h0ia2585b0c0d0e0f0g0h0i
The output comes about every 5 seconds and the above is 2 lots of output (each lot starts with "a" and then the water depth value in mm, and then the rest of the string "b0c0d0e0f0g0h0i"). So there are 20 characters in the string. If there was less than 1m of water depth, then the string would have a "0" after the "i" in order to keep the 20 character string. I guess that it's a voltage output but I really don't know.

One other question - the file "data_structs.h" has a list of Davis functions and a note that not all of them are functional in WeatherDuino. Out of curiousity, are "uint16_t monthRain;" and "uint16_t yearRain;" operational in WeatherDuino?