Question
How to use USART single wire(half-duplex) for SDI-12 communication protocol using Stm32cubeIDE???
Hello,
I am trying to communicate with an SDI-12 sensor using STM32L072CZY6TR. I'm using UART half-duplex with the following configuration:
- Baud rate: 1200
- Word length: 7 bits
- Parity: Even
- Stop bits: 1
My questions:
- Do I need a UART to SDI-12 converter module, or can I connect the sensor directly to the STM32?
- Do I need signal inversion, and if so, should it be done in hardware or software?
- What pull-up resistor value is recommended for the SDI-12 data line?
My current understanding:
- SDI-12 uses inverted logic compared to standard UART
- SDI-12 requires a pull-up resistor on the data line
- Level shifting may be needed between 3.3V and 5V
Has anyone successfully implemented SDI-12 communication with STM32L0 series? Any schematic examples or code snippets would be greatly appreciated.
Thank you!
