Hello,
I am playing with some DIY things for home automation and recently I decided to give a try ESP32. I started with simplest possible temperature checking and as I think the best way to learn something is to try to explain it to somebody - I started putting notes on my blog.
I used DS18B20 with code coming from FeelFreeLinux and wired it up and it works. I would like to go further and keep going. I put whole story there => http://e-rook.org/2017/06/08/esp32-chec ... h-ds18b20/
Cheers,
Rook/Peter
First try - temperature gathering
Re: First try - temperature gathering
Nice work.
One suggestion: There is no need to connect DS18B20 VDD to 5V, connect it to 3.3V. Better yet, use DS18B20 in parasite power mode, you need only GND and one GPIO to use it (in this mode VDD is connected to GND). I'm using it that way for months with ESP32 without any problem.
If your driver does not support parasite power, you could adapt it from my driver in LUA-RTOS project (https://github.com/loboris/Lua-RTOS-ESP32).
Look at files:
https://github.com/loboris/Lua-RTOS-ESP ... s/ds1820.c
https://github.com/loboris/Lua-RTOS-ESP ... rs/owire.c
Only the small part of the code in those files is related to Lua, you can just ignore it.
One suggestion: There is no need to connect DS18B20 VDD to 5V, connect it to 3.3V. Better yet, use DS18B20 in parasite power mode, you need only GND and one GPIO to use it (in this mode VDD is connected to GND). I'm using it that way for months with ESP32 without any problem.
If your driver does not support parasite power, you could adapt it from my driver in LUA-RTOS project (https://github.com/loboris/Lua-RTOS-ESP32).
Look at files:
https://github.com/loboris/Lua-RTOS-ESP ... s/ds1820.c
https://github.com/loboris/Lua-RTOS-ESP ... rs/owire.c
Only the small part of the code in those files is related to Lua, you can just ignore it.
Re: First try - temperature gathering
Thanks for your comments Loboris. I will jump into your repos and look as I was looking for some drivers/handlers of different sensors.
Parasite power power supply for DS18b20 I used in past with with some Z-wave chips so on high level I understand what you mean
Cheers,
/Rook
Parasite power power supply for DS18b20 I used in past with with some Z-wave chips so on high level I understand what you mean
Cheers,
/Rook
Who is online
Users browsing this forum: No registered users and 85 guests