Initial version of this TX was only working in some installs.
This is likely to do with the TX sometimes being ~7v and sometimes closer to 12v.
Thanks to help from Skymuster
Hi there Mark, thanks so much for the extra suggestions. I spent some time today troubleshooting and happy to say that i finally GOT IT TO WORK 😁
There were a few things that I did which ultimately fixed the circuit. Firstly I managed to calculate what the likely value of the internal data bus pull-up resistor was, using a dummy resistor to pull down the data bus line and measuring the drop. I calcuated it to be ~300Ω. This means that the internal pull-up is really strong, requiring a significant effort to pull it down. To get around this I ended up shorting out R3 (i.e. removing the collector resistor altogether) which allowed the data bus to be pulled down when the transistor was properly saturated.
That led to another other problem that I had with the transistor - the GPIO output wasn't sufficient to properly saturate transistor and trigger the bus pull down. To provide provide greater current to the base of the transistor I changed R4 to 470Ω and increased R5 to 100k. This initally didnt work however I discovered a loose solder joint on the base pin of the transistor which when fixed made the circuit finally come alive!
So, to summarise, the updated values of the resistors used in my circuit were:
R1 = 100k Ω
R2 = 100k Ω
R3 = 0 Ω
R4 = 470 Ω
R5 = 100k Ω
This issue it to review and implement this in the circuit
R1 = 100k Ω ✅
R2 = 100k Ω ✅
R3 = 470Ω -> 0 Ω
R4 = 10k -> 470 Ω. (or 1KΩ)
R5 = 10k -> 100k Ω
Estimated pull up to be ~300Ω - but remeasure and confirm this.
RX
DATA ----[R1:100k]----+----> GPIO1 RX
|
[R2:100k]
|
GND
TX
DATA ----[R3:0k]---- C NPN
E ---- GND
GPIO2 TX ----[R4:1k]---- B
|
[R5:100k]
|
GND
Improved RX circuit:
RX (with 5.1 V Zener clamp):
+----> GPIO1 RX
|
DATA ----[R1: 100k]----------------+
|
+-----------+-----------+
| |
[R2: 100k] [ZD1: 5.1V Zener]
| | cathode (banded end) up
| | anode down
GND GND
Initial version of this TX was only working in some installs.
This is likely to do with the TX sometimes being ~7v and sometimes closer to 12v.
Thanks to help from Skymuster
This issue it to review and implement this in the circuit
R1 = 100k Ω ✅
R2 = 100k Ω ✅
R3 = 470Ω -> 0 Ω
R4 = 10k -> 470 Ω. (or 1KΩ)
R5 = 10k -> 100k Ω
Estimated pull up to be ~300Ω - but remeasure and confirm this.
Improved RX circuit: