ENGLISH 简体中文 日本語 한국어  


アプリケーションノート4051

Using an Analog Voltage to Control a Digital Potentiometer

Abstract: In some applications a digital potentiometer with an I²C interface must be controlled by a continuously varying analog signal. This application note addresses this requirement, and provides a simple design solution. The principle presented here is versatile and can be used in multiple applications.

Introduction

This application note describes a simple method that uses an external analog voltage to change the resistance of a digital potentiometer. The Microchip PIC12F683 microcontroller is used to make the conversion from an analog voltage to an I²C stream, which is then used to control the digital potentiometer. The DS1803 digital potentiometer serves as the example device and a minimum number of external components is used in this application. The ideas presented here can be applied to other control inputs and other digital potentiometers/resistors.

Hardware Configuration

Figure 1 shows the schematic for the control circuit that uses the PIC12F683. Four of the microcontroller's six GPIOs are used to control output signals on SDA, SCL, and a single LED, and to accept one analog input.

Output signals on SDA, SCL, and the LED are assigned to GP5, GP4, and GP0, respectively. SDA and SCL have 4.7kΩ pull-up resistors to VDD and connect directly to the DS1803's SDA and SCL pins. The microcontroller's GP1 IO is assigned as the analog input pin. Jumpers are provided for selecting address pins, separating the shared VCC (VDD), and isolating SDA and SCL.

Figure 1. Schematic illustrated analog voltage control of a digital potentiometer.
Figure 1. Schematic illustrated analog voltage control of a digital potentiometer.

Project Firmware

Firmware for this project was written in assembly language using the MPLAB IDE (version 7.40). This tool is currently available from Microchip at no cost. The entire program consists of fewer than 450 bytes in program space (Flash) and 8 bytes in data space (RAM).

The program first initializes the various configuration bits in the PIC, including the ADC and the internal oscillator. The program configures the ADC to accept input from GP1, and sets the conversion clock to use the internal oscillator at 125kHz.

The firmware runs in a loop with the ADC converting the voltage at the analog input continuously. Once a conversion is complete, the 8 MSBs of the 10-bit ADC output are used as the data byte to be sent over the I²C bus. This I²C signal is then used to control the DS1803. The program is set up to control both the potentiometers on the DS1803; by making a change in the firmware, however, the potentiometers can be controlled individually with two different analog inputs on the PIC12F683.

The firmware is available for download.

Versatile Functionality

The program allows the user to control the potentiometer by varying a voltage on the PIC12F683's GP1 input. A continuously varying input on GP1 will cause a corresponding change in the resistances of the potentiometers. The output resistance (ROUT) can be calculated as a function of the input voltage:

End-to-end resistance of the DS1803 used in the design: 50kΩ
VCC range allowable: 2.7V to 5V
Input voltage varies from 0V to VCC

Output resistance observed will be:

ROUT (kΩ) = (50 (kΩ)/VCC) × Input Voltage

While the ADC is running, the LED blinks constantly. The LED remains on in case an I²C error occurs. Once the error is corrected, the LED resumes normal function. The designer can troubleshoot the application by checking that the device address is correct and that the I²C bus is connected.

This design is quite versatile, and a similar approach can be used for a variety of applications. Some examples include:
  1. A nonlinear transfer function (e.g., gamma correction) can be implemented by using the DS3906 variable resistor with the correct transfer function implemented in the embedded lookup tables.
  2. A thermistor can be connected at the input to vary the output of an I²C-controlled current DAC when there are changes in the ambient temperature (DS4402/DS4404).

    Figure 2

Conclusion

This application note describes a simple and cost-effective mechanism for controlling a digital potentiometer by using an analog voltage. The application concept can be extended to use an analog voltage to control any device with an I²C interface.

Questions/comments/suggestions concerning this application note can be sent to: .

A similar article appeared in the April, 2008 edition of EDN magazine.


フィードバックをお寄せください。
内容に満足されましたか、あるいは満足されていませんか?もっと良いページにできると思いますか?あるいは、単なるコメントでも結構です。フィードバックをお待ちしています。—マキシムはお客様からいただく訂正、提案を元に改善していきます。 このページを評価し、フィードバックを送信する。


自動アップデート
お客様が関心のある分野でアプリケーションノートが新規に掲載された際に自動通知Eメールの受信を希望する場合は、EE-Mail™にご登録ください。



