Previous Articles »
« Recent Articles

Strange Oscillations

Tuesday, July 5, 2011 by darco

I stuck one of my soil moisture sensors in a potted plant last Friday before I left for a weekend trip. It was working fantastically. I watched as the soil moisture reading increased as I added water to the plant—working exactly as expected. However, when I returned Monday evening, I noticed that the values were all over the place. I took some samples on 100ms intervals and plotted the results:


Oh my. It's oscillating with an amplitude of around 10% of the capacitance reading. Not only that, my readings are an order of magnitude larger than what I was getting on Friday—when if anything they should be smaller.

I'm wondering if the 60Hz mains frequency is somehow affecting my readings, which would imply that what I'm looking at is the alias of 60Hz sampled at whatever interval I'm polling sensor. The power company regularly adjusts the frequency by ±1Hz or so, which could explain why I didn't notice the ripple earlier (Slight changes in the mains frequency would yield large changes in the alias frequency). This doesn't explain the large increase in the reading, however.

I also noticed some interesting behavior back on Friday. Whenever I grasped the stem of the plant, it caused the moisture level to increase. This makes sense, now that I think about it, but the implications are that each soil moisture sensor may have to be individually calibrated for differences in soil type, amount of soil in potted plants, etc. Not ideal, but not a show-stopper either.

Obviously, still some kinks to work out.

I hope to have the wire protocol solidified this week, at which point I'll actually deploy a few of these things in the yard to see what kind of readings I get. Should be interesting.

Final Soil Moisture Sensor Design

Tuesday, June 28, 2011 by darco

I think this is the final re-design of the soil moisture sensor that I will be sending off to Gold Phoenix for panelization and a small production run.



Just seven parts: two capacitors, three resistors, one ATTiny25 and a circuit board. I switched over to largish surface-mount parts and an edge connector instead of a standard 3x2 header. This board will be able to temperature-compensate using the on-board temperature sensor on the ATTiny25. I've also increased the length of the sensor to nine inches. Here is the schematic:


By my calculations I should get back around twenty to thirty boards. Should be more than enough to cover the front and back lawns and the garden. Now to just work out how to wire them all up...

Soil Moisture Sensor Update

Friday, June 24, 2011 by darco

I've heard a lot of feedback on my soil moisture sensor project, and I wanted to update everyone on how it is going.

Last weekend I did a lot of work on these devices and I've made some significant progress. I now have the firmware to a point where I can remotely communicate with the sensor, perform readings, etc. I've also made a few observations after working with the most recent board layout.

Read the rest of this entry »


Wednesday, May 11, 2011 by darco

Now that I'm a fully-committed git user, I now find myself using the git svn clone command fairly often. One problem with this command is how the authors are translated: Subversion uses simple usernames for the author-ids, whereas git uses full email address lines. You can supply an 'authors file' for git to use to look up author email addresses, but for large projects on Sourceforge that just becomes unwieldy.

Luckily, recent versions of git-svn support the --authors-prog argument, which allows you to specify a program to use for the lookup process instead of an authors file. With the right authors-prog, you can have git-svn automatically look up the name and email address for a given Sourceforge user id. And that's exactly what this bash script I wrote does.

If you want to make sure the program is used for future fetches from svn, then set svn.authorsprog to point to the location of sf2email:

git config svn.authorsprog ~/bin/sf2email
Read the rest of this entry »

Git Out

Monday, April 18, 2011 by darco

About a month ago, I started making a concerted effort to use Git. I mean, heck, Synfig development has been using Git for a while now, and I wrote it. I figured it was about time to learn once and for all what all the fuss was about.

I had been aware of Git for years, but could never quite wrap my Subversion-oriented head around it. I've known about Linus Torvalds' infamous disdain for version control since 2004. Like him, I learned to hate CVS. Unlike him I was quite fond of Subversion, and found Linus' complete dismissal of it confusing. It wasn't until Bitkeeper that Linus finally figured out that there was something to this whole version control thing.

BitKeeper was not only the first source control system that I ever felt was worth using at all, it was also the source control system that taught me why there's a point to them, and how you actually can do things. — Linus Torvalds 1

Now, after a month of using Git heavily, I finally understand what Linus was talking about. I am now a convert—Git represents a clearly superior way of group collaboration.

Previously, all of my code was hosted on From now on, all of my publicly-available open-source projects will be available from I've already migrated most of the public projects over (Including ybox2 stuff), and this is where all future development will take place.

I'll be updating past posts and pages to point to the new Github-hosted repositories over the next week or two. If I've skipped migrating a project, let me know and I'll make sure I get it copied over.

6LoWPAN Cat Feeder

Saturday, March 12, 2011 by darco

2011-03-06_17-30-16_2231I just wanted to point out that while I'm lagging quite far behind in my own 6LoWPAN-based home-automation system, it seems that yzf600's project is moving ahead at full steam. He just recently created "World's First 6LoWPAN Cat Feeder", based on a wireless controller board of his design.

Now I want one. I guess I had better get back to working on this stuff.

IM-Me Spectrum Analyzer

Monday, February 28, 2011 by darco

narrow At some point I ran across Travis Goodspeed's fascinating blog, and after some poking around I found his post about hacking the GirlTech IM-Me toy. Curious, I did some googling and found Michael Ossmann's $16 Pocket Spectrum Analyzer. At that point I make a realization. I must have one.

But... It's so... Pink. So... I plasti-dipped it.


As you can see from the debug header, it is still a work in progress. This is my first attempt to use plasti-dip as a device coating, so some parts didn't turn out quite as well as I had hoped—but at least it doesn't reek of a tween-age girl's toy.

Just to prove that this device is in fact now a sophisticated scientific instrument and no longer a toy, here is a picture of it showing my iPad's 3G signal as it loads John Gruber's blog:


Read the rest of this entry »

Updates and Musings

Sunday, February 27, 2011 by darco

Late last year I decided that I need to go ahead and get my workshop finished before I continued my work on my home automation network. Since that time I never seemed to find the proper time to get back to working on it. The longer I wait, the more difficult it will be to get back up to speed. I've got a lot of parts just waiting to be soldered up in the garage, but due to the recent construction work on the house, the garage (and, thus, my workshop area) is a total mess. Grr...

I'm looking forward to getting back to work on the home automation front. From what I can tell, there is still no CC2350 or ATmega128RFA support natively in Contiki, so it sounds like I may have to do the heavy-lifting myself after all.

Previous Articles »
« Recent Articles