One Wire over an IO extender board?

Hello,

I was wondering if it is at all possible to read a DB18b20 Temperature sensor via the extra pins an IO extender offers.

I am using a PCF8574 breakout board with 8 extra io pins. I would like to hook it up to an esp-01 which has very few IO pins.

You can simply daisy chain DS18B20 and, once the adresses are known, interrogate them one by one on the same IO pin.

Wow. It is that easy?

I am going to try that.

Thank you very much.

It is best you not operate them in parasitic mode when paralleling them as the extra capacitance can cause problems. 1 pull up resistor for the whole group is fine.

Hi,

I tried both modes, parasitic and with + - and signal connected but I cannot get it to work.

The i2c board and sensor (bme280) get detected. I connect dit to the sda pin (a4) on an uno r3 clone. If I connect it directly to A3 it reads fine.

I tried with and without a pullup. (+- 5.2k according to my multimeter) and with 3.3 and 5 volt.

It is all not super important but it would be nice to beable to add those sensors to one of the i2c wires.

I just like the super cheap esp-01 boards. They are about 80 cents a piece and have way more memory but only 2 gpio pins. You an also use rx and tx but it is nice to beable to debug using serial. So I thought/was hoping that adding a digital io extender(s) (PCF8574) to get digital IO pins and 1 or more analog ADC's (ADS1115) I get as many IO ports and I want.

But it seems that it is not easy (or possible) to get them to work with existing libraries for the many common sensors/break out boards out there.

I guess I should focus on using i2c modules only.

Ps I am testing on an uno r3 clone first. Once I get it working there I try it on the esp8266

I think you should focus on buying a ESP32 :wink:
Seriously, you are willing to go through great trouble and buy extra hardware to make it work. It is much simpler to buy something that is a common used board with normal options.

The 1-Wire protocol has very specific timing. I think it is impossible to do that via a I2C I/O extender.

You don't need the I2C extender, one digital pin, one VCC, one GND connection and a pull-up resistor for the digital pin.

Check out other DS18B20 tutorials on how to connect and use them.

Koepel:
I think you should focus on buying a ESP32 :wink:
Seriously, you are willing to go through great trouble and buy extra hardware to make it work. It is much simpler to buy something that is a common used board with normal options.

The 1-Wire protocol has very specific timing. I think it is impossible to do that via a I2C I/O extender.

Well that's not for me. I find the esp-01 with the 8266 is wonderfull. They are almost free. Yes I know. If had spent the time working for money I could have bought a bunch of those eps 32's. The little board has 2 GPIO pins and I got a DHT11 and a DS18B20 working on the tx/rx pins.

I used one set as a remote control for my bath tub. (3 switches, on/off, more or less bubbles) since the manufacturer went bankrupt and I could not get a new control panel anywhere. At least now I have bubbles after 10 years of not being able to use it.

I just wanted to know how get it done. I have a Wemos d1 mini that has 12 pins I think and also an UNO+WiFi R3 from Robodyn which also has 12 pins for the esp. But I really want to use the ESP-01 first when ever possible.

But it is a challenge.

So far I cannot even talk to the bme280 board. I can see it when scanning for i2c devices on gpio 0 and 2 but so far could not find a library for the bme280 that I can tell to use gpio 0 and 2. But I am slowly learning :slight_smile:

Okay I can read the bme280 over i2c on gpio0 and gpio2. The Wire.begin(0,2); Does that. 0=SDA 2=SCL
Just a very stupid mistake of reading over if (!status==1). So it was working all this time.

Now I have to figure out how I can have my uno talk to the esp-01 over i2c so my uno has internet access :slight_smile: