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 🫢

http://www.owfs.org


πŸŽ€ 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 πŸ«ΆπŸ’–