-
Notifications
You must be signed in to change notification settings - Fork 638
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
DS18B20 extended temperature sensors not working #1361
Comments
@peteeee could you please share the schematics of how you are connecting the sensors you ll need some pull ups as the cable is quite long also you can try using CAT5 Ethernet cable |
I did extended testing with ds18b20 sensors on long cable, run into multiple issues. Most issues can be solved doing this. |
Thank you gentlemen. Here looking to shrink down 1-wire temperature sensors hub to a SonOff basic. Initially tested here with an RPi / Node Red / OWFS / MQTT out set up. This current RPi is multitasking doing ZWave (serial to ethernet), SD Radio NOAA map downloads, Node Red, Mosquitto Broker, OWFS. Looking to off load 1-wire temperature sensors to SonOff basic with only 4 temperature sensors. It worked fine with resistor at terminal end on SonOff basic (3.3VDC, GPIO14, Ground) star connected to 4 DS18B20 sensors connected via 22/4 alarm cable 1-3 meters in length using waterproof DS18B20 cables, raw DS18B20 chips, AAG 18B20 boards, Midon 18B20 boards and Hobby Boards 18B20 boards. Here is a drawing of configuration and Tasmota console messages with 3 sensors connected all extended from Sonoff basic terminals in a star configuration. SonOff basic with Tasmota runs fine with 4 temperature sensors hooked up in a similar fashion (star) with all of the sensors extended via 22/4 alarm cable. Using this configuration with Home Assistant. I like Espurna firmware flexibility versus Tasmota firmware. Goal here is to use one SonOff basic in basement to cover outside, basement, main floor (2) and Sonoff basic in attic (of two story) to cover attic, second floor rooms. Using / tested firmware Espurna V. 1.13.3 ITEAD SonOff basic Dallas and basic and TH Debug only shows one sensor: [246529] [MQTT] Sending SonOff-1Wire-2/data => {"temperature":69.8,"time":"2018-11-25 09:21:53","mac":"BC:DD:C2:0F:4E:8A","host":"ICS-SonOff2","ip":"192.168.244.222","id":80042} (PID 52) In Tasmota configured this for multiple DS18X20 sensors connected to GPIO14 in user_config.h.. #define USE_DS18x20 // Optional using OneWire library for multiple DS18B20 and/or DS18S20 (+2k code) |
@peteeee All you need to do is to comment the line with |
Thank you Valcob. Yes; went to 4 extended DS18B20 sensors and it is working now with one 4.7K ohm resistor except for the DHT debug errors. I have wired the terminals on the SonOff basic WiFi for two GPIO pins. Can I redefine the firmware to use GPIO 14 for DS18B20's and GPIO XX for one DHT22 combo sensor? |
@peteeee sure just find the line or add one to your configuration in hardware.h |
Thank you Valcob. Here had set up PlatformIO to work with Tasmota and just configured it to work with Espurna firmware. Still learning. Found this section in sensors.h file. //------------------------------------------------------------------------------ #ifndef DALLAS_SUPPORT #ifndef DALLAS_PIN #define DALLAS_RESOLUTION 9 // Not used atm //------------------------------------------------------------------------------ #ifndef DHT_SUPPORT #ifndef DHT_PIN #ifndef DHT_TYPE So here can I keep the GPIO dallas sensors to GPIO 14 and change the DHT sensors to GPIO4 or any other. Here modded my SonOff WiFi basic adding outside terminals for multiple GPIO pins, 3.3VCC and 5.0VCC and ground for multiple sensors connectivity. |
Keep closing thread by accident fat fingering it. |
Got 5 DS18B20 sensors working now. 2 are local which are less than 2 meters and 3 are further away. I put one 4.7k Ohm resistor at the terminal end of the SonOff basic Wifi device and one 4.7k Ohm resistor at the end run of the longest wire (50 feet or so). Next looking to add two DHT22 combo sensors on different GPIO pins. So modding firmware to work with wired terminals and multiple GPIO pins. GPIO 14 - will be utilized for 5 DS18B20 temperature sensors |
@peteeee OMG stop adding temperature sensors )))) |
Yes here got addicted to 1-Wire sensors in the late 1990's and weather using an AAG Weather station. First MQTT testing was relating to using an RPi / Node Red / OWFS / Dallas hub...works great today.. ....and now wanting to downsize a bit and go to a hub and spoke topology using updated SonOffs. Ideally incorporating the OWFS library would be a nice thing. I did notice that with Tasmota firmware you can connect 3 DHT22's and did find a patch to update an old ino file: Single wire sensor I am good here now with 5 DS18B20 sensors (extended) connected. [402188] [MQTT] Sending SonOff-1Wire-1/temperature/0 => 68.0 (PID 734) and will close this thread. Thank you for your help Valcob. |
Officially closed this thread as I have fixed my multiple extended DS18B20 issue. Great stuff here!!!! |
Is this conversion also possible with Sonoff SV boards? |
Recently switched over from Tasmota to Espurna for my Sonoff WiFi basic switches and multiple DS18B20s.
I am impressed with the Espurna feature set and using less than 500k of memory.
Initial testing with Tasmota firmware had 3 DS18B20 sensors from about 3 meters out to around 10 meters. This has been working well now for a few months.
Initial testing was connecting 3 DS18B20's on the work bench with short wires. All three worked fine with ESPURNA 1.13.3.
Extending one of the sensors to around 10 meters took out all of the sensors where I cannot see any of the sensors.
Not sure why the three sensors (extended) worked with Tasmota firmware and no longer work now with ESPurna firmware.
Did a similiar test with one DHT22 sensor. Worked great near the Sonoff and it doesn't work at all extended to around 10 meters.
The text was updated successfully, but these errors were encountered: