Tuesday, January 31, 2012

SoWACS: The soil water moisture content measurement systems and sensors mailing list

If you've been following the soil moisture stuff I've been playing with you will have seen me referencing many others' work, both hobbyists and pros. This isn't new stuff, though it's poorly documented on the 'net and hard to find.

It turns out there's a mailing list dedicated to the topic - but you'd be really, really lucky to find it. Check the archives out here, they're seriously informative:


The group moved from its old hosting to Google Groups a while ago, but the best stuff is in the old archive on sowacs.com. It's a bit patchy, frustratingly, and there don't seem to be mbox files of the archives to download, but it's still very informative.

Monday, January 23, 2012

I've had it with HTC - thanks for the rescue, CyanogenMod + AAHK

HTC pushed an Android 2.3.5 update to my Vodafone Australia-branded HTC Desire HD. There was no changelog, and along with the Android update it turns out I get a new version of HTC Sense (yay?) with all sorts of animations I can't turn off and extra bloat.

Great work HTC, you made the phone faster, then ruined it with more pointless animation. At least the "no window animations" setting used to work in the old version...

Friday, January 20, 2012

Atmel Microcontroller (non-ATmega/ATtiny compatible) with built-in 433MHz (US: 310MHz) transmitter!

While researching parts for my soil moisture sensors I stumbled across these awesome Atmel microcontrollers:

I was so excited I had to share. At about AU$8 each, these little beasties might make building wireless soil moisture sensors so much easier it's just not funny. The main problem is going to be ordering them, since Jaycar and Element14 don't carry them, and DigiKey has them as non-stock components with 4000 unit minimum volumes. They're 4-bit 8051-architecture micros so they're not going to be compatible with the ATmega or ATtiny range, so I lose the advantage of having the same arch on sensor and control system. For something as relatively simple as sampling an analog temperature and humidity sensor that may not be a big problem.

It may still land up being easier to use an ATtiny for the analog sensor controller and digital sensor data transmitter, so I can use (mostly) the same software tools as for the ATmega on the control board. I could then hook the sensor's ATtiny up to either some wiring for wired service, or to an RF transmitter IC for wireless operation without much if any change to the sensor codebase.

Atmel also have a family of RF receiver ICs (with matching tx modules or transceivers available) so I might be able to avoid the need for a breakout board / shield for the RF receiver support and just make it an optional component in the base design. Things like the ATA5723 /ATA5724/ATA5728 and the ATA5745 /ATA5746 RF receiver ICs could be awfully handy at about AU$4 each ... if I can find someone who'll sell them to me in less than 1,500 unit quantities. If not, there are lots of other highly integrated 433MHz RF receivers and transmitter ICs out there.

The ATA8204P3-TKQY looks particularly suitable; it's a slower and cheaper unit without UHF, but that shouldn't be a biggie for my use. It's cheaper than any of the other units except the ATA8202-PXQW 19 on digi-key, and should do the job fine. It's surface mount so it won't be assembly-friendly, though. An alternative might be the ALPHA-RX433S from RF-Solutions as that's packaged as a little module that'd be a bit saner to solder up.

Tuesday, January 17, 2012

DIY DC soil moisture sensor - early test successful

Laptop connected to Arduino connected to flowerpot

On the the progressive difficulty scale of home built soil moisture sensors the bottom of the ladder is a DC soil conductivity sensor that uses simple resistivity measurement.

It took a couple of hours build one of those last night, most of which was spent incompetently attempting to produce a decent solder joint on steel wire and on the cleaned heads of galvanized nails. Anyone who can use a soldering iron without being a hazard to themselves and those around them should be able to whip something like this up in a few minutes.

Monday, January 16, 2012

Interested in soil moisture sensors and irrigation control? Start with the UF/IFAS virual extension series

I've been having ... "fun" ... trying to find a way to build an affordable network of soil moisture sensors that don't require too much looking after.

It's harder than you'd think, but this UF/IFAS Virtual Extension series on soil moisture and irrigation has made it a lot easier to understand the different approaches and sensor types. It'll help you understand the differences between resistive and capacitive soil moisture measurement, introduce alternatives like tensiometers, etc. This is important whether you plan to DIY your sensors or buy off the shelf.

Saturday, January 14, 2012

Using a RHT03 (aliases: RHT-22, DHT22, AM2302) temperature/humidity sensor from Arduino

I picked up a nice compact little temperature and relative humidity sensor called the RHT03 for a project from Little Bird Electronics. It and very similar parts appear to go by the names RHT-22, DHT-22 and AM2302. You can find the part at SparkFun, Adafruit, etc too.

It took a lot more work to get it working than I expected, so I thought I'd write it up here for anyone else who is looking into it. There's sample code at the end of this post, but you should probably read the details because this is a quirky beast.

UPDATE: I since found a library on GitHub: nethoncho/Arduino-DHT22 that does a better job more simply and compactly. It works fine with my sensor. It needed some changes for Arduino 1.0 and some further tweaks to work how I wanted, so I've uploaded a fork here: https://github.com/ringerc/Arduino-DHT22.

Thursday, January 12, 2012

Extending Arduino example CIRC-05 to use hardware SPI control

For kicks, I've extended the basic Arduino shift register LED control example CIRC-05 from www.oomlout.com to use the Arduino's hardware SPI routines instead of software signalling.

As someone who has done very little with low-level electronics and who didn't know what SPI even was until today, this was embarrassingly easy. Kudos to the excellent Arduino libraries and the great documentation for making this simple.

I'm posting the re-written example for CIRC-05 here. It has the original software-based control as well as support for SPI, so you can see how similar the methods are.

(BTW, if you were wondering what a "latch" is in the IC, see this example.)

SparkFun Inventors Kit CIRC-03 - Motor not working (spinning)? It's an error in the instructions

I've started playing with some basic tutorial/toy electronics stuff using the Arduino platform and the "SparkFun Arduino Inventors' Kit" (hardly "inventors'", but anyway...) after picking it up as part of an order from the awesome outfit Little Bird Electronics. While generally good, I've hit an interesting issue with the kit that's worth documenting for anyone else who has it.

The short version: If you're using the SparkFun kit that specifies a 10kΩ resistor and the test circuit doesn't work (the motor won't spin) you might need to use a lower valued resistor between the transistor and pin 9 of the Arduino board.

If this is the case, you'll find that when you flick the motor's drive around with your fingers so it spins, sometimes it'll spin down slowly and sometimes it'll stop suddenly, depending on whether the Arduino is currently trying to drive it or not.

Check for all the usual errors before assuming the issue described here is what's wrong with your circuit. You might've reversed the flyback diode, made a poor connection on a power rail, etc etc.