Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

71%
+3 −0
Q&A Single wire UART to Microcontroller

Since the guaranteed logic high threshold is 1.6 V, passively pulling the line to 3.3 V will be fine. Unless you are operating from batteries or every mW otherwise matters, I would use a pullup to...

posted 7mo ago by Olin Lathrop‭  ·  edited 7mo ago by Olin Lathrop‭

Answer
#2: Post edited by user avatar Olin Lathrop‭ · 2026-02-13T16:36:48Z (7 months ago)
  • Since the guaranteed logic high threshold is 1.6 V, passively pulling the line to 3.3 V will be fine. Unless you are operating from batteries or every mW otherwise matters, I would use a pullup towards the low end of the range since you are operating with less voltage margin than at 5 V.
  • With a pullup to 3.3 V, you should be able to connect the DCDI line directly to the microcontroller RX input.
  • The micro's TX line can't be directly connected if it actively drives in both directions. Some micros can route peripheral signals to different pins and can disable the high side driver. In that case you can connect the DCDI line to both the RX and TX pins directly.
  • If the micro can't be configured to only drive TX low, then you have to add external circuitry to achieve that. The simplest would be a Schottky diode in series. Check the TX line maximum possible logic low, add the diode drop to that, and make sure the result is still solidly below the 1.0 V threshold. If that doesn't work out, you can use transistors:
  • <img src="https://electrical.codidact.com/uploads/tkgxo5qg22nwgiy8mi1t83smb0ls">
  • Something like this also necessary if the TX line can't sink enough current to solidly overcome the pullup. The values in this circuit are adjusted so that even with only a gain of 20 for Q2, it can still sink 13 mA. That times the worst case pullup of 433 &Omega; is 5.7 V, which is more than the voltage across the pullup can ever be.
  • Another advantage of this circuit is that the TX pin only needs to sink 260 &micro;A, compared to the 7.6 mA required to drive low against a 433 &Omega; pullup.
  • If you can arrange the RX input of the micro to be 5 V tolerant, then you can pull DCDI to 5 V for greater noise immunity. The circuit above will still work without modification for driving DCDI from the TX pin.
  • Since the guaranteed logic high threshold is 1.6 V, passively pulling the line to 3.3 V will be fine. Unless you are operating from batteries or every mW otherwise matters, I would use a pullup towards the low end of the range since you are operating with less voltage margin than at 5 V.
  • With a pullup to 3.3 V, you should be able to connect the DCDI line directly to the microcontroller RX input.
  • The micro's TX line can't be directly connected if it actively drives in both directions. Some micros can route peripheral signals to different pins and can disable the high side driver. In that case you can connect the DCDI line to both the RX and TX pins directly.
  • If the micro can't be configured to only drive TX low, then you have to add external circuitry to achieve that. The simplest would be a Schottky diode in series. Check the TX line maximum possible logic low, add the diode drop to that, and make sure the result is still solidly below the 1.0 V threshold. If that doesn't work out, you can use transistors:
  • <img src="https://electrical.codidact.com/uploads/tkgxo5qg22nwgiy8mi1t83smb0ls">
  • Something like this also necessary if the TX line can't sink enough current to solidly overcome the pullup. The values in this circuit are adjusted so that even with only a gain of 20 for Q2, it can still sink 13 mA. That times the worst case pullup of 433 &Omega; is 5.7 V, which is more than the voltage across the pullup can ever be.
  • Another advantage of this circuit is that the TX pin only needs to sink 260 &micro;A, compared to the 7.6 mA required to drive low against a 433 &Omega; pullup.
  • If you can arrange the RX input of the micro to be 5 V tolerant, then you can pull DCDI to 5 V for greater noise immunity. The circuit above will still work without modification for driving DCDI from the TX pin.
  • <blockquote>With that circuit, I can connect MCU UART TX → your circuit → DCDI, and MCU RX directly to DCDI, and then use normal UART timing on the MCU, right?</blockquote>
  • Yes.
  • <blockquote>And on the firmware side, the only thing I need to manage is switching between transmit and receive at the right times?</blockquote>
  • Sortof. You don't "switch" between transmit and receive like you would with a RS-485 line, for example. The hardware isn't in one of transmit or receive mode. Both are simultaneously active. Electrically, anyone can pull the bus line low at any time.
  • The firmware needs to make sure that it is only causing the UART to send when that is allowed by the higher level protocol. Keep in mind that the UART probably has an outgoing FIFO of at least one but possibly several bytes. That means the UART will continue to send for a while after the firmware stops giving it characters. Hopefully the higher level protocol is designed to make this process easy.
  • Another issue is that all transmitted characters will be received by the UART too. The firmware will have to keep track of what it sent and discard those received characters. It could even do collision checking to make sure the sent characters got onto the wire correctly without something else pulling it low at the same time.
#1: Initial revision by user avatar Olin Lathrop‭ · 2026-02-13T13:31:30Z (7 months ago)
Since the guaranteed logic high threshold is 1.6 V, passively pulling the line to 3.3 V will be fine.  Unless you are operating from batteries or every mW otherwise matters, I would use a pullup towards the low end of the range since you are operating with less voltage margin than at 5 V.

With a pullup to 3.3 V, you should be able to connect the DCDI line directly to the microcontroller RX input.

The micro's TX line can't be directly connected if it actively drives in both directions.  Some micros can route peripheral signals to different pins and can disable the high side driver.  In that case you can connect the DCDI line to both the RX and TX pins directly.

If the micro can't be configured to only drive TX low, then you have to add external circuitry to achieve that.  The simplest would be a Schottky diode in series.  Check the TX line maximum possible logic low, add the diode drop to that, and make sure the result is still solidly below the 1.0 V threshold.  If that doesn't work out, you can use transistors:

<img src="https://electrical.codidact.com/uploads/tkgxo5qg22nwgiy8mi1t83smb0ls">

Something like this also necessary if the TX line can't sink enough current to solidly overcome the pullup.  The values in this circuit are adjusted so that even with only a gain of 20 for Q2, it can still sink 13 mA.  That times the worst case pullup of 433 &Omega; is 5.7 V, which is more than the voltage across the pullup can ever be.

Another advantage of this circuit is that the TX pin only needs to sink 260 &micro;A, compared to the 7.6 mA required to drive low against a 433 &Omega; pullup.

If you can arrange the RX input of the micro to be 5 V tolerant, then you can pull DCDI to 5 V for greater noise immunity.  The circuit above  will still work without modification for driving DCDI from the TX pin.