Accessing the RG-15 with a JSON API

This example shows how you can access the accumulation data though the Serial TTL interface from a RG-15 over a network as JSON utilizing an Arduino. This can also be used to setup the device as it will also provide the output and allow you to send commands when connecting over usb.

Example responses

Acc 0.001 in, EventAcc 0.002 in, TotalAcc 0.003 in, RInt 0.082 iph

Acc 0.001 in, EventAcc 0.002 in, TotalAcc 0.003 in, RInt 0.004 iph, XTBTips 0, XTBAcc 0.01 in, XTBEventAcc 0.02 in, XTBTotalAcc 0.03 in

Hardware Required


When running this at a distance we recommend you follow the cabling section on our recent post How to use a RG-15 with a standard RS232 system


Most ethernet shields use pins 10-13 to communicate, so we need to select one that isn’t used to communicate with the RG-15. For this we used pins 5 & 6, if your ethernet hat uses these pins make sure to select different ones in the editor. Note: this only applies if you are using an arduino that doesn’t have a second hardware serial. If your device has this make sure to use the TX1 & RX1 pins instead. After equipping the ethernet shield, connect the SO(Serial out) pin to pin 5 on the shield to the SI(Serial in) to pin 6.

Powering the RG-15

There are several options to power the RG-15. You are able to provide either 5-15V on the V+ pin or a stable 3.3V on the 3.3V pin. It is recommended to use V+ if you are planning to run the device more than a few feet away from the power source. In this case we powered the arduino though the barrel jack with a 9V supply. We could wire the RG-15 into this supply directly or simply use the 9V pin (also VIN) from the Arduino.


For this little project we also wanted to be able to configure the RG-15 though this interface as well. So plugging in though the usb port and connecting with a program like Termite we can set the baud rate to match the device (default is 9600) and connect. This will show the output from the RG-15 directly but also any errors or logs from the Arduino (These lines would be prefixed with a semicolon). You can find the most recent protocol documentation in the RG-15 Instructions.

Arduino IDE & Libraries

Before even plugging your Arduino board into your computer make sure to install the Arduino IDE. After installing go to Tools -> Manage Libraries, and install these libraries:

After plugging in your Arduino board into your computer, start the Arduino IDE and use the code below. Note: Make sure the correct board and port are selected before programming.


If you want to log the output of the tipping bucket make sure to change xtbEnabled to true and enable it on the RG-15 with the ‘X’ command. (Disable with ‘Y’) Also make sure to change the ip match to one available on your network, also make sure to reserve it for this device in your router settings. Once completed you are able to browse to the device ip address in any web browser and see it’s response.


How to use a RG-15 with a standard RS232 system

This example shows how you can convert the Serial TTL 3.3V output of the RG-15 to standard RS232(TIA232). This will allow us to both receive the data from the device as well as send commands to configure it. To accomplish this we need a TI-MAX3232, but to make this easier we used a board that already had the connections we needed to make this as plug and play as possible.

Hardware Required

  • RG-15 –
  • RS232 to TLL conversion board that uses a MAX3232 – Amazon
  • USB to RS232 Adapter cable (If wanting to connect to a computer) – Amazon

Powering the Conversion board

In this case we powered the conversion board though a 9v DC supply. In the case of our conversion board it doesn’t take that much power, we measured it at about 7mA. This falls well within what the RG-15 can supply to the 3.3v pin of about 45mA. If what you are trying to power has a peak requirement of above that 45mA you cannot power it from the RG-15.


Since the TTL conversion board doesn’t fit within the housing of the RG-15, we opted to put it inside the building with our other equipment. We used a 8 core stranded 22 AWG cable in our installation running it about 8ft, but we also tried the longest 21ft Cat5e cable we had and found it to be working at 9600 baud. We have not tested this longer distances though, they may not work reliably.

If using Cat5e

Tie all the ground together at the RG-15 side. When using the TB output use the ground use the Green/White GND To try and minimize interference we wired it using:

  • Orange/White – GND (Unconnected on adapter side)
  • Orange – SO – TXD
  • Green/White – GND (Use for TB output GND)
  • Green – SI – RXD
  • Blue – O(TB Out)
  • Blue/White – 3.3V – Vcc
  • Brown – V+
  • Brown/White – GND (Use for PSU GND)
Diagram showing connections between the RG-15 and the RS232 adapter.

Wiring the device

Connect the Vcc on the conversion board to the J2 V+ and the GND to the J2 GND. For connection communication connect the J2-SO(Serial out) to TXD and the J2-SI(Serial in) to RXD on the converter. Now just plug your USB to RS232 cable into the converter and your computer.


