1-Wire Snowfall Sensor

Measuring snowfall for less than $60
Copyright 2004, Chris Nafis

Snow Sensor Snow Sensor Snow Sensor Snow Sensor

Table of Contents


Living in Upstate New York, USA we get a reasonable amount of snow every year. This year we put a 1-Wire Weather Station together. One of the local TV stations ( WRGB Channel 6) has put together a web interface for local weather spotters to report weather information ( WeatherNet6). In the winter this includes snowfall.

What surprised me was the inconsistency of how people / agencies measure snowfall. The local TV station uses a snow board which they clear after every inch of snow. Other people say you have to clear the board at least once a day but no more than four times a day.
Mother Nature also makes measuring snowfall interesting because of drifting, compresssion, and melting.

Here are some snow measurement references I found on the web:

I was interested in how much snow was on the ground and at what rate it was falling and melting. I thought developing a sensor that measured this continuously would be of interest. If the sensor could be made inexpensively, then the power of the Internet could be used to collect a large number of samples over large areas.

The popular weather data collections sites ( Weather Underground, Citizen Weather Observer Program) currently don't provide fields for snowfall, but this is changing. I noticed that WeatherMatrix has started a beta system for reporting snowfall.


Dan Awtrey has written several articles about using 1-Wire Addressable Digital Instruments for Environmental Monitoring. The 1-Wire devices are very inexpensive and easy to interface with. Many devices can be supported on the 1-Wire bus. I decided to build a system based on them.

snow sensor layout

There are two classes of inexpensive devices available for making non-contact distance measurements.

Ultrasonic sensors have a wide beam so it is hard to focus them on a particular area. They need to be mounted perpendicular to the snow surface. The speed of sound changes with the temperature, so for accurate readings the sensor must be temperature compensated. I chose the Sharp GP2D12 infrared triangulation measurement sensor. It has a lower cost, smaller foot print, and has a roughly 3cm spot size. It is available from Acroname for less than $12. It works on the principal of triangulation. An infrared LED emits a beam of light. If an object is in range, the light is reflected back to the detector. The detector lense focuses the reflected light onto a linear CCD array. The location that the reflected lights hits the detector is dependent on the distance of the object from the sensor.

Sharp GP2D12 Proximity Sensor Sharp GP2D12 Triangulation

The GP2D12 outputs a non-linear analog voltage corresponding to the distance of the reflective object. The Sharp specification chart below shows the relationship. The sensor can measure in the range from 10-80 cm. The voltage is approximately 2.4V at 10cm and at 0.52 at 60cm. The sensor draws about 34mA. The maximum is stated to be 50mA. The beam spot size is 2-3cm.

voltage / distance chart

First Prototype

Snowfall Sensor

circuit board circuit board circuit mount

In my first attempt I decided to use a DS2450 1-Wire Quad A/D converter. The input range can be programmed to 2.55V with 15bits which matched the GP2D12 output pretty well.

snow sensor schematic

Snow Sensor Components

Power Supply

The GP2D12 power consumption was more than could be supplied by the 1-Wire bus using a parasitic approach. I wanted to use an interpretive programming development environment, so I purchased The Link. It has simple ASCII commands to control the 1-Wire Bus and it also provides auxilury power from the RS-232 port on RJ12 pin 2. Unfortunately the Link User Guide states that the Aux line load should be less than 4ma.

The Link 5V Power Supply 5V Power Supply

I ended up building a small 5V regulated power supply that injects the +5 and ground on unused wires in the CAT-5 cable with RJ-45 connectors that goes out to the snow sensor. AAG makes the TAI8530 1-Wire Power Supply, but it has been out of stock. The down side of providing power over the CAT-5 cable is that it appears to add noise and limit the distance the 1-Wire cable can run.

power supply schematic

Power Supply Components

1-Wire Network

Sensor Stand

The following are available from Home Depot or your local hardware store:

Range Sensor Data Quality

The following charts were generated by setting the GP2D12 at 60cm from a white piece of paper. 2700 samples were taken over a 1 hour period. During that time the Sun came in and out. The room temperature was constant at 67F. The GP2D12 had an average voltage of 0.524 VDC and standard deviation of 0.011 VDC. The minimum was 0.494 VDC and the maximum was 0.601 VDC. The mean 5V supply at the sensor measured by the DS2450 was 4.989 VDC. The standard deviation was 0.017 VDC, the minimum was 4.932 VDC, and the maximum was 5.0102 VDC.

GP2D12 voltage at 60cm GP2D12 voltage at 60cm

Snowfall Sensor Calibration

As you can see from the GP2D12 chart above, the Sharp sensor is non-linear. The sensor is pointed at an angle so that the structure holding the sensor and the sensor it's self does not interfere with the falling snow. Being conservative with the maximum range of the sensor, this configuration can measure a little over 30cm of snowfall with a single sensor.

To calibrate the sensor, I raised a white surface to every cm in the measurement range and took two minutes of data. Even though the data is noisy, The mean from of the sample is sufficient to uniquely identify the distance / voltage relationships. The measurements were taken at 68F.

A polynomial was then fitted to the means of each of the 0-33cm range values.

curve fit of voltage distance data


There are 1-wire Tools for Software Developers available from Dallas Semiconductor. There are also many 1-wire weather applications available.

I have found that TCL provides an interpretive development environment that runs on many platforms. It's pretty easy to write routines to communicate with the 1-Wire devices using THE LINK. TCL also makes it easy to FTP or HTTP weather data to Internet sites.

You can download the following free software packages:

Here is some sample TCL code that communicates with THE LINK to configure and read the DS2450 AD Converter. To make a measurement you would send something similar to: ReadSnow "com1:" "6f000000037a2220"

Second Prototype Sensor

Prototype with Photodiode and Thermometer

A second prototype, built with a DS2438 has an added light sensor and thermometer to compensate the Sharp sensor for the sun and temperature. From the specification sheets I originally didn't think the DS2438 AD converter would be accurate with the low voltages. But tests so far seem to show it is similar to the DS2450.

second snow sensor prototype

Snow Sensor #2 Components

Current Status

The prototypes are now collecting data and is being evaluated for accuracy.

Other Resources

Here are some other snowfall measurement related websites:



This project is for experimental use only. The user assumes all responsibilities for assembly, installation, and use. This circuit is provided without warranty and the author makes no claim that this device will work in any particular application. Do not use in applications where failure or incorrect operation could jeopardize someone's safety. This schematic is provided for noncommercial use only.