Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonoff TH 16 Elite cannot detect temp sensor #437

Closed
zandegran opened this issue Oct 19, 2024 · 14 comments
Closed

Sonoff TH 16 Elite cannot detect temp sensor #437

zandegran opened this issue Oct 19, 2024 · 14 comments

Comments

@zandegran
Copy link
Contributor

zandegran commented Oct 19, 2024

The temp probe data should be at GPIO25. I changed the config to reflect this. Changed oneWirePin from 23 to 25 in Config.h. GPIO27 gives power to the sensor so added the following to void brewpi_setup() in BrewPiLess.cpp

void brewpi_setup()
{
  pinMode(27, OUTPUT); 
  digitalWrite(27, LOW);
  pinMode(13, OUTPUT); 
  digitalWrite(13, LOW); // Green status Led
  ....
}

The LED is turning on but the temperature sensor is not detected.
My changes: master...zandegran:BrewPiLess:wip-sonoff-th-16-elite

@vitotai
Copy link
Owner

vitotai commented Oct 21, 2024

I don't think GPIO would give enough power to OneWire Device. According to my limited experience, even 3.3V from ESP32 didn't work well. I am NO hardware expert, though.

@lalo-uy
Copy link

lalo-uy commented Oct 21, 2024 via email

@zandegran
Copy link
Contributor Author

zandegran commented Oct 21, 2024

This is standard 1.5m cable that came with the sonoff th16 elite device. i didn't check if it worked with the original firmware.. @lalo-uy the sonoff sensor has pullup built in.

I updated the one-wire lib to 2.3.8 and added the line #define ARDUINO_ARCH_ESP32 true to config.h
I guess this should fix some timing issue with some of the sensors. Still no improvement.
https://github.com/PaulStoffregen/OneWire/blob/master/OneWire.cpp#L151

I don't think GPIO would give enough power to OneWire Device. According to my limited experience, even 3.3V from ESP32 didn't work well. I am NO hardware expert, though.

@jonathanschneider
Copy link

I have a Sonoff TH Origin that I'm trying to get to work at the moment. The sensor I received isn't just a DS18B20. There is another microcontroller installed in the cable and I believe from there on it's not OneWire anymore. Does your temp sensor cable also have a little box in it?

@zandegran
Copy link
Contributor Author

zandegran commented Oct 22, 2024

Ohh I didn't know that.. Yes it does... I was already thinking of buying a RJ11 to TRS adapter that Sonoff sells so that I can test with sensor that I know works. I was using Sonoff TH16 before. I have sensors from that.

@zandegran
Copy link
Contributor Author

Bingo! I spliced the old device and everything is working... Big thanks @jonathanschneider
I have a version where
Red led indicates power
Blue led indicates wifi connection
Green led indicates cooler/heater(relay) on

I will receive oled-lcd tomorrow... I will create a PR once I get that working

@zandegran
Copy link
Contributor Author

zandegran commented Oct 22, 2024

So, technically the Sonoff AL010 2.5mm Audio Jack to RJ9 Adapter could work with old sensor which are still easy to find. Or remove the in-line micro controller in newer sensor which involves splicing wires.

@zandegran
Copy link
Contributor Author

IMG_4633 Large

@jonathanschneider
Copy link

Nice job! I'm looking forward to that PR!

@zandegran
Copy link
Contributor Author

zandegran commented Oct 23, 2024

@jonathanschneider Here is the PR #438 it would be nice if you can confirm if it works in origin as well

@jonathanschneider
Copy link

jonathanschneider commented Oct 28, 2024

@zandegran I realized that the pinout between the TH Elite 16/TH Origin 16 and TH Elite 20/TH Origin 20 is different. Looking at your PR I believe you have a TH Elite 16 whereas I have a TH Origin 20. I will create a PR to make the distinction.

@zandegran
Copy link
Contributor Author

zandegran commented Oct 28, 2024

@jonathanschneider I should have checked.. Only the Relays are different not the leds, data, soderpads for 20A elite and sensorpower though.. It takes some minutes before the cooling begins so the LED might be working already..

@jonathanschneider
Copy link

I had checked for differences between Elite and Origin but not between 16 and 20. The LED does work!

@zandegran
Copy link
Contributor Author

@jonathanschneider This PR should fix your problem #440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants