Closed reinisb closed 4 years ago
It is clear that the Senseair S8 LP sensor requires 5V power supply. Now, what about the logic pins (UART_RxD and UART_TxD) - do they require 5V as well? Or are they 3.3V? If they require only 3.3V then there is no need for the 5V-to-3.3V logic converter (which does not work anyway).
Those will be 5V level too. Technically you should shift that to 3.3V for the ESP, but I've successfully used 5V on those pins already. You just have to be careful you don't mix up TX/RX.
@OttoWinter so you are saying that Senseair S8 LP has 5V both on power (G+) and logic pins (UART_RxD and UART_TxD). In that case, something is wrong with my logic converter. I have an ESP32 board with 5V power-out pin and 3.3v TX/RX logic pins. When I connect the 5V power pin along ground to the sensor, then the sensor powers on properly. If I then connect the 3.3V TX/RX pins to sensor's 5V(?) UART_RxD/UART_TxD pins then I can read sensor readings. So everything works.
Now, when I connect the 3.3V TX/TX pins via a 3.3V-to-5V logic level shifter to the UART_RxD/UART_TxD then I cannot read sensor readings. Can you please confirm that connecting ESP32 3.3V logic level TX/RX to the sensor via a 3.3V-to-5V logic level shifter work for you and you can read sensor readings?
It should work if the logic level conversion is bi-directional (or uni-directional but different for each pin).
I don't have that device here, so I can't test it. I can only tell you I successfully used an MH-Z19 with the same 5V setup.
I have the SparkFun Logic Level Converter - Single Supply, which seems to be bi-directional. I am pretty sure that the Senseair S8 LP has TX/RX pins that operate at 3.3v (not 5v) - I would appreciate it if anyone could please confirm. Thanks!
@reinisb You can check that with a multimeter.
But as you noted, it works fine when connecting it directly, which means it's an issue with how you connected the device, not a software bug. I will therefore close this report - if a solution is found please update the docs.
Operating environment/Installation (Hass.io/Docker/pip/etc.):
ESPHome 1.14.0, Hass.io, Virtualbox
ESP (ESP32/ESP8266, Board/Sonoff):
SparkFun ESP32 Thing (3.3v) + SparkFun Logic Level Converter - Single Supply (3.3v -> 5v)
Affected component:
https://esphome.io/components/sensor/senseair.html
Description of problem: Today I tried setting up the SenseAir S8 sensor for the very first time, but I have not succeeded as the reading from the sensor always fails. I suppose the issue lies somewhere with UART. I would appreciate if you could please help. Thanks!
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried: The sensor light blinks every 10 seconds or so, hence the sensor is powered. I tried swapping rx_pin/rx_pin values, nothing changes, the same error.
PS GPIO Switch 'The Blue LED' works, hence I at least know that communication with the board works, but I suppose something is wrong with UART.