その他の情報  APP 4051: May 15, 2008
DS1803 アドレス可能、デュアルディジタルポテンショメータ フルデータシート
(PDF, 304kB)
無料
サンプル
DS1805 アドレス指定可能なディジタルポテンショメータ フルデータシート
(PDF, 260kB)
無料
サンプル
DS1807 アドレス可能、デュアルオーディオテーパポテンショメータ フルデータシート
(PDF, 472kB)
無料
サンプル
DS1808 デュアルログ ディジタルポテンショメータ フルデータシート
(PDF, 440kB)
無料
サンプル
DS1844 クワッドディジタルポテンショメータ フルデータシート
(PDF, 272kB)
無料
サンプル
DS1845 デュアルNVポテンショメータおよびメモリ フルデータシート
(PDF, 204kB)
無料
サンプル
DS1846 NVトリプルポテンショメータ、メモリおよびMicroMonitor フルデータシート
(PDF, 264kB)
無料
サンプル
DS1847 デュアル温度制御NV可変抵抗 フルデータシート
(PDF, 272kB)
無料
サンプル
DS1848 デュアル温度制御NV可変抵抗およびメモリ フルデータシート
(PDF, 264kB)
無料
サンプル
DS1855 デュアル不揮発性ディジタルポテンショメータおよびセキュアメモリ フルデータシート
(PDF, 280kB)
無料
サンプル
DS1870 LDMOS RFパワーアンプバイアスコントローラ フルデータシート
(PDF, 616kB)
無料
サンプル
DS1881 オーディオ用デュアルNVテーパディジタルポテンショメータ フルデータシート
(PDF, 240kB)
無料
サンプル
DS1882 オーディオ用、デュアル対数ディジタルポテンショメータ フルデータシート
(PDF, 244kB)
無料
サンプル
DS3902 デュアル、NV、可変抵抗器、ユーザEEPROM付き フルデータシート
(PDF, 392kB)
無料
サンプル
DS3903 トリプル、128ポジション、不揮発性ディジタルポテンショメータ フルデータシート
(PDF, 632kB)
無料
サンプル
DS3904 トリプル、128ポジション、不揮発性、可変、ディジタル抵抗器/スイッチ フルデータシート
(PDF, 392kB)
無料
サンプル
DS3905 トリプル、128ポジション、不揮発性、可変、ディジタル抵抗器/スイッチ フルデータシート
(PDF, 392kB)
無料
サンプル
DS3906 トリプルNV小ステップサイズ可変抵抗器およびメモリ フルデータシート
(PDF, 256kB)
無料
サンプル
DS3930 I/Oおよびメモリ付き、ヘックス(6回路)不揮発性ポテンショメータ フルデータシート
(PDF, 632kB)
無料
サンプル
DS4302 3つのディジタル出力、2線式、5ビットDAC フルデータシート
(PDF, 568kB)
無料
サンプル
MAX5417 256タップ、不揮発性、I²Cインタフェース、ディジタルポテンショメータ フルデータシート
(PDF, 504kB)
無料
サンプル
MAX5418 256タップ、不揮発性、I²Cインタフェース、ディジタルポテンショメータ フルデータシート
(PDF, 504kB)
無料
サンプル
MAX5419 256タップ、不揮発性、I²Cインタフェース、ディジタルポテンショメータ フルデータシート
(PDF, 504kB)
無料
サンプル
MAX5420 PGA用、ディジタル設定可能、高精度分圧器 フルデータシート
(PDF, 208kB)
無料
サンプル
MAX5421 PGA用、ディジタル設定可能、高精度分圧器 フルデータシート
(PDF, 208kB)
無料
サンプル
MAX5426 プログラマブル計測アンプ用、高精度抵抗ネットワーク フルデータシート
(PDF, 192kB)
無料
サンプル
MAX5427 32タップ、ワンタイムプログラマブル、リニアテーパディジタルポテンショメータ フルデータシート
(PDF, 216kB)
無料
サンプル
MAX5428 32タップ、ワンタイムプログラマブル、リニアテーパディジタルポテンショメータ フルデータシート
(PDF, 216kB)
無料
サンプル
MAX5429 32タップ、ワンタイムプログラマブル、リニアテーパディジタルポテンショメータ フルデータシート
(PDF, 216kB)
無料
サンプル
MAX5430 PGA用、±15Vディジタル設定可能、高精度電圧分周器 フルデータシート
(PDF, 220kB)
無料
サンプル
MAX5431 PGA用、±15Vディジタル設定可能、高精度電圧分周器 フルデータシート
(PDF, 220kB)
無料
サンプル
MAX5432 32タップ、不揮発性、I²C、リニア、ディジタルポテンショメータ フルデータシート
(PDF, 328kB)
無料
サンプル
MAX5433 32タップ、不揮発性、I²C、リニア、ディジタルポテンショメータ フルデータシート
(PDF, 328kB)
無料
サンプル
MAX5434 32タップ、不揮発性、I²C、リニア、ディジタルポテンショメータ フルデータシート
(PDF, 328kB)
無料
サンプル
MAX5435 32タップ、不揮発性、I²C、リニア、ディジタルポテンショメータ フルデータシート
(PDF, 328kB)
無料
サンプル
MAX5460 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5461 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5462 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5463 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5464 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5465 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5466 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5467 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5468 32タップ、FleaPoT™、2線式ディジタルポテンショメータ フルデータシート
(PDF, 656kB)
無料
サンプル
MAX5477 デュアル、256タップ、不揮発性、I²Cインタフェース、ディジタルポテンショメータ フルデータシート
(PDF, 428kB)
無料
サンプル
MAX5478 デュアル、256タップ、不揮発性、I²Cインタフェース、ディジタルポテンショメータ フルデータシート
(PDF, 428kB)
無料
サンプル
MAX5479 デュアル、256タップ、不揮発性、I²Cインタフェース、ディジタルポテンショメータ フルデータシート
(PDF, 428kB)
無料
サンプル
MAX5527 64タップ、ワンタイムプログラマブル、リニアテーパディジタルポテンショメータ フルデータシート
(PDF, 408kB)
無料
サンプル
MAX5528 64タップ、ワンタイムプログラマブル、リニアテーパディジタルポテンショメータ フルデータシート
(PDF, 408kB)
無料
サンプル
MAX5529 64タップ、ワンタイムプログラマブル、リニアテーパディジタルポテンショメータ フルデータシート
(PDF, 408kB)
無料
サンプル
 

ダウンロード、PDFフォーマットダウンロード、PDFフォーマット (67kB)
 AN4051, AN 4051, APP4051, Appnote4051, Appnote 4051



         


      プライバシーポリシー    法的お知らせ

      Copyright © 2008 by Maxim Integrated Products, Dallas Semiconductor