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

0 Members and 1 Guest are viewing this topic.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6879
    • Eagle Bay Weather
Re: DIY "GREEN DOT" Data Logger
« Reply #275 on: April 02, 2017, 08:37:37 PM »
It was a joke, actually.  But, my smoker IS connected to the Internet!  You have no idea how useful that is while waiting for the "stall" on a Boston Butt to end.  I can be out in the fishing boat and the app notifies me to return to the dock to deal with BBQ.  Just because some "guru" says the IoT is not understood by many doe not mean it cannot have value.

regardless, my point on Davis is still valid: the logger is archaic (but it goes nicely with the circa 70's console)

Offline torkelmj

  • Contributor
  • ***
  • Posts: 132
    • My weather station, etc.
Re: DIY "GREEN DOT" Data Logger
« Reply #276 on: April 05, 2017, 11:52:01 AM »
Maybe the minority should think twice next time before creating a headache for the majority, definitely not appreciated.   

That's one view of the world. I beg to differ.

Offline torkelmj

  • Contributor
  • ***
  • Posts: 132
    • My weather station, etc.
Re: DIY "GREEN DOT" Data Logger
« Reply #277 on: July 06, 2017, 11:59:59 AM »
hi,
My Vue is #6250 and Mfg code of ME18041xxxx.  'VER' returns May 1 2012. 'NVER' returns 3.0.

this is C source code for a funny experiments.
Code: [Select]
/*
 * compiler: Microchip XC8
 *
 *    PIC12F1822
 *     +--+ +--+
 * VCC |1  ~  8| GND
 *     |2     7| SDO
 *     |3     6| SCK
 *  SS |4     5| SDI
 *     +-------+
 */

// ... ... ...



Did anyone successfully implement & run this program?

I'm attempting to move from the AVR world to the PIC universe but I can't get this simple program to work as expected. While it works as intended when hooked up to a BusPirate, it certainly doesn't unlock the VP2 console (resulting in the "PLL NOT LCK" console message... which I believe refers to the radio/CC1021 configuration which also takes place on the same SPI bus).

I'm making ONE change to the original code, namely the LVP=ON pragma in order to use the Curiosity board programmer.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 600
Re: DIY "GREEN DOT" Data Logger
« Reply #278 on: July 06, 2017, 12:20:26 PM »
I'm attempting to move from the AVR world to the PIC universe ...
Well, I'm aware this is not really on topic, but still...

May I ask, why? Isn't the generally accepted approach is to choose the most appropriate tool (chip, vendor, etc.) for a given purpose? Of course, considering other constraints, like available support (which tends to be huge for AVR, thanks mainly to the Arduino), accumulated skill level, ease of use, available compilers and tools, accessibility, etc. In other words, what does the PIC do for you that the AVR doesn't? I'm not defending any, but I must note that accessibility and support makes the AVR(/Arduino) side incomparably easier to use. Also, fun fact: Microchip now owns both the "world" and the "universe" as well ;)

Offline torkelmj

  • Contributor
  • ***
  • Posts: 132
    • My weather station, etc.
Re: DIY "GREEN DOT" Data Logger
« Reply #279 on: July 06, 2017, 01:06:01 PM »
It seems that the 8-pin ATTinys don't support SPI in mode 3. The VUEs seem to be picky about this.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 600
Re: DIY "GREEN DOT" Data Logger
« Reply #280 on: July 06, 2017, 01:07:18 PM »
Ah. Strong argument.

Offline kashima

  • Member
  • *
  • Posts: 3
Re: DIY "GREEN DOT" Data Logger
« Reply #281 on: July 07, 2017, 12:29:54 AM »
Did anyone successfully implement & run this program?

Yes, it is working on my vantage vue.
I have wrote the HEX to the PIC using a PIC Start Plus.

HEX file are follows:

 [ You are not allowed to view attachments ]
« Last Edit: July 07, 2017, 12:32:58 AM by kashima »

Offline torkelmj

  • Contributor
  • ***
  • Posts: 132
    • My weather station, etc.
Re: DIY "GREEN DOT" Data Logger
« Reply #282 on: July 07, 2017, 02:55:55 AM »
Thanks. I'll just have to keep digging into this.
Again, my only change to the code is enabling low-voltage programming. Somehow the SS line seems to be pulled low way too early.

Offline night303

  • Member
  • *
  • Posts: 1
Re: DIY "GREEN DOT" Data Logger
« Reply #283 on: April 18, 2018, 01:56:01 PM »
Hello guys, my first post, but not first time I'm on this forum :)

During time I found some valuable information about Davis' v3 interface here, and devised few of my own solutions that I implemented successfuly on 5+ Davis Vantage Vue and Vantage Pro stations that operate 24/7 for years. So let me share that with you.

I read great PDF about Davis v3 protocol (http://meteo.annoyingdesigns.com/DavisSPI.pdf) by torkelmj and decided to make v3 emulator presented in that document. So I bought few ATTiny85 chips, already had programmer, and as base board I used interface board by belfryboy and simplified it. To skip USB->TTL->RS232->TTL conversion I reduced it to USB->TTL, reducing the cost and complexity, while keeping communication in perfect order. Also, since Davis' proprietary software interface costs money, I use Cumulus to stay in free software&hardware domain.

My design uses cheap USB->TTL cable from eBay, it's tested with Windows7 and Windows10 with latest updates and it works fine, it uses Prolific PL2302HX chip, and drivers are available from Prolific site. If it shows exclamation mark in Device Manager just reboot computer and it will work. Also I got info that it works with Raspberry Pi, but didn't tested it myself.
Can be bought here for 1.5 USD (link to specific seller is just for picture reference, you can buy from any seller, there are plenty on eBay offering exactly this same cable) : https://www.ebay.com/itm/USB-To-RS232-TTL-UART-PL2303HX-Auto-Converter-USB-to-COM-Cable-Adapter-Module/201539573206 My board has three pins that connects to this cable marked with letters on solder mask (G-green, W-white, B-black) for easier connecting.

Boards can be ordered directly from OSHPark or downloaded and made in any PCB factory you like, I designed board and put open-source-hardware mark, feel free to improve it if you like, and hopefully share design with others. If someone wants schematic and board in Eagle format, I can attach them. Just board is here : https://oshpark.com/shared_projects/M0mczaXC

Software in ATTiny is compiled from Bascom sources from above mentioned PDF, they are work of user watson from this forum. I'm attaching HEX files, but important thing is that AVR hex doesn't contain fuse bits information so you will have to specify them while programming chip. They are : Lock : 0xFF, FuseLow : 0xC1, FuseHigh : 0xDF, FuseExtended : 0xFF. It is important to program them correctly, else program won't work. For me both constant and random versions of firmware worked, but to be sure use constant version.

Besides ATTiny85, you will need : 1k or 470R resistor in SMD 0805 format, 0.1uF ceramic capacitor in SMD 1206 format and 3v Zener diode in SMD MINIMELF format. Capacitor is used as bypass cap, actually not needed in this application, but I put it for a good practice. Resistor and Zener are used to clamp 5V from USB->TTL cable to 3V, it worked for me even with 5V, but for a good practice it's better to clamp voltage as microcontroller in Davis operates at 3V. Only remaining part is 2x10 female header with 2mm pitch. Original data logger uses header that is a bit longer than ones I could find, by not pressing it directly to board, but soldering it with 1mm space between header plastic and board will do the trick and header will go firmly into expansion port.

So that's my solution, all for around 10 bucks. Once again, many many thanks to all users from this forum that made this interface possible, especially three mentioned above. Great work guys!

 [ You are not allowed to view attachments ]   [ You are not allowed to view attachments ]

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 653
  • BismarckWeather.net
    • BismarckWeather.net
Re: DIY "GREEN DOT" Data Logger
« Reply #284 on: April 18, 2018, 05:02:51 PM »
After working with the Software Designed Radio's with the NOAA weather radio, I wish I was smart enough to combine a SDR to retrieve the Davis ISS signal, and combine it with a Raspberry PI.  Basically turn the PI into a Weather Link IP.  In short, a replacement for a full console and data logger.

Only other issue is that you would need to add an external barometer and temp gauge to truly match what a console does.

Alas, I'm not a programmer. 
http://www.BismarckWeather.net
Davis VP2, Cumulus, Blitzortung, Bloomsky, Saratoga Scripts

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 802
  • K2BIG
Re: DIY "GREEN DOT" Data Logger
« Reply #285 on: April 18, 2018, 05:39:48 PM »
Some of the SDR heavy lifting has already been done.....

https://github.com/bemasher/rtldavis
WU Gold Stars for everyone! :lol:

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 653
  • BismarckWeather.net
    • BismarckWeather.net
Re: DIY "GREEN DOT" Data Logger
« Reply #286 on: April 19, 2018, 09:12:37 AM »
My idea was to basically create a replacement for the Virtual VP program.  Have a PI receive the data via SDR.  Then have a small database running on the PI.  Have it dish out the live data just like Virtual VP did.  Ideally via IP and multiple ports, and possible a serial driver.

Then have the data base store a history, basically like the data logger.  But also keep a history of when the last communication a particular port handed out the data.  Have a couple of weeks worth of data similar to what VVP could have done.

Like I said, I'm not a programmer.  But if you'd combine a copy of weewx or Cumulus MX on the same machine, you'd have a potent little device.  And you'd run it a lot cheaper than a second console and logger.  But you'd still need a barometer connected to it as well as probably an inside temp if you truly are replacing the console.
http://www.BismarckWeather.net
Davis VP2, Cumulus, Blitzortung, Bloomsky, Saratoga Scripts

Offline pfletch101

  • Senior Contributor
  • ****
  • Posts: 238
    • Personal Website
Re: DIY "GREEN DOT" Data Logger
« Reply #287 on: April 19, 2018, 10:22:56 AM »
Like I said, I'm not a programmer.  But if you'd combine a copy of weewx or Cumulus MX on the same machine, you'd have a potent little device.  And you'd run it a lot cheaper than a second console and logger.  But you'd still need a barometer connected to it as well as probably an inside temp if you truly are replacing the console.

Assuming that you already have the Pi and an SDR dongle, you can get and use an Ambient Temp/humidity sensor (which can be located where you want it, rather than being constrained by the location of the Pi, with its power supply) for just over $10.00, and a decent barometer sensor to wire to the Pi for about the same amount. Some programming would be required, of course.  :-)
Vantage Pro 2+ with WeatherLink - data incorporated in domestic energy production (PV) and use monitoring system.

Offline pfletch101

  • Senior Contributor
  • ****
  • Posts: 238
    • Personal Website
Re: DIY "GREEN DOT" Data Logger
« Reply #288 on: April 19, 2018, 09:14:36 PM »
Some of the SDR heavy lifting has already been done.....

https://github.com/bemasher/rtldavis

Sadly, this project appears to be a 'work in progress' that stopped progressing a couple of years ago.
Vantage Pro 2+ with WeatherLink - data incorporated in domestic energy production (PV) and use monitoring system.

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 802
  • K2BIG
Re: DIY "GREEN DOT" Data Logger
« Reply #289 on: April 20, 2018, 07:04:42 AM »
Note that I said "some" of the heavy lifting.  Unlike many of the consumer 433Mhz stations, Davis uses frequency hopping that adds an extra layer of complexity when trying to snag packets with an SDR.

IIRC, the above code can follow the frequency hops and collect data, but is missing the decoder part.  Since Boris/MeteoStick/MB-Pro have figured this out, it is obviously possible to decode the information.  My uneducated guess would be that Davis sends the exact same packet data over the air that they send to a wired console, so it may just be a matter of finding any progress made on decoding that and joining it to the SDR code.....
WU Gold Stars for everyone! :lol:

Offline kobuki

  • Forecaster
  • *****
  • Posts: 600
Re: DIY "GREEN DOT" Data Logger
« Reply #290 on: April 20, 2018, 07:45:37 AM »
On the air packet format and transmit scheduling is the same as on wire. The code in the mentioned repo can decode the radio packets and there are already a handful of solutions to make use of them, including my own here. If someone adept in golang could come up with a daemon that can serve the packets via eg. a simple tcp or unix socket interface (based on the bemasher repo), I'm willing to add handler code to my fork of the weewx driver.

Offline pfletch101

  • Senior Contributor
  • ****
  • Posts: 238
    • Personal Website
Re: DIY "GREEN DOT" Data Logger
« Reply #291 on: April 20, 2018, 10:24:34 AM »
In my (admittedly fairly brief) tests, with an antenna located within a few inches of a Davis console which shows excellent reception, and a good-quality SDR (that works very well with Ambient TH sensors), the software was apparently only able to detect/decode occasional transmissions. Life is too short - for me, at least - to try to use/debug/modify unsupported software in a language that I don't 'speak'. YMMV.

I will be sticking to downloading the data from the USB logger in my console, for now.
Vantage Pro 2+ with WeatherLink - data incorporated in domestic energy production (PV) and use monitoring system.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 600
Re: DIY "GREEN DOT" Data Logger
« Reply #292 on: April 21, 2018, 06:39:55 AM »
So this solution doesn't look reliable with the existing software. Too bad...

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 802
  • K2BIG
Re: DIY "GREEN DOT" Data Logger
« Reply #293 on: April 21, 2018, 08:20:04 AM »
So this solution doesn't look reliable with the existing software. Too bad...

For some background, I have only had my Davis VP2 for about a month now, after wrestling with various hacks to collect data from other consumer-oriented stations for years.

The only reason why I have not pursued these Davis hack setups any further is because of what I learned above.  If the SDR locks up or overflows the USB bus, you lose data.  If you have to shut down your logging computer with a serial or USB-connected console, you lose data.  Starting to see a recurring theme here?  I lost three weeks of data due to an unexpected hospital stay, combined with a USB bus lockup with an SDR.

My eyes were opened when I was setting up a genuine Davis USB logger a few weeks ago.  I needed to shut down my new weewx Raspberry Pi to install a realtime clock, and I was *floored* when I saw the weewx Vantage driver backfill data from the time that the computer was down thanks to its internal memory!   Made me realize that Davis calls the thing a "logger" because it has memory to LOG data...even when the connected device is offline.  Maybe data continuity means less to others, but the Davis logger is worth the price to me compared with options that do not have replay capabilities if the connected computer is down.

I do have the desire to crack the Davis wired console code one day, to put a Raspberry Pi or NodeMCU inside a wired VP2 ISS to make a wifi weather station.  Purely for the technical challenge, not something that I would ever personally use unless I could obtain the Davis logger's reliability levels.....
WU Gold Stars for everyone! :lol:

Offline kobuki

  • Forecaster
  • *****
  • Posts: 600
Re: DIY "GREEN DOT" Data Logger
« Reply #294 on: April 21, 2018, 08:41:56 AM »
My receiver and the weewx driver has been working stable for years. Currently the receiver has a bug that prevents correct reception of US channels and since I only have EU equipment I can't fix it easily. Just give it a try (or another one based on mine) sometime. It doesn't have log memory, though. It's running mostly on RPi3 devices in the wild and some of them are running from UPS solutions so they don't lose data on blackouts. The driver has been extensively tuned by me and also its upstream for the best precision we could achieve using available formulas and our own tests. There are ports for other MCUs and IIRC even for ESP8266-based devices. You can easily adapt any of those for cabled connections if you want since they use the same packet format as the RF ones.

Offline sjjh

  • Member
  • *
  • Posts: 2
Re: DIY "GREEN DOT" Data Logger
« Reply #295 on: June 26, 2018, 04:36:23 PM »
Hi, first post here. :)

