Reading DS18b20 sensors using ESP-IDF using a ESP32 with a 26 MHx XTAL

Internet of Things IoT Frameworks 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ I'm able to read DS18B20 sensors using the example code provided in this repository. It works well using a standard Espressif ESP32-WROOM-32 (aka ESP32-DevKitC), which uses a 40 MHz XTAL. I'm not able to run the same example using an Allnet-IOT-WLAN, which uses a 26 MHz XTAL. I suspect that the problem is related with RMT initialization. The initialization is using: rmt_tx.clk_div = 80; I've tried different settings for clk_div with no luck. Does anyone know how to use the DS18B20 sensor with ESP-IDF, using a board with a 26 MHz XTAL, instead of more standard 40 MHz one? ESP32-WROOM-32 output (working) I (0) cpu_start: Starting scheduler on APP CPU. Find devices: 0 : d4000008e40d7428 1 : f8000008e3632528 Found 2 devices Device 1502162ca5b2ee28 is not present Temperature readings (degrees C): sample 1 0: 22.3 0 errors 1: 21.8 0 errors Temperature readings (degrees C): sample 2 0: 22.3 0 errors 1: 21.9 0 errors Allnet-IOT-WLAN output (not working) I (0) cpu_start: Starting scheduler on APP CPU. Find devices: Found 0 devices E (6780) owb_rmt: rx_items == 0 E (6880) owb_rmt: rx_items == 0 E (6980) owb_rmt: rx_items == 0

Posted on 16 Aug 2022, this text provides information on IoT Frameworks related to Internet of Things. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ There are no differences in the RMT initialization using different XTAL clock frequencies. D (2319) rmt: Rmt Tx Channel 1|Gpio 25|Sclk_Hz 80000000|Div 80|Carrier_Hz 0|Duty 35 D (2319) intr_alloc: Connected src 47 to int 13 (cpu 0) D (2319) rmt: Rmt Rx Channel 0|Gpio 25|Sclk_Hz 80000000|Div 80|Thresold 77|Filter 30 Both use the same 80 MHx source. I was using a wrong pinout diagram. I've tested the RMT with a more simple example and I found out that the pinout was wrong. The DS18b20 sensors works well with a 26 MHz XTAL with the esp32-ds18b20 library.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Internet of Things Links

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community