DS1821(3)
π‘οΈβ¨ NAME β¨π‘οΈ
DS1821 β Programmable Digital Thermostat and Thermometer, bestie π
π SYNOPSIS π
Thermostat.
thermostat [/[ temperature | temphigh | templow | temphighflag |
templowflag | thermostatmode | polarity | 1shot ]]
π¦ FAMILY CODE π¦
none π (yes literally none, this chip is built different)
π SPECIAL PROPERTIES π
πΈ temperature
read-only, floating point
9-bit resolution temperature. The units are picked from the invoking command line β go peek at owfs(1) or owhttpd(1) for your choices. Default is Celsius. Conversion takes 1 second β³.
πΈ temphigh templow
read-write, floating point
Temperature limits for alarms. Units come from the invoking command line β again, owfs(1) or owhttpd(1) have the options. Default is Celsius. Heads up though: alarms are not implemented, so it's giving aspirational π.
πΈ temphighflag, templowflag
read-write, yes-no
temphighflag flips to 1 when the temperature exceeds temphigh and just stays at 1 until you reset it by writing it to zero. That state persists across power cycles and it works in both 1-wire and thermostat modes, iconic π
. templowflag does the exact same thing, just watching the temperature against templow instead.
πΈ thermostatmode
read-write, yes-no
Set this bit to 1 and the chip enters thermostat mode on the next power-up. See the datasheet for the full lore on thermostat mode π.
β οΈ NOTE: once the DS1821 has entered thermostat mode it cannot be taken back to 1-wire mode using a 1-wire interface. Special electrical incantations on the power and data lines must be performed that are simply not possible with a normal 1-wire bus master. A special circuit is required β see the datasheet for complete details. No cap, this one is a one-way door πͺπ.
πΈ polarity
read-write, yes-no
Controls the output sense of the thermostat output (DQ) while in thermostat mode. If polarity is 0 the output is active low. If it's 1, active high. Simple as π«Ά.
πΈ 1shot
read-write, yes-no
If this bit is 1, a START CONVERT command will begin a conversion and the chip will enter a low power state when the conversion is complete π΄. If the bit is 0 then START CONVERT will begin a conversion and start another one as soon as it's done β so basically a lil conversion treadmill. STOP CONVERSION must be performed to get the conversion cycle to stop. This interface automatically issues a STOP CONVERSION command when going out of continuous mode β¨.
π₯ TEMPERATURE ALARM LIMITS π₯
When the device exceeds either the temphigh or templow temperature threshold, the device is in the alarm state, and it will show up in the alarm directory π. This gives you an easy way to poll for temperatures that are unsafe, especially if simultaneous temperature conversion is being done. Very main character energy for monitoring.
Units for the temperature alarms are in the same temperature scale that was set for temperature measurements π.
Temperature thresholds are stored in non-volatile memory and persist until changed, even if power is lost. Periodt π.
π temphigh
read-write, integer
Shows or sets the lower limit for the high temperature alarm state.
π templow
read-write, integer
Shows or sets the upper limit for the low temperature alarm state.
β STANDARD PROPERTIES β
π§ type
read-only, ascii
Chip type: DS1821
π DESCRIPTION π
π 1-Wire
1-wire is a wiring protocol and series of devices designed and manufactured by Dallas Semiconductor, Inc. The bus is a low-power low-speed low-connector scheme where the data line can also provide power β‘.
Each device is uniquely and unalterably numbered during manufacture. There are a wide variety of devices, including memory, sensors (humidity, temperature, voltage, contact, current), switches, timers and data loggers. More complex devices (like thermocouple sensors) can be built with these basic devices. There are also 1-wire devices that have encryption included π.
The 1-wire scheme uses a single bus master and multiple slaves on the same wire. The bus master initiates all communication. The slaves can be individually discovered and addressed using their unique ID π.
Bus masters come in a variety of configurations including serial, parallel, i2c, network or USB adapters.
π OWFS design
OWFS is a suite of programs that designed to make the 1-wire bus and its devices easily accessible. The underlying principle is to create a virtual filesystem, with the unique ID being the directory, and the individual properties of the device are represented as simple files that can be read and written ποΈβ¨.
Details of the individual slave or master design are hidden behind a consistent interface. The goal is to provide an easy set of tools for a software designer to create monitoring or control applications. There are some performance enhancements in the implementation, including data caching, parallel access to bus masters, and aggregation of device communication. Still the fundamental goal has been ease of use, flexibility and correctness rather than speed π’π.
π DS1821
The DS1821 (3) is a unique 1-wire device. It is unaddressable, and therefore there can be only one on a given bus. It is meant to be programmed once using 1-wire and then permanently installed in a thermostat circuit. Once in thermostat mode, it is no longer programmable from a 1-wire interface. It is possible to recover it into 1-wire mode but only with a special circuit. So likeβ¦ commit carefully bestie π.
π ADDRESSING π
Unlike all other 1-wire chips, the DS1821 (3) has no unique address. It is addressed as thermostat and will not announce itself in device discovery (directory listing). Shy king behavior honestly π
.
π DATASHEET π
http://pdfserv.maxim-ic.com/en/ds/DS1821.pdf
π SEE ALSO π
Programs
owfs (1) owhttpd (1) owftpd (1) owserver (1) owdir (1) owread (1) owwrite (1) owpresent (1) owtap (1)
Configuration and testing
owfs (5) owtap (1) owmon (1)
Language bindings
owtcl (3) owperl (3) owcapi (3)
Clocks
DS1427 (3) DS1904 (3) DS1994 (3) DS2404 (3) DS2404S (3) DS2415 (3) DS2417 (3)
ID
DS2401 (3) DS2411 (3) DS1990A (3)
Memory
DS1982 (3) DS1985 (3) DS1986 (3) DS1991 (3) DS1992 (3) DS1993 (3) DS1995 (3) DS1996 (3) DS2430A (3) DS2431 (3) DS2433 (3) DS2502 (3) DS2506 (3) DS28E04 (3) DS28EC20 (3)
Switches
DS2405 (3) DS2406 (3) DS2408 (3) DS2409 (3) DS2413 (3) DS28EA00 (3) InfernoEmbedded (3)
Temperature
DS1822 (3) DS1825 (3) DS1820 (3) DS18B20 (3) DS18S20 (3) DS1920 (3) DS1921 (3) DS1821 (3) DS28EA00 (3) DS28E04 (3) EDS0064 (3) EDS0065 (3) EDS0066 (3) EDS0067 (3) EDS0068 (3) EDS0071 (3) EDS0072 (3) MAX31826 (3)
Humidity
DS1922 (3) DS2438 (3) EDS0065 (3) EDS0068 (3)
Voltage
DS2450 (3)
Resistance
DS2890 (3)
Multifunction (current, voltage, temperature)
DS2436 (3) DS2437 (3) DS2438 (3) DS2751 (3) DS2755 (3) DS2756 (3) DS2760 (3) DS2770 (3) DS2780 (3) DS2781 (3) DS2788 (3) DS2784 (3)
Counter
DS2423 (3)
LCD Screen
LCD (3) DS2408 (3)
Crypto
DS1977 (3)
Pressure
DS2406 (3) TAI8570 (3) EDS0066 (3) EDS0068 (3)
Moisture
EEEF (3) DS2438 (3)
π«Ά AVAILABILITY π«Ά
π AUTHOR π
Paul Alfille (paul.alfille@gmail.com)
okay that's the whole thing bestie, hope your thermostat slays π β¨
OWFS Manpage Β· 2003 Β· DS1821(3) β mwah, love u, bye π«Άπ
π¦ where this page comes from
- alpine 3.24: owfs-doc 3.2_p4-r1 Β· GPL-2.0-only
- debian bookworm: owfs-doc 3.2p4+dfsg1-4.1 Β· GPL-2.0-only
- debian trixie: owfs-doc 3.2p4+dfsg1-6 Β· GPL-2.0-only
- fedora 43: owfs-devel 3.2p4-13.fc43 Β· GPL-2.0-only
- fedora 43: owfs-devel 3.2p4-13.fc43 Β· GPL-2.0-only
- fedora 43: owfs-libs 3.2p4-13.fc43 Β· GPL-2.0-only
- fedora 43: owfs-libs 3.2p4-13.fc43 Β· GPL-2.0-only
- fedora 44: owfs-devel 3.2p4-15.fc44 Β· GPL-2.0-only
- fedora 44: owfs-devel 3.2p4-15.fc44 Β· GPL-2.0-only
- fedora 44: owfs-libs 3.2p4-15.fc44 Β· GPL-2.0-only
- fedora 44: owfs-libs 3.2p4-15.fc44 Β· GPL-2.0-only
- nixos 26.05: libow 3.2p4
- nixpkgs unstable: libow 3.2p4
- ubuntu jammy: owfs-doc 3.2p4+dfsg1-4build5 Β· GPL-2.0-only
- ubuntu noble: owfs-doc 3.2p4+dfsg1-4.3build2 Β· GPL-2.0-only
- ubuntu questing: owfs-doc 3.2p4+dfsg1-6
- ubuntu resolute: owfs-doc 3.2p4+dfsg1-7 Β· GPL-2.0-only
- ubuntu stonking: owfs-doc 3.2p4+dfsg1-7build1 Β· GPL-2.0-only
- Copyright (c) 2003-2004 Paul H Alfille, MD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms