Another commercial G120 based project

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.

12 Likes

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.

Hi Zan,

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.

Which RS485 driver were you getting issues with?

Well that was interesting. I can run at up to 19200 without errors but 38400 just works occasionally but I can’t test higher as my PC side RS485 automatic driver chip does not support those rates.

Not sure if this is down to the PC side and the K3-ADE I am using but I need to test this again with a different setup and driver just to be sure.

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?

Hi Steve,

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.

Hi Zan,

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.

I always use shielded Turck 5 pin “devicenet” or “eurofast” cables and connectors for RS485 networks.

Like these: [url]Turck RSC RKC 572-2m Cable CORDSET 5 Pin Male/female for sale online | eBay

I use these connectors for the drops for each node:
http://www.ebay.com/itm/Turck-RSC-2RKC57-FKM-FKM-FSM-DeviceNet-eurofast-Bus-Tee-/191784983328?hash=item2ca7469b20:g:zpsAAOSwLnlWm678

Terminating the network is easy, with these:
[url]http://www.ebay.com/itm/TURCK-RSM-57-TR2-CONNECTOR-DEVICENET-TERMINATOR-MALE-5-POLE-/181894144476?hash=item2a59bc61dc:g:0MQAAOSwdhlWEtOa[/url]

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.

Thats what I get for skimming. I thought the issue was a termination thing/inferior cabling thing

Bad news Zan, this works solid it we don’t use any RS485 driver.

I have two Cobra 2 boards hooked up with the Modbus slave and master code running and they are talking away fine at up to 115200 so this must be something to do with the MAX13487 driver IC.

I need to build up another board to test this with. The G120’s should be here tomorrow so I will do this then.

As a follow up, I connected a Cobra 2 with a GHI RS485 module and I can’t get good comms at 38400 either. 19200 and 9600 are fine.

I have A and B and ground connected but still not good and the receive buffer has partial data.

Thanks for the update Dave. I will have the new part by tomorrow, and will know if more power on the UART side will get more stable speeds.

Interesting to find these results, as I would think the MAX IC should be fairly plug and play.

Just an update on the testing, with a more current providing OC, the speed is still not good and works only up to 38.4K.

Next, I have ordered some high speed opto’s, and hope that it will work that way. Will report on that next week.

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.

Good work Zan,

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.

Dave, This is really impressive. Do you have a complete catalogue of things you’ve developed?