Arduino Weather Station: Adding Ultrasonic Sensor

Arduino Weather Station: Adding Ultrasonic Sensor

Now that I have a working indoor Arduino Weather Station, I’m going to add a ultrasonic sensor. The goal of this sensor is to measure snow height in the winter. I am going to use the US-100 ultrasonic sensor to do this. The idea is that this sensor will send out a sound wave that will hopefully bounce off a layer of snow outside. The sensor kind of works like a bat! Bats use sound waves to sense their surroundings, it’s pretty cool! The sensor will then tell me how far away the snow is and I can get an estimate of how much snow there is by looking at the change in distance compared to measurements with no snow.

I am trying to do what was done in this article, hopefully this works! I’m hoping the Arduino sleep routine I use will extend battery life. We will find out!

For now I’m going to pick up from my earlier post and connect the US-100 to my working setup indoors. This is not winter ready yet! I am going to test the sensor by measuring the distance to a box. This is what my prototype setup looks like:

My weather station with the US-100 for testing

I also added this sensor to my mqtt setup so the distance the sensor measures also appears in Grafana. This way I can measure the snow accumulation outside from the warm indoors when I get this working outside. My new dashboard with the US-100 is shown below. When I move the box, the distance changes like it should, success!

Grafana dashboard with the ultrasonic sensor measuring distance in the bottom right.