Hi
I've got some Waveshare "smart"
serial servos and matching
demo/driver board for my project. My goal is not to use their driver board for finished project but to re-implement the serial interface part on my custom PCB. Before I do that though, I want to understand how their original implementation works and I struggle with that badly. They publish a (heavily abridged)
schematic with only the serial sending and receiving parts shown.
In a nutshell, it's using UART in half-duplex, multi-drop configuration over single wire. From what I understand, they're using TX signal from the ESP32's UART (pulled-up, idle-high) to drive TXEN signal high when TX goes low (i.e. active/transmitting a bit). TXEN in turn drives OE input of the top SN74LVC1G high, effectively passing TX to DATA and thus actively driving the bus during transmission pulse. So far so good.
What I don't understand is how the receiving part works. The second SN74LVC1G (the bottom one on the schematic) has its OE input also tied to TXEN which, in my understanding, makes its output go from HI-Z to actively repeating what it sees on the bus (DATA) during the same TX pulse to the ESP32's RX line. No matter how hard I try to understand it, I end up with nonsensical situation where the ESP32's UART receives echo of its own transmissions repeated on its RX and sits with its RX pulled high (TXEN low, so "bottom" driver's Y output is tristated), oblivious to external transmissions when servos drive the bus. I have checked and TXEN doesn't seem to be connected to any of the ESP32's GPIOs so it seems it's only driven "automatically" when the micro is driving TX line. I was almost convinced there's an error in the schematic and the "receiving" driver's OE input is actually driven by ~TXEN or TX which would make more sense to me but nope: it really is wired like in the schematic. And the sample programs actually work, i.e. the board seems to be receiving data being sent by servos properly. How is that possible? What dumb mistake am I making trying to understand this circuit?