1-Wire Sensor DS18B20

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
rosariot
Beiträge: 1
Registriert: 16 Aug 2021, 05:20

1-Wire Sensor DS18B20

Beitrag von rosariot » 31 Dez 2021, 03:37

Hi! How are they? I need to read with Python the temperature sensor DS18B20 with 1-Wire protocol in a TXT Controller. is it possible with TXT Controller 4.7.0? This is the sensor:

Bild

Regards!

Benutzeravatar
elektrofuzzis
Beiträge: 212
Registriert: 25 Jun 2016, 09:40

Re: 1-Wire Sensor DS18B20

Beitrag von elektrofuzzis » 31 Dez 2021, 07:07

Hi,

this sensor uses Maxims 1-wire bus. Therefore you need an IO pin which could be input and output as well. Only the distance sensor uses such a pin configuration, but uses another, incompatible protocol. So you need to control this pin by your own and implement the protocol. Theoretically possible, but very tricky. I don't think someone did this before.

If you just need a temperature sensor, you could use a cheap i2c sensor like bmp180.

If you are fixed to that sensor, you can use a cheap arduino/esp32 controller as man in the middle. Use Paul Stoffgens arduino 1-wire-library to control the sensor and implement a simple i2c client to transfer data to your TXT.

Best regards,

Stefan

-------------------------------

Hallo,

dieser Sensor verwendet Maxims 1-Wire-Bus. Daher benötigst Du einen IO-Pin, der sowohl Eingang als auch Ausgang sein kann. Nur der Abstandssensor verwendet eine solche Pin-Konfiguration, aber ein anderes, inkompatibles Protokoll. Du müsstest also diesen Pin selbst ansteuern und das Protokoll implementieren. Theoretisch möglich, aber sehr knifflig. Ich glaube nicht, dass das schon mal jemand gemacht hat.

Wenn Du nur einen Temperatursensor benötigst, könntest Du einen billigen i2c-Sensor wie den bmp180 verwenden.

Wenn Du auf diesen Sensor fixiert bist, kannst Du einen billigen Arduino/esp32-Controller als "man in the middle" verwenden. Verwende Paul Stoffgens arduino 1-wire-library zur Steuerung des Sensors und implementiere einen einfachen i2c-Client zur Datenübertragung an den TXT.

Gruss,

Stefan

Antworten