Sunday, January 5, 2014

It is Venus Weather!


When the weather permits, every winter we can perform an astronomical observation that almost seems impossible.  If you know where to look, it is possible to observe the planet Venus with your naked eyes in full daylight!  You will need to know a few things to accomplish this feat...
Venus Anadyomene - Theodore Chasseriau
...and she'll probably need a jacket.

These cool clear winter days, as well as the astronomical position of the planets Venus and Earth will now allow us to see Venus in daylight. The bright “star” in the west just after sunset is the planet Venus.  If you have a small telescope or good pair of binoculars you can see that this “star” is a little crescent.  Even though the whole disk is not illuminated this planet is extremely bright due to the planets orbit bringing it closest to the Earth.

 
This is a Diagram of Where the Planets are...



This image I found on the Universtoday.com site illustrates this nicely.

 

 We have accomplished this easily several time in the last few clear weekends.  There are a couple of things you need to know to perform this feat. 

First, the planet is in close proximity to the sun in the sky.  You need to be real careful not to look at the sun, especially with binoculars or a telescope.  THIS WILL PERMANENTLY DAMAGE YOUR EYES! 

To avoid this stand in the shadow of a building or other structure looking south so the sun is hidden to your right-hand side (this also protects you as the sun moves across the sky to the west towards sunset - it will not emerge from behind the structure and keeps it out of site)

Sun is behind the roof line to the right

BTW - This picture is actually of the Comet McNaught I spotted in 2007 using this technique... If you can see it in this image please let me know I never found it but definitely saw it!

Secondly, You will need a clear blue sky!  Finally, you will need to approximately how far behind the sun is it?   There are some smartphone apps that will help...
Free from Android Store

 

With this tool, you simply start the app and aim your phone to the sky until the planet Venus lines up and the now shaded sun line up. 


Google Sky in Action 


Now you are ready to spot it. The best way to start is to use a pair of binoculars to locate it by systematically scanning the sky. If you are using binoculars focus them on a distant object, a jet contrail or if the moon is visible work great.  

Once you spot it, take note of the angle and move the binoculars to the horizon, and note a land mark straight below where the point you spotted it.  This also helps show someone else where to look!
Venus in Daylight ca.11:32AM PST 12/22/13 - (West is left)


Also, can you see the crescent shape?  No this is not the Moon.  If you rotate the view 180 degrees it is the same crescent you see in the first diagram's "Evening Sky" side of the diagram. All you'll need are a good pair of binoculars and a steady hand or a telescope on a tripod or other steady surface to see the tiny crescent.  

Now that you know where it is, try with your eyes only! 
So to see it without an optical aid,  there is a visual skill that you will need to learn.  Looking into a clear blue sky you will need to train your eyes to look into infinity!  The contrail or other object in the sky will help you train your eyes as you did the binocular focus, only the eye will try to focus and won't stick at any focal length like the binoculars do.  But the trick is not to look at anything close to change the eye's focus, we have used a paper tube to help focus attention to a small area of sky .  If there is a well-placed contrail or bird happens to fly by it will help train your eyes as well.   Once you train your eyes to focus at infinity, and find it once, you can’t help but see it. It looks like a little star up in the blue daytime sky. 

Hint: You may need to take off your sunglasses as you will need all the light gathering power your eyes have.

We have not been able to photograph it with a digital camera alone.  If you ever tried to photograph the moon without a telephoto, you know it will only show up as a dot so the chance of getting a star in blues sky is next to impossible, without at least some magnification.  The optical telephoto is pretty weak in my camera, and the digital zoom is useless for this, even when we could see it in the viewfinder, we never found a setting for the exposure. 

But, as you can see, but we were able to successfully take a few pictures through a small telescope simply shooting it through the eyepiece!  I used my little Celestron First Scope  (less the solar filter) to photograph these.   There is a lot of trial and error to get the autofocus to focus the telescope's image not the eyepiece, and the optical axis has a dark spot dead center that is due to the secondary mirror of this scope. Finding it with this much magnification that takes some doing as you only get to look at a small area of sky at a time.  Also, these images are "mirror images" due to the telescope's optics.
 
