I need help with a little circuit to read and write to a Bus System

Hello y'all,

I've got a problem with a circuit and I don't know how to solve it.

I'm trying to read and write data on a 24V DC Bus Line.

First there is a voltage divider (for the receiving part) to lower the voltage to around 3V (1M + 147K).
Seems to be fine in general - but as soon as it's connected to GPIO17 its pulled down to around 0.3V which is not enough at all because it should be a high signal by default and go down for a low signal for a few milliseconds.

Then there is the sending part which has a transistor to short the 24V Bus Line to ground for a few milliseconds for each bit. Maybe there is a better way (I hope so) to do it because I only need to pull it down to around 20V for a low signal. But as I'm quite inexperienced with all that I can't do better.
Anyways... When I connect the Transmit Part to GPIO16 its immediately triggering the transistor and shorting the bus line to ground which shouldnt be like that either.

The ESP is not even powered on at this point.

I tried it with a D1 Mini with ESP8266 (Pin D5, D6) and a NodeMCU with ESP32 (GPIO16, GPIO17) as well without success.

Here's the schematic for the circuit (The ESP Part is simlified an incomplete just to show):

It's based on this Video:

Another Project based on it:

All of them seem to work just fine - not in my case tho.
Maybe I do something wrong.

I'd be very happy if there is somebody that could help me a little.

Best regards

The resistance is quite high. Reduce it by a factor of 10 or 100.

This can happen only if the pin is configured for output and set high.

Thank you for your reply.
It turned out that the wires were twisted. That's why this strange behaviour happened. Now it's working just fine but another question:

Is there a way to replace the transistor?
I just need to reduce the bus voltage to 20V and I actually don't want to short it to ground entirely.
Or is that the only possible way to achieve it?

Thanks in advance :slight_smile:

No. The bus wire has to switch from 20V to 0V, impossible with a GPIO pin.

Ah okay. But I was thinking about something like the transistor triggering resistors to pull down the 24V.

After looking at the intercoms PCB it looks like it's doing something similar but doesn't look like shorting it.
That way the pcb would have a way smaller footprint.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.