NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » serial temp sensor cables

July 12, 2013
by sask55
sask55's Avatar

I have been trying to determine if it may be possible for me to build a microcontroller based adapter to enable me to read and record output from grain temperature cables.

Grain temperature monitoring cables are commercially available from a number of manufactures. I know from talking to one entrepreneur that is manufacturing cables that the actual communication protocol is not unique or proprietary (there is no patents that apply). This fellow is manufacturing and selling cables that are completely compatible and interchangeable with other manufactures of temperature cables and grain temperature monitoring systems.

I have 12 of these digital output type cables installed in a grain storage facility. These 12 cables report the temperature at over 100 locations within the grain bins. The 12 cables are electrically arranged onto two individual independent loops. Each of the two loops has a cable terminating in the office. The hand held unit that is used to read and recoded temperatures works well, but has the disadvantage of requiring someone to physically plug in one or the other of the two cables to record the current temperature data from each bin that is part of that loop. When a cable loop is connected to the monitoring device the system is able to identify what bins are connected, what individual temp sensors are located within each bin and record the data with a time stamp.

I would greatly prefer if both of the cable loops remained continuously connected to a PC. Software running on the PC could periodically check the temperature of the grain and alert the proper people by email if anything suspicious is indicated. Actually this type of feature is available in one form or another from at least two manufactures, both the software and the hardware are very expensive well over $10,000 for the setup.

I have attempted to research what type of serial data communication or protocol is used to transfer the temperature data to the hand held unit but this information is not easily determined since no one is divulging that type of detail.

I suspect that serial I2C used to communicate the temp data since there are only two conductors in the cable used to connect the cables to the monitor. I am thinking there are some digital temp sensors located along each cable that encode and transmit data to the monitor when addressed. I have never used I2C but do have some limited experience with serial uart and SPI.

Any data communication in ether direction as well as any required power supplied to the cables is being done using only two conductors since there are only two conductors in the connecting cables

I know that there are a number of regular Nerdkit forum contributors that have considerable experience and knowledge with regard to serial communication.

After that long explanation here are my questions.

Is it possible or even likely that these systems are using I2C?

Using test equipment might it be possible to develop a understanding of communication protocol used on these systems with such little information to start with?

I am considering the possibility of placing my oscilloscope / analyzer across the two conductors in the cable that lead to the hand held monitor.

Might it be possible to determine anything by doing that?

What other steps might I consider to gain a much better understanding of the communication used in theses systems?

I could just continue monitoring the bins with the hand held unit but would be interested in upgrading to a PC based system if I could develop a understanding of the communication used.

I would appreciate any useful comments or suggestions.

Darryl

July 13, 2013
by Rick_S
Rick_S's Avatar

Probably 1 wire temperature sensors like the DS18B20. These have unique serial numbers that would allow them to be identified by the host, they can be powered by the host in a 'parasite" mode where power is leached off the data lines. This allows only two wires to power and communicate with these devices. If I were a gambler, I'd bet on that being what is used.

A microcontroller could definitely be used for this. Noter had some code he had written for the 1 wire communications... don't remember if he posted it or not. A logic analyzer would be very helpful to determine what protocol is being used.

Good luck, sounds like a fun project,

Rick

July 13, 2013
by JimFrederickson
JimFrederickson's Avatar

Temperature in Grain Bins?

I am not so sure that it would be I2C...

I would be much more inclined, (NOTE, without actually seeing any of the hardware), to believe that it is RS-485 Communications.

I2C is mostly designed to be a short-distance inter-chip/inter-board communications protocol.

My exposure, (VERY LIMITED), to Grain Storage Facilities is that they are quite large.

RS-485 is used to connect multiple devices over sometimes very long distances mostly for industrial settings.

Probably the best place to start would be the make/model of the hand-held unit or the temperature cables.

RS-485 can interface to Atmel Microcontrollers, as well as any Microcontroller, fairly easily.

Once the Hardware Interface, RS-485 for instance, is determined then the next part is going to be to determine the protocol of the communications stream.

July 13, 2013
by Rick_S
Rick_S's Avatar

The temperature cables that you stated have only two wires to connect to the reader, do they have any other source of power than the two wires? Is there another "box" that has circuitry in it? Or do they just look like a two wire cable? Is there a shield in the cable?

Jim, doesn't RS-485 require a power and ground besides the two data lines? I'm not that familiar with it.

I'm with you though, make & model of temp cables / interface would help... Also putting a logic analyzer on the data lines :)

July 13, 2013
by Rick_S
Rick_S's Avatar

Looking a little more, It looks like RS-485 has to have at least 3 wires (two data and ground) so if his cable is shielded, it could definitely be that.

Looking at the one wire protocol though, according to Maxim's guidelines, a 1 wire network can have a range of up to 200 meters without any fancy supporting electronics.

