1-Wire: Difference between revisions
Jump to navigation
Jump to search
NickPGSmith (talk | contribs) |
NickPGSmith (talk | contribs) (→Usage) |
||
(One intermediate revision by the same user not shown) | |||
Line 18: | Line 18: | ||
!Name | !Name | ||
!Function | !Function | ||
|- | |- | ||
|1 | |1 || 3 ||3 || V<sub>DD</sub> || Power 5 V DC | ||
|3 | |||
|3 | |||
|V<sub>DD</sub> | |||
|Power 5 V DC | |||
|- | |- | ||
|2 | |2 || 1 || GND || Power Ground | ||
|1 | |||
| | |||
|GND | |||
|Power Ground | |||
|- | |- | ||
|3 | |3 |5 ||2 ||OW ||1-Wire Data | ||
|5 | |||
|2 | |||
|OW | |||
|1-Wire Data | |||
|- | |- | ||
|4 | |4 || 4 || 1 || GND_OW ||1-Wire Return | ||
|4 | |||
|1 | |||
|GND_OW | |||
|1-Wire Return | |||
|- | |- | ||
|5 | | 5 || || |SUSO || USB Suspend | ||
| | |||
| | |||
|SUSO | |||
|USB Suspend | |||
|- | |- | ||
|6 | |6 || || || || | ||
| | |||
| | |||
| | |||
| | |||
|} | |} | ||
Line 179: | Line 156: | ||
|Lower resolution measurements (faster). | |Lower resolution measurements (faster). | ||
|- | |- | ||
| | | ||power||1 if on power, 0 if parasitic | ||
|power | |||
|1 if on power, 0 if parasitic | |||
|- | |- | ||
|/run/owfs/20.X | |/run/owfs/20.X|| ||Base for DS2450 | ||
| | |||
|Base for DS2450 | |||
|- | |- | ||
| | | ||volt.A||Voltage measurement for channel A (similar for B-D) | ||
|volt.A | |||
|Voltage measurement for channel A (similar for B-D) | |||
|- | |- | ||
| | | ||volt.ALL||All voltage measurements for A-D (CSV) | ||
|volt.ALL | |||
|All voltage measurements for A-D (CSV) | |||
|- | |- | ||
| | | || || | ||
| | |||
| | |||
|} | |} |
Latest revision as of 13:44, 15 May 2024
Hardware
See Maxim's website.
USB to 1-Wire converter
- DS9490R, recommended external power load is limited to 25 mA.
- 10 Ω in series with OW line
- Application note on Network Topologies
RJ11 | 5-pin DIN | 3-pin Mini DIN | Name | Function |
---|---|---|---|---|
1 | 3 | 3 | VDD | Power 5 V DC |
2 | 1 | GND | Power Ground | |
5 | 2 | OW | 1-Wire Data | |
4 | 4 | 1 | GND_OW | 1-Wire Return |
5 | SUSO | USB Suspend | ||
6 |
Temperature Sensor
- When used in parasitic mode, tie VDD and GND together
- Reads 85 C as an error condition: some OW communication is possible but proper temperature conversion failed.
ADC
Switch
Kernel Module
- Modules:
- wire (w1_smem, w1_therm)
- ds2490
- Devices in: /sys/bus/w1/devices
- README
Digitemp
Initialise RC file with all supported devices:
# digitemp_DS2490 -i -d 1 -n 0 DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Found DS2490 device #1 at 001/003 Turning off all DS2409 Couplers .. Searching the 1-Wire LAN 28EEC13522160223 : DS18B20 Temperature Sensor ROM #0 : 28EEC13522160223 Wrote .digitemprc
Walk device tree and show devices on the bus:
# digitemp_DS2490 -w DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Found DS2490 device #1 at 001/003 Turning off all DS2409 Couplers .. Devices on the Main LAN 28EEC13522160223 : DS18B20 Temperature Sensor 81DAA024000000EC : Unknown Family Code
Show all devices with output format 1:
# digitemp_DS2490 -qa -o 1 Jul 15 15:26:56 Sensor 0 C: 85.00 F: 185.00
OWFS
Installation on Fedora 25
Install OWFS packages, enable and start services:
dnf install owfs-server owfs-libs owfs-fs
Config file:
- /usr/lib/systemd/system/owserver.service
Options:
- --w1 which uses the kernel ds2490 driver or
- --usb=all to use all USB devices directly
Enable and start:
systemctl enable owserver owfs systemctl start owserver systemctl start owfs
Usage
Data appears under /run/owfs (and also /run/owfs/uncached). Default caching time: 10 s. For example (X is the OW hardware address):
Directory | File | Notes |
---|---|---|
/run/owfs/settings/units | pressure_scale | eg "mbar" |
temperature_scale | eg "C" | |
/run/owfs/81.X | Base for DS9490R | |
/run/owfs/10.X | Base for DS18S20 | |
temperature | Temperature, 1s conversion time, floating point. | |
power | 1 if on power, 0 if parasitic | |
/run/owfs/28.X | Base for DS18B20 | |
temperature | Temperature, 1s conversion time, floating point, 12 bit resolution. | |
temperature9, 10, 11 | Lower resolution measurements (faster). | |
power | 1 if on power, 0 if parasitic | |
/run/owfs/20.X | Base for DS2450 | |
volt.A | Voltage measurement for channel A (similar for B-D) | |
volt.ALL | All voltage measurements for A-D (CSV) | |
My devices:
- 20.D02805000000 : Hub internal ADC
- 28.EEC135221602 : Hub internal thermometer
Maxim SDKs
Can be obtained here.