Sonoff Mini & RX/TS for I²C

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Sonoff Mini & RX/TS for I²C

#1 Post by Grumpf » 14 Sep 2020, 21:31

I flashed two sonoff minis that I thought were bricked (will do the third one tonight). I reconfigured the RX/TX pins to be used for I²C but had unstable (to say the least) results with a BME280.
Anyone tried that or have advice about it (adding resistors etc.)?
14 PCB&Wires (Small).jpg
14 PCB&Wires (Small).jpg (98.37 KiB) Viewed 9855 times
15 Programming (Small).jpg
15 Programming (Small).jpg (137.8 KiB) Viewed 9855 times
Rant/ the DIY mode and so procedure with wifi hotspot, Chinese wiretap & bloat/spyware is a total turnoff for me. Dunno what happened in the head of the Sonoff creators but abandoning the simple Wifi AP doesn't seem like a bad marketing choice but more like a will to be certain to rid off geek customers, AKA their primary market (although they don't want to admit it). /Rant.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Mini & RX/TS for I²C

#2 Post by TD-er » 14 Sep 2020, 21:51

Is the serial port (and/or serial logging) still enabled in the settings?
Do you have a pull-up resistor between 3v3 and SCL and one between 3v3 and SDA?
If not, I would suggest to try a 4k7 resistor as pull-up resistors for the I2C bus.

User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Re: Sonoff Mini & RX/TS for I²C

#3 Post by Grumpf » 15 Sep 2020, 07:41

Thanks, I disabled the serial but I was wondering about the pull-ups, forgot it was no the native I²C pins, I'll try that and post my results.
Cheers.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Mini & RX/TS for I²C

#4 Post by TD-er » 15 Sep 2020, 09:52

Just another thing to try, regardless of the pull-up check.
You can also try to lower the I2C speeds.
The default is 400 kHz, but you could also try a lower speed like 100 kHz in the settings.

User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Re: Sonoff Mini & RX/TS for I²C

#5 Post by Grumpf » 17 Sep 2020, 21:29

Added resistors and slowed down the bus. Worked like a charm I now have 3 days (hence I waited to post back) stability. Thanks TD-er. I'll finish my word document then try to do an instructable about the whole process. There are several already but none toward Espeasy.

Here's the graph with the uncalibrated probe compared to my calibrated one (for T only).
custom-temperature-graph.png
custom-temperature-graph.png (146.03 KiB) Viewed 9812 times

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Mini & RX/TS for I²C

#6 Post by TD-er » 17 Sep 2020, 21:36

What bus frequency are you now using? 100 kHz?

User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Re: Sonoff Mini & RX/TS for I²C

#7 Post by Grumpf » 17 Sep 2020, 21:50

Yes, I just did the whole change without checking what was the real issue there. Considering my poor soldering skills I'll do a full test again to identify the real culprit (although it's good practice to just add pullups and lower speed when not needed) before publishing anything. But it works.

I2CBoard.png
I2CBoard.png (1.24 MiB) Viewed 9808 times
Cheers !

Post Reply

Who is online

Users browsing this forum: No registered users and 52 guests