We're trying to follow the different guides in this forum to create a DIY data logger. We use the pcb from night303 with an ATTINY85-20SU-ND as described in the PDF by  Torkelmj. To program the ATTINY85 we use an Arduino UNO and the program described by JoeBean. Unfortunately JoeBean used an AT45DB011 chip that seems to have a different pin assignment than the ATTINY85. We're thus a little unsure how to connect the ATTINY85 to the Ardunio. We came up with following set-up, but it seems not to work (no connection and out of sync-errors appear in the Ardunio sketch output, after changing pin 7 and 12 there's no output at all anymore, we might just have bricked the chip):
Code: [Select]
    AT45DB011D  ------------  ARDUINO
    1 (SI/MOSI) ------------  Pin 11
    2 (SCK)     ------------  Pin 13layout
    3 (RESET)   ------------  Pin 8
    4 (CS)      ------------  Pin 10
    5 (WP)      ------------  Pin 7
    6 (VCC)     ------------  3.3V
    7 (GND)     ------------  Ground
    8 (SO)      ------------  Pin 12


    ATTINY85-20SU-ND -------  ARDUINO
    1 (RESET)   ------------  Pin 8
    2 (WP)      ------------  Pin 7 (??)
    3 (CS)      ------------  Pin 10 (?)
    4 (GND)     ------------  Ground
    5 (SI/MOSI) ------------  Pin 11
    6 (SO)      ------------  Pin 12 (??)
    7 (SCK)     ------------  Pin 13
    8 (VCC)     ------------  5V

Can anybody confirm the pin assignment? Or give a hint how to proceed?

Thanks in advance!
Simon

Offline docbee

  • Forecaster
  • *****
  • Posts: 640
    • smartbedded
Re: DIY "GREEN DOT" Data Logger
« Reply #296 on: June 27, 2018, 04:53:50 PM »
ATTINY85 and AT45DB011 are completely different things IMHO. While the AT45DB011 is a serial data flash storage chip with a security register and some write once regions the ATTINY85 is a computing device that tries to trick the console by imitating the signal behavior expected by the console.

So the pin layout is not the main problem to solve when trying to use one as a drop-in replacement for the other. But may be I am missing something here. The most compatible way to Davis green dot is of course when you go the AT45DB011 route, but it requires to get a grip on those chips, which are EOL in the meantime.
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline sjjh

  • Member
  • *
  • Posts: 2
Re: DIY "GREEN DOT" Data Logger
« Reply #297 on: June 27, 2018, 05:42:05 PM »
Ah, damn it. Thx for your reply. So if I understand it correctly either we would need to find a successor of the AT45DB011 and hope that it works as well (I mean, Davis must continue to use some chip as well), or we would need to port the code printed in the PDF to an Arduino sketch.

//Edit: The replacement for the AT45DB011 seems to be the AT45DB021E [1] which might be compatible to it [2] and still seems to be available (e.g. via mouser). But as we bought the above mentioned PCB [3] and the AT45DB021E is not compatible to the ATTINY85 I'm wondering if we actually could use the AT45DB021E at all anyway? Anybody an idea? Thx!

[1] http://www.adestotech.com/pcn/pdf023.pdf
[2] https://www.adestotech.com/wp-content/uploads/doc8789.pdf
[3] https://oshpark.com/shared_projects/M0mczaXC
« Last Edit: July 06, 2018, 06:19:51 AM by sjjh »