Everything is now setup to communicate with the device, you are able to send commands and read the output of the device. The most recent documentation on the commands and communication protocol can be found in the RG-15 Instructions.

Connecting to a computer

Once everything is setup all you need is a program to communicate with the device, for Windows we like to use Termite. While this isn’t the only software available we like since it has features such as adding timestamps to the data and logging directly to a file. Assuming you don’t have any other serial devices connected to your computer Termite should automatically select this device for you. You just need to change the baud rate used for this device in the Settings menu, the default used for the RG-15 is 9600. If you run into issues open up Device Manager and look at the Ports section, any plugged in serial devices should appear here. If have multiple shown try plugging and unplugging the cable and see which device appears and disappears noting its COM id. Make sure this COM id is selected in Termite under the settings menu. Also from here you can enable the extra features for timestamping lines and logging to a file. (If these plugins don’t show up you completed a minimal installation of Termite, try reinstalling and making sure they are selected)

Connection issues

If you experience issues with the serial device disconnecting or stops responding in Windows try changing your power management settings to prevent the internal usb hub from turning off. If you are still having issues and are using an external usb hub, we have noticed switching to a different higher quality usb hub has fixed the issue for us.

RG-11 and TCW220 Data Logger

In this article will be shown how to use Ethernet data logger TCW220 with a rain detector.

Two different rain detectors are used – RG-11 and CON-REGME. RG-11 is manufactured by Hydreon Corporation.

1. Test setting

An example test setting is shown on Fig. 1. Both rain detectors are powered by the controller TCW220.

In the event of rain or snow, they send a signal to the digital inputs of Ethernet data logger TCW220 (the rain detector RG-11 to digital input 1, the rain detector CON-REGME to digital input 2). The controller TCW220 is equipped with a logger which enables the storage and comparison of the information received by the two rain detectors.

rain detector test schematic
Fig. 1
The corresponding connections between the controller and the rain detectors are shown in Table 1.

rain detector test table of wiring

Table 1
To get accurate measurements from the rain detectors, they have to be mounted on a spot where there is free access to rain.

rain detector test mounting

A mandatory requirement when assembling the rain detectors is all components to be dry because any moisture in them creates condensation which may damage the rain detector.

2. Principle of operation of rain detector CON-REGME

This type of rain detector uses a sensor that detects the conductivity changes on the sensor surface. That change leads to the activation of a relay which then sends a signal to the digital input of the controller TCW220.

This rain detector operates at different sensitivity levels which can be changed so that the presence of fog can also be detected. The sensor surface can be heated which will enable operation at low temperatures and will speed up the drying process of the sensor.

CON REGME rain detector

3. Principle of operation of rain detector RG-11

This type of rain detector uses infrared rays that are reflected by a lens. When there is water on the lens, some of the rays get deflected.

The sensor detects the difference in the intensity of the rays, and then activates a relay which sends a signal to the digital input of the controller TCW220.

These rain detectors can operate at different sensitivity levels and in various modes that are changed by using DIP switches.

RG11 rain detector test

4. Test results

Figure 2 shows the feature of the controller TCW220 to display the saved data from the rain detectors and to compare them.

In the case below, the rain detector CON-REGME, using a sensor for changes in the conductivity, is the first to detect the presence of rain in both measurements. The detector using infrared rays has registered it later because depending on its operating mode, it will send a signal for the presence of rain at specific intensity of the rain.

A signal that it is not raining is first sent by the rain detector RG-11, and later by CON-REGME whose surface dries up a little more slowly.

rain detector test graph

Graph 1

5. Conclusion

Each of the tested sensors in combination with Ethernet data logger TCW220 can be used for condensation sensing, irrigation control, automation of greenhouses, balcony sun shades, and so on.

This post was taken from the Teracom website,

Rain Tracker Windshield Wiper Control


Rain Trackers are out of stock and no longer made.

We do not have any available for sale. Please do not call or email to ask. They do not exist.

We would like to thank everyone that ever purchased a Rain Tracker. Thanks for the business, best of luck and best wishes to you in the future.

From 1998 to 2015, we made Rain Tracker brand rain sensing wiper control systems for aftermarket applications. It was a well designed and well made product, but there simply is not a large enough aftermarket demand for rain sensing wipers. The feature is great if the car comes with it. For most people, however, it is just more trouble than it is worth to install. Addressing the market niche– especially the Sisyphean task of making it compatible with over 5000 different make / model-year combinations, and supporting them– did not make business sense. Hydreon has directed its energy towards more promising opportunities in recent years.


Spare couplers are no longer available.

If you need support for a particular vehicle, please see our compatibility database. This database is no longer updated and we offer the information as is. You can also find links to the the standard installation instructions in the database.