This is a cut and paste from their application note.

Network weight is limited by the ability of the cable to be charged and discharged quickly enough to satisfy the 1-Wire protocol. A simple resistor pullup has a weight limitation of about 200m. Sophisticated 1-Wire master designs have overcome this limitation by using active pullups, that provide higher currents under logic control and have extended the maximum supportable weight to over 500m. See application note 244, "Advanced 1-Wire Network Driver."

So you can get quite a distance with 1 wire as well.

Not saying that's what it is, just saying it's a viable possibility.

Rick

July 13, 2013
by Ralphxyz
Ralphxyz's Avatar

Yeah Darryl, what is the brand of your handheld unit?

We might get a hint from the user manual or spec sheet.

Ralph

July 13, 2013
by sask55
sask55's Avatar

Thanks for the replies.

I was a little hesitant to mention the name of the system but after thinking about it I do not know what harm that could possibly do. I am using an OPI StorMax hand held unit to read and record the temp data from the cables.

The individual temperature cable range in length from 25 to 70 feet long. Typically there will be a temp sensor located at four foot intervals along each cable. The longer cables are spaced at 5 foot intervals. Therefore each cable will contain from 6 to 14 individual temp sensors. Each cable has both a male and a female two pin weather resistant connector. Both of these connectors are located at the upper end of the temp sensor cable. Having both a male and female connector on each cable is to allow multiple cables to be connected one after the other. ON the last cable, or in the cases of a solo cable, the female connector is not used and is just sealed from the elements.

There are clearly only two pins in these connectors with no indication of any other conductor or shielding connections. These cables are connected in groups by using inter connect cables between each cable in the set. There is also a long 100' interconect cable used between the first temp sensor bin cable in the set and hand held unit. The only limitation we encountered is a limit of 100 individual temp sensors per cable group. The grain storage facility is fairly large. The distance from the hand held to the last sensor on the last temp sensor cable would be at least 250 feet on the longest cable set. That set of cables consists of four temp sensor cables seperated from each other with interconnect cables. That group has a total 46 sensors located in four individual bins.

I cannot seam to locate any reference to any detailed information like the serial protocol or temp sensor chip in the user manual or on line. It may be available on line somewhere I just have not fund it yet. There is defiantly a system in use that reports the ID of individual temp sensor units. Each cable or set of cables must be initiated or set up on the hand held unit. After this process has been completed the unit will recognize the cable each time it is connected and record the temp date in the appropriate bin temperature history file automatically.

That is the extent of what I know about this system at this point. I would have to cut into a interconnect cable to gain access to the wires and connect my data analyzer to the system. I may not get the time to actually do much of this until this fall. I am just investigating what direction I should start off with at this time.

Thanks to comments here on this forum I feel I have already a couple of interesting pionts to look into this summer.

July 14, 2013
by pcbolt
pcbolt's Avatar

Darryl -

I think Rick might be right about the 1-wire protocol. The communication line is pulled up to "high" in reset or "no communication" mode so it essentially powers the sensors full time. Each sensor needs some smarts to it as well as a capacitor to hold the charge when the comm line goes low for brief periods. HERE is a good introduction.

July 14, 2013
by Rick_S
Rick_S's Avatar

Did you read about the DS18B20?? The cables you describe fit it to a tee. Your max distance is well within it's range, you can chain many together, they only need two wires for communication, with NO extra components.

Darryl, pull the data sheet for the DS18B20 and look it over. I'd bet your cables use those or something similar.

Rick

July 14, 2013
by sask55
sask55's Avatar

Thanks pcbolt & Rick that is interesting and potentially useful information.

I will be being doing some reading this summer to get a handle on this. I should get time this fall and winter to do some testing and experimenting with the hand held and a cable. I would like to think that I will make some headway but the reality is that doe to personal and business commitments I often have too many irons in the fire so to speak and my intentions do not match up well with my actual results.

July 14, 2013
by JKITSON
JKITSON's Avatar

SASK55 Nice project ahead of you.. I have been 4+ years on the Pull Sled Monitor.

RICK Here is another "Real World Project"...

Jim

July 15, 2013
by pcbolt
pcbolt's Avatar

HERE is a location for the DS18B20 data sheet and some sample code. Seems like it would be easy enough to build a whole system from scratch with those little buggers. I like that it has internal capacitors so all you need is two wires, an MCU, a pull-up resistor and some power.

July 15, 2013
by sask55
sask55's Avatar

pcbolt

I did look over the DS18B20 data sheet and the info on the Dallas one wire network last night. There is little question in my mind that this is the chip in use on these cables. As you say, setting up a system does appear to be very doable at this point. Assuming I am able to build a mirco based system to handle communication, there would still be a considerable number of points that would have to be addressed in software. I will defiantly be chipping away at this through the summer.

