First try - temperature gathering

e-rook
Posts: 2
Joined: Thu Jun 08, 2017 12:24 pm

First try - temperature gathering

Postby e-rook » Thu Jun 08, 2017 12:31 pm

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

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: First try - temperature gathering

Postby loboris » Thu Jun 08, 2017 6:26 pm

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.

e-rook
Posts: 2
Joined: Thu Jun 08, 2017 12:24 pm

Re: First try - temperature gathering

Postby e-rook » Fri Jun 09, 2017 8:31 am

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

Who is online

Users browsing this forum: No registered users and 21 guests