Electronics > Projects, Designs, and Technical Stuff

Weird I2C issue, ESP8266 ,MCP23017

(1/3) > >>

ChrisGreece52:
Hello, I have completed my "smart" thermostat project and i am facing some weird issue with the MCU i am using.

Issue : Since the on board MCU cannot supply all the components on its own, the board is always powered using mains (see schematics below). When i have the board connected to my PC via USB everything works fine.
The moment i unplug the USB cable and i reset the MCU things get wild.

The MCP23017 used to control the state of two relays and read button inputs, reads random inputs and turns on and off the relays. I have no control over the buttons once the USB cable is unplugged.

Troubleshooting steps i followed :

1) I tried disabling Serial communication and every serial.print/println statement, to make sure the problem was not caused by the MCU trying to relay messages to the Serial Console.
2) I tried removing the SCL and SDA pull-up resistors.
3) I tried enabling and disabling the internal pull-ups of the MCP23017.

I am kinda lost on what to do or what to measure. Since the MCU does not communicate via USB and the MCP works fine when connected via USB i think this might be a supply issue.

The power supply on my board utilizes a 220VAC to 5VDC module , more specifically the HI-LINK HLK-20M05 which is more than capable of powering everything on the board ( the ESP8266, 20X4 LCD Display and 2 Relays are the most power hungry components on there).

Since i have no idea on how to proceed i posted the schematics for the board below. I am so sorry if i missed something and i thank you in advance.

If there is anything i could clarify please inform me.

mayor:
You're not showing your USB connection, or MCU reset, etc?

ChrisGreece52:
The board houses a full ESP8266 board like this one https://www.e-wireless.gr/images/detailed/255/nodemcu_lua.jpg
The connections between the boards can be seen in the schematic i provided.

st_ashcroft:
I'd be looking at the following:

Running MCP23017 on 5V but interfacing to 3.3V I2C bus of ESP8266.
No decoupling cap on MCP23017.

I expect the USB 5V rail is much smoother than the output of the PSU and so you got away with things being a bit marginal.

Ice-Tea:
Have you tried powering from a 5V power bank?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod