Introduction: Remote Monitoring Via 3G
I had the requirement to monitor wind turbines in various remote sites. I also wanted to be able to re program the grid tie controllers remotely and also "see" the turbine with some sort of camera.
This setup can however be used for any local software that you want to monitor a remote device.
In my case the monitoring/programming software was provided by the supplier that ran only locally with the PC connected directly to the grid tie unit via a USB to RS232/485 cable converter (these are cheap and easily found on eBay).
RS485 is basically RS232 that is addressable to upto 32 devices via just two wires. (Unshielded twisted pair)
Hardware requirements for remote monitoring:
TP-Link TL-MR3020 Portable 3G Wireless N USB Router (eBay)
RS 485 to Ethernet converter (eBay) This can be any converter.
5v power to both of the above
2G/3G/4G USB dongle with SIM for internet access with PUBLIC IP address be sure it has an external antenna connection
Optional antenna for the 3G USB dongle if 3G signal is weak (recommended)
Tibbo Virtual Serial Port Software http://tibbo.com/soi/tdst.html
Local software ie camera software or monitoring software
Step 1: Conceptual Understanding
If you look at the picture above it gives you an overview of how it all hangs together. Some lines have vanished when uploading but gives you the idea and some IP address also.
What we are dong is basically fooling any locally run software that the device is connected directly to the PC.
By using the Tibbo Virtual Serial Port software we fool the local application into thinking the device is local but it is in fact on the internet.
It is a free application.
The only hard bit (if it is that hard) is setting up the software and the ports in the devices so they all talk to each other.
A BIG factor to remember is that when sourcing your 3G SIM be sure it has a PUBLIC IP address. It does not need a fixed IP address.
Some cheaper 3G suppliers supply a private IP address. This will not work in our situation as we have to get into the device remotely.
The IP address that your 3G supplier provides is dynamic. That means it is not fixed and can change at any time.
To ensure you always have the correct IP address you need to sign up to one of the free Dynamic DNS suppliers such as DYNDNS or NoIP. Basically the TP Link router (and most if not all routers) has a setting where you tell it what Dynamic DNS provider you are using and the router automatically updates the correct IP address if it changes.
Step 2: The Hardware
If you look at the image above I mounted all the hardware into an electrical box with a clear lid (available at most electrical stores)
On the RHS is a 240VAC to USB 5VDC power adaptor with four USB ports. I drilled a hole on the RHS so that the figure 8 power cord could be plugged in. I think this came with the TP-Link. You can use anything that will provide 5v DC to both the TP Link and the RS485 to Ethernet converter. Allow 500mA each.
Next to this is the Ethernet to to RS-485 converter. (exposed PCB) I had to butcher a USB cable by cutting off one end and wiring the other end to a standard power connector. Do a Wiki search on USB Connector and it will give you the pin outs. The outer two pins are power with red + 5v and black ground. Wire red to the center post of the standard power connector and black to the outer post. Just cut off the two data wires.
The yellow and blue twisted pair cables coming out at bottom are the RS-485 cables
Next is the key to this solution. The TP-Link TL-MR3020
a USB connector for the USB 3G router (see left hand side of box)
a mini USB for power
an Ethernet connector that goes to the RS-485 converter
and it also has wireless so you can run a wireless IP camera or any other wireless device
Pretty snazzy unit with low power usage also
You can also see the 3G antenna plugged into the USB 3G dongle.
Step 3: Antenna
This is the type of external antenna I used to boost the signal. The stronger the signal the more bandwidth you will get.
It has a 16dB gain and can be mounted out in the elements so the rest of the stuff can be in a shed for example.
3G is line of site so be sure you place the antenna so it has direct line of site to the 3G transmitter
Step 4: The Setup
There are three devices that need to be set up
- The Tibbo Software
- The Ethernet to RS485 device
- The TP Link router (next page)
Tibbo Virtual Serial Port
The first image above is how the Tibbo software should be set up
It is set to run on COM3 so set whatever application software you are running to use COM3 or whatever COM port you want to use that does not conflict with any local COM port you already have on your PC. This is a virtual port ie it does not physically exist.
At the bottom you can see the Dynamic DNS we have set up. In this case we registered with DYNDNS and obtained the address windturbine1.dyndns.org
When we did this you could get up to three addresses for free. We swapped over to noip later on as we found it a bit easier to use.
Just go to their websites and check it out.
So locally we are now all set up. We tell our local application that device we want to monitor is on COM3 . The Tibbo software then translates everything and puts it on the Internet transparently to the application.
Ethernet to RS485 converter.
The second image is the setup of the Ethernet to RS485 converter. It comes with software that lets you set this up.
Set it up as shown
Step 5: The TP Link Router
The TP Link router
The above images should allow you to set up the TP Link router.
The key is to set up port forwarding so that you can "get through" the router to the various attached devices ie the Ethernet to RS485 converter and cameras. You can see we have allowed for extra devices.
We have a be nice policy.
Please be positive and constructive.