Categories
Gardening Lawn

Raspberry Pi Weather Station Pt. 2

When I originally thought about this project, I was thinking of having the Raspberry Pi interface with another micro-controller which would take the actual measurements. The majority of the sensors are essentially designed to generate pulses. The frequency of these pulses corresponds to a certain value. For example, the rain gauge operates using a reed switch with a 100 Ohm resistor in series with it. When a hundredth of an inch of water passes through it, it momentarily closed the reed switch. Depending on how you hook it up, it can be either active low or active high. I prefer working with active high signals, so that is the design I went with.

However, after thinking about it for awhile I decided to use the GPIOs on the Raspberry PI and to use the interrupt library. In hind sight, that may not have been the best idea. I originally connected the rain gauge to the first GPIO pin (board pin 3). Unfortunately, the only place where it is documented that board pin 3 has pull up resistor on the Raspberry Pi board itself is in the code for the library. So when I first did my integration, it was throwing all kinds of errors and warnings. So, I ended up switching it to board pin 8. The schematic below is the updated schematic I am currently using.

The code is relatively simple. Rather than having locks, I use a counter. Due to the GIL in Python, the counter is essentially atomic (not that it matters much for this implementation anyway). Every hour, I calculate what the difference is in the current count from the previous hour’s count. I multiply by 0.01″ because every rising edge should be a hundredth of an inch and write it to the database.

#!/usr/bin/python3
import RPi.GPIO as GPIO
import time
import psycopg2

GPIO.setmode(GPIO.BOARD)
GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

c = 0
o = 0

def my_callback(channel):
   global c
   c = c + 1
   print("Rain Gauge Trigger %i" % (c,))

GPIO.add_event_detect(8, GPIO.RISING, callback=my_callback)

while 1==1:
   time.sleep(3600)
   t = c #read c once in case it changes
   r = (c-o)*0.01
   o = t

   # now do the database update
   conn = psycopg2.connect("dbname=weather user=grafana password=[PASSWORD] host=[HOST]")
   cur = conn.cursor()
   cur.execute("INSERT INTO rain (time, amount) VALUES ('now', %s)", (r, ))
   conn.commit()
   cur.close()
   conn.close()

I run the program using screen so that I can disconnect from the Raspberry Pi. At some point, I plan on using systemd to run it as a daemon which is restartable and will run at boot. From, there I use Grafana to generate a nice display.

Unfortunately, one of the problems I do have is that there are a lot of “phantom” interrupts as in there are interrupts when it is not raining. I get a few of these an hour. I believe it has something to do with the logic level thresholds, so I am going to play with the pull down resistor to see if I can get them to go away.

Categories
Lawn

Rye/Fescue Testing

5/11/2020

One of the issues I do have with bluegrass is its long germination time. I do have some spots I would like to fill in rather quickly. I have sections of my yard that are some variety of fine fescue and those spots seem to do very well most of the year. After doing a bunch of research, I determined that I would like to test Grand Slam perennial rye grass, Radar fine fescue and 4th Millenium tall fescue. I planted those indoor plots on May 11th, 2020.

Update: 5/24/2020

It’s been almost two weeks since I originally planted these. At this point, both the Grand Slam and 4th Millenium would be ready for their first cut. The Grand Slam is doing the best as expected (because it is a rye grass) and it is the majority of the grass is over 4″ tall. The 4th Millenium is just behind with most of the grass being around 3.5″ tall. The Radar fine fescue is about 2″ tall.

This is the Grand Slam Perennial Ryegrass at about 4″ tall in 2 weeks.
This is the 4th Millennium turf type tall fescue at about 3.5″ at two weeks.
This is the Radar fine fescue at about 2″ tall at two weeks.
Categories
Lawn

White Dutch Clover in the lawn Pt. 1

There are areas of my lawn that don’t seem to grow much of anything. I have planted grass seed for the past several years and nothing happens. I want some ground cover until I try to plant grass again in the Fall of 2020, so I decided to try white dutch clover.

I put down seed in some of the rough areas on May 6th. It is now the 16th of May and it seems like it is starting to germinate in about 30% of the area I put it down in. I followed up the rough areas with another round of seed today and I also overseeded it in the side yard and parts of the front yard. The front yard is where I have spent the majority of my time over the past few years trying to get it back to life. Unfortunately it is being invaded right now by Black Medic. I have used chemicals in the past and it was extremely difficult to get it to go away. The only thing I found that worked was to get the grass healthy enough to choke it out. I’m hoping that the clover will quickly germinate and try to push it out this time. I don’t have any particular problem having clover in my yard as long as it is providing some benefit.

This is some of the White Dutch Clover that I decided to grow indoors. This is about a week and 3 days since it was planted.

Categories
Lawn

Bluegrass Testing Pt. 3

On May 13th which is about 2 weeks after I planted the indoor test plot, the Blue Note variety of blue grass has started to germinate. This means I am still waiting on the Midnight variety to germinate. The Fahrenheit 90 seems like it is doing the best followed by the SPF 30.

I did end up bringing in the outdoor test plot a few days ago because of a cold snap. I took all of the varieties back outside with the exception of the SPF 30. The varieties outdoors still show no signs of germinating. However, the SPF 30 germinated within a few days of being indoors.

Categories
Lawn

Bluegrass Testing Pt. 2

A week and two days later, several of the varieties started to show some seedlings on the inside plots. The variety that seems like it is doing the best is Fahrenheit 90. The other two varieties that are showing some seedlings are SPF 30 and Skye.

Fahrenheit 90 looks like it has the most seedlings.
SPF 30 has some seedlings.
Skye seems like it may have one more seedling than SPF 30 right now.

There are still no signs of seedlings on the outdoor test plot. I think it has to do with the fact that it is much colder outside than it is indoors which during normal years is not true at this time of year.

Categories
Lawn

Bluegrass Testing Pt. 1

Click Here for Update

Right now my yard is kind of a mess. I believe the previous home owners always cut the lawn short and always bagged the clippings. As a result, there aren’t a whole lot of nutrients and there are a lot of different weeds that have taken over the yard.

I have tried overseeding and fertilizing over the past several years and the yard is looking a lot better. The lawn is looking a lot better, but it still needs a lot of work. The predominant grass type is turf type tall fescue which seems to do OK in my zone which is 7B. However, I would like a grass that is capable of repairing itself and filling in the bald spots.

The summers here can get absolutely brutal and they start quickly. We can go from a day where it is in the 40’s to a day when it almost hits 90. In July and August, we typically have a little bit of a drought where we can go one or two weeks of 90 degree weather without any rain.

I have spent a lot of time looking at different grass seeds and decided to go ahead and try bluegrass. There are some hybrid varieties that seem to do well in Texas and I figured they might do well here in my yard. So I ended up ordering small amounts of Fahrenheit 90, SPF 30, Blue Note, Midnight and Skye.

I am doing two different test plots. One is inside and one is outside. The game plan is whichever one seems to do the best (with a bias towards the one that does best outside), I will be planting in the fall.

I set up the indoor test plot on 4/30/2020 and the outdoor test plot on 5/2/2020. I am keeping the soil moist and misting it several times a day.

This is the indoor plot.
This is the outdoor plot.