Here are some more Eyepiece Views, the large blue circle and spots are artifacts from the telescope.  It is not easy to line up the camera and the eyepiece, but it can be made to work.
 
 
 


Pretty cool huh?

 UPDATE: 1/6/2014. The crescent of Venus is, greatly elongated but is less than 10 Degrees from the Sun now, be extremely careful...or wait for it to appear once again in the morning sky!

 

 

 

Thursday, March 14, 2013

Wx Redux - The Vantage Vue Seeing Double?



Now my weather watching is expanding to multiple sites!  I was asked to recommend a reliable weather station for a bird (and hoot owl) sanctuary near by.  I had installed two stations for her there in the past few years.  First was a Dallas (AAG) 1-wire station. 
 
 


It was a wired station and I had the same one at my ranch. But maintaining these little guys was an issue. The bearings would fail after a few months.


 

 

Followed by a Lacrosse: 

 

 

…which lasted a couple years.  BTW this is the same rain sensor that the $99 station uses, it will be easy  to convert that one to a spare for my WW2

 






Seeing Double

I've had good luck with my  Wizard II so let's try the Davis... Vantage Vue


 



I got a couple one for the ranch, and one for the birds!

 

Hopefully everything will last a few years.  There were only two issues setting these up.
The ISS#2 ...I like this new packaging no Styrofoam!

 

First Problem…

It was a very minor issue but one of the Anemometers wind  cups would not attach to the station… I suspect the set screw was put in slightly askew and someone either returned it without telling anyone.  I would have simply suspected operator error but I just finished building the first one with no issue.  I called the support folks at Davis and they were most helpful and sent us a new set!  Very cool.
The vane and the wind cup

 

Second Problem…

