WXforum.net

Weather Station Hardware => Davis Instruments Weather Stations => Topic started by: DanITman on May 24, 2011, 11:12:08 AM

Title: New VP2 owner, need data logging cable
Post by: DanITman on May 24, 2011, 11:12:08 AM
I just received my Wireless VP2 and I would like to start collecting data. I'm aware of all my software options but I'm wondering where I can pick up a serial/usb cable.  Since I don't need the software I'm finding this to be very hard.  I might have to create it on my own but I would rather just pay the money and purchase one.  Anyone have a spare they want to sell?

I'm looking forward to contributing on this site.  It has already proven to be a great resource while deciding what to purchase and where to place my weather station.

I have big plans to incorporate the data collected into my irrigation system to better my watering schedules.  

Thanks
Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 24, 2011, 11:20:21 AM
You already have the serial data logger?  If not, you can search DeKay's posts and see how to make a direct connect from the Console to your PC.  Otherwise you need a logger (~125 bucks).  If all you need is a serial to USB converter, there are scads of them for cheap at dealextreme.com  Get one with the Prolific chipset.
Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 24, 2011, 11:24:51 AM
No I don't have the logger but I'm wondering where I should purchase one.  I have read DeKay's post and have considered making a direction serial connection.  I just find it hard to pay $125.00 for something that can be made for under $10.  I almost wish someone would start selling just the cable because I think you would have a market for it.
Title: Re: New VP2 owner, need data logging cable
Post by: dalecoy on May 24, 2011, 11:40:55 AM
No I don't have the logger but I'm wondering where I should purchase one.  I have read DeKay's post and have considered making a direction serial connection.  I just find it hard to pay $125.00 for something that can be made for under $10.  I almost wish someone would start selling just the cable because I think you would have a market for it.

It's not just a simple cable.  And I don't remember anybody saying that a copy/equivalent can be made for under $10. 
Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 24, 2011, 12:02:17 PM
No I don't have the logger but I'm wondering where I should purchase one.  I have read DeKay's post and have considered making a direction serial connection.  I just find it hard to pay $125.00 for something that can be made for under $10.  I almost wish someone would start selling just the cable because I think you would have a market for it.

It's not just a simple cable.  And I don't remember anybody saying that a copy/equivalent can be made for under $10.  

It all depends on the type of cable you are building.  You could keep the cost low by just doing a serial cable.  If you want USB the cost of the cable goes up.  I've built a similar cable for another project and the cost was around the $10 mark.

Here is one piece you will need if you want USB.  The cost is $15

http://cgi.ebay.com/FTDI-USB-RS232-TTL-Converter-FT232-FT232RL-3-3V-/120648223859?pt=Vintage_Electronics_R2&hash=item1c1731cc73

Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 24, 2011, 12:08:49 PM
TO reiterate, the Davis logger is NOT a simple serial/USB cable.  It contains logging circuitry to retain the data from the station.  If you build your or Dekay's cable you WILL NOT get that memory and if it burps, you lose the current data and subsequent till it feels better.
Title: Re: New VP2 owner, need data logging cable
Post by: SlowModem on May 24, 2011, 12:14:38 PM
No I don't have the logger but I'm wondering where I should purchase one.  I have read DeKay's post and have considered making a direction serial connection.  I just find it hard to pay $125.00 for something that can be made for under $10.  I almost wish someone would start selling just the cable because I think you would have a market for it.

You know how you can buy a printer cheap but the toner is outrageous?  That's how Davis dataloggers are.  It's a pretty good racket for Davis.
Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 24, 2011, 12:19:10 PM
How are you planning on incorporating the data into your irrigation system? I use a home automation program called HomeSeer, and import the data into it from VWS to do similar control.

FWIW, I've made a simple RS-232 serial cable for the VP2 console for about $25 in parts. As Bushman points out, it doesn't include a logger, buy the app for which I built it doesn't use the logger data, at least not at this time.

I used an off-the-shelf 3.3 v logic level to RS-232 adapter and a 2mm dual row header from Digi-Key.
Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 24, 2011, 01:34:41 PM
How are you planning on incorporating the data into your irrigation system? I use a home automation program called HomeSeer, and import the data into it from VWS to do similar control.

FWIW, I've made a simple RS-232 serial cable for the VP2 console for about $25 in parts. As Bushman points out, it doesn't include a logger, buy the app for which I built it doesn't use the logger data, at least not at this time.

I used an off-the-shelf 3.3 v logic level to RS-232 adapter and a 2mm dual row header from Digi-Key.

I'm glad you asked :)  I currently use a product called EtherRain.  Its and IP based irrigation controller that works very well.  It's has a well documented API and the guy who invented it wrote the Homeseer driver.  I've been playing with it for some time and I love it.

http://board.homeseer.com/showthread.php?t=136596

I want to use it to measure rain fall rates to determine when to water.  Right now I just use a rain sensor but I want something more accurate.  I can calculate how much water my lawn needs daily and then see how much rain it has received.  I would eventually like to calculate evapotranspiration as this is a more accurate number.  I think I'll need Solar Radiation Sensors to calculate this.

You can also use EtherRain in combination with their website lawncheck.com.  It allows you to set schedules and it uses Yahoo weather to predict rain and check rain fall rates. 
Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 24, 2011, 02:25:34 PM
Because of your interest in irrigation control, you might want to check out my SLOweather.com website. There you will see 2 different indexes, the Watering Index, and the Irrigation Index.

I created the Irrigation Index before I learned about the Watering Index.

The Irrigation Index is the running total of the last 7 days of rainfall subtracted from the running total of the last 7 days evapotranspiration or ET, as measured and calculated by the SLOweather weather station.

That tells you how much water in inches to put out this week.

The Watering Index was created by a California DWR engineer and is the percentage of the last 7 days running ET/highest weekly average ET for your area * 100.

On SLOweather, I've enhanced the WI by subtracting out the last 7 days rain from the ET to give a better representation.

Bottom line, get the solar sensor and use ET. You won't be sorry.



I'm glad you asked :)  I currently use a product called EtherRain.  Its and IP based irrigation controller that works very well.  It's has a well documented API and the guy who invented it wrote the Homeseer driver.  I've been playing with it for some time and I love it.

http://board.homeseer.com/showthread.php?t=136596

I want to use it to measure rain fall rates to determine when to water.  Right now I just use a rain sensor but I want something more accurate.  I can calculate how much water my lawn needs daily and then see how much rain it has received.  I would eventually like to calculate evapotranspiration as this is a more accurate number.  I think I'll need Solar Radiation Sensors to calculate this.

You can also use EtherRain in combination with their website lawncheck.com.  It allows you to set schedules and it uses Yahoo weather to predict rain and check rain fall rates. 
Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 24, 2011, 03:02:17 PM
Because of your interest in irrigation control, you might want to check out my SLOweather.com website. There you will see 2 different indexes, the Watering Index, and the Irrigation Index.

I created the Irrigation Index before I learned about the Watering Index.

The Irrigation Index is the running total of the last 7 days of rainfall subtracted from the running total of the last 7 days evapotranspiration or ET, as measured and calculated by the SLOweather weather station.

That tells you how much water in inches to put out this week.

The Watering Index was created by a California DWR engineer and is the percentage of the last 7 days running ET/highest weekly average ET for your area * 100.

On SLOweather, I've enhanced the WI by subtracting out the last 7 days rain from the ET to give a better representation.

Bottom line, get the solar sensor and use ET. You won't be sorry.



I'm glad you asked :)  I currently use a product called EtherRain.  Its and IP based irrigation controller that works very well.  It's has a well documented API and the guy who invented it wrote the Homeseer driver.  I've been playing with it for some time and I love it.

http://board.homeseer.com/showthread.php?t=136596

I want to use it to measure rain fall rates to determine when to water.  Right now I just use a rain sensor but I want something more accurate.  I can calculate how much water my lawn needs daily and then see how much rain it has received.  I would eventually like to calculate evapotranspiration as this is a more accurate number.  I think I'll need Solar Radiation Sensors to calculate this.

You can also use EtherRain in combination with their website lawncheck.com.  It allows you to set schedules and it uses Yahoo weather to predict rain and check rain fall rates.  

Very Cool, I love this.  What are you using to control your irrigation?  Do you need the UV sensor to calculate ET? Can you give me an example on how you would use the watering index % to determine how much to water your grass?

I also notice you are comparing 10 years worth of ET.  Are those the numbers you have collected?

Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 24, 2011, 04:58:22 PM

Very Cool, I love this.  What are you using to control your irrigation?  

Right now, an old controller that HS turns on and off. I think I'm going to check out your EtherRain referral, though. :)

Quote
Do you need the UV sensor to calculate ET? Can you give me an example on how you would use the watering index % to determine how much to water your grass?

All you need is the solar sensor, not UV. The Davis ET calc uses solar irradiance, wind, RH, and BP to calculate the running daily ET value from midnight.

For people with newer controllers than mine, it's pretty easy. The controller is set to water 100% for the highest weekly average ET. Here in California, that's usually in July.

Then, once a week, check the Watering Index, and set the knob or whatever on the controller to that percentage. The controller automatically adjusts each station accordingly.

