US-100 Ultrasonic Sensor - How to get temperature reading

Hey there,

I recently flashed an ESP32 with ESPHOME to integrate it into my homeassistant installation.
My current progress:

ESP32 running on battery (CR123A) along a US-100 ultrasonic sensor to measure the remaining liters in my oil tank.

Everything works fine. The ESP starts up, takes 5 measurements and the median is then converted into liters, which is then scraped by the homeassistant via API. Afterwards the ESP goes into deepsleep for 6 hours and the cycle continues.

I now saw, that the US-100 also has a temperature sensor and I was wondering, how I could get the date of it too. I saw, that with some arduino sketches, it seems to not be a huge problem, but I have no clue how to achieve this with ESPHOME

Does someone already has this set up?

Regards,
Ben

Depends. If you have removed the jumper and are running it in HC-SR04 mode then no - you can’t read the temperature.

If you are running it in UART mode and reading the serial data then sure - send 0x50 and read back the temp. I suspect you aren’t using UART mode?

Someone wrote a custom UART based ESPHome sensor - why don’t you have a look at that?

1 Like

Hey Daryl,

thanks for pointing me to this repository! Will check that tonight.

I just wanted to add all my findings of yesterday evening and I was already at the stage that I had it in UART mode and tried to follow the guide for adding a custom UART component to esphome. Sadly I could not get it to work yet as I do not have that much C++ know how.

Regards,

Ben

Hey Daryl,

short update from my side.
The repository works well but I hit another problem. It seems that es sensor together with the ESP32 draw too much power from the intended CR123a battery and so I only get confusing readings. When pluuged to a powerbank it works perfectly, but this is no solution for the intendet usecase.

I now ordered an esp8266 as it draws less power than the esp32 … maybe I can get it to work with this :smiley:

Thanks again for your help.

Regards,
Ben

1 Like