esphome / esphome/feature-requests

Add an new component ad5291 5292 Digital Potentiometers

Open
#2,515 7 comments 3 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

[(https://www.analog.com/media/en/technical-documentation/data-sheets/ad5291_5292.pdf)](https://www.analog.com/media/en/technical-documentation/data-sheets/ad5291_5292.pdf)

It is Digital Potentiometers.
Used SPI. The AD5291/AD5292 contain a serial interface (SYNC, SCLK, DIN
and SDO) that is compatible with SPI interface standards, as
well as most DSPs. The part allows writing of data via the serial
interface to every register.
SHIFT REGISTER
The AD5291/AD5292 shift register is 16 bits wide (see Figure 2).
The 16-bit input word consists of two zeros, followed by four control
bits, and 10 RDAC data bits. For the AD5291, the lower two RDAC
data bits are don’t cares if the RDAC register is read from or
written to. Data is loaded MSB first (Bit DB15). The four control bits
determine the function of the software command (see Table 11).
Figure 3 shows a timing diagram of a typical AD5291 and AD5292
write sequence.
The write sequence begins by bringing the SYNC line low. The
SYNC pin must be held low until the complete data-word is loaded
from the DIN pin. When SYNC returns high, the serial data-word
is decoded according to the commands in Table 11. The command
bits (Cx) control the operation of the digital potentiometer. The
data bits (Dx) are the values that are loaded into the decoded
register. The AD5291/AD5292 have an internal counter that counts
a multiple of 16 bits (a frame) for proper operation. For example,
AD5291/AD5292 work with a 32-bit word but does not work proper-
ly with a 31-bit or 33-bit word. The AD5291/AD5292 do not require
a continuous SCLK, when SYNC is high, and all serial interface
pins should be operated at close to the VLOGIC supply rails to
minimize power consumption in the digital input buffers.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the AD5291/AD5292 datasheet linked in the issue and review existing SPI component patterns in the repository. Determine the supported device behavior and verify the SPI register transactions against the datasheet; done means the new component supports the requested digital potentiometers and their documented interface.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.