1

It seemed that ESP8266-01S does not work smoothly with PCF8574P (Dip16) but PCF8574T/AT (SOP16) does. Evidence as following:

Code for blinking a led connecting to P7 of the PCF8574 was just simple

void loop() {
pcf.digitalWrite(P7,HIGH);
delay(500);
pcf.digitalWrite(P7,LOW);
delay(500);
}

For connecting with pcf8574 I2C, I used this library https://github.com/xreef/PCF8574_library

Wiring was made using the following cases:

Case 1: Connect an ESP8266-01S with PCF8574P using standard I2C connection (02 pullup resistors of 1K each). Blinking of a led connected with P7 stopped after one cycle (on>off) and resumed working again after few seconds and stopped again. ESP8266-01S and PCF8574P

Case 2: Similar as above but replace PCF8574P with an SMD version of PCF8574AT. Blinking of a led connecting with buzzer (P7) was fine as expected, no delay, no strange problem was found. ESP8266-01S with PCF8574AT

Case 3: Arduino Uno connected with PCF8574(P/AT) via A4 (SDA), A5(SCL) using 02 options (5V and 3.3V to power up the PCF8574). Blinking of a led connecting with buzzer (P7) was fine as expected.

I tried to look at datasheet of the PCF8574 and did not find any part relating to the strange behavior as stated in case 1 above. Can anyone advise me on why such a strange problem happened in Case 1.

  • What if it is a software issue? Do you know what the ESP does behind the scenes when it is not running your code? – Justme Feb 06 '22 at 14:12
  • Different physical implementations might have created a problem with the DIP version. – Andy aka Feb 06 '22 at 14:18
  • @Justme I tried to log using serial monitor but the ESP just halt and did nothing. After few seconds, it starts blinking the led on/off and resume that cycle again. Similar code was working fine with the smd version! – Đặng Đình Ngọc Feb 06 '22 at 14:35
  • @Andyaka I used a SMD to DIP breakout board for the SMD version and also used the PCF8574 port expander to check and ESP working all fine with both bare chip (SMD) and port expander module (using similar chip pcf8574AT version). Same software piece and only case 1 has problem! – Đặng Đình Ngọc Feb 06 '22 at 14:39
  • Show a picture of the DIP implementation. – Andy aka Feb 06 '22 at 14:41
  • @Andyaka will do tomorrow! but I sure nothing wrong with it! I made it on the breadboard for testing as my PCB (with DIP16) was failed! – Đặng Đình Ngọc Feb 06 '22 at 14:44
  • Breadboards are notoriously flaky. – Andy aka Feb 06 '22 at 14:56

0 Answers0