I haven't gone overboard with getting my adjustments just right yet, because we only water about 100 square feet of turf for the dogs, some raised beds for veggies and flowers, and a native plant bird-and-butterfly garden that requires almost no supplemental water in the summer.

In HomeSeer, it's easy to pick up the station data from VWS and then script to control relays directly, or, like I do, just keep the controller from opening the solenoids.

Quote
I also notice you are comparing 10 years worth of ET.  Are those the numbers you have collected?

The State of California has a listing somewhere on-line of highest average ETs for various locations in the state. I got my info from there.

EDIT: Found the map... It's big, so here's the link:

http://www.cimis.water.ca.gov/cimis/cimiSatEtoZones.jsp

Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 26, 2011, 03:22:09 PM
TO reiterate, the Davis logger is NOT a simple serial/USB cable.  It contains logging circuitry to retain the data from the station.  If you build your or Dekay's cable you WILL NOT get that memory and if it burps, you lose the current data and subsequent till it feels better.

Has anyone actually taken one of these apart?  I have a feeling they are just a cable.  Isn't it the counsel that is keeping the history in memory?  I have a feeling the only components in the USB cable is a USB to serial converter.   Once I get my serial cable I'll open it up and take a look.
Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 26, 2011, 03:41:21 PM
Knock yourself out and possibly ruin the logger in the process.  If there was a console memory Dekay's simple direct connect cable would be passing data from memory in the console and not streaming data (whoch it does).
Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 26, 2011, 03:53:01 PM
Has anyone actually taken one of these apart?  I have a feeling they are just a cable.  Isn't it the counsel that is keeping the history in memory?  I have a feeling the only components in the USB cable is a USB to serial converter.   Once I get my serial cable I'll open it up and take a look.

Good luck with that. The board is encapsulated in a hard rubber-like molding. It's certainly possible to cut away at it, I suppose. However, that cable pigtail is molded into it.

I'm sure that someone at some time has extracted the board from the molding, but, to my knowledge, that hasn't been reported here.

OTOH, it would be easier to connect a console with a true serial-only cable like the one I built, and see what happens when one tried to access the archive memory.

Remember, back when these were first designed, memory was more expensive, and it would have made sense to only put it in the interface cable.
Title: Re: New VP2 owner, need data logging cable
Post by: wxtech on May 26, 2011, 05:28:48 PM
Don't bother whittling on your data logger.  I opened one several years ago.  I didn't post pictures then out of respect for Davis propriety rights for the device.  I've hacked most of the parts of the VP & VP2, and made modifications to most.
I can't find the old pictures but on the data logger circuit board, I see two IC's, a regulator, 2 diodes, 3 resistors, 11 capacitors plus J1 the 20 pin connector.  The black cable is soldered to 4 pads.  I'll have to get creative to read the IC part numbers. I don't know how many layers the circuit board has.  I didn't uncover the foil side of the circuit board.  I'll post a picture later.
Al
Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 26, 2011, 05:51:36 PM
It is not that difficult to make your own data logger.  heck t you can use a Casio or Ti calculator to log temps!  But for $120 bucks...
Title: Re: New VP2 owner, need data logging cable
Post by: wxtech on May 26, 2011, 05:57:15 PM
On the datalogger circuit board,
U1 is an Atmel 45DB memory http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf (http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf),
U2 is a Maxim MAX3221E RS-232 Transceiver http://www.maxim-ic.com/datasheet/index.mvp/id/1781/t/do (http://www.maxim-ic.com/datasheet/index.mvp/id/1781/t/do)
U3 is probably a voltage regulator, it is unmarked.  All the other components are passive resistors, capacitors, diodes and a connector.
If anyone wishes to pursue this further, I'll trade this one for a new datalogger.   :lol:
Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 26, 2011, 06:51:34 PM
Thanks for posting that, Wxtech. That will quell a lot of wondering and speculation.
Title: Re: New VP2 owner, need data logging cable
Post by: wxtech on May 26, 2011, 08:37:35 PM
I also have a Temp/Hum circuit board sensor opened to see what components are used.  I'll round that up and take new pictures of both devices that were previously encapsulated.
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 28, 2011, 05:01:55 PM
On the datalogger circuit board,
U1 is an Atmel 45DB memory http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf (http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf),
U2 is a Maxim MAX3221E RS-232 Transceiver http://www.maxim-ic.com/datasheet/index.mvp/id/1781/t/do (http://www.maxim-ic.com/datasheet/index.mvp/id/1781/t/do)
U3 is probably a voltage regulator, it is unmarked.  All the other components are passive resistors, capacitors, diodes and a connector.
If anyone wishes to pursue this further, I'll trade this one for a new datalogger.   :lol:

