The Combine Forum banner

Reading OPI Cables with and Arduino

1099 Views 13 Replies 3 Participants Last post by  Farming-Hamilton-IA
I am interested in seeing if anyone has been able to successfully read OPI cables with an Arduino or other microcontroller. I found an old thread about it, and it looks like folks have been able to get the temperature and relative humidity.


The main question I have here is how can you get the addresses of the different sensors, and how do you know which level in the cable they are?

Thank you for your ideas. The subscriptions on these cables are just getting very high.
1 - 6 of 14 Posts
It is pretty straight forward. The most common sensors used are ds18b20 sensors that use onewire protocol to communicate. Each sensor is connected along a bus and are powered using parasitic power(it robs power off the data line). You can use the arduino onewire library to read them. To get their positions we utilize the two bytes of user programable memory in the sensors(originally intended for temperature alarms) one is the cable is and the other is the sensor position. From their you basically make a sketch that runs through the onewire search algorithm and read the temperature then the bin and sensor numbers and sort them into an array.

Humidity is a little more complicated as you use a DS28EA00 sensor that has 2 io pins on it, and a SHT35 I2C humidity sensor. The DS28EA00 bit bangs out the I2C signal to the humidity sensor and reads it that way. I have still got to make a library for the humidity but all I use is a modified software I2C library.
Okay. So you have the old style cables. That mystery IC is a DD28EA00. The library’s that I am working on are not Matt Reiner’s but they are for the new style cables that utilize the SHT35 sensors because the sht15 has been discontinued. Is that a 2 wire cable? If so I would bet that that other circuitry is for the parasitic power for the SHT15.
The SHT15 doesn’t use I2C but sensirions own protocol and a formula different from the sht35 so they are not compatible. There was actually an update on the commercial readers when they switched the sensors out. I have yet to publish anything at this point as I need to make my code a little better. For my projects I am using a AVR128DB28 with the DxCore add on so I can use the arduino IDE and libraries to program it. It seems to have significantly more functionality and features when compared to other arduinos and is geared specifically for analog signal processing, so it makes it a great microcontroller for driving onewire signals. But nearly any microcontroller will work with the onewire library.
I am trying to use some of the analog features to improve the reliability of extended onewire networks mainly the comparators(these aren't actually unique to the DB series), and I am using the internal OPAMPS and some of the filtering circuitry(Which might not stay on this path, doesn't seem to be terribly effective). When you start to get large networks there are a lot of weird analog components of the onewire waveform that can begin to manifest(ringing, reflections, EMI). I am trying to use these analog functions of the microcontroller to filter those out. They aren't necessary, but I have seen improvements compared to the basic onewire library when you have poor electrical connections or non-ideal networks, but my main goal is to help with EMI. Plus with the cross-peripheral event system, I can use the hardware peripherals to achieve incredible performance with certain functions that can outperform nearly any other arduino.
  • Like
Reactions: 1
What kinds of changes did you make to the 1-wire to bit bang the I2C signal off the SHT35 to something you can read?
I basically found an example of a software I2C code. Then I replaced all the digitalwrites with the wire commands to write to the DS28EA00’s IO. Then I just looked in the SHT35 data sheet and found the commands I had to send and when to read and punched it in and it all worked. If I get a chance I will post it on my GitHub soon and I will share the link.
  • Like
Reactions: 1
When you post your code, it would be great if you could drop the link. Thank you for your feedback.
Guy1000/Grain-Bin-Humidity-Cable-Reader: For reading SHT35 and DS28EA00 based humidity/temperature cables (github.com)

Sorry about that, got distracted with other things. Definitely not my best code but it is good enough as an example. If there is anything confusing on there or somethings that don't make any sense just let me know.
  • Like
Reactions: 1
1 - 6 of 14 Posts
Top