An archive of as of Saturday January 26, 2019.

UART TX & RX, Voltages, Open Collector


I see in the hardware topic about the digital and analog input and output lines but didn't see anything about the UART lines.

I want to connect a Maxium DS18B20 to the UART and found some code to try and use. I don't want to burn anything out so how do I safely attach this to the UART? As I understand since it is a one wire the TX and RX need to be connected to the DQ line on the DS18B20. Do I just connect them both together?

One schematic for a different board using the UART for this used a Schottky Diode between the two with the RX connected directly to the UART pin and the TX goes through the Schottky. They have a pull up resister from +3.3v to the DQ line too.

I hope that made since. I'll have to use the UART's in the back connector as I'm using the UART 0 for LCD Display.

Thanks for all your help,



We have a 1-Wire class we're putting the finishing touches on right now. It uses a UART with the TX and RX pins connected together and the TX configured as open drain exactly as you describe. We've been testing it with a DS18B20 and it works quite well. It is also capable of supporting the AdaFruit NeoPixels (WS2812). We should be releasing it in a new version of EOS in a couple of weeks. I can also provide a beta to those interested in trying it out and giving feedback.

// Create a 1-Wire bus instance on UART1
onewire <- Onewire(1);

// Find a DS18B20 on the 1-Wire bus
rom <- onewire.searchRomFamily(0x28);
if (!rom)
    throw("temp sensor not found");

// Create a DS18B20 instance with the found ROM
ds18b20 <- DS18B20(onewire, rom);

// Read the temperature
temp <- ds18b20.readT();
print("temp = " + temp + "C\n");

That is awesome, I'd be happy to try it out and give you feedback. Does it support multiple DS18B20's. I have the need to use 6 of them for my project keeping track of the temperatures of each one. I going to build a web page for remote monitoring too.

Thanks for replying so quickly.



We'll let you know when it is ready to beta test.

Yes, it supports the full 1-wire search spec for using multiple devices on the same 1-wire bus. You can also have up to five separate 1-wire buses since there are 5 UARTS on Esquilo.


Wow, that's fantastic, can't wait to try it out smile