Sensing tipping spoon rain gauge
February 27, 2021 3 Comments
If you have a tipping spoon rain gauge to sense besides other SDI-12 sensors, you can use a basic SDI-12 USB adapter equipped with an analog/digital input terminal block to sense it. You can sense up to 4 pulse sensors such as a tipping spoon rain gauge, a flow meter etc.
In the following picture you can see the 12-terminal long green terminal block between my thumb and index finger with markings “3 + – 2 + -” etc. You can either purchase this option on tindie.com when you place your order or purchase a 0.1 inch (2.54mm) pitch 12-pole terminal block and solder to the basic adapter yourself but you need to check the connectivity between the processor and the terminal block yourself because I only check that if you order this option. Connect 0,1,2,3 to + and perform analog read, you should always get near 4.995V and connect 0,1,2,3, to – you should always get 0.
With this terminal block, you get up to 4 digital counters although you will unlikely deploy 4 rain gauges within close proximity unless I imagine you want to see how an agriculture pivot irrigation system distributes water in your field. It’s still nice to have if you need one rain gauge.
Here is an adapter with the terminal block unpopulated, with the space between my index finger and ring finger. You can see more clearly the markings.
Each group of 3 pins on the terminal block is one counter so there is a total of 4 counters. There are many pulse sensors such as tipping spoon rain gauges and flow meters. In theory each tip of the spoon creates a pulse of voltage from low to high then back to low. Rotation of a flow meter creates these pulses continuously. The following shows some low-to-high and high-to-low level transitions that form pulses:
But this is only the the theory. The actual situation of mechanical contacts bouncing off and on until they settle looks like this:
So there are multiple bouncing from the time marking 1 when the signal has been low but just start to become high until time marking 2 when the signal finally settles at high. The duration of the multiple bouncing between high and low is about half a millisecond. If you feed this signal directly to the counter, the counter will register all of these pulses instead of just one.
To count a rain gauge, you usually need to condition the input because it tends to be noisy. The cause of the noise is the electrical contact bouncing of the reed switch inside the gauge. When the spoon tips, it waves a magnet across a reed switch, which short circuits the two connections on the wire. This reed switch mechanically bounces back and forth before making the contact when the magnet is near and then breaking the contact when the magnet moves far enough. The bouncing causes the two wires to make repeated connections and disconnections so each tipping of the spoon causes multiple (inconsistent) number of contact making and breaking. To condition the input, you can use a resistor and capacitor. This causes the electrical signal from multiple contact making and breaking to smooth out into a single pulse.
The rain gauge you have most likely has two contacts in the cable. Either contact can act as the signal wire and the other as the ground. The diagram below assumes there is a power wire but if you don’t have one you can ignore it. You can start with a 10k ohm resistor and 1uF capacitor and follow this diagram to solder the resistor inline with the signal wire (usually either wire), and place the capacitor between the signal and ground (the other wire). The following diagram assumes you are connecting to input 0.
Now you are almost home free. There is one more detail. The counter registers both high-to-low and low-to-high transitions instead of just counting pulses because some sensors use both transitions and others like the rain gauge only use one to indicate a pulse. If you count tipping spoon rain gauges for instance, your tip count is exactly half of the reported transition count because each tipping corresponds to a pulse that has both H-to-L and L-to-H transitions that both get counted.
Here is a photo of a setup provided by one of the users. You can see a pair of twisted green/white wires coming off one side of the 12-pole terminal block. The wires are connected to the 2 by 3 clear plastic wire terminal blocks on the top and center of the right side terminals. This type of terminal blocks connect the left side to the corresponding right side to save you from having to solder wire ends together. So the green/white wire pair connect to the pair of orange/white wire that are connected to a 1uF capacitor seen on the second photo wrapped in translucent protective tubing. Then the rain gauge with thick black wire on the right side of the 2 by 3 is connected to the white wire going to the counter terminal. The red one on the other hand connects to a short red heat-shrink tube in the shape of a side-way U with a resistor of 10k ohm inside connected to the left side of the 2 by 3. This makes the resistor inline between the red wire and the green wire. I think I might want to design a small breakout board to make this connection easier.
I think that I would like to mount it all on a board as well. This was the test setup while I tested the values of the components. I will get a veroboard and do it properly when I get a chance.
Once again, thanks for your help from Australia.
Hello, Would your adapter work to send an SDI12 signal from a Raspberry Pi to a logger (ie. the Rasp Pi acts as the sensor)? I am trying to figure out a way to have a Raspberry Pi talk to a FTS Datalogger via SDI12 (https://ftsinc.com/hydrology/products/axiom-dataloggers/axiom-h1-datalogger/). thanks, james
Hi James,
My adapters are acting as loggers to talk to actual SDI-12 sensors. They can’t pretend to be themselves SDI-12 sensors to talk to other loggers. On the other hand, I’m always interested in expanding my line of products so I could design a bridge between an SDI-12 logger and a non-SDI-12 sensor. Would you be interested in providing some information as of what type of data the rasp pi is producing, whether from actual sensors or else? I can be reached via email: zliudr@gmail.com