Electronics > Projects, Designs, and Technical Stuff
Weird I2C issue, ESP8266 ,MCP23017
ChrisGreece52:
I modified a micro USB cable i had around and cut the +5V cable. The board is functioning normally. Problem is now that i disconnected the cable fully the problem does not appear. I have no idea why this is happening but it seems like the problem is solved. I am starting to think that it was a software issue but still i am not sure.
As for the address pins A0,A1 and A2 i now saw in the MCP23017 datasheet that they must be externally biased. I will do a bit more research and bias the crap out of those address pins to make sure they do not cause an issue.
d-smes:
It could be the secondary circuits (5V stuff) need an Earth ground reference which is what the USB cable is providing. Try a direct connection from 5V GND signal to Earth / PE ground. Instead of a direct connection, a few nF of capacitance to Earth may also do the trick.
ChrisGreece52:
That's another issue, this board works as a thermostat, the cables that come out of the wall for the connections include only L,N and two wires for the burner and the water heater. No earth cable is included.
Since i am powering the thermostat via a wall outlet at the moment for troubleshooting i connected the shell of the USB type A to earth while the micro USB end was connected to the MCU. No difference at all.
rstofer:
If you are still using I2C, the pull-up resistors are required and should be on the order of 2.2K. You will see schematics where the author uses 10K or even higher but the circuit is unlikely to comply with the standards in terms of rise time. NXP wrote the specifications for I2C:
Section 7, Page 55, goes into the calculation. Generally, 4.7K will work but 2.2K works better when the capacitance is just a guess.
You're working in the very bottom left corner of the graph and it is mostly useless because a lot is happening within one grid line of the origin.
https://www.nxp.com/docs/en/user-guide/UM10204.pdf
ChrisGreece52:
I am currently using 1k pull-ups since i had no bigger value available at the moment. From what i read and considering the layout of the board i do not think that would cause an issue.
Navigation
[0] Message Index
[*] Previous page
Go to full version