Author Topic: DIY "GREEN DOT" Data Logger  (Read 94299 times)

0 Members and 2 Guests are viewing this topic.

Offline LittletonCOwx

  • Senior Member
  • **
  • Posts: 78
  • Droplet
Re: DIY "GREEN DOT" Data Logger
« Reply #200 on: February 13, 2014, 12:00:15 AM »
WOOHOO!!!   :grin:  \:D/  :grin:  \:D/  :grin:  \:D/

I'm online!  :cool:  Installing the Belfryboy logger went smoothly, and the instructions he provided worked great!  =D>  I had already set up my Meteobridge, so all I had to do was plug everything in (after powering down the console, of course).

I had hoped that since the FTDI chipset that Belfryboy uses in his logger is USB 2.0 compliant, I wouldn't need a USB hub to convert for the TP-LINK TL-MR3020 (which only accepts USB 2.0), but alas, no dice.   #-o  However, as soon as I plugged in the Belkin USB 2.0 4-port mini hub (F5U407) between the logger and the MR3020 Meteobridge router, everything started working immediately!

Here's my Wunderground page!
"Engineers don't idle well."     EW4560

Davis Vantage Vue | Belfryboy Clone USB Logger (fw v3.0 compatible :cool:) | MeteoBridge


Offline column5

  • Member
  • *
  • Posts: 2
