Transmission of logged data to a PC via XBee

vindog59

New Member
:eek: Firstly, I apologize to all you experts out there as I've only just become aware of PicAxe and its potential, but one has to start somewhere!

My challenge is to log soil moisture and temperature at about 4 sites in a vineyard remote by up to 200 metres from a base station (PC).

After doing quite some reading on-line, I think I have a reasonable knowledge of the devices available and options that I might need. However some general advice as to the correctness of my choice of PicAxe hardware (below) would be gratefully accepted before I order parts.

Project Specs:
multi-site logging, 4 channels per site, data every 15 minutes or so (384 readings per logger total per day), transmission of data <=200 metres to a PC from each logger at weekly (2688 readings or more) or greater intervals.

Hardware:
at each logging site- an AXE110P datalogger kit with AXE034 clock enhancement and 24LC256 EEPROM, an AXE210 connect board, extra PICAXE 18 chip and XBEE 2.4GHz module, enhanced aerial for the range required .
at the PC- an AXE210 connect board with XBEE 2.4GHz module and MAX3232 chip instead of PICAXE chip
 

ciseco

Senior Member
Hiya,

For 200m, it might be worth getting either the xbee's with external connectors for separate antennas or use xbee pro's (cheaper way). The axe210 is a good starting point to learn from but probably wont give you what you want "out the box" as it comes with on board wire antenna xbees and the voltage regs wont deliver enough power for the PRO version, although from my tests it's just enough to run one on the PC interface if you turn the power down a notch (can do it from the editor) and the recieve sensitivity is better. I've just done a PCB for SMT stuff which has on board voltage regs for the PICAXE and the required 3.3v voltage divider for the Xbee, it's about the same size as a PRO, just going to re do it without 5v reg as my design is going to have the PICAXE running at 3.3v also, hopefully the end result will be a board containg a SMT 28x, the interface and the vol regs that'll be no larger than the xbee it's self, it's purpose is to be as small and as compact as possible, if you dont publish the design (as it's not yet finished) I'll mail you what I have now, no support mind! and no help with those tiny tiny 0.1uf SMT caps, they are a sod to see when soldering.

I'll have in weeks an 08M version also which would happily suffice for moisture and temp if thats all you need in a sensor, but thats not as important as the 28 version currently.

Miles
________
Ford CHT engine picture
 
Last edited:

vindog59

New Member
Thanks Miles,

Finding out some of the pitfalls is exactly what I was hoping for, thankyou. I had concluded the pro XBEE was the go and I am looking into the, aerial, power supply issues, 3.3V reg etc. The remote loggers will be Lithium battery powered and backed up by solar chargers (at least that is what I have in mind). Space is not a problem for me as the sensor/logger system is out in the paddock- the sensors I might add are gypsum blocks driven by a very simple square wave circuit. The output of that interface is 0-1.5V which should go into the ADC inputs of the picaxe. It would be useful to have temp and humidity at the logger but that is as complicated as it gets.

Keep me posted and I will let you know how I go with the prototype here in due course.

Thanks

Glenn
 

moxhamj

New Member
A number of us are working on this problem. It isn't quite as simple as it first appears - not many units go 200m and those that do tend to use more power, and then the whole solar charging issue becomes significant as well. There are commercial units but I note they are not solar powered and they charge a maintainance fee per acre (to change the batteries...). Self contained and self powered makes a lot of sense. The temperature and humidity and moisture sensor are relatively easy. The harder part is managing the solar power to prevent over charging batteries while keeping them always charged even on cloudy days and getting the range for a reasonable cost. I'm finishing soldering up a board tonight ready for field tests in the next few days, and I'm waiting on some new RF modules which hopefully will come in at the lowest $ per 100m of transmission range. One thing I found from the last series of field tests that ran for a couple of months was the solar cells need to be hugely over rated. An average of 20mA current draw needs at least a cell capable of 300mA to cover cloudy days and short winter days.

Best advice is to buy a few parts and start doing experiments.
 

MFB

Senior Member
Try a 433MHz link

As you are moving a relatively small amount of data, you really don’t need the kind of data rates offered by a 2.4GHz link. A 433 MHz link would be cheaper (Malin Electronics do a transmitter and receiver set of modules for under £10) and have a much better range/power consumption performance than xbee.

There’s a lot of very useful forum information on how to interface with such modules. Try doing a search under 433MHz.
 

geoff07

Senior Member
How are you measuring soil moisture? I have tried this a few ways without much success, including using a tensiometer (bought from a garden centre), which in my example seems to need to be saturated before it triggers. If you know of a reliable low cost device I would appreciate learning of it.
 

moxhamj

New Member
Soil moisture is just resistance and the simplest test is to stick two metal stakes in the ground, solder wires onto them (angle grinder/lots of heat/zinc chloride flux), then measure the resistance with a multimeter. The biggest problem is the huge range - from a few k up to a few meg = at least 1000 to 1. So you need to switch in different resistors eg with a 4051 in series with the ground. Switching 1k, 10k, 100k and 1M gives a pretty good dynamic range. Then you need to calibrate that with how stressed the plants look, and the depth of the plants' roots and the depth of the stakes.
 

ciseco

Senior Member
Hi,

For me solar isn't an issue (unless a pound here or there in cost is), I have a couple of solar powered ones. Sending the xbee to sleep and reducing the clock on the PICAXE is all thats needed to negate this, I'm using 200ma ish panels (about ?10-15). Using a large enough cell (2x12ah 6v in mine) keeps it going for 2 weeks without need for charge (on full time, is months by powering down Xbee etc) and they self monitor to warn of low battery status, plus it'll never overcharge the batteries, it's not got enough oomph to. The axe210 board without LEDS runs at about 52ma, 70-75ma with them in place. I'm just starting to use everything at 3.3v and expect to realise a few more ma saving by removing the vol regs and will go to LiPo 3.7 cells and 4.5v solar cells (cheap again from ebay, got 10 x 50ma ones the other day from someone in china for about ?2 each, 4 of these should be fine and are quite small)

200 meters is easy enough, but again costs in higher gain antennas come into it (ebay is best source), depends on environment, having plenty of experience in 2.4Ghz I've personally done 5.5 miles (just) with similarly powered devices (PRO) but required 24db parabolics (damn expensive and takes radiated power over the EU limits by a few db from memory I think 19db is the max at 100mw). A couple of cheap wifi 7db omnis and a pig tails would easily do 200m in open space. I've just bought some toshiba laptop internal wifi antennas for pence off ebay and seem to work quite well. Looks like I'll have to do some quantitive measurements when I get time with the various antennas I have.

I'd expect a couple of PRO's with the onboard wire antenna to do 200m in open space, maybe when it stops blowing and raining I'll go try it (biggest storm of the year here now, wind turbine is putting out nearly 50 amps 24v in blasts, I dont feel too happy looking at it)

The place I'd go for a sensor is this guy in the states, I've had plenty of other stuff off eric, he's a nice guy

http://www.hobby-boards.com/catalog/index.php?cPath=21

He used to do a white gypsum block, might be worth asking why eric has changed, it might be from experience.

Cheers

Miles
________
vapir no2
 
Last edited:

papaof2

Senior Member
Gypsum blocks tend to degrade over time; the standard recommendation is that they be replaced yearly. The newer granular matrix sensors appear to have much longer life.

Tensionometers work better in some soil types than in others, but can give very accurate results.

In all cases, the sensor needs to be at the root level of the plants of interest, whether 6" or 24". The ideal measurement is done with sensors at two levels; based on the changes from day to day, an average is taken unless a limit value is read - which always indicates a need for water: http://www.ext.vt.edu/pubs/rowcrop/442-024/442-024.html

There is a method for calibrating the readings from a gypsum sensor to the actual % of water in the soil: http://www.hwr.arizona.edu/globe/globe3/SMGypsum.html

List of articles about gypsum and other sensors: http://www.sowacs.com/sensors/gypsum.html

Since the resistive sensors (gypsum, granular matrix) need an AC excitation voltage, you could use PWM from a PICAXE through a low pass filter (square wave excitation does not work well) http://www.sowacs.com/sensors/gypsum.html{/URL] I'm sure there are several people on the forum who can show how to measure AC resistance with a PICAXE (and maybe a few other chips). John
 
Top