Onewire over UART

This project is based on Maxim’s application note: Using a UART to Implement a 1-Wire Bus Master

http://www.maximintegrated.com/app-notes/index.mvp/id/214

Onewire over UART

Resistors can vary from 200ohm to 20kohm. Transistors can be BJTs or MOSFETs. The diode used in the simplified version should be fast and has a low forwarding voltage. 1N4148 is known to work.

A USB to UART converter is needed. There are many USB to UART converters that have a TTL UART interface. RS-232 UARTs should be avoided since its voltage is very high and can damage your device. If you have to use one of such, insert a MAX232 or equivalent chip between the RS-232 port and the circuits mentioned above properly.

Here are a few models that are tested. Many of these are prices under $5:

SiLabs CP2102 USB to UART converters (shown below) are known to work.

Prolific PL2303 USB to UART converters (shown below) are also known to work, but most boards have problematic power output pins. Try to power your 1-wire device separately or strange things will happen.

Software

Type “make” to get “lsow” and “digitemp_evil” compiled.

lsow is a tool that list devices on a onewire bus connected to a USB to UART converter. Simply type something like “lsow /dev/ttyUSB0” and it will show device IDs found on the bus.

digitemp_evil is a demonstration program that reads temperature values from DS18S20/DS18B20/DS1822 onewire digital temperature sensors. Type “digitemp_evil /dev/ttyUSB0” and read IDs and values. Sometimes after powering up DS18B20 will give something like 85°C, you will just need retry.

 

For more detail: Onewire over UART

 


A Propos De L'Auteur

Ibrar Ayyub

Je suis expérimenté, rédacteur technique, titulaire d'une Maîtrise en informatique de BZU Multan, Pakistan à l'Université. Avec un arrière-plan couvrant diverses industries, notamment en matière de domotique et de l'ingénierie, j'ai perfectionné mes compétences dans la rédaction claire et concise du contenu. Compétent en tirant parti de l'infographie et des diagrammes, je m'efforce de simplifier des concepts complexes pour les lecteurs. Ma force réside dans une recherche approfondie et de présenter l'information de façon structurée et logique format.

Suivez-Nous:
LinkedinTwitter

Laisser un Commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FRFrench
Faire défiler vers le Haut