As for the temp sensor cables themselves, they need to by very rugged and strong. The cables are designed around one or two steel cables in order to handle the load placed on the cable as the bin is being filled and emptied. It is incredible how much downward force is on the longer cables. I have seen metal bin roof that have been deformed by the pull from a temp cable.

Thanks again; as usual very good information available on this forum.

Darryl

July 15, 2013
by pcbolt
pcbolt's Avatar

Darryl -

Well the good news is if these are the sensors you are using, you should be able to tap into them if you're willing to cut into a cable. Also, you could purchase a few of them and see exactly how they operate before the actual surgery. It sounds like you just have to measure the duration of the low pulses and high pulses then translate that into addresses and data. Like Jim said...sounds like a nice project. Look forward to seeing your progress.

February 29, 2016
by JKITSON
JKITSON's Avatar

Darryl

I just spotted the new Rasberry pi 3. I has WIFI built into the unit now. This might have some use for your temp monitor project....

https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/

I looked for you on Ricks site....

Jim

February 29, 2016
by sask55
sask55's Avatar

Hi Jim

The Raraspberry Pi that I have came with a USB stick type WiFi adapter from CanaKit. I find it works very well and is useful when playing around with the Pi. I have set up a folder on one of the hard drives on a PC as a mapped drive on the Pi. in that way I have as much storage I want for the Pi and also full access to the files from both the Pi and the PC. I do all the coding on the PC using Programmer's notepad because I am familiar with it and I have a better keyboard and monitor setup. I can then use the Pi to compile and run the projects.

Unfortunately I have not done much with my idea to try and build a bin temp monitoring system. I got impatient and sceptical that I could complete a satisfactory and reliable working system in a acceptable time frame. I ended up biting the bullet and just purchased a system for our main grain storage facility. I usually have to many irons in the fire and don't seam to get around to the projects I hope to complete. I have redesigned and greatly simplified my other, never ending, mill project by making use of microstep Driver modules, it is looking much more achievable at this point.

I like to think that I am going to investigate the grain temp monitoring system at some point. As you have pointed out the power and flexibility of the Raspberry PI option should make that idea very achievable as well as economical if I ever get time to really look into it.

I am registered on Ricks site as Darryl D.

Thanks for the suggestion, I think the Pi would work very well and I believe a lot of the code for the temp sensors is available open source on line.

Darryl

February 29, 2016
by JKITSON
JKITSON's Avatar

I was not thinking... Looked for SASK55

The PI 3 with WIFI may work great for some of my projects... all I need is time an dollars...

Jim

March 01, 2016
by BobaMosfet
BobaMosfet's Avatar

sask55-

The OPI Stormax system (for temp measurment at least) uses a 1-wire signaling sytem designed around the MAXIM (aka Dallas Semiconductor) DS1820. This ICs replace thermocouples, allowing them to simplify because little analog circuitry is necessary.

Datasheet is readily available, and has everything you need for understanding the protocol. Any one cable in a silo could have a sensor attached every few feet, data stream MUX'ed together and sent back. Essentially, you need to convert the problem from one of a parallel bus, to a serial bus.

The speed of the protocol will determine how many lines a single MCU can handle. N-number of MCUs could then handle all the lines coming back from the silos, could serialize that data by sensor ID, and make that available via USB or ethernet to a PC.

BM

March 01, 2016
by BobaMosfet
BobaMosfet's Avatar

sask55-

As for the second wire... they might be using that for additional power, or perhaps using the same technique for humidity sensing, but with a different sensor. If I can find more info, I'll share. Or it's just a ground wire.

BM

March 01, 2016
by sask55
sask55's Avatar

BM

I am familiar with the OPI Stormax system as well as the predecessor of the Stormax temp sensor cables. We still have a number of grain bins that are fitted with the older technology OPI analog cables. These cables are many years old now and are near the end of their serviceable life. Over time individual temp sensor locations and occasionally the entire cable will stop functioning. Eventually we will just replace all of the remaining old analog cables with the Stormax or Intra Grain cables, but for now on our farm location bins we have a kind of a hogpog mixture of the two completely incompatible technologies that require two separate sets of reading equipment.

Intra Grain, Bin Sense, is a company started by, Kyle Folk, a local, young entrepreneur. When I say local I really mean local. There are perhaps 300 people this entire rural area where I farm and live. Kyle’s family has farmed in this area for generations. His father had an electrical contractor business and still farms in this area. This fellow took a good idea, recognized a potential niche market, combined a number of existing and emerging technologies, developed some very high quality and well-designed products. They are now selling internationally with thousands of customers and a well-established retail distribution network.

