mcsakoff / pydigitemp

Python implementation of 1-Wire protocol.
Other
16 stars 11 forks source link

UART > 1-wire schematics #3

Closed slavkoja closed 7 years ago

slavkoja commented 7 years ago

While I experimented with this i collect some different solutions on the internet and i created SVG schematics of them. I am not able to attach it here (github complains about unsupported file type for SVG and for ZIP too). You can download archive here http://digitemp.slavino.sk/uart-1wire.zip (i will delete it after issue will be closed).

These i tested:

The parasitic mode works for short lines - i was success in 1 m and less and not success in 10 m (both with 3k3 resistor, perhaps lowering resistor value can help). Nonparasitic mode i didn't test on 10 m - i have no long 3-wire cable ;-) I tried all with the CP2102 USB/UART adapter in two flavors -- one with USB-A and second with micro USB connector. The first one gives better results, then usage depends on adapter too. In short, not all schematics works in all cases, depending on adapter and cable length.

These i didn't test yet, the MOSFET is directly from Maxim application note and NPN from forgotten site:

These schematics are not developed by me, i only draw them, then i am not sure about license.

brennmat commented 7 years ago

Dear Slavko

Thanks for this. It would be great to describe these schematics a bit better. What are they used for, in which situation, what are the advantages or disadvantages of the different options? Putting this together in a single document and sharing this on github (as part of the pydigitemp package?) would be great.

Matthias

On 19 Nov 2016, at 10:29, Slavko notifications@github.com wrote:

While I experimented with this i collect some different solutions on the internet and i created SVG schematics of them. I am not able to attach it here (github complains about unsupported file type for SVG and for ZIP too). You can download archive here http://digitemp.slavino.sk/uart-1wire.zip http://digitemp.slavino.sk/uart-1wire.zip (i will delete it after issue will be closed).

These i tested:

ds18b20-uart.svg ds18b20-uart-par.svg ds18b20-uart-dioda.svg ds18b20-uart-diodapar.svg The parasitic mode works for short lines - i was success in 1 m and less and not success in 10 m (both with 3k3 resistor, perhaps lowering resistor value can help). Nonparasitic mode i didn't test on 10 m - i have no long 3-wire cable ;-) I tried all with the CP2102 USB/UART adapter in two flavors -- one with USB-A and second with micro USB connector. The first one gives better results, then usage depends on adapter too. In short, not all schematics works in all cases, depending on adapter and cable length.

These i didn't test yet, the MOSFET is directly from Maxim application note and NPN from forgotten site:

ds18b20-uart-mosfet.svg ds18b20-uart-npn.svg These schematics are not developed by me, i only draw them, then i am not sure about license.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/neenar/pydigitemp/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/ARLHFw1FoVINwJQlOcOcTU7SHHjQWW0lks5q_sGKgaJpZM4K3NV0.

slavkoja commented 7 years ago

I agree with you, but i am not UART nor 1-wire hardware implementation expert, then i cannot describe them properly. IMO, better is not described, than wrongly described. I can share only my experiences, as i did in initial description. But, you can create wiki page here with schematics and perhaps someone other in future will able to describe and compare them properly. I am sorry, i cannot help more ;-)

mcsakoff commented 7 years ago

I am not an 1-wire hardware expert too. I just can read specs. ;)

Personally, I used this schematics in my projects and it worked perfectly in both parasitic and non-parasitic mode with no any CRC errors at 5 meters cable. They say it works for up to 100 meters in parasitic mode!

Please note that some servers (e.g., some Dell PowerEdge models) have low voltage at serial port (about 3V, I suppose). I had to use USB-to-RS232 adapter to make it work. Apparently, with the PL2303TA adapter it could be simple like this but I already had working circuits installed into D-Sub backshell.

slavkoja commented 7 years ago

I tried the latest you mentioned, but with the CP2102 USB/UART adapter and it doesn't works. IMO there can be difference inside the adapter how the RX and TX pins are (or are not) interconnected...

Please, if you want, include the files, that i can delete them from server, we can continue in discussion without files on my server ;-)

mcsakoff commented 7 years ago

Done.