Author Topic: New VP2 owner, need data logging cable  (Read 7891 times)

0 Members and 1 Guest are viewing this topic.

Offline DeKay

  • Forecaster
  • *****
  • Posts: 351
    • Mad Scientist Labs
Re: New VP2 owner, need data logging cable
« Reply #25 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.

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

:grin:

Offline C5250

  • Forecaster
  • *****
  • Posts: 636
    • Local weather
Re: New VP2 owner, need data logging cable
« Reply #26 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.

Precious little in your life is yours by right and won without a fight.

Offline NickelPlate

  • Member
  • *
  • Posts: 36
Re: New VP2 owner, need data logging cable
« Reply #27 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
« Last Edit: May 29, 2011, 09:37:07 PM by NickelPlate »

Offline DeKay

  • Forecaster
  • *****
  • Posts: 351
    • Mad Scientist Labs
Re: New VP2 owner, need data logging cable
« Reply #28 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>

Offline wxtech

  • Weather Equipment Technician
  • Forecaster
  • *****
  • Posts: 1617
  • USAF Weather Equipment Maintenance Tech (retired)
    • Lexington, Ga. Weather
Re: New VP2 owner, need data logging cable
« Reply #29 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
Al Washington, Lexington, Ga.,  NWS Coop station=LXTG1, Fischer Porter, SRG, MMTS. 
CoCoRaHS=GA-OG-1. CWOP=CW2074.  Davis VP2+ WLIP 5.9.2, VP(original) serial, XP with serial port, VWS v15.00 p02. ImageSalsa, Win8 all-in-one.
Selling used professional rain gauges on wx site

Offline johnd

  • Forecaster
  • *****
  • Posts: 1625
    • www.weatherstations.co.uk
Re: New VP2 owner, need data logging cable
« Reply #30 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)?
« Last Edit: May 30, 2011, 10:45:19 AM by johnd »
Prodata Weather Systems
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline C5250

  • Forecaster
  • *****
  • Posts: 636
    • Local weather
Re: New VP2 owner, need data logging cable
« Reply #31 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.
Precious little in your life is yours by right and won without a fight.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 4377
    • Eagle Bay Weather
Re: New VP2 owner, need data logging cable
« Reply #32 on: May 30, 2011, 03:43:25 PM »
I'd love to know how Davis "made them stop". 

Offline johnd

  • Forecaster
  • *****
  • Posts: 1625
    • www.weatherstations.co.uk
Re: New VP2 owner, need data logging cable
« Reply #33 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.
Prodata Weather Systems
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline Bushman

  • Forecaster
  • *****
  • Posts: 4377
    • Eagle Bay Weather
Re: New VP2 owner, need data logging cable
« Reply #34 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.

Offline DeKay

  • Forecaster
  • *****
  • Posts: 351
    • Mad Scientist Labs
Re: New VP2 owner, need data logging cable
« Reply #35 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?

Offline C5250

  • Forecaster
  • *****
  • Posts: 636
    • Local weather
Re: New VP2 owner, need data logging cable
« Reply #36 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.
Precious little in your life is yours by right and won without a fight.

Offline SLOweather

  • Administrator
  • Forecaster
  • *****
  • Posts: 2691
    • http://www.sloweather.com
Re: New VP2 owner, need data logging cable
« Reply #37 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.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 4377
    • Eagle Bay Weather
Re: New VP2 owner, need data logging cable
« Reply #38 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. 

Offline DanITman

  • Member
  • *
  • Posts: 25
Re: New VP2 owner, need data logging cable
« Reply #39 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.




Offline Bushman

  • Forecaster
  • *****
  • Posts: 4377
    • Eagle Bay Weather
Re: New VP2 owner, need data logging cable
« Reply #40 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.

Offline DanITman

  • Member
  • *
  • Posts: 25
Re: New VP2 owner, need data logging cable
« Reply #41 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,
U2 is a Maxim MAX3221E RS-232 Transceiver 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

Offline SLOweather

  • Administrator
  • Forecaster
  • *****
  • Posts: 2691
    • http://www.sloweather.com
Re: New VP2 owner, need data logging cable
« Reply #42 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:



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

Offline C5250

  • Forecaster
  • *****
  • Posts: 636
    • Local weather
Re: New VP2 owner, need data logging cable
« Reply #43 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.
Precious little in your life is yours by right and won without a fight.

Offline DeKay

  • Forecaster
  • *****
  • Posts: 351
    • Mad Scientist Labs
Re: New VP2 owner, need data logging cable
« Reply #44 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.

Offline DeKay

  • Forecaster
  • *****
  • Posts: 351
    • Mad Scientist Labs
Re: New VP2 owner, need data logging cable
« Reply #45 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.

Offline C5250

  • Forecaster
  • *****
  • Posts: 636
    • Local weather
Re: New VP2 owner, need data logging cable
« Reply #46 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).
Precious little in your life is yours by right and won without a fight.

Offline NickelPlate

  • Member
  • *
  • Posts: 36
Re: New VP2 owner, need data logging cable
« Reply #47 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.
« Last Edit: June 02, 2011, 09:59:03 PM by NickelPlate »

Offline Grrxyn

  • Member
  • *
  • Posts: 4
    • My Lair
Re: New VP2 owner, need data logging cable
« Reply #48 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?
« Last Edit: November 15, 2011, 06:14:40 AM by Grrxyn »
I build things.
Electronics, Computers, Sat-Com, Hamradio, Pro-Audio...

Offline Ingineer

  • Member
  • *
  • Posts: 10
Re: New VP2 owner, need data logging cable
« Reply #49 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
« Last Edit: October 16, 2012, 03:18:03 AM by Ingineer »

 

anything