First prototype of a G120 based project for a local client. This will be tested in the next couple of weeks and then be used for all subsequent wells.
I have a pressure and temperature sensor that I sell that goes into a water or oil well up to 12,000 feet depth and this has two 4-20mA current signals multiplexed onto the one cable. They provide pressure and temperature in the well.
Because the cable is grounded via the outer metal shielding to the wellhead and the need to provide +24 and -24V to read the sensors on just 1 core, the gauge cannot be connected to conventional PLC 4-20mA inputs, hence this project.
Using an existing gauge interface module I developed to read the 2 sensors (green board), I built a board around the G120 that provides two separate isolated 4-20mA outputs (pressure and temperature) that can connect to a PLC with standard 4-20mA inputs. I use a 16 bit ADC for the sensor interface and two 16 bit DAC’s for the 2 outputs. They are very stable with the ADC being no more than 2 bits of change with a calibrated current loop simulator connected to the input. Once calibrated, input to output is very stable and repeatable.
There is also an isolated RS485 interface to communicate with the gauge interface using Modbus protocol.
There is an SD card slot on the underside for storage of the calibration data.
The G120 is a little overkill for this but I like this little module and it just works every time I’ve used it. A G80 might have worked well but I knew I could get the G120 up and running first time. From the time the boards came in and I hand soldered them, it took 1 week to get this working. NETMF rocks.
Great board Dave. I have found the G120 to have lots of features and used it in my board instead of the smaller units, mainly for the in field update that I wanted to have and the features in the package.
Question on the RS 485, did you have any issues getting the higher speeds? On our prototypes, I found only slower speeds max of 28.8 rate despite following the recommendations for the MAX RS 485 chip we used. The suspicion was on the amount of current the UART pins from the module can drive, to sustain the higher speed rates.
I only need to run at 19200 or 9600 for this application and both work fine. RS485 is not normally high speeds as it is generally used to drive long lines but I will test it at higher speeds and report back what I find. I use the MAX13487 with an ADUM1201BRZ for the isolation.
That is exactly what I found on my end too, using the MAX13487EESA+ chip. At 38.4 rates got only some data across.
We are just fine tuning this feature and I will confirm what is the highest speed I get. I will do a test to send data board to board, so that only the custom boards communicate directly, to eliminate any issues from the RS 485 over USB cable I am using for testing.
I will be very interested in hearing the results of the RS485 speed test. I am in the planning processes of an application that needs 1Mbs RS485 over a distance of about 50 feet. I was planning on using the MAX13487 because of the AutoDirection control.
Are you using the AutoDirection control feature of that part? It seems that the pull-up/pull-down resistors on A and B are critical for it to work correctly, do you have those installed?
Yes, without the 470R resistors it does not work at all.
I will get time this week when some more G120’s arrive and I can build a second board and then use that to test the interconnection. I will also look at the signals with a scope to find out what is happening.
@ Zan, the MAX13487, according to the datasheet should be well capable of higher speeds but I wonder if this is not using the auto send?
GHI use this same device on there RS485 module so I might hook that up to a Cobra 2 and see if I can get the same issue.
@ Dave, I have attached the RS485 part schematic below to clarify; There is an optocoupler on the UART TX/RX lines on my board; The one currently on the board probably does not have high current transfer ratio (CTR) from the CPU pin, and thus on our end is getting max of 38.4 speeds. To even get the 38.4 speed, we replaced the 470 resistor with 1K and it works barely.
My friend the engineer that created the design, recommended we try a different part, with higher CTR thus I ordered it, so will have something to try later this week and report.
@ skeller, it would be great to get some high speeds, and I will report how far we get with the updated part.
As for AutoDirection, yes that is the mode that the testing is done in.
Finally to confirm that I have tested device to device with 2-3 boards, thinking that maybe my USB to RS485 cable is the issue, but no success on higher speeds.
I use this to couple the RS485 driver to the G120, an ADUM1201. Much less board space.
I’ve just run this back up to 38400 and checked the input to the G120 with a scope and the edges are really nice and clean. I am going to hook up two G120’s (Cobra 2) boards together and see if they work at 3.3V levels as I am not convinced this is an RS485 driver issue. I have a suspicion that this is G120 UART related as I recall issues trying to get a modem to work reliably above 19200 before.
I also have a G400 based board with the same RS485 driver so I will test that today too.
Ive had several 32-node networks running a 115K baud polling RS485 network using these cables, connectors and terminators. With drop cables up to several hundreds of meters. I imagine I could have gone even faster, but some of the devices on my networks were using old 8051 micros, and so we had to cap off the speed at 115K
Yes, but have you been able to get a G120 based board to work at these speeds on the same network? I too have had successful RS485 working on 4000M of ROV umbilical (albeit at 19200) so I know it is possible. The issue we have here is getting the G120 to work.
I never got the Cobra 2 to talk to a modem at 38400 let alone 115200. The G400 works reliably at those rates.
I need a USB to RS485 and the only commercial ones I can find are expensive or don’t have auto so I am going to roll my own. I can get a board made by DFRobot and populate with the MAX13487 and FT232RL and then I have something with the same device at either end to test with.
The mere fact that the current setup with a K3-ADE which I know works at 38400 without any issues is a little off putting if we build a working design with the MAX13487 we need it to work at higher speeds if needed. In most cases, we will be using lower baud rates as RS485 is after all designed for long runs and high speeds do not work too well. Most of the VSD’s I work with only go up to 19200 for the Modbus ports.
I am trying to setup a logic analyser on the RS485 side and the received input to the micro to see if there is a difference in the signal. I’ll try to get that done this week.
Dave, I made progress on the RS485, so now I have a working design that I was able to test with high speeds working perfectly up to 128K. Also, was able to write data out at speed of 256K Baud rate. For reading, for some reason not sure if it is in the NETFM, or something else reading does not work at 256K Baud. The oscilloscope shows the data coming across fine, but the board gets nothing, all zeroes on the data.
So, with that, I can confirm a perfect working scenario od 128K baud rate in both ways and write out only working on 256K baud.
The design change was to get high speed opto couplers in place. I will have an updated board that I will test in full within coupe of weeks, and will test a direct device to device test on the speed in both ways.
@ skeller I am not sure about the goal of the high speed that you are trying to get, as I am not sure why I can not read data at the higher baud rate. I think the current design should work even at 512K Baud rate, but will test that once I have two devices with the updated design.
I can post the updated design once I confirm that is working in full on the newer board.
I’ve ordered a new 200Mhz scope for another project that will be here in a couple of days and it does RS232 decode so I plan to get this thing setup and testing this issue with the ADUM1201 that I currently use. It’s capable of 5Mbps so I don’t really see it as an issue.