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

Internet of Things IoT Frameworks 3 years ago

3.73K 1 0 0 0

_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

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 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.
0 views
0 shares

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.

Similar Forum


Q

Azure IoT hub and sending messages with mosquitto_pub

_x000D_ _x000D_ I'm trying to send some simple message with mosquitto_pub to Azure IoT HUB but faced...
Q

How to generate AWS bootstrap certificates with java SDK?

_x000D_ _x000D_ According to this docs I need to generate so-called bootstrap certificates for my Io...
Q

is it possible to do 3way handshake only one time with mqtt communication?

_x000D_ _x000D_ I am using mosquitto_pub to publish the data with TLS using a topic. I am using mosq...

Important Internet of Things Links