Re: DIY "GREEN DOT" Data Logger
« Reply #201 on: February 19, 2014, 09:23:08 PM »
I have been lurking for a while and ordered the parts to build the logger here ( http://oshpark.com/shared_projects/XrOiaET6 ). I assembled it last night and I have a V3.x firmware console that reports "lcd ok.INCOMPATIBLE LOGGER" via the serial utility ( from here (WeatherStation.exe) https://drive.google.com/folderview?id=0BxWPDCRn6BMXRGtxcXBDUGdNdnc&usp=sharing ).

I suspect it might be that I need to program the security register? The PC recognizes the USB serial port, and I am able to see data come across as the console starts. If it is not the security register, I suspect I may of installed the 1MB memory chip incorrectly.

Any guidance/advice would be very helpful. Thank you all so much for the work you have done on this!

Offline LittletonCOwx

  • Senior Member
  • **
  • Posts: 78
  • Droplet
Re: DIY "GREEN DOT" Data Logger
« Reply #202 on: February 20, 2014, 01:12:33 PM »
I have been lurking for a while and ordered the parts to build the logger here ( http://oshpark.com/shared_projects/XrOiaET6 ). I assembled it last night and I have a V3.x firmware console that reports "lcd ok.INCOMPATIBLE LOGGER" via the serial utility ( from here (WeatherStation.exe) https://drive.google.com/folderview?id=0BxWPDCRn6BMXRGtxcXBDUGdNdnc&usp=sharing ).

I suspect it might be that I need to program the security register? The PC recognizes the USB serial port, and I am able to see data come across as the console starts. If it is not the security register, I suspect I may of installed the 1MB memory chip incorrectly.

Any guidance/advice would be very helpful. Thank you all so much for the work you have done on this!

Yes, sounds like you are having the firmware v3.0 problem, and will indeed need to find a way to flash the security register.  I have on of Belfryboy's clone loggers with the flashed security register, and it has been working like a clock for the past week.   =D>

I would kindly suggest to carefully re-read through the last 4 or 5 pages of this thread.  That should help you in flashing the Atmega chip (IC1).  Hopefully you have a way to directly interface to the chip, as I'm pretty sure that is the only way to flash the ROM.
"Engineers don't idle well."     EW4560

Davis Vantage Vue | Belfryboy Clone USB Logger (fw v3.0 compatible :cool:) | MeteoBridge


Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: DIY "GREEN DOT" Data Logger
« Reply #203 on: February 20, 2014, 01:43:47 PM »
There are a couple references to this in my latest blog post.  You'll see a reference to Watson's algorithm to determine the bytes you need to program in plus a link to torkelmj's masterwork that has programming code for (IIRC) a PIC-based micro.  Otherwise, you might need to quickly code it up yourself on an Arduino or something unless perhaps Belfryboy has something he could share.

Offline column5

  • Member
  • *
  • Posts: 2
Re: DIY "GREEN DOT" Data Logger
« Reply #204 on: February 20, 2014, 02:04:32 PM »
Awesome, thank you guys. I have an Arduino that I could likely use, I will read back to page 4-5!

Offline belfryboy

  • Forecaster
  • *****
  • Posts: 489
  • waiting for the rain.....
    • Belfryboy Blog
Re: DIY "GREEN DOT" Data Logger
« Reply #205 on: February 20, 2014, 06:14:06 PM »
Sorry for the delay in posting, I fell on my daughter and broke her leg :( so I have been a little preoccupied.

I program the dataflash security register using a Buspirate in SPI mode and the lookup table from Watson. I do all this using hyperterminal and Excel. If I get time I will write up a procedure, but I can't see that happening in the immediate future.

Offline EA1EF

  • Senior Member
  • **
  • Posts: 98
Re: DIY "GREEN DOT" Data Logger
« Reply #206 on: August 03, 2014, 08:59:36 AM »
we are interest in one build (or one to three units with combined shipping)

i send you a MP

edit: purchased one item for test,

thanks for your work
« Last Edit: August 05, 2014, 10:18:48 AM by EA1EF »

Offline torkelmj

  • Contributor
  • ***
  • Posts: 145
    • My weather station, etc.
Re: DIY "GREEN DOT" Data Logger
« Reply #207 on: September 12, 2014, 06:10:38 AM »
For those interested in DIY projects the upcoming winter (or summer, depending on location) - the enclosed schematics should be a good starting point for building your own data logger.  Not my own work, it was handed over to me by another weather station enthusiast who agreed to having it published here.
« Last Edit: September 12, 2014, 06:12:37 AM by torkelmj »

Offline HandyGeek

  • KD4E
  • Senior Member
  • **
  • Posts: 58
Re: DIY "GREEN DOT" Data Logger
« Reply #208 on: September 27, 2014, 08:39:36 PM »
What is the status of the iBangkok24 & BelfryBoy projects, please?

I bought a non-Davis data cable years ago but due to the lack of a buffer could never get it to work properly.

It would be nice to get my older model Davis VantageVue data online.

Thanks! David

Offline belfryboy

  • Forecaster
  • *****
  • Posts: 489
  • waiting for the rain.....
    • Belfryboy Blog
Re: DIY "GREEN DOT" Data Logger
« Reply #209 on: September 28, 2014, 04:19:12 AM »
The belfryboy loggers are still being made, they work with the latest Davis firmware (AFAIK) and I know of forum members that are using them with WeatherDisplay, Cumulus, Meteohub, and Weatherlink.

Offline snapper

  • Senior Member
  • **
  • Posts: 64
Re: DIY "GREEN DOT" Data Logger
« Reply #210 on: October 01, 2014, 09:33:39 AM »
The belfryboy loggers are still being made, they work with the latest Davis firmware (AFAIK) and I know of forum members that are using them with WeatherDisplay, Cumulus, Meteohub, and Weatherlink.

Worked fine with weewx and VWS as well...

Offline JoeBean

  • Member
  • *
  • Posts: 1
Re: DIY "GREEN DOT" Data Logger
« Reply #211 on: December 02, 2014, 12:47:04 PM »
Hi all,
I've benefitted enormously from all the hard work done by everyone in this thread and have built several clone dataloggers successfully following the information here.  To give back in some small way I thought I'd do a quick how-to writeup for those who may read this but are too intimidated by the technical aspects to give it a try.  It's really not too hard!

What You'll Need
Parts:
belfryboy's PCBs from OSH Park (3 for $6.20)
From Mouser you'll need per datalogger:
1 USB Cable (eg. Mouser #538-88738-8200) $2.91 each
1 PCB Header (798-DF11-20DS-2DSA05) $1.71 each
1 AT45DB011 (556-AT45DB011D-SSH-B) $1.05 each
1 10uF tantalum Case 'A' capacitor (647-F931A106MAA) $0.181 each
2 0.1uF ceramic capacitors (581-08055C104K) $0.121 each, $0.242 total)
1 FTDI FT232RL Serial-USB Interface (895-FT232RL) $5.43 each

So in Canadian dollars the total cost for parts is $17.72, assuming you just make the one and order no extras.  If you made all 3 you'd be around $13.58 each.  Quite a bit better than the $165 or so Davis lists the WeatherLink USB at!

I would recommend ordering extra AT45s at a minimum, though, as they're probably the most likely thing to mess up.

Tools & Supplies:
Soldering Iron with fine tip
Decent quality fine solder (eg. 0.031" Kester 60/40)
Decent flux (eg. SRA #312 Flux Pen)
Arduino (eg. Arduino Uno)
Some wire for connecting between AT45s and Arduino
Optional, SOIC8 Breakout Board or SOIC8 to DIP (if using Arduino with breadboard)
Optional, but recommended - an anti-static wrist band
Optional, but recommended if your hand is shaky like mine - An SMD rework station
     I use an Aoyue 968A+ rework station/soldering iron with Hakko tips and find it works well

Programming the AT45DB011D
If you are using a breakout board or a SOIC-DIP adapter solder the AT45 to the board. Edit/update Or buy a SOIC8 clip from aliexpress and use that to clip on the chip.  Much easier. End edit Soldering SMDs is a topic of it's own, so if you need help just google it.  I have neural issues and I shake quite a bit so I prefer to flux and tin the pads on the board first, then use an SMD rework heat gun to heat the solder and board while I use a set of tweezers to move the chip in place.
Alternatively, if you are using only wires, you can solder them directly to the pins of the AT45.  You should tin the wire and use the minimum amount of solder possible to attach the wires. Check each one to make sure it's firmly attached (pull gently) and not touching it's neighbour.
Connect the other end of the wires to the Arduino.  The pins of the AT45 are numbered like this:
    1   8
    2   7
    3   6
    4   5
If you look really carefully there'll be a tiny triangle or dimple at the #1 pin side (usually next to #1 pin).  These pins connect to the Arduino as follows:
    AT45DB011D  ------------  ARDUINO
    1 (SI/MOSI)   ------------  Pin 11
    2 (SCK)         ------------  Pin 13
    3 (RESET)      ------------  Pin 8
    4 (CS)          ------------  Pin 10
    5 (WP)         ------------  Pin 7
    6 (VCC)        ------------  3.3V
    7 (GND)        ------------  Ground
    8 (SO)          ------------  Pin 12

Once everything's connected open the Arduino application and open the Davis_Weatherlink_Programmer sketch attached to this post, or copy/paste the following into a blank sketch:
Code: [Select]
#include <SPI.h>
/*  This code by default reads the 64 byte unique Device Identifier on
    the attached AT45DB001D, outputs it to the console, and then calculates
    the 64 bytes to be programmed in the Security Register to match a
    genuine Davis Weatherlink interface, and outputs those 64 bytes
    to the console.  By uncommenting the last section in the setup() loop
    you can choose to program the Security Register. But first make sure that
    the read was successful and the calculated bytes are correct before enabling
    writing.
    *******
    NOTE:  YOU ONLY GET ONE CHANCE TO WRITE THE SECURITY REGISTER!
    So make sure communication with the AT45 is OK or you'll have a dead
    dataflash on your hands!
    *******
*/
   
//DataFlash Commands
#define DATAFLASH_READ_MANUFACTURER_AND_DEVICE_ID 0x9F
#define DATAFLASH_READ_SECURITY_REGISTER 0x77
#define DATAFLASH_STATUS_REGISTER_READ 0xD7
#define DATAFLASH_CHIP_ERASE_0 0xC7
#define DATAFLASH_CHIP_ERASE_1 0x94
#define DATAFLASH_CHIP_ERASE_2 0x80
#define DATAFLASH_CHIP_ERASE_3 0x9A
#define DATAFLASH_READ_SECURITY_REGISTER 0x77
#define DATAFLASH_PROGRAM_SECURITY_REGISTER_0 0x9B
#define DATAFLASH_PROGRAM_SECURITY_REGISTER_1 0x00
#define DATAFLASH_PROGRAM_SECURITY_REGISTER_2 0x00
#define DATAFLASH_PROGRAM_SECURITY_REGISTER_3 0x00


//As per Watson's work described at http://www.wxforum.net/index.php?topic=18110.msg200376
int const GreenDot_Table[256] =
{
0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C, 0x21, 0x25, 0x29, 0x2D, 0x31, 0x35, 0x39, 0x3D,
0x46, 0x42, 0x4E, 0x4A, 0x56, 0x52, 0x5E, 0x5A, 0x67, 0x63, 0x6F, 0x6B, 0x77, 0x73, 0x7F, 0x7B,
0x8C, 0x88, 0x84, 0x80, 0x9C, 0x98, 0x94, 0x90, 0xAD, 0xA9, 0xA5, 0xA1, 0xBD, 0xB9, 0xB5, 0xB1,
0xCA, 0xCE, 0xC2, 0xC6, 0xDA, 0xDE, 0xD2, 0xD6, 0xEB, 0xEF, 0xE3, 0xE7, 0xFB, 0xFF, 0xF3, 0xF7,
0x18, 0x1C, 0x10, 0x14, 0x08, 0x0C, 0x00, 0x04, 0x39, 0x3D, 0x31, 0x35, 0x29, 0x2D, 0x21, 0x25,
0x5E, 0x5A, 0x56, 0x52, 0x4E, 0x4A, 0x46, 0x42, 0x7F, 0x7B, 0x77, 0x73, 0x6F, 0x6B, 0x67, 0x63,
0x94, 0x90, 0x9C, 0x98, 0x84, 0x80, 0x8C, 0x88, 0xB5, 0xB1, 0xBD, 0xB9, 0xA5, 0xA1, 0xAD, 0xA9,
0xD2, 0xD6, 0xDA, 0xDE, 0xC2, 0xC6, 0xCA, 0xCE, 0xF3, 0xF7, 0xFB, 0xFF, 0xE3, 0xE7, 0xEB, 0xEF,
0x31, 0x35, 0x39, 0x3D, 0x21, 0x25, 0x29, 0x2D, 0x10, 0x14, 0x18, 0x1C, 0x00, 0x04, 0x08, 0x0C,
0x77, 0x73, 0x7F, 0x7B, 0x67, 0x63, 0x6F, 0x6B, 0x56, 0x52, 0x5E, 0x5A, 0x46, 0x42, 0x4E, 0x4A,
0xBD, 0xB9, 0xB5, 0xB1, 0xAD, 0xA9, 0xA5, 0xA1, 0x9C, 0x98, 0x94, 0x90, 0x8C, 0x88, 0x84, 0x80,
0xFB, 0xFF, 0xF3, 0xF7, 0xEB, 0xEF, 0xE3, 0xE7, 0xDA, 0xDE, 0xD2, 0xD6, 0xCA, 0xCE, 0xC2, 0xC6,
0x29, 0x2D, 0x21, 0x25, 0x39, 0x3D, 0x31, 0x35, 0x08, 0x0C, 0x00, 0x04, 0x18, 0x1C, 0x10, 0x14,
0x6F, 0x6B, 0x67, 0x63, 0x7F, 0x7B, 0x77, 0x73, 0x4E, 0x4A, 0x46, 0x42, 0x5E, 0x5A, 0x56, 0x52,
0xA5, 0xA1, 0xAD, 0xA9, 0xB5, 0xB1, 0xBD, 0xB9, 0x84, 0x80, 0x8C, 0x88, 0x94, 0x90, 0x9C, 0x98,
0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF, 0xC2, 0xC6, 0xCA, 0xCE, 0xD2, 0xD6, 0xDA, 0xDE
};

/*  Pin connection definitions.  Pin connections between Arduino and Dataflash
    should be as follows:
    AT45DB011D  ------------  ARDUINO
    1 (SI/MOSI) ------------  Pin 11
    2 (SCK)     ------------  Pin 13
    3 (RESET)   ------------  Pin 8
    4 (CS)      ------------  Pin 10
    5 (WP)      ------------  Pin 7
    6 (VCC)     ------------  3.3V
    7 (GND)     ------------  Ground
    8 (SO)      ------------  Pin 12
   
    Note that pin #s on AT45DB are as follows:
    1   8
    2   7
    3   6
    4   5
   
    A breakout board for the SOIC package makes connections easier but isn't
    strictly necessary
*/
int csPin = 10;
int resetPin = 8;
int writeProtectPin = 7;

int delayTime = 500; //half-second typical delay

void setup(){
  //Initial setup & SPI Initialization
  pinMode(csPin,OUTPUT);
  SPI.begin();
  SPI.setDataMode(SPI_MODE3);
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(SPI_CLOCK_DIV2);
  Serial.begin(19200);
  delay(delayTime*4); //wait 2 seconds before continuing

  //Begin communication tests
  Serial.println("Attempting communication with DataFlash...");
 
  //First we get the current status register
  uint8_t STATUS;
  digitalWrite(csPin,LOW);
  SPI.transfer(DATAFLASH_STATUS_REGISTER_READ);
  STATUS=SPI.transfer(0);
  digitalWrite(csPin,HIGH);
  Serial.print("Status Register: 0b");
  Serial.println(STATUS,BIN);
  Serial.println("Format: RDY MEMCOMP 0 0 1 1 SECPROT PAGESZ");
  delay(delayTime);
 
  //Next Manufacturer ID and Device ID
  byte MANUFACTURER_DEVICE_ID[4];
  digitalWrite(csPin,LOW);
  SPI.transfer(DATAFLASH_READ_MANUFACTURER_AND_DEVICE_ID);
  for (int i=0;i<4;i++){
    MANUFACTURER_DEVICE_ID[i]=SPI.transfer(0);
  }
  digitalWrite(csPin,HIGH);
 
  //Output result
  Serial.print("Manufacturer ID (Should be 0x1F): ");
  Serial.println(MANUFACTURER_DEVICE_ID[0],HEX);
  Serial.print("Device ID byte1 (should be 0x22): ");
  Serial.println(MANUFACTURER_DEVICE_ID[1],HEX);
  Serial.print("Device ID byte2 (should be 0x00): ");
  Serial.println(MANUFACTURER_DEVICE_ID[2],HEX);
  Serial.print("Length of Extended Device Info: ");
  Serial.println(MANUFACTURER_DEVICE_ID[3],HEX);
  delay(delayTime); 
 
 
  /*Security Register
  The Security Register consists of two 64-byte parts, composing a total
  of 128 bytes.  Bytes 0-63 are one-time user programmable.  Bytes 64-127
  are programmed at factory and can't be changed.  As outlined at
  http://www.wxforum.net/index.php?topic=18110.0 Davis calculates the first
  64 bytes based on an algorithm that uses the second 64 bytes and the values
  in the GreenDot_Table above.  Here we will read the 64 factory-programmed bytes
  and calculate what should be programmed for the other 64 bytes. 
 
  */
  byte FACTORY_SECURITY_REGISTER[64]; //Factory-programmed
  byte USER_SECURITY_REGISTER[64]; //Calculated by us
 
  //We need to read the entire 128 bytes in one shot. 
  //Start with verifying the first 64 bytes are unwritten
  Serial.println("Reading Security Register...");
  digitalWrite(csPin,LOW);
  SPI.transfer(DATAFLASH_READ_SECURITY_REGISTER);
  SPI.transfer(0x00);//dummy 1
  SPI.transfer(0x00);//dummy 2
  SPI.transfer(0x00);//dummy 3
 
  Serial.println("Checking that Programmable Register is empty (0xFF)...");
  for (int i=0;i<64;i++){
    uint8_t CURRENT_BYTE;
    CURRENT_BYTE=SPI.transfer(0x00);
   if (CURRENT_BYTE != 0xFF){
    Serial.print("Error!  Byte #");
    Serial.print(i);
    Serial.println(" is not 0xFF!!");
   }
  }
   
  // Read Factory programmed 64 Byte security Register
  Serial.println("Reading Factory-programmed Security Register..,.");
  for(int i=0;i<64;i++){
    int byteNumber = i+64;
    Serial.print(byteNumber);
    Serial.print(" - 0x");
    FACTORY_SECURITY_REGISTER[i]=SPI.transfer(0x00);
    Serial.println(FACTORY_SECURITY_REGISTER[i],HEX);
  }
  digitalWrite(csPin,HIGH);
  delay(delayTime);
 
  // Calculate User-programmable security bytes
  Serial.println("Calculating User-Programmable Security Register...");
  // The first 3 bytes can be anything.  Davis uses it as a serial number
  USER_SECURITY_REGISTER[0]=0x01; //I just used 1, 2, 3...  Change as you like
  USER_SECURITY_REGISTER[1]=0x02;
  USER_SECURITY_REGISTER[2]=0x03; 

  /* Calculate the remaining 61 bytes
  This is taken verbatim from Watson's post, above. location is the location
  in the green dot table that the value we need at position i is located. 
  Because we're using an 8-bit unsigned integer when the calculation below for
  location is greater than 255 it loops around and starts at 0 again.
  */
  uint8_t location,i;
  for ( i=3; i<64; i++){
    Serial.print("Byte #");
    Serial.print(i);
    location =  (uint8_t)FACTORY_SECURITY_REGISTER[i]+i;
    Serial.print("   Location in Table: ");
    Serial.print(location,DEC);
    USER_SECURITY_REGISTER[i] = GreenDot_Table[location];
    Serial.print("   Value: 0x");
    Serial.println(USER_SECURITY_REGISTER[i],HEX);
  }
  delay(delayTime);
 
  //Uncomment (remove the /* at the start and */ at the end) the lines
  //below to program the Security Register
/*
  boolean wait = true; //Make sure chip isn't busy
  while (wait == true){
    uint8_t STATUSREG;
    uint8_t NOTBUSY;
    digitalWrite(csPin,LOW);
    SPI.transfer(DATAFLASH_STATUS_REGISTER_READ);
    STATUSREG=SPI.transfer(0);
    digitalWrite(csPin,HIGH);
    NOTBUSY= getBit(STATUSREG, 7);
    if (NOTBUSY == 1){
     wait=false;
    }
  }

  digitalWrite(csPin,LOW);
  Serial.println("Programming security register...");
  SPI.transfer(DATAFLASH_PROGRAM_SECURITY_REGISTER_0);
  SPI.transfer(DATAFLASH_PROGRAM_SECURITY_REGISTER_1);
  SPI.transfer(DATAFLASH_PROGRAM_SECURITY_REGISTER_2);
  SPI.transfer(DATAFLASH_PROGRAM_SECURITY_REGISTER_3);
  for(int i=0;i<64;i++){
   Serial.print("Programming Byte ");
   Serial.println(i);
   SPI.transfer(USER_SECURITY_REGISTER[i]);
  }
  digitalWrite(csPin,HIGH); 
 
  //Verify everything wrote out OK
  wait=true; //Make sure chip isn't busy
  while (wait == true){
    uint8_t STATUSREG;
    uint8_t NOTBUSY;
    digitalWrite(csPin,LOW);
    SPI.transfer(DATAFLASH_STATUS_REGISTER_READ);
    STATUSREG=SPI.transfer(0);
    digitalWrite(csPin,HIGH);
    NOTBUSY= getBit(STATUSREG, 7);
    if (NOTBUSY == 1){
     wait=false;
    }
  }
  delay(delayTime);
 
  Serial.println("Verifying everything went OK...");
  byte VERIFY_SECURITY_REGISTER[128];
  digitalWrite(csPin,LOW);
  SPI.transfer(DATAFLASH_READ_SECURITY_REGISTER);
  SPI.transfer(0x00);//dummy 1
  SPI.transfer(0x00);//dummy 2
  SPI.transfer(0x00);//dummy 3
  for(int i=0;i<128;i++){
    VERIFY_SECURITY_REGISTER[i]=SPI.transfer(0x00);
  }
  digitalWrite(csPin,HIGH);
 
  boolean writeOk = true;
  for (int i=0;i<64;i++){
    if (USER_SECURITY_REGISTER[i]!=VERIFY_SECURITY_REGISTER[i]){
        Serial.print("Error at security register ");
        Serial.print(i);
        Serial.print(": Should be 0x");
        Serial.print(USER_SECURITY_REGISTER[i],HEX);
        Serial.print(".  Is 0x");
        Serial.print(VERIFY_SECURITY_REGISTER[i],HEX);
        Serial.println(".");       
        writeOk = false;
    }
  }
  if (writeOk == true){
      Serial.println("Looks like everything went great!");
   }
   else{
      Serial.println("Oh no!  There was a problem programming the security register!!");
   }

*/
}
void loop(){
}

uint8_t getBit(uint8_t bits, uint8_t pos){
   return (bits >> pos) & 0x01;
}

Upload the sketch to the Arduino, then open the Serial Monitor from the Arduino application.  You should see the results of some tests, including a status read (which would typically output 10001100), a check to make sure that the programmable register is empty/not programmed (should read all 0xFF, if not there's a problem with the chip or your connections),  output of the factory security register, and a calculation of bytes 3-63 that we have to program based on the factory security register (as per Watson's observation bytes 0-2 are a serial number and can be set to anything). 

You should get no errors and the output should be repeatable (ie. if you click the Reset button on top of the Arduino you should get the exact same output every time).  If you get errors check all your connections from the Arduino to the AT45. As per iBangkok24's observation try the other ground on the Arduino board to make sure that's not the problem.

Once everything appears OK you can uncomment (remove the /* and */) the section at the end of the code that deals with programming the security register.  Upload the program again.  This time the security register will be programmed, and afterwards it'll be verified.  Out of 8 chips I programmed one didn't work.  It refused to change one bit from 0xFF, likely due to either a defective chip or me damaging it with overheating or static electricity.

Once the chip is programmed you can remove it from the wires/breakout board.

Assembling everything
Tin the pads on the belfryboy board (EXCEPT the header tabs and possibly the U1 and IC1 pads if using a soldering iron, depending on technique).  Solder the 0.1uF capacitors to the places marked C1 and C2, being careful not to solder them together or solder the pads together.  Solder the 10uF tantalum capacitor to C3, with the grey stripe pointing towards U1's location (make sure this is installed the right way around as tantalum capacitors are polarized and will be destroyed if installed backwards).

Solder the FTDI RS232RL to the U1 location.  Note that on the top of the chip there's a tiny dimple at pin one.  That dimple should be located where the o is silkscreened on the board.  A rework station really comes in handy for soldering this high of a pin density chip unless you're really steady or really patient.  If you don't have a rework station solder just one pin so that the chip is in the proper orientation/location.  Then tack one of the pins on the opposite side.  Once that's done solder the rest of the pins.  Google SMD soldering for more examples of technique.

Solder the AT45 to IC1 location.  Note again that a o is silkscreened at pin 1 location.  Recall that we already identified pin one of the AT45 by the triangle and/or dimple located on the top of the chip.  Align the board and chip correctly and solder into place.

Insert the header from the BACK of the board (where the white rectangular outline is).  Looking at the header from the hole side the pins are numbered like this:
2  4  6  8 etc.
1  3  5  7

A careful look at the long side of the header near the bottom where the pins extend out of it you should see a triangle pointing upward at pin one.  See page 107 of this pdf for more details.

Pin 1 should insert into the hole with the white square outlining it on the PCB.  Push all the way in till it clicks.  Then solder the pins from the other side of the board, taking care not to short any to each other.

Finally, solder the USB cable to USB header.  The red wire goes to Vbus.  White is D-.  Green is D+.  The two black wires (one is actually bare wire with a black sleeve over it) go to Gnd. 

Finishing it up
Once you're done wiring you can pot the board with Techspray or epoxy, or wrap it in electrical tape, or just leave it as-is.  At your Davis console unplug power and remove the batteries.  Insert your new logger all the way into the port and route the wire appropriately.  Re-install the batteries and the cover and plug power back in.  Plug the USB cable into your PC and proceed to set it up as outlined by belfryboy.

If you're using linux, you can use minicom to test communication (as outlined here), although I never found that worked right for me the first time.  Instead, I installed weewx and ran wee_config_vantage as outlined here to get things working.

Hopefully that helps someone out.  I realize this isn't new information but after spending several hours figuring things out I thought I'd try to simplify it for the next person who comes along.

Thanks again everyone for the service you've done in helping restart 3rd party dataloggers!!
« Last Edit: June 23, 2017, 07:51:12 PM by JoeBean »

Offline belfryboy

  • Forecaster
  • *****
  • Posts: 489
  • waiting for the rain.....
    • Belfryboy Blog
Re: DIY "GREEN DOT" Data Logger
« Reply #212 on: December 02, 2014, 01:38:04 PM »
That is fantastic! Many thanks for sharing this with us.

And for fun I have knocked up a circuit to program the board. It use the FTDI FT232RL chip, an Arduino ProMini (3.3V 8MHz) and a ZIF socket like this one






Here is the OSH  Park project DataFlash Programmer
« Last Edit: December 02, 2014, 02:36:56 PM by belfryboy »

Offline rdsman

  • Senior Contributor
  • ****
  • Posts: 249
Re: DIY "GREEN DOT" Data Logger
« Reply #213 on: December 02, 2014, 04:33:28 PM »
Joe:

Great job!

Ray

Ray

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: DIY "GREEN DOT" Data Logger
« Reply #214 on: December 03, 2014, 07:46:18 AM »
JoeBean, very nice project. I'm wondering if it would be possible to simply use the Arduino for all the interfacing and emulate the logger's memory with it, too. Maybe a Moteino with the flash installed would be a possible candidate? One would still need the board from eg. OSHPark to be able to connect to the console, though.

Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: DIY "GREEN DOT" Data Logger
« Reply #215 on: December 03, 2014, 09:19:59 PM »
Hi all,
I've benefitted enormously from all the hard work done by everyone in this thread and have built several clone dataloggers successfully following the information here.  To give back in some small way I thought I'd do a quick how-to writeup for those who may read this but are too intimidated by the technical aspects to give it a try.  It's really not too hard!

THIS IS AWESOME!  Thank you!    =D&gt;

Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: DIY "GREEN DOT" Data Logger
« Reply #216 on: December 03, 2014, 09:34:26 PM »
JoeBean, very nice project. I'm wondering if it would be possible to simply use the Arduino for all the interfacing and emulate the logger's memory with it, too. Maybe a Moteino with the flash installed would be a possible candidate? One would still need the board from eg. OSHPark to be able to connect to the console, though.

I got halfway through doing something like this last winter and will hopefully pick it up again this winter.  The incredibly painful part of doing this is the Dataflash's bizarre support for page sizes that are either 256 bytes or 264 bytes.  Davis uses the latter whereas the flash chip on the Moteino is only capable of the former.  So to stay true to the Davis record size expected from any piece of software out there requires a lot of jumping through hoops that I got tired of.  That would then be followed by a bunch of testing to make sure the flash logging worked right for a bunch of different cases (eg. start logging in the right spot after a power loss, handle wraparound in the flash, etc).

Offline Uksa007

  • Need a Logger board?
  • Contributor
  • ***
  • Posts: 106
Re: DIY "GREEN DOT" Data Logger
« Reply #217 on: December 03, 2014, 09:47:57 PM »
For anyone that may be interested I had a need for a real RS232 (PC levels) logger, so I put together a solution using a MAX3221E, I also had a need for USB so I made a board that can do both.
I program the AT45DB011 memory in circuit, so it works with the "Green Dot" consoles.
Also flow control is configured so it should work with weatherlink software if you have a licence, e.g. could replace failed hardware.
Works great with Cumulus, and should work with any software that supports Davis Pro/Vue consoles.

Photos show prototypes built as RS232 on the Left and USB on the right.

Thought I might offer them for anyone that needs a RS232 solution or USB, or potentially both on the one board.

USB Version uses genuine FTDI USB chip, includes 2m USB Cable $50 USD order here
RS232 Version uses genuine MAX3221E chip, includes 1.5m DB9 Cable  $50 USD order here
Prices Include Free International Postage!

Send me a PM if you are interested
« Last Edit: December 05, 2014, 09:18:28 PM by Uksa007 »
Need a green dot compatible Data Logger Board for your Davis VP, VP2, Vue or Weather Envoy?
USB Version uses genuine FTDI USB chip, includes 2m USB Cable $79.99 USD order here
RS232 Version uses genuine MAX3221E chip, includes 1.5m DB9 Cable  $89.99 USD order here
See here for more info.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: DIY "GREEN DOT" Data Logger
« Reply #218 on: December 06, 2014, 03:08:16 PM »
Thanks Joe, that's a great writeup.  I got a little ahead of myself and soldered the chip on the board first.  Can the programming be done in-circuit, or do I need to desolder and remove before programming?  Thanks.
Ron

Offline EA1EF

  • Senior Member
  • **
  • Posts: 98
Re: DIY "GREEN DOT" Data Logger
« Reply #219 on: December 28, 2014, 12:14:31 PM »
www.meteocampoo.es team

EDIT This problem dissapear by de moment and now it works fine EDIT

Hello, I report a extrange problem with the BelfryBoy green dot datalogger (USB), this problem probably are any thing from CONSOLE.

Resume: I only can receive the datalogger on Disagnostic Mode (pres and hold TEMP+HUM).

Explain: HARDWARE:

- Davis Vantage VUE (US) Console and ISS on 900Mhz (placed in SPAIN), the station came fron second hand buy and repaired by me, I have yhe low battery ISS problem and I replaced the supercap. Original AC and battery sourced. Test only battery sourced without AC power.
- PC with W7 ultimate and weatherlink 6.03.
- BelfryBoy green compatible datalogger USB

Problem:
none function on datalogger, nor plug and play recognized, not data transfer to software, unstable function.
test for reanimation:

- powerdown console (remove bateries). none results
- complete erase data of console (Disagnostic Mode (pres and hold TEMP+HUM then 2ND - CLEAR hold 6 seconds) none results
- unplug datalogger fron console and USB-PC port. (none results).

- casually y go to DIAGNOSTIC MODE then PC sound plug and play music an see as USB plug and play came ON anf port COM8 came back, test fron weather link and IT WORKS completely, download all datalogger, run test console and ISS, etc.

But get out fron diagnostic mode and COM USB disappears and none work.

www.meteocampoo.es team

« Last Edit: January 18, 2015, 10:56:24 AM by EA1EF »

Offline djdiaz

  • Member
  • *
  • Posts: 1
Re: DIY "GREEN DOT" Data Logger
« Reply #220 on: February 07, 2015, 06:59:48 PM »
Thanks for the great writeup Joe, and to all those who came before to make this possible. 

FWIW, I hand soldered leads onto my first AT45 chip and I think I killed it (arduino said programming failed).  Luckily I ordered 2 extra chips, and the second time I used solder paste and hot air to attach it to an SOIC8 breakout board I ordered from OSHPark at the same time I ordered belfryboy's pcb.  That time it worked like a champ, and I was able to re-heat the chip with hot air, remove it from the breakout board, then used the same method to attach it to the belfryboy board.  Everything else went smoothly and about 30 min later I had a working logger!

In case anyone is put off by the prospect of hand soldering the AT45 or the FTDI chip, solder paste and hot air are the way to go.  I have used the method described here several times with good success: https://www.youtube.com/watch?v=e5QxcKMNAEk (technique is discussed at 36:22).  I know it's not the right way, but it's a cost effective way to get into this type of work, and like I said, it worked for me on more than one occasion.

Offline JohnDoe1983

  • Hi !
  • Senior Member
  • **
  • Posts: 67
  • Just love to watch the weather
    • John station
Re: DIY "GREEN DOT" Data Logger
« Reply #221 on: February 08, 2015, 01:35:28 PM »
Hi.

All of you guys impress me with your work. Even though I do not make any electronic hardware, it is a great pleasure to read you.

Wow!!
John
Quebec
Canada
Ex-weather man

Davis Vantage Vue
Oregon WMR200
Lacrosse

http://www.wunderground.com/personal-weather-station/dashboard?ID=IQUEBECQ10#history

Offline andre58

  • Member
  • *
  • Posts: 7
Re: DIY "GREEN DOT" Data Logger
« Reply #222 on: October 15, 2015, 05:22:21 PM »
First post here, so i say hi to you all.
My name is André and i'm from the Netherlands.
I own a Vantage Vue since a couple of months and am working on a datalogger with wifi interface
using a ESP8266 Wifimodule.
The ESP8266 has some firmware loaded to act as a transparent UART and if things work out well
i should get the Vantage Vue data on every computer in my house.

However, i have a problem programming the AT45db011b.
I built an Arduino shield to program the AT45 and I'm 99% sure it's OK but it won't do it's job.
I tried several AT45's, but none of them even reads OK.

Now I realized that even though the AT45 is powered with 3.3V all the other pins still get
5V data from the arduino pins.
Could this possibly be the reason why i can't read or write my AT's and maybe kills them?
Any help is much appreciated.


Offline Uksa007

  • Need a Logger board?
  • Contributor
  • ***
  • Posts: 106
Re: DIY "GREEN DOT" Data Logger
« Reply #223 on: October 15, 2015, 05:50:25 PM »
Hi,

Yes you need an arduino that is running on 3.3v.

I use a nano.

Regards.
Need a green dot compatible Data Logger Board for your Davis VP, VP2, Vue or Weather Envoy?
USB Version uses genuine FTDI USB chip, includes 2m USB Cable $79.99 USD order here
RS232 Version uses genuine MAX3221E chip, includes 1.5m DB9 Cable  $89.99 USD order here
See here for more info.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: DIY "GREEN DOT" Data Logger
« Reply #224 on: October 15, 2015, 05:51:11 PM »
A few things. In order to get effective help and to better understand what you're trying to do and what doesn't work, you should post the schematics and the complete code or the relevant parts of it. Several people were successful in programming the security chip, they will probably able to help (I care more about the radio protocol). Though, a glance at the AT45db011b DS hints that driving the input with 5V will not kill the part, even if its max Vcc is 3.6V.

OTOH, the console can only serve a single client at a time, if you use the published Davis serial protocol, even if you use a TCP stack to access it. It's the exact same protocol but on a different medium. It's command-based and bi-directional, so unless you roll your own interpreter for the data designed to be transmitted to a single receiver, you can't make use of it in multiple devices on your network. There is one product that is able to serve its own receievr and an original (or another other of the same device) Davis console at the same time, the MeteoBridge and its associated firmware.

Radio packets transmitted by the Vue ISS, however, can be received and fully interpreted anywhere within its range. They provide only the raw sensor data, though. Should yo decide to go on that route, there's plenty of info in the forums on that, as well.

 

anything