Stormax and Bin Sense both use the same technologies in their digital cables right down to the type of connection plugs used. Either system will readily connect and read the cables purchased from the other supplier. One of the reasons I have not taken the time to develop anything on my own is because we installed a Bin Sense system in our main grain storage facility. Bin Sense has a much more complete and interconnected approach then our Storemax system. With Bin Sense all my bin temp readings are available to me on line any time I wish to check. There are now humidity sensors and bin fan control features available. Bin Sense continually monitors grain temperature within the bins and alerts me by text message if a reading is beginning to look suspect.

I think I could possibly produce a homemade system using a Raspberry Pi and update all of our remaining bins to a digital cable system. I am not really convinced I could produce a system that is as trouble free and reliable as the Bin Sense system is. I think I should be able to do it with a considerably less investment of dollars but a much larger investment of time.

Most of this information has little to do with electronics, the underlining theme of this forum. I only brought it up because Intra Grain is an example of something that does not happen very often these days. Kyle is journeymen electrician that has completely given up his electrical contractor business in order to concentrate on Intra Grain.

If anyone is interested this is the link to Intra Grain

March 03, 2016
by BobaMosfet
BobaMosfet's Avatar

sask55-

Are the digital cables really expensive? If not, you could just get more digital cables, but build your own main unit to connect all of them to. I think that is a much more feasible engineering task, because the cables have to deal with all kinds of element-related physics (cold, hot, humidity, static, stretching, etc). Whereas the master unit is perhaps a relatively stationary indoor unit. Mostly a case with electronics and connections.

The Bin-Sense folks should be able to help you with the protocol issues, or at least verification. I checked with the ASEA and a couple of other agriculture groups regarding the information I provided.

BM

March 03, 2016
by sask55
sask55's Avatar

BM

Yes I think that would be the most practical approach.

In my case I have basically two groups of cables now. My main facility has about a dozen digital cables ( perhaps 150 individual temp senses) that are physically all in the same building. They are arranged on two independent circuits that are currently connected to, and read by, two Bin-Sense units. The Bin_sense units report to the Bin_sense server on a Cell-tower type data link. Software on the Bin_sense server tracks any changes in temperature over time and makes that information available on the web as well as sending out alerts when certain criteria is met.

The multiple bins on each transmitter setup that we have was not typical for Bin Sense. Typically they would use a master transmitter unit on one bin and a secondary transmitter unit on each of other bins within a yard site. Their system would set up communications between all the units on a site and the master communicates with the server on a cell data link. We had all the OPI digital temp cables in place and operating for a number of years with a hand held Store_Max reader when we switched to the Bin Senses system. I know that when we went to the Bn_Sense system they actually had no experience sorting out how to determine which temp sensors where in each bin. Our facility was the first that they had set up with so many cables all on the same loop. It took them a bit to get things working. That was a couple of years ago, they certainly have it down now.

The most practical approach for me would be to build my own system to read, track and report the cables in that facility. There is a PC on site that has internet connection. Conveniently the PC is located next to the location where the two temp sensor circuit are terminated. There would still be a considerable amount of software development required to come anywhere close to what I am getting from Bin_Sense. My original plan was to use a micro to read the temps on the cables and set up a Uart connection with the PC to do the recording and reporting. I have not made much progress with reading multiple cable with a Micro I am now thinking a Raspberry Pi may work better. Well! a lot more experience writing code that is so time sensitive would also be very helpful.

If I was able to replace the Bin_sense units in the grain elevator I could move the two Bin_sense units to my more remote farm bin location. I am certain that Bin-Sense have plenty more that I could buy, but my facility in town lends itself so well to a home made system. I was planning or maybe dreaming about setting up my our system. The Bin_sense units would be ideal out at the farm site because they do not require any power source or an internet connection, basically that is the type of location they are designed for. I could simply upgrade the remaining analog cables that I have in bins on the farm to digital cables then connect all the farm bins to Bin_sense. I could easily have intra grain track all the farm bins with no more need for us to occasionally connect the hand held OPI and Store Max units as we now are doing.

All this is very good in theory but I just do not seam to find the time to actually get much done.

Darryl

March 04, 2016
by BobaMosfet
BobaMosfet's Avatar

Darryl--

Completely understand (time and getting things done). I think we all can appreciate that battle :)

Do you have any old, failed digital cable? If so, you might carefully crack one open and see if you can determine what the sensor is inside-- if it is in fact the chip I mentioned, then you have your answer about protocol, and could acquire a couple of those chips to breadboard and test with.

If it's based on the DS1820, it appears that the main control unit actually polls the sensors on the line, the sensors don't drive the interaction. Every sensor is serialized, so they can be differentiated from one another.

BM

Post a Reply

Please log in to post a reply.

Did you know that inductors try to keep their current constant over short periods of time? Learn more...