NICE!  This is great information!  I was speculating that the dongle contained a small micro that managed storage of the data to a bit of on-chip memory.  But what you've proven is that the console itself does the work of writing the data to what is basically just a simple memory expansion that you could buy for less than a dollar (http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=ca&keywords=AT45DB011&x=10&y=16)!!!  That would also explain why Davis brings out the SPI lines to the expansion port.

(http://2.bp.blogspot.com/_Nvf6aanA8XE/TTzcIXs-aJI/AAAAAAAAAKQ/SFMqAEJXWZY/s1600/VP2+Expansion.jpg)

If you were to pin out the connection between the expansion port and the dongle like I did between the processor and the expansion port, that would enable us to build our own dongles at a huge cost saving.  It would be simple to use a multimeter to do this without you even needing to uncover the foil side.

Heck, even without doing that, the pinout is mostly obvious if you take a look at the datasheet (http://www.datasheetcatalog.org/datasheets/151/131300_DS.pdf) and my diagram above.  The trick (I'm guessing) is that the dongle likely has a short between a couple of the pins that lets the console sense the dongle is there and plugged in.  And I can even narrow that down: it should be between PB4, PE2, PE3, and PC4. 

It is possible too that none of them are and it would just work if this chip were connected up.  Wxtech, if you, or anybody else for that matter, would care to figure out which of these two pins are shorted together, that would be huge.  I'd be willing to take a shot at building one and sharing what I learn as I've done before (http://madscientistlabs.blogspot.com/2011/01/davis-weatherlink-software-not-required.html).

And to DanITman: Bushman is right.  Unless you use a USB->Serial converter that converts to 0V -> 3.3V LVTTL levels rather than +/-10V (or whatever), you'll very likely fry your console.  Read the link in the last paragraph to see why.
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 28, 2011, 05:08:44 PM
And of course, just after posting, it occurred to me that PB4, PE2, PE3, or PC4 could also either be pulled down to ground or pulled up to Vcc.  That should be checked for as well.

A general question to folks with the logger: is there an indication somewhere on the console display if a logger is plugged in?  Does the logger have to be plugged in when the console is powered up for it to be recognized, or can you plug it in anytime?
Title: Re: New VP2 owner, need data logging cable
Post by: dalecoy on May 28, 2011, 05:56:49 PM
A general question to folks with the logger: is there an indication somewhere on the console display if a logger is plugged in?  Does the logger have to be plugged in when the console is powered up for it to be recognized, or can you plug it in anytime?

I don't know the precise answer to this question.  However, I do know that doing one or both of the following can (and usually does) cause the console to get "confused".

A.  Unplugging the logger when the console is powered.
B.  Plugging in the logger when the console is powered.

In particular, it is usually the case that - if the console is powered up - unplugging the logger and plugging it back in will cause logging to cease until there is a complete power reset.

"Powered" in the above seems to mean "power available" (that is, including the batteries).   
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 28, 2011, 07:50:04 PM
In particular, it is usually the case that - if the console is powered up - unplugging the logger and plugging it back in will cause logging to cease until there is a complete power reset.

"Powered" in the above seems to mean "power available" (that is, including the batteries).   

This is good to know.   When I was sniffing the data interchange between the processor and the RF chip, I saw some other traffic just when the console was reset that I couldn't explain and that I didn't see afterward.  I now suspect that was the console trying to talk to the memory chip on the same "SPI" bus.  It got no answer back so it didn't try again afterward.

Wxtech, what package was the 45DB memory chip: the SOIC version with just eight pins?
Title: Re: New VP2 owner, need data logging cable
Post by: wxtech on May 28, 2011, 08:53:18 PM
The package is soic.  The P/N looks like 450B011B but I couldn't match that with a part, so I settled on 45DB011B.  The top line is Atmel 0321 which is date 2003, 21st week.
Is this just a hobby or does anyone intend to build one?  I designed an anemometer replacement for the VP2 and no one built one.  No one seems to have electronics skills.  I think the Davis datalogger is a value priced item.  I'll build you one for $300.00.   
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 29, 2011, 12:13:06 AM
The package is soic.  The P/N looks like 450B011B but I couldn't match that with a part, so I settled on 45DB011B.  The top line is Atmel 0321 which is date 2003, 21st week.

Knowing that it is the 8 pin SOIC is great.  The other larger packages have a RDY/*BUSY pin that we won't have to worry about interfacing to.

No one seems to have electronics skills. 

Not quite true.  Click here please. (http://madscientistlabs.blogspot.com/search/label/Davis%20VP2)

I think the Davis datalogger is a value priced item.  I'll build you one for $300.00. 

:grin:
Title: Re: New VP2 owner, need data logging cable
Post by: C5250 on May 29, 2011, 03:52:48 PM
And of course, just after posting, it occurred to me that PB4, PE2, PE3, or PC4 could also either be pulled down to ground or pulled up to Vcc.  That should be checked for as well.

PB4 is connected to the backlight. I don't have anything in my notes for PE2, PE3 or PC4.

As far as I could tell, the PROM status was checked by pulling PB0 low and then sending 0x57 out the SPI.

Title: Re: New VP2 owner, need data logging cable
Post by: NickelPlate on May 29, 2011, 09:20:00 PM
No I don't have the logger but I'm wondering where I should purchase one.  I have read DeKay's post and have considered making a direction serial connection.  I just find it hard to pay $125.00 for something that can be made for under $10.  I almost wish someone would start selling just the cable because I think you would have a market for it.

Dan,

Even if it could be manufactured for $10 (which is doubtful unless they are making them in extremely large quantities), Davis undoubtedly has tens of thousands of $$$ (likely more) in Engineering and development costs, product testing and certification etc. It's not cheap to develop and bring even the simplest of products to market, have them tested to relevant safety standards etc. Being a EE myself in product development, I think $125 is a bargain. You've already shelled out several hundred for your VP2, why not just spend a little more and be done with it? Unless of course you just enjoy tinkering and building things yourself which I can certainly understand.

NP
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 29, 2011, 10:45:43 PM
PB4 is connected to the backlight. I don't have anything in my notes for PE2, PE3 or PC4.

Interesting. If that is the case for PB4, it wouldn't make sense to bring that out to the expansion connection unless it is maybe there for factory test?  I might have made an error when I pinned this out.   Will have to check that next time.

As far as I could tell, the PROM status was checked by pulling PB0 low and then sending 0x57 out the SPI.

Now this makes perfect sense, since PB0 is muxed as Slave Select on the processor and 0x57 is the command to read the status register on the memory chip.  Perhaps all that is needed is to just hook up the memory chip's SPI and power pins to the expansion port, like so:

Console Pin   45DB011B Pin
1 -  SS       4 - CS*
2 -  SCLK     2 - SCK
3 -  MOSI     1 - SI
4 -  MISO     8 - SO
7 -  RST      3 - RESET*
14 - VCC      6 - VCC
14 - VCC      5 - WP*
16 - GND      7 - GND

And I've asked this before, C2520: how did you figure out all of this stuff?  I often get the feeling that where I am going, you have already been.   =D>
Title: Re: New VP2 owner, need data logging cable
Post by: wxtech on May 30, 2011, 07:27:11 AM
Dan,
Even if it could be manufactured for $10 (which is doubtful unless they are making them in extremely large quantities), Davis undoubtedly has tens of thousands of $$$ (likely more) in Engineering and development costs, product testing and certification etc. It's not cheap to develop and bring even the simplest of products to market, have them tested to relevant safety standards etc. Being a EE myself in product development, I think $125 is a bargain. You've already shelled out several hundred for your VP2, why not just spend a little more and be done with it? Unless of course you just enjoy tinkering and building things yourself which I can certainly understand.
NP
I agree the price is a bargain.  Some assume that this is a simple cable with unique connectors.  We've discovered that this does indeed contain the memory/data logging and communications interface circuitry for VP2 to computer.  What irks some is that the datalogger/cabling/software bundle looks like an afterthought that should have been included inside the console.
Al
Title: Re: New VP2 owner, need data logging cable
Post by: johnd on May 30, 2011, 08:10:12 AM
What irks some is that the datalogger/cabling/software bundle looks like an afterthought that should have been included inside the console.

That's certainly true ('irks some') but isn't the architecture of the Vantage stations based around providing flexibility as to the type of logger (USB/serial/IP interface as well as the various advanced loggers) so that the user is free to choose the logger to complement their console. It's obviously not the only architecture imaginable but it does provide a good degree of flexibility as to exactly which logging/control option you might prefer to use.

And suppose Davis had included eg a standard PC-compatible serial or USB interface in the logger then who's to say that they wouldn't have priced it the same as console+logger is now? Whatever, I'd imagine that there would be some price increase over the current console alone.

Of course, part of the problem is that Davis have no head-on competitor make, that would help to set the pace on specification. Maybe someone may start competing again in the Vantage logger market (though look what happened to the last company that tried that - they are no longer with us for various reasons)?
Title: Re: New VP2 owner, need data logging cable
Post by: C5250 on May 30, 2011, 02:32:05 PM
I might have made an error when I pinned this out.   Will have to check that next time.

It may be an error. I do seem to recall thinking, when I first saw your pinout, it was odd that they would bring PB4 out.

Now this makes perfect sense, since PB0 is muxed as Slave Select on the processor and 0x57 is the command to read the status register on the memory chip.  Perhaps all that is needed is to just hook up the memory chip's SPI and power pins to the expansion port, like so:

Slave select is an input and only when SPI is in slave mode. SPI is configured for master mode, so that pin can't be used for that function. It is likely that is being used as a CS though. That's about all the comment I can make until I get around to downloading a datasheet for the PROM.

And I've asked this before, C2520: how did you figure out all of this stuff?

If you did, I either missed it, or it was while my workstation was down and I couldn't reply at the time. This is benign enough that I suppose it's not likely to cause any issues, backup what I said about PB4, and provide a hint.


From ver 1.75 for a wireless console:
Code: [Select]
; -----------------------------------------------------------------------------------------
;
;  LAMPS
;
+0000A619:   E045        LDI     R20,0x05         ;chars
+0000A61A:   EB21        LDI     R18,0xB1         ;
+0000A61B:   E23D        LDI     R19,0x2D         ;0x2DB1 (LAMPS)
+0000A61C:   D2D5        RCALL   PC+0x02D6 ;A8F2 - check if string match
+0000A61D:   F441        BRNE    PC+0x09   ;A626 - Branch if not equal
;
+0000A61E:   D996        RCALL   PC-0x0669 ;9FB5 - Send "OK" out USART
+0000A61F:   D2B1        RCALL   PC+0x02B2 ;A8D1 -Relative call subroutine
+0000A620:   2B01        OR      R16,R17          Logical OR
+0000A621:   F011        BREQ    PC+0x03   ;A624 -Branch if equal
;
+0000A622:   9AC4        SBI     PORTB,4           Set bit in I/O register
+0000A623:   CA8D        RJMP    PC-0x0572 ;A0B1 - 0x78 => (0x0927), restore regs and return
;
+0000A624:   98C4        CBI     PORTB,4           Clear bit in I/O register
+0000A625:   CA8B        RJMP    PC-0x0574 ;A0B1 - 0x78 => (0x0927), restore regs and return
; -----------------------------------------------------------------------------------------
This is the section of code that checks for the LAMPS command and handles it if found.

The first 5 lines are standard for every serial command, the first line is the number of characters in the cmd, the 2nd and 3rd are the address in program space of the string to compare the serial RX buffer contents with. The forth line calls a routine the does the compare. The 5th line branchs to test for the next possible command if the compare fails.

Then we get to the what actually happens when sent the LAMPS command.

A61E sends OK out the serial port. A61F calls a routine that looks for a number in the serial RX buffer after the command. A620 tests the return value of that routine. Depending on the result of that test, PB4 is set either high or low and the routine returns. The data written to memory location 0x0927 is not unique to this command.

I seem to recall the manual says you have to use 0 or 1 after the LAMPS command. That does not appear to be the case, in reality any number, except zero, after the command should turn on the backlight.


A bit more back to the thread topic. I seem to recall hearing that someone was making and selling a datalogger/cable at one time, although with a larger PROM. As the story went, Davis was not happy about that and made them stop. I doubt they can make the thing for as little as what was originally suggested in this thread. But I'm sure they do make a tidy profit from them.
Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 30, 2011, 03:43:25 PM
I'd love to know how Davis "made them stop". 
Title: Re: New VP2 owner, need data logging cable
Post by: johnd on May 30, 2011, 03:58:25 PM
I'd love to know how Davis "made them stop". 

It was all fairly indirect, but effective. I do know something of what happened but it's probably best left there.
Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 30, 2011, 04:44:47 PM
With the Magnusson-Moss Act etc. it would have to involve a baseball bat.  Of course unless the  aftermarket unit was clearly  much superior or amazingly cheap then it would likely die on its own.
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 30, 2011, 11:20:01 PM
And I've asked this before, C2520: how did you figure out all of this stuff?

If you did, I either missed it, or it was while my workstation was down and I couldn't reply at the time. This is benign enough that I suppose it's not likely to cause any issues, backup what I said about PB4, and provide a hint.
I was just wondering how you figured this stuff out in general terms.  And it looks like you've taken a disassembler to the entire ROM and figured out the inner workings???  Wow.  Just wow.  My hat is off to you, sir.   =D>

What software tools did you use to do this, BTW?
Title: Re: New VP2 owner, need data logging cable
Post by: C5250 on May 31, 2011, 12:02:28 AM
What software tools did you use to do this, BTW?

The actual disassembly is pretty easy, just download a bin from Davis, convert it to hex and load into AVR.

From that point, I wrote a program to calculate the actual addresses of all the relative offsets and further anoint the AVR disassembly. Then spend a couple/few years trying to figure it out.
Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 31, 2011, 11:37:11 AM
I'd love to know how Davis "made them stop". 

All they have to do is be able to pay their attorneys more than you can pay yours.
Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 31, 2011, 12:43:42 PM
I'd love to know how Davis "made them stop". 

All they have to do is be able to pay their attorneys more than you can pay yours.

It would be interesting to see what Davis would do if someone  was to market a direct connect cable based on Dekay's work.  You are probably talking making them in bulk for  a dollar or less; sell them for 25 or so. 
Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 31, 2011, 01:47:42 PM
No I don't have the logger but I'm wondering where I should purchase one.  I have read DeKay's post and have considered making a direction serial connection.  I just find it hard to pay $125.00 for something that can be made for under $10.  I almost wish someone would start selling just the cable because I think you would have a market for it.

Dan,

Even if it could be manufactured for $10 (which is doubtful unless they are making them in extremely large quantities), Davis undoubtedly has tens of thousands of $$$ (likely more) in Engineering and development costs, product testing and certification etc. It's not cheap to develop and bring even the simplest of products to market, have them tested to relevant safety standards etc. Being a EE myself in product development, I think $125 is a bargain. You've already shelled out several hundred for your VP2, why not just spend a little more and be done with it? Unless of course you just enjoy tinkering and building things yourself which I can certainly understand.

NP

I didn't realize this topic would blow up into this.  I'm sort of glad that it has :)  I'm glad everyone set me straight that the data logger is actually in the cable and not just a cable that accesses the memory on the device.  The device must have some type of memory to display historical results on the screen as well as keep high and low temps. 

I know I could make one of DeKay's cables for around $10 and that is all I"m really looking for.  I was just hoping someone would start producing these in small quantities so I wouldn't have to make it myself.

I really don't see this being illegal in any way.  The counsel is already outputting this data.  If they didn't want people to interface with the counsel they could have put measures in place to stop this.  Since it works out of the box then there is nothing stopping you from interfacing with it.



Title: Re: New VP2 owner, need data logging cable
Post by: Bushman on May 31, 2011, 01:53:01 PM
It is not illegal in any way for you to do this.  You could talk to one of the OEM cable vendors like Monoprice and see if they would make batches of cables for you.  pretty simple to do.  Cheap as well.
Title: Re: New VP2 owner, need data logging cable
Post by: DanITman on May 31, 2011, 01:53:10 PM
On the datalogger circuit board,
U1 is an Atmel 45DB memory http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf (http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf),
U2 is a Maxim MAX3221E RS-232 Transceiver http://www.maxim-ic.com/datasheet/index.mvp/id/1781/t/do (http://www.maxim-ic.com/datasheet/index.mvp/id/1781/t/do)
U3 is probably a voltage regulator, it is unmarked.  All the other components are passive resistors, capacitors, diodes and a connector.
If anyone wishes to pursue this further, I'll trade this one for a new datalogger.   :lol:

And to DanITman: Bushman is right.  Unless you use a USB->Serial converter that converts to 0V -> 3.3V LVTTL levels rather than +/-10V (or whatever), you'll very likely fry your console.  Read the link in the last paragraph to see why.

DeKay, thank you for the reminder on the 3.3v.  I have your read your blog in great detail and I appreciate you posting that info.  I plan on using a MAX3223 to communicate with the counsel.  Do you see that being a problem?  I have one similar to this:

http://cgi.ebay.com/RS232-Serial-Port-TTL-Converter-MAX3223-3-3V-DIY-/230604730798?pt=LH_DefaultDomain_0&hash=item35b11cf1ae
Title: Re: New VP2 owner, need data logging cable
Post by: SLOweather on May 31, 2011, 02:48:05 PM

DeKay, thank you for the reminder on the 3.3v.  I have your read your blog in great detail and I appreciate you posting that info.  I plan on using a MAX3223 to communicate with the counsel.  Do you see that being a problem?  I have one similar to this:

http://cgi.ebay.com/RS232-Serial-Port-TTL-Converter-MAX3223-3-3V-DIY-/230604730798?pt=LH_DefaultDomain_0&hash=item35b11cf1ae

That should work. It's quite similar to the one I used:

(http://www.sloweather.com/blog/2011/110328davisserial.jpg)

Note also that the console connector is not the standard 0.1" spacing, but rather 2mm. I got the connector from Digi-Key.

More here: http://www.wxforum.net/index.php?topic=10721.msg107265#msg107265
Title: Re: New VP2 owner, need data logging cable
Post by: C5250 on May 31, 2011, 09:48:06 PM
I'm glad everyone set me straight that the data logger is actually in the cable and not just a cable that accesses the memory on the device.  The device must have some type of memory to display historical results on the screen as well as keep high and low temps.

Just to be clear, the datalogger stores all variables at a specified interval  (usually configured via WL). This is useful if a computer is not constantly receiving the data or if a computer is and there is an issue such as a power failure. For instance, I have the period set for 1 minute, and if there is an issue, after the computer is back up, I download the archive to fill in the time that was missed.

Highs and Lows for the past 24 (25 for a Vue Console) days, months and years are stored in memory of the Console/Envoy.
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on May 31, 2011, 11:52:24 PM

DeKay, thank you for the reminder on the 3.3v.  I have your read your blog in great detail and I appreciate you posting that info.  I plan on using a MAX3223 to communicate with the counsel.  Do you see that being a problem?  I have one similar to this:

http://cgi.ebay.com/RS232-Serial-Port-TTL-Converter-MAX3223-3-3V-DIY-/230604730798?pt=LH_DefaultDomain_0&hash=item35b11cf1ae

Should be fine.  This chip is from the same family as the one used in the Davis dongle (MAX3221).
http://www.maxim-ic.com/datasheet/index.mvp/id/1069

I'd hook the 3.3V supply to your PC rather than the console to save some battery life though (unless your console is plugged in all the time - then it wouldn't matter).  It says 1 uA supply current, but that can't be counting the current sucking LED.

Note that the route I took - USB to LVTTL serial - is also a good route to consider.  It is powered from the PC side and doesn't seem to be susceptible to the glitches the Davis branded version has caused some people.
Title: Re: New VP2 owner, need data logging cable
Post by: DeKay on June 01, 2011, 12:01:35 AM
What software tools did you use to do this, BTW?

The actual disassembly is pretty easy, just download a bin from Davis, convert it to hex and load into AVR.

Atmel's AVR Studio?  I thought I tried doing that once but couldn't get it to pull in raw hex without source.  Didn't spend a lot of time on it though so I could easily have missed something.  I'd never played with Atmel micros before.

From that point, I wrote a program to calculate the actual addresses of all the relative offsets and further anoint the AVR disassembly. Then spend a couple/few years trying to figure it out.

 :shock:  Again, my hat is off to you, sir.
Title: Re: New VP2 owner, need data logging cable
Post by: C5250 on June 02, 2011, 12:02:43 AM
Atmel's AVR Studio?  I thought I tried doing that once but couldn't get it to pull in raw hex without source.  Didn't spend a lot of time on it though so I could easily have missed something.  I'd never played with Atmel micros before.

Yes, AVR Studio. Did you specify 32bit addresses for the conversion? That's usually a command line option and not all bin2hex converters can do that, I had to try a couple before I found one that worked. Keep in mind that the AT128 uses 32bit addressing, as that will be very important when when looking at the raw file in a hex editor, and also trying to understand why the IPM instruction addressing is different (that uses 16bit addresses).
Title: Re: New VP2 owner, need data logging cable
Post by: NickelPlate on June 02, 2011, 09:51:55 PM
Oh it's not illegal at all. In fact, if you call Davis they have a document that describes the communications protocol and what serial commands to send it to actually get the data (sort of a developer's app note). If you PM me I can send it to you. At my job I was at one time going to interface the console on a VP2+ with a PLC over a serial COM port and display the information on an HMI touch screen. But in the end it was easier to just plug the console directly in the HMI COM port (with a serial datalogger) and run Weatherlink directly on the HMI's embedded windows OS. Saved me from having to develop a bunch of screens tied to HMI tags in a PLC's memory.
Title: Re: New VP2 owner, need data logging cable
Post by: Grrxyn on November 15, 2011, 06:05:37 AM
And of course, just after posting, it occurred to me that PB4, PE2, PE3, or PC4 could also either be pulled down to ground or pulled up to Vcc.  That should be checked for as well.

PB4 is connected to the backlight. I don't have anything in my notes for PE2, PE3 or PC4.

As far as I could tell, the PROM status was checked by pulling PB0 low and then sending 0x57 out the SPI.

I figured they were for driving the relays on the alarm and irrigation modules.  Are we positive PB4 goes to the backlight... or that PB4 goes to the connector?
Title: Re: New VP2 owner, need data logging cable
Post by: Ingineer on October 16, 2012, 01:57:45 AM
I wanted a wireless connection to my server from the VP2, (the server and VP2 are difficult to wire in my setup) so I came up with a much easier and more elegant way to achieve connection/logging, and it cost less than $20:
http://www.wxforum.net/index.php?topic=16937.0