I am trying to build a converter from 1-wire LIN bus to UART. Since I do not just want to read, but also write data to the LIN bus, I need more than just a simple voltage divider to get from the 40 V LIN rail down to 5 V.
See this circuit simulation where I am right now. Note 3 connections on the left (V+, LIN bus, GND) and 4 on the right (V+, Rx, Tx, GND). The 2 switches are just to simulate the signals. Receiving signals (LIN -> Rx) kinda-sorta works, so closing and opening the left switch (=LIN bus) changes the Rx pin to the right. However, Tx (switch at the bottom right) does not change the LIN bus if that is currently high (which it normally is) and is also directly appearing on the Rx pin. The same happened when I build this circuit in hardware, Tx is appearing on Rx.
Could someone have a look and help me figure this out? I am way out of my depth with this kind of stuff.