We got a call from the bird lady shortly after we installed it for her. Saying there is no rain or wind and the console kept saying: ”low Battery on Transmitter”  I had run both stations side by side at the ranch for over a week and never saw an issue, now they were acting differently 10 miles away from each other. ( I had one set for CH#1 and the other set for CH#2)  I dropped by to see if there really was a battery issue, may be a charger issue as there was a rain event shortly after I installed it. Nope, battery measured to be good.  So I swapped her with mine and the problem re-appeared! This time with my good ISS.  After a few minutes I hit on the solution to the problem… I had her setup configured for to the default channel #1.  After changing hers to CH#2 as well the problem went away.  There must be enough local interference on that set of channels at that location that caused enough data packets to drop out.

Console #1 in Operation


Apparently
Davis does not send the ISS battery or charge state.  This would be really good and we could track the sun rise and sets through the solar cells as well as the charge times, instead they count lost packets and declare the transmitter’s battery is bad…

Moral of This Story? 
If we had only got one station we would have assumed the station was bad (…or the design was not working too well, and I would, of course, be thinking "what a @#!& piece of crap!)   The whole thing may have gone back to Amazon had I only had a sample set of one.  I don't really want to maintain two weather stations, only wanted to do installations thank you.
 

Other Than Those Issues...

One feature I got to test because I had two consoles on hand was to transmit the weather data from one console to another.  It worked pretty well. I did not see a real use for me as the ISS reaches the whole house from a pole on my deck about 80ft away from the house! The diagnostic screens are very helpful, I found the second screen to be the most use as it shows the radio data.  



I was never really a fan of this type of sensor ~ but it does install quickly
 
In Summary
 
This seems like a pretty good system.  It has it quarks but that seems to be part of the charm of Davis.  ( like the "no leap year" bug in the Wizard II) We had a rare rain event of several inches and was able to compare my home made rain gauge davis-wizzard-iii-rain.html  to this one.  At first I thought that my WWII was way off.  When I checked the Vue in the morning it read way less than my old unit's.  It was not until I scrolled to "Storm" total they matched to one tip of the bucket.  (only 0.01" difference: 1.82" to 1.83") This was a great verification of that older post.

The strange thing is the battery voltage is the voltage of the console battery,  Which are a pretty hefty string of three "C" cells,  I would like to see the charging and state of the thing that is up on a 20ft pole.   The manual says it should last a couple years but I used the supplied power adapter as well. 

 Now I am thinking APRS... that expansion connector is right there...with all the data ready to jump out.  Although I saw DK had a post in his blog that said Davis had changed the interface format to detect if a proper interface card  thing is being used.  I will need to investigate if it is the same on this version. http://www.wxforum.net/index.php?topic=17198.0  Yeah, that's part of the problem of sharing this kind of information, the owners of these products see more immediate revenue, and corporate types want every penny.  Still, it think it a little short-sited of them not to let the public domain have a go at second sourcing accessories. They are set up perfectly to support us as they sell all the bits and parts as well. 
 
 
~ ~ ~


Monday, January 7, 2013

Wizzard III ~ Updates?



CLUE?

Over the past few months I have put this on hold, mostly.  Recently I was cleaning up some files and  I did get a chance to look at the captures I did way back and may have come to one more clue: Nybbles!


Looking at these old plots I did from the handheld scope it looks like these packets are sent as 4-bit nybbles which I think is why I could never see any command leaving the console I was using the logic analyzer to trigger on the various commands.  The other reason is the bits may be sent in REVERSE order which would make the commands harder to see.

I may dust off the Bit  Pirate again and see if I can see any likely Nybbles coming out of the console. I am still pretty sure the hardware protocol is I2C-like with one clock and one Data Pin.  If I can see what the console is trying to send the data logger I may be able to correlate to a commands


 
 

BTW this SUMP analyzer is a JAVA app...it took a bit of fiddling to get it to work but it is fairly functional.

ALSO...

It seems I have been tasked to build a weather station for APRS for application in a remote desert storage container in Ocotillo Wells, California in the Anza Borrego Desert that we can place a Weather Station.  I am not clear if we will use a Vantage Station or a Wizard III.  If I can convince them to get an old Wizard and data logger I may be able to snoop the connection with it as well. Since I have the ASCII/serial version built for a PIC16F88 Microprocessor ( but not tested ) for either it will be on the air soon...But I would sure like to send the data directly from the console w/o the logger!



Saturday, March 17, 2012

Davis Weather Wizard - Hacking the Serial Port - V


Missed by Twenty-five thousandths? Well at least I gave the last 0.025% to other than I2C. Let's just say the Weather link is very...well.."I2C-like"

Device(Read)(Write)BP I2C read TIME @ 0xBE command:   TXT: 
10x03(0x01 R)0x02?(0x01)?[0x020xBE[0x03r:3[0x02 0xBE [0x03 r:3 
20x05(0x02 R)0x04(0x02 W)[0x040xBE[0x05r:3[0x04 0xBE [0x05 r:3 
30x07(0x03 R)0x06(0x03 W)[0x060xBE[0x07r:3[0x06 0xBE [0x07 r:3 
40x09(0x04 R)0x08(0x04 W)[0x080xBE[0x09r:3[0x08 0xBE [0x09 r:3 
50x0B(0x05 R)0x0A(0x05 W)[0x0A0xBE[0x0Br:3[0x0A 0xBE [0x0B r:3 
60x0D(0x06 R)0x0C(0x06 W)[0x0C0xBE[0x0Dr:3[0x0C 0xBE [0x0D r:3 
...
70x0F(0x07 R)0x0E(0x07 W)[0x0E0xBE[0x0Fr:3[0x0E 0xBE [0x0F r:3 
80x11(0x08 R)0x10(0x08 W)[0x100xBE[0x11r:3[0x10 0xBE [0x11 r:3 
1260xFD(0x7E R)0xFC(0x7E W)[0xFC0xBE[0xFDr:3[0xFC 0xBE [0xFD r:3 
1270xFF(0x7F R)0xFE(0x7F W)[0xFE0xBE[0xFFr:3[0xFE 0xBE [0xFF r:3 

There were a few things that bothered me about that address search. First, the fact there are 127 device addresses. This did not seem like a normal I2C device. Second, the first device does not even have a Write location. Other than those issues the outputs seemed normal so the plan was to drop the text generated commands (one by one) into the BP's serial port and examine the outputs for the one that had the same BCD values as the Wizard's display. ...Simple?

[0x02 0xBE [0x03 r:3
[0x04 0xBE [0x05 r:3
[0x06 0xBE [0x07 r:3
[0x08 0xBE [0x09 r:3
[0x0A 0xBE [0x0B r:3
[0x0C 0xBE [0x0D r:3
[0x0E 0xBE [0x0F r:3
...
[0xF4 0xBE [0xF5 r:3
[0xF6 0xBE [0xF7 r:3
[0xF8 0xBE [0xF9 r:3
[0xFA 0xBE [0xFB r:3
[0xFC 0xBE [0xFD r:3
[0xFE 0xBE [0xFF r:3

Well, there was one catch to this plan. I alluded to it on the last post. The bus gets hung up after every start command issued!

I2C>[0x03 0x04 [0x03 0xBE r:3]
I2C START BIT
WRITE: 0x03 ACK
WRITE: 0x04 ACK
Warning: *Short or no pull-up
I2C START BIT
WRITE: 0x03 ACK
WRITE: 0xBE ACK
READ: 0x00 ACK 0x00 ACK 0x00
NACK
I2C STOP BIT

So this was a typical output when I ran those commands trough. I could not yet find a reliable way to clear the error by toggling the power and pull ups either. The only way to clear the error for sure is to power cycle the Wizard.

Although while using the commands I did find a particularly interesting combination of toggling the lines would, in fact cause the console to beep!

I2C STOP BIT
I2C>[
Warning: *Short or no pull-up
I2C START BIT
I2C>P
Pull-up resistors ON
Warning: no voltage on Vpullup pin
I2C>W
Power supplies ON
I2C>pP
Pull-up resistors OFF
Pull-up resistors ON
Warning: no voltage on Vpullup pin


So, where does this leave us? Well besides the obvious, we did not gain control of the unit through I2C, I think I will cut my losses and let this project go! Yeah, I am admitting defeat! I think that since this is most likely a proprietary implementation of a 2-wire interface, that unless I set up a snoop with a logic analyzer between an actual Weather Link Data Logger and the Wizard to find the actual outputs and inputs with a known command sequence. I think that would be the only way, and that investment is not what I want to do at this time, hey my time is valuable and once more than a few idle hours get invested, it becomes, well, WORK! I get paid to engineer stuff for companies, and I think that when it gets to that point... I will just buy the damned software, throw out the disk, hook up the LOGGER and be done with it.

I will shelve this hack for now, unless I come up with another inspiring idea...it would be really cool to figure this out...But, if one of you, my dear readers, wants to part with their LOGGER! *hint*

~ ~ ~
SK

Sunday, March 11, 2012

Davis Weather Wizard - Hacking the Serial Port - IV



Success!!? I spent a few hours this weekend figuring out the syntax and commands on the Bus Pirate board.  So, after building a cable, and fussing around a little with the pull up settings, and unless the BP macro is giving me phantom devices...



I2C Address Scan of Wizard w/ BP!

We are in.  ☺ Yeah, it found devices, 127 of them!  The problem now is which device(s) contain the defined Bank 0 and Bank 1 data.  The other worry I have is I never heard the third beep, recognising a valid Data Logger device.\ So simply having a I2C master is not enough.  My fear is that unless one of these devices gets a handshake of some kind the data will not be processed for the data logger device. 





The next step?  I think I may need to write a macro to read out some of this info from a number of these devices at a time.  The nibbles I think I will go after first is the date/time. The 6 nibbles starting at 0x1BE (BANK 1 - 190th location)  This data should be recognisable, the same time as the console, with one BCD digit at 0x1C2 incrementing every second.  Or simply brute force a dump out some consecutive locations at each of these devices to see if anything starts to line up with that published memory map.


Here are the connection details for my cable used to connect BP to WeatherLink connector on the Wiz .  Note; that I intentionally did not wire the +12V (BLACK) wire.  I did not want to accidentally expose the BP to that +12V supply on its maiden hack!  I simply soldered a 3-pin male header to the phone cable and plugged in the BP cable to the other side


What a neat little tool that is BTW...Oh, I have some projects in mind for the Radio Ranch with that thing. 

☺☺☺

Sunday, March 4, 2012

Davis Weather Wizard - Hacking the Serial Port - III




I am always telling folks at work to read and understand the specs. Before you start anything... well, ahem, I need to listen to my own advice from time-to-time.  I sat down this weekend and really looked through the Davis documentation Not a usual thing to do on an abnormally sunny day, (It was a record 85F high, 19F above normal BTW)  but I did it over a couple cups of morning coffee.

From which I learned that the Wizard is definitely *not* compatible with the Vantage...

http://www.davisnet.com/support/weather/downloads/



The first of the downloaded documents of interest for the Wiz was:

WeatherLink Serial Communications Reference V3.3  1/22/1999

An amazing bucket of information they released, in fact contains almost everything a programmer could ask for, short of the source code.  I am actually a little embarrassed by some of my earlier speculative posts, all the info I should need is contained in this single document  ...with ONE glaring exception (more on this later)

But for now anyway, it looks you will still need the Davis Link Interface / Data Logger (dongle) to communicate with the Wizard!

0D 0D 0D OD 00 0D 0D 0D OD 00 0D 0D 0D OD 00 0D 0D 0D OD 00...

THIS IS THE CLOSEST THING I GOT TO RESPONSE WITH TTL LEVEL SERIAL DATA...FOR EVERY 4 CHARACTERS INPUT, THE RX LINE DROPS TO LOW LEVEL, SOUNDS A LOT LIKE AN ACK/NAK RESPONSE.... IT DOES NOT SEEM TO MATTER WHAT THE CHAR IS OR EVEN THE DATA RATE, IT IS JUST APPEARS TO BE LOOKING AT THE TRANSITIONS...

After poking around with the device a bit more this weekend, I have finally come to the conclusion that the protocol between the little weather link module and the Wizard III, with about 99.975% certainty, it is the two wire interface: I2C. 

A simple RS232 -> 5V TTL converter won't communicate with the wizard.  All is not lost!  We in all probability wake this thing up eventually, but we will need a serial to I2C converter...sound familiar?




The order went to those sparky guys in Boulder, CO for one today...  I am thinking that this $30 device can also be the interface substitute for the Davis Dongle as well?

BACK TO THE PROTOCOL:  There are only a few responses that Weather link provides:

"...If a command is understood, an ASCII 6 (0x06) (ACK) is returned (before any returned data).  If the command was not understood, an ASCII 33 (0x21) (!) is returned...."


So in order to verify the link is talking, we should get a "!"  (0x21) in response to a corrupted or otherwise unrecognized command:

xxxx0D 21







View from the $40 Digital 'Scope View - I gotta get one!  Had a little trouble triggering it, but it did the job.  You can also save waveforms but I did not attempt to this weekend All-in-all a nifty portable scope!
This view is the 0x0D input to the pins which produced dismal results.  I now suspect that one pin is SDA and the other is the SCL line of a two wire interface, most likely I2C,  I have a strong suspicion as well the serial data won't come out of the wizard until the Master/Slave relationship or some other digital courtships occurs!  Then and only then the happy little 3rd beep will emit and all the good info can be put to use...

! ! !

The major interface to the Wizard is only a few commands:

"...The commands "RRD" and "RWR" operate on the link processor memory. These commands execute faster than the "WRD" and "WWR" commands which operate on the station processor memory..."


They operate on two banks in nibbles and must be followed by a CR (0x0D):

"...Commands must be in upper case and terminated with a carriage return (0dh). Do not insert spaces between binary data arguments. If an argument description uses the character '|' then one byte of data is to be formed from the 4 bit values on either side. For example: "bank | n-1" becomes the single byte "0x13" where bank = 1 and n = 4"

Finally, the major command we need to get real time data for APRS modem is the vaunted "LOOP" command:
MULTI LOOPS (65536 –n) so for 1 loop:   
4C 4F 4F 50 FF FF 0D...
     start of block                     1 byte
     inside temperature                 2 bytes
     outside temperature                2 bytes
     wind speed                         1 byte
     wind direction                     2 bytes
     barometer                          2 bytes
     inside humidity                    1 byte
     outside humidity                   1 byte
     total rain                         2 bytes
     not used                           2 bytes
     CRC checksum                       2 bytes
                                       --------
                                       18 bytes
MULTI LOOPS (65536 –n) so for 5 loops:                      
4C 4F 4F 50 FB FF 0D….
I am not sure what use this can be...maybe if you hjave l0ts of link err0rs...or doing some averaging??




There is a lot of good info about the check sum and the data formats:

"...Some commands return a data stream and a CRC check sum.  The generator polynomial for the check sum is x^16 + x^12 + x^5 + 1 (CRC-CCITT backward)...


"...All binary data is transferred in "Intel" format: least significant byte first. In addition, multi-nibble data values on the station are stored least significant nibble first. This does not make a difference when you look at byte sized pieces of memory, since the Link will correctly align the nibbles when sending byte data. "

In a nutshell; this tells us pretty much how these bytes and bits go in and out.  Here are some examples of the actual hex bytes needed to implement some of these commands, and even some expected responses:


INSIDE TEMP (@ LOCATION 0x30 = 0x2D8 => 728  => 72.8F):
57 52 44 44 30 0D 06 D8 02


BAD COMMAND (NAK = 0x21 "!") :
...0D 21

I would think a 0x0d without any proceeding data would not get recognised and produce a " ! " as well.

! ! !

...AND with the upcoming DST time change it got me thinking that these commands hopefully will work as well:

GET TIME (06:37:02)
57 52 44 64 BE 0D 06 06 37 02  

SET TIME (04:25:00)
57 57 52 63 BE 04 25 00 0D 06  



GET DATE (9/20)
57 52 44 44 C8 0D 06 20 09


SET DATE (to today's date 03/04)
57 57 52 43 C8 04 03 0D 06


SET DATE (12/31)
57 57 52 43 C8 31 0C 0D 06
                   

Note: From the appendix , the time and day are in BCD,  but the month is only 4-bits, so the last day of the year 12/31 is shown as above.

0064     SpdHTime:   DS  4      ; BCD hour and minutes of hi.
0068     SpdHDate:   DS  3      ; BCD day of month + 1 nibble for month
So if you have the data logger dongle and want to be free of using a PC to generate your APRS info into your packet modem from the Wizard itself...you are in luck! Stay tuned here and I will soon modify my existing APRS modem code to accomplish this via the serial link which should show you the gorey details of formatting the data into a proper DVS weather packet. 

If you don't have a Weather Link / Data Logger module all is not lost!  I will follow this shortly with the results using a 2-Wire interface (soon as I sort out the details, hopefully, with the help of the Buss Pirate)

As for that glaring omission?  While these documents and code snippets are a wealth of info for the RS232 side of the interface, there are no specs on the dongle to Wizard side.

The assumption is, of course, that the command structure is the same for both interfaces and simply passes these along as the Vantage does. 

I have reached some of the technical details with the aid of that handy little gadget, the pocket O'scope, which I only borrowed to do some more snooping on those two pins this weekend:

"...Once SCL is high, and the master waits a minimum time (4 μs for standard speed I²C) to ensure the receiver has seen the bit, then pulls it low again. This completes transmission of one bit.
After every 8 data bits in one direction, an "acknowledge" bit is transmitted in the other. The transmitter and receiver switch roles for one bit and the erstwhile receiver transmits a single 0 bit (ACK) back. If the transmitter sees a 1 bit (NACK) instead, it learns that:
  • (If master transmitting to slave) The slave is unable to accept the data. No such slave, command not understood, or unable to accept any more data.
  • (If slave transmitting to master) The master wishes the transfer to stop after this data byte.
After the acknowledge bit, the master may do one of three things:
  1. Prepare to transfer another byte of data: the transmitter set SDA, and the master pulses SCL high..
  2. Send a "Stop": Set SDA low, let SCL go high, then let SDA go high. This releases the I²C bus.
  3. Send a "Repeated start": Set SDA high, let SCL go high, and pull SDA low again. This starts a new I²C bus transaction without releasing the bus.
- Wikipedia


Wow! this looks a lot like what I was seeing stimulating these inputs... even more interesing; They actually used the word "erstwhile" in this definition?  ...Really?  

erst·while/ˈərstˌ(h)wīl/

Adjective:
Former.
Adverb:
Formerly.
Synonyms:
adjective.  former - quondam - sometime - late
adverb.  formerly - erst - once - before - heretofore - previously

~ ~ ~