Monday, February 20, 2012

Make Your DIY Davis Datalogger Work With Weatherlink

Progress comes in fits and starts.  That is why the iPad preceded the iPad 2,  why there had to be light before there was a light bulb, and why there had to be a Martin Sheen before we were fortunate enough to get a Charlie Sheen.
I Need To Come Up With Better Examples
So it is with reverse engineering.  First I figured out how to get a computer connection to a Davis weather station console without buying their overpriced Weatherlink software / hardware combo.  That was all well and good, but my DIY interface didn't have datalogging capability until a tip on a wxforum post gave me the clue I needed to implement that too.  This was my iPad 2.

What's that you say?  The release of the iPad 3 is imminent?  Drat.  Indeed it is.  I need a problem to stretch this dubious metaphor even further.  And that problem is the fact that Davis software products like Weatherlink and the firmware updater don't work with the DIY interface and logger.  The software would scan through all the ports on my laptop and pause at the COM port assigned to the USB to Serial Adapter, but wouldn't initiate communications to it.

I thought that Davis was likely doing some kind of factory initialization on the flash chip that I was not privy to, and I wasn't going to bother disassembling the firmware image to figure out what I needed to do.  Cumulus works great and is free for personal use, and the Weatherlink software has been beaten to death with the ugly stick.  It burns my eyes.
Windows 95 Called - They Want Their GUI Back
Still, this problem bugged me.  Until now.  Enter belfryboy.  He is the Mr. Watson to my Alexander Graham Bell, the Dr. Watson to my Sherlock Holmes, and the supercomputer Watson to my Ken Jennings.  belfryboy is the guy who designed the schematic and PCB layout for a DIY logger.  He's made the Eagle design files publicly available and he'll even build one for you if you want.  He also lives in the UK, where they add a superfluous "u" to many words for no particular reason (the phrase "for no particular reason" is also superfluous in that sentence when you think about it, but I'm not about to start letting "thinking" get in the way).

It turns out this problem was bugging him too.  He took a different approach.  What if it had nothing to do with some factory initialization?  What if it was a handshaking issue?  So he started playing around and actually got it to work!!!  Here is what you need to do, and this applies to both a straight serial or a USB to Serial interface to the console.
  • Connect CTS to RTS
  • Connect DSR to DTR to DCD
  • Make sure to use the 1Mb dataflash chip.  The console will not recognise the datalogger with larger capacity flash chips, even though it will log to it
To illustrate this, I opened up the Sparkfun USB to Serial converter schematic in Eagle.  The dashed lines show the changes that need to be made.
A Pretty Standard RS-232 Hardware Handshaking Dance
This is a pretty easy job to do on the back of an RS-232 DB-9 or DB-25, but you'll need a steady hand and some good soldering skills to do it on the FTDI chip on these USB to Serial converters.  The connections are mostly not adjacent to each other, so it will take more than just a simple solder bridge between pins.  Time to break out the 30 AWG wire.

But maybe you aren't up for this?  belfryboy has got you covered once again, as he has a new version of the DIY datalogger in the works and will build you one if you'd like.  He'll also be making the design files available once again for anybody to build their own.  I'll put up a link to them on this blog once they are available.

I have to take my hat off to belfryboy because this solution wouldn't have occurred to me.  Ever.  The console does not have any lines for hardware handshaking, just TxData and RxData.  Why didn't Davis just ignore hardware handshaking in their software instead of hardwiring it on to the logger board?  It makes no sense, but that is the way it is.

By the way, please spare me any wailing about how this encourages piracy of the Davis software.  There are many legitimate reasons for enabling this functionality in a DIY interface.  Here are a few.  There are others.
  • Your Davis branded logger got zapped and no longer works (happened to belfryboy himself)
  • You've got a Davis branded USB logger that is dropping out all of the time
  • You've got multiple consoles and want a DIY version for the second one
  • You've got the Davis branded logger but want to build a DIY wireless version of the interface
  • You want to use the Davis updater software to update the firmware in your console
I haven't tried implementing this hardware handshaking fix myself yet.  Unfortunately, it seems that I have somehow fried my console after digging in to its innards one too many times.  I had thought it was just the LCD that was blown, but I got a replacement and that isn't working either.  These are the hazards when you mess around like I have been.  C'est la vie. This is going to put a temporary hold on any progress on my alternative wireless console, but rest assured that I will pick it up again once the new console arrives.

So there you have it.  A DIY datalogger that has 100% of the capabilities of the Davis version, and more than two weeks before the antipated announcement of the iPad 3.  That's how we roll here at Mad Scientist Labs.


  1. Is there a way we can contribute to the hardware fund to replace your console? I've benefited from your work and would like to help fund a replacement...


    1. Thanks Ben, but I've got it covered. Whenever someone asks if they can help out, I suggest they consider donating to a charity of their choice. There are a lot of people, animals, and causes that need the money more than I do. I enjoy hearing back from people who have chosen to do so, so let me know if you do.

  2. Done. I dropped $50 to the MSPCA (humane society).

    BTW it was great to see your progress on decoding the on-air protocol!

    1. That is pretty awesome of you Ben. This made my evening. And a fine choice of charity as well: our dog means a great deal to my wife and I, and we are strong supporters of animal welfare. Thank you very much!

  3. Does anyone have these design files uploaded yet. I'm not able to find them for the new layout. I'd like to make one of these. Thanks

    1. I haven't asked belfryboy on wxforum yet for the new design that works wth weatherlink. Shoot him a PM and I'd think he'd be happy to.

  4. This work on the older Davis Systems Like the Monitor ii? My logger got zapped and not longer works and not spending 150 in something build in 1997!!!!!!!!

    1. Some of those older units have a different interface. It should work on anything that has the 20 pin expansion port on the back.

  5. Does the data logger from belfryboy allow a connection to a PC, or does it just log the data

  6. Hi,
    This blog is very impressive about data logger. This is very pretty article about this blog to do the work with weather link .