AN420 Application note

Similar documents
AN922 Application note

AN2970 Application note

Obsolete Product(s) - Obsolete Product(s)

STTH60R04. Ultrafast recovery diode. Main product characteristics. Features and benefits. Description. Order codes

STM1831. Voltage detector with sense input and external delay capacitor. Features. Applications

STTH61R04TV. Ultrafast recovery diode. Main product characteristics. Features and benefits. Order codes. Description A1 K2 ISOTOP ISOTOP STTH61R04TV1

Order codes Part numbers DPAK (tape and reel) PPAK (tape and reel)

LD29300xx. 3 A, very low drop voltage regulators. Features. Description

T810H. High temperature 8 A sensitive TRIACs. Features. Applications. Description. Medium current TRIAC

STTH6110TV. Ultrafast recovery - high voltage diode. Main product characteristics. Features and benefits. Order codes. Description ISOTOP ISOTOP

DO-15 DO-201AD STTH3R04Q STTH3R04

STTH6006W. Turbo 2 ultrafast - high voltage rectifier. Features and benefits. Description. Main product characteristics

STTH16R04CT. Ultrafast recovery diode. Main product characteristics. Features and benefits. Description. Order codes TO-220AB TO-220FPAB

L78LxxAB L78LxxAC - L78LxxC

STTH312B. Ultrafast recovery V diode. Main product characteristics. Features and benefits. Description. Order codes

STTH15L06. Turbo 2 ultrafast high voltage rectifier. Description. Features

AN1755 APPLICATION NOTE

STPS20M60S. Power Schottky rectifier. Features. Description. High current capability Avalanche rated Low forward voltage drop High frequency operation

STEVAL-MKI109V2. emotion: ST MEMS adapters motherboard based on the STM32F103RE compatible with all ST MEMS adapters. Features.

STTH3002. Ultrafast recovery diode. Main product characteristics. Features and benefits. Description. Order codes K DOP3I STTH3002PI DO-247 STTH3002W

High brightness RGB LED array driver with local dimming and diagnostics based on the LED1642GW and STM32

Order code Marking Package Packaging. STGB30V60DF GB30V60DF D²PAK Tape & reel STGP30V60DF GP30V60DF TO-220 Tube

Symbol Parameter Value Unit V RRM Repetitive peak reverse voltage 150 V I F(RMS) RMS forward voltage 15 A

ESDAULC5-1BF4. Low clamping and ultra low capacitance single line bidirectional ESD protection. Applications. Description.

STTH12R06. Turbo 2 ultrafast high voltage rectifier. Features. Description

TDA7439DS. Three-band digitally-controlled audio processor. Features. Description

STPS60L30C-Y. Automotive power Schottky rectifier. Features. Description

KD A LOW DROP POSITIVE VOLTAGE REGULATOR ADJUSTABLE AND FIXED

Obsolete Product(s) - Obsolete Product(s)

STTH5L06RL. Turbo 2 ultrafast high voltage rectifier. Main product characteristics. Features and benefits. Order codes.

STTH6004W. Ultrafast high voltage rectifier. Table 1: Main product characteristics I F(AV) 60 A V RRM. 400 V T j (max) 175 C V F (typ)

Obsolete Product(s) - Obsolete Product(s)

LD1117A SERIES LOW DROP FIXED AND ADJUSTABLE POSITIVE VOLTAGE REGULATORS


K G. Order code 400 V 600 V Min. Max. P0111MA 1AA3 X 4 µa 25 µa TO-92. P0111MN 5AA4 X 4 µa 25 µa SOT-223. P0115DA 5AL3 X 15 µa 50 µa TO-92

AN2044 APPLICATION NOTE

STPS1545. Power Schottky rectifier. Main product characteristics. Features and Benefits. Description 15 A 45 V

ST2378E. 8-bit dual supply 1.71V to 5.5V level translator with I/O V CC ± 15KV ESD protection. General features. Description.

Obsolete Product(s) - Obsolete Product(s)

HCF4532B 8-BIT PRIORITY ENCODER


STTH1210G. Ultrafast recovery - high voltage diode. Main product characteristics. Features and benefits. Description. Order codes K TO-220AC STTH1210D

74VHCT138ATTR 3 TO 8 LINE DECODER (INVERTING)


7.5A LOW DROP POSITIVE VOLTAGE REGULATOR ADJUSTABLE AND FIXED. October 2002

L7800 SERIES POSITIVE VOLTAGE REGULATORS

STPS1L40M LOW DROP POWER SCHOTTKY RECTIFIER. Table 1: Main Product Characteristics I F(AV) V RRM. 1 A 40 V T j (max) 150 C V F (max) 0.

STD5N20L N-CHANNEL 200V Ω - 5A DPAK STripFET MOSFET

ULTRAFAST RECTIFIER PDP ENERGY RECOVERY

BAR42FILM BAR43FILM SMALL SIGNAL SCHOTTKY DIODE. Table 1: Main Product Characteristics I F(AV) 0.1 A V RRM. 30 V T j 150 C 0.33 and 0.

Table 3: Absolute Ratings (limiting values) Symbol Parameter Value Unit I T(RMS)

ULTRAFAST RECTIFIER PDP ENERGY RECOVERY

Description. Part numbers. AB version C version Output voltage LD2980ABM30TR LD2980ABM33TR LD2980CM33TR 3.3 V LD2980ABM50TR LD2980CM50TR 5.

LD1117A SERIES LOW DROP FIXED AND ADJUSTABLE POSITIVE VOLTAGE REGULATORS

Obsolete Product(s) - Obsolete Product(s)

HCF4555B DUAL BINARY TO 1 OF 4 DECODER/DEMULTIPLEXER OUTPUT HIGH ON SELECT

HCF4089B BINARY RATE MULTIPLIER

Automotive-grade 400 V internally clamped IGBT E SCIS 320 mj

TURBO 2 ULTRAFAST HIGH VOLTAGE RECTIFIER

TEA6422 BUS-CONTROLLED AUDIO MATRIX

STTH212RL. High voltage ultrafast diode. Main product characteristics. Features and benefits. Order codes. Description DO-201AD STTH212

HCF4035B 4 STAGE PARALLEL IN/PARALLEL OUT SHIFT REGISTER

ST3L01 TRIPLE VOLTAGE REGULATOR

N-channel enhancement mode Field-Effect Transistor (FET) in a small SOT23 (TO-236AB) Surface-Mounted Device (SMD) plastic package using

Obsolete Product(s) - Obsolete Product(s)

BCM857BV; BCM857BS; BCM857DS

BSH Description. 2. Features. 3. Applications. 4. Pinning information. N-channel enhancement mode field-effect transistor

STTH60SW03C. Turbo 2 ultrafast high voltage rectifier. Description. Features

L7800 SERIES POSITIVE VOLTAGE REGULATORS

Obsolete Product(s) - Obsolete Product(s)

BTA12, BTB12 and T12 Series

M74HCT688TTR 8 BIT EQUALITY COMPARATOR

16 channel LED driver expansion board based on LED1642GW for STM32 Nucleo. Description

Obsolete Product(s) - Obsolete Product(s)

Silicon carbide Power MOSFET 650 V, 90 A, 18 mω (typ., T J = 25 C) in an H²PAK-7 package. Order code V DS R DS(on) max. I D

L7800AB/AC SERIES PRECISION 1A REGULATORS

STEVAL-CCA021V1. USB audio demonstration board based on the STM32F103RE and TS4657. Features. Description

Features. Description. Table 1. Device summary. Order code Marking Packages Packing. STGD19N40LZ GD19N40LZ DPAK Tape and reel

STTH16L06C-Y. Automotive turbo 2 ultrafast high voltage rectifier. Description. Features

STPS30SM100S. Power Schottky rectifier. Features. Description

STPS1045B. Power Schottky rectifier. Description. Features

STTH10LCD06. Turbo 2 ultrafast - high voltage rectifier for flat panel displays. Description. Features

TURBO 2 ULTRAFAST HIGH VOLTAGE RECTIFIER

LD A high PSRR ultra low drop linear regulator with reverse current protection. Datasheet. Features. Applications.

STTH3R06RL TURBO 2 ULTRAFAST HIGH VOLTAGE RECTIFIER. Table 1: Main Product Characteristics I F(AV) V RRM

SD2902. RF POWER TRANSISTORS HF/VHF/UHF N-CHANNEL MOSFETs

ST2L Very low quiescent current dual voltage regulator. Description. Features. Applications

65 V, 100 ma NPN/PNP general-purpose transistor. Table 1. Product overview Type number Package NPN/NPN PNP/PNP Nexperia JEITA

74HC1GU04GV. 1. General description. 2. Features. 3. Ordering information. Marking. 5. Functional diagram. Inverter

T4 Series 4A TRIACS. Table 1: Main Features Symbol Value Unit I T(RMS) 4 A. V DRM /V RRM 600 to 800 V. I GT (Q1 ) 5 to 35 ma

Obsolete Product(s) - Obsolete Product(s)

Obsolete Product(s) - Obsolete Product(s)

M74HCT138TTR 3 TO 8 LINE DECODER (INVERTING)

HCF4543B BCD-TO-7-SEGMENT LATCH/DECODER/LCD DRIVER

M74HC20TTR DUAL 4-INPUT NAND GATE

Obsolete Product(s) - Obsolete Product(s)

NPN/PNP transistor pair connected as push-pull driver in a SOT457 (SC-74) Surface-Mounted Device (SMD) plastic package.

AN1542 APPLICATION NOTE

SCT10N120. Silicon carbide Power MOSFET 1200 V, 12 A, 520 mω (typ., T J = 150 C) in an HiP247 package. Datasheet. Features. Applications.

Dual N-channel field-effect transistor. Two N-channel symmetrical junction field-effect transistors in a SOT363 package.

Transcription:

Application note Expanding A/D resolution of the ST6 A/D converter Introduction Occasionally the analog signal provided by external sensors require an Analog to Digital conversion with a resolution of greater than 8 bits. In order to extract the full information for subsequent data processing within the microcontroller a higher resolution Analog to Digital is thus required. The solution described in this note enables this higher resolution with the on-chip 8-bit A/D converter of the ST62, using only an additional Operational Amplifier (OpAmp) and a few resistors November 20 Doc ID 2078 Rev 2 /5 www.st.com

Contents AN420 Contents Introduction................................................ 2 Overview.................................................. 4 3 Principle of operation of an algebraic adder..................... 5 4 Example................................................... 7 5 Application example........................................ 0 6 Revision history........................................... 4 2/5 Doc ID 2078 Rev 2

List of figures List of figures Figure. Example circuit........................................................... 4 Figure 2. Generic algebraic adder.................................................... 5 Figure 3. Conversion routine........................................................ 8 Figure 4. Example circuit.......................................................... 0 Doc ID 2078 Rev 2 3/5

Overview AN420 2 Overview The technique implemented is that of the Algebraic Adder, a full discussion of the principle of operation is included in this note. A practical example of the external components used is shown in the following figure: Figure. Example circuit PC4 PC5 OUTPUTS PC6 ST625 PB0 (A/D Input) Vin The resistances are selected by the ST62 I/O pins depending on the analog input voltage. The selection programmed modifies the output voltage of the OpAmp in such a way that the following A/D conversion is always made with the maximum input range of the converter. This selection is made by software, therefore the total conversion time is increased versus a normal 8-Bit conversion, however the precision is increased and the input voltage range can be enlarged. 4/5 Doc ID 2078 Rev 2

Principle of operation of an algebraic adder 3 Principle of operation of an algebraic adder Figure 2 represents the generic algebraic adder. Figure 2. Generic algebraic adder VNn RNn VN2 VN RN2 RN Vn RN0 Rr + Vo VP VP2 RP RP2 Vp - RP0 VPm RPm The circuit generates an output voltage equal to: i V 0 = m n K i V Pi K i i = i = V Nj () To minimize the effects of the input polarizing currents, the total resistances seen from the two inputs of the OpAmp should be the same. Therefore: ----- + -------- + R N0 n j = ------- = -------- + ------- = R Nj R P0 m i = R Pi ------ R T (2) The two resistances RP0 and RN0 are needed to satisfy the above relation. In general, only one of them will be needed. Doc ID 2078 Rev 2 5/5

Principle of operation of an algebraic adder AN420 To analyze the circuit, let us calculate the input voltages: m G Pi V Pi V P = --------------------------------- i G P0 + m i = G Pi where G x = ------ R x (3) (4) V 0 G R + G Nj V j = n = --------------------------------------------- G N0 n Relation (2) becomes: n m G + N0 G + R G G Nj = + G = G P0 Pj T j = j = (5) From 3, 4 and 5 we get: V 0 = n j = V Nj ------- + V Pi ------- R Nj m i = R Pi (6) Relation (6) is the relevant formula to be used. It also explains the name given to this circuit, since the output voltage is the 'algebraic sum' of the input voltages. To design the actual circuit, you chose one value of Rr (arbitrarily). The other resistances are then determined by the desired coefficients: K i R = ------- K r j = ------- R Pi R Nj (7) 6/5 Doc ID 2078 Rev 2

Principle of operation of an algebraic adder Finally, the values for R N0 and R P0 are chosen, based on (2). Doc ID 2078 Rev 2 7/5

Example AN420 4 Example Let us assume we have a voltage swing of 0 volts (0 to 0) that we want to convert with a 0-bit resolution. And let us assume we have a set of voltage sources VNj that we can switch between 0 to 5 volts under software control, and each one independently from the other. Let us also assume we can 'cut' the 0 volt swing in 4 'pieces' of 2.5 volts each, and that every 'piece' can be converted with 8-bit resolution. The overall resolution will therefore be: 2 8 (ST6 A/D resolution) * 2 2 (# of 'pieces') = 2 0 Let us call V in the actual value of the source to be converted. For instance, if V in ε [0, 7,5] volts, we could supply the ST6 A/D with the voltage: (V in -7.5volt)x2 => ε[0,5]volt or, for (0,7.5) volts: (V in -.5xV N )x2 = 2xV in -3xV N where V N is one of the V N j sources, either 0 or 5 volts. In similar fashion, for the other intervals, we could obtain: (7.5, 5) volts (V in -V N2 )x2 = 2xV in -2xV N2 (5, 2.5) volts (V in -0.5xV N3 )x2 = 2xV in -V N3 (2.5, 0) volts (V in -0xV N4 )x2 = 2xV in So, relation (6) becomes: V 0 = 2xV in -3xV N -2xV N2 -V N3 where V in =V P The software driving the conversion will therefore verify if, given a certain status of the V Nj voltages, the conversion is far from being saturated. If so, another try will be performed with a different status of the V Nj voltages. Figure 3 gives the flow chart of such software. 8/5 Doc ID 2078 Rev 2

Example Figure 3. Conversion routine VN = VN2 = VN3 = 0 CONVERT SATURATED? YES VN3 = CONVERT NO DONE Vin => [0, 2.5] V SATURATED? YES VN3 = 0, VN2 = CONVERT NO DONE Vin => [2.5, 5] V SATURATED? YES VN2 = 0, VN = CONVERT NO DONE Vin => [5, 7.5] V DONE Vin => [7.5, 0] V The actual circuit values are calculated as follows. With arbitrarily chosen Rr equal to 0 KΩ, the other resistor values are given by: --------- = 2 R P = R P 5000Ω --------- = 3 R N = R N 3333Ω --------- = 2 R N2 = R N2 5000Ω Doc ID 2078 Rev 2 9/5

Example AN420 --------- = R N3 = 0Ω R N3 To satisfy relation (2), we obtain the following values, as indicated in Figure 4. ----- + --------- + --------- + --------- + --------- + --------- + 0.0007 R N0 R N R N2 R N3 R N0 --------- + --------- R P0 R P = --------- + 0.0002 R P0 --------- + 0.0007 R N0 = --------- + 0.0002 R P0 Assuming ------ R = R P0 N0 = 2KΩ 0/5 Doc ID 2078 Rev 2

Application example 5 Application example An example ST62 software program follows on the next pages. It executes the program flow of Figure 3 in the application circuit of Figure 4. Figure 4. Example circuit 3.3K 5K 0K PC4 PC5 PC6 OUTPUTS 0K ST625 2K PB0 (A/D Input) Vin 5K The ST625 pin allocation is arbitrary. The three outputs can drive other identical circuits, when more the one 0-bit A/D channel is needed. Also, a different number of 'pieces' can be used to achieve a different resolution. ;*********************************************************************************** ;* File name: HIRES_AD.ASM ;* ;* ALGEBRAIC ADDER AND ST6 A/D CONVERTERS - Application note software ;* This software is an example on how to increase the ST6 converter ;* resolution. Please refer to the application note for further ;* explanations. ;* ;* Allocation of pins: PC4, PC5 and PC6 are, respectively, voltage sources ;* VN, VN2 and VN3. PB0 is an A/D input ;* ;***********************************************************************************.input "625_reg.asm" ;ST625 standard definitions file VN.equ 4 VN2.equ 5 VN3.equ 6 drcs.def 0bfh,0ffh,0ffh ;PC4 bit select ;PC5 bit select ;PC6 bit select ;shadow register for Data Register C Doc ID 2078 Rev 2 /5

Application example AN420 Hres.def 0bdh,0ffh,0ffh ;MS 2 bits of conversion result, and ;conversion flag conv_f.equ 7;the MSB of Hres is the high resolution ;end of conversion flag c.equ 6 ;conversion step flags c2.equ 5 c3.equ 4 c4.equ 3 Lres.def 0beh,0ffh,0ffh ;using Hres ;LSB of conversion result ;************************** N O T E *********************************************** ;register W is used to save the accumulator contents ;in standard interrupt routines ;********************************************************************************.org 880h ;one module only. Do not use this ;assembly directive if you organize ;your software in linkable modules init ldi drb, ldi orb, ;PB0 is analog input ldi ddrc,070h ;PC4..6 are open drain outputs ldi orc,070h ;PC4..6 are push-pull outputs now ldi drcs,0 ;assume PC7 is input with pull-up, ;no interrupt ldi ior,0h ;enable interrupts ldi Hres,0 reti ;initialize interrupt machine conv ;this is an endless loop converting ;PB0 input with 0-bit resolution ;the first time here after reset, ;VN=VN2=VN3=0 set conv_f,hres set c,hres set 5,adcr ;start high resolution conversion jrs conv_f,hres,$ nop ;here the high resolution result is ;available in Hres-Lres jp conv adcint ld w,a ;save accumulator ld a,adr ;in accumulator conversion result jrs c,hres,cconv 2/5 Doc ID 2078 Rev 2

Application example jrs c2,hres,c2conv jrs c3,hres,c3conv c4conv ldi Hres,3 ld Lres,a ld a,drcs res VN,a ld drcs,a ld drc,a ;VN=VN2=VN3=0 jp convout cconv pi a,0ffh jrnz cc lr Hres ld Lres,a convout d a,w reti cc ld a,drcs set VN3,a ld drcs,a ld drc,a ;VN=VN2=0, VN3= set 5,adcr ;start conversion res c,hres set c2,hres jp convout ;exit interrupt c2conv cpi a,0ffh jrnz c2c ldi Hres, ld Lres,a jp convout c2c ld a,drcs res VN3,a set VN2,a ld drcs,a ld drc,a ;VN=VN3=0, VN2= set 5,adcr ;start conversion res c2,hres set c3,hres jp convout ;exit interrupt c3conv cpi a,0ffh jrnz c3c Doc ID 2078 Rev 2 3/5

Application example AN420 ldi Hres,2 ld Lres,a jp convout c3c ld a,drcs res VN2,a set VN,a ld drcs,a ld drc,a ;VN2=VN3=0, VN= set 5,adcr ;start conversion res c3,hres set c4,hres jp convout ;exit interrupt.org 0ff0h jp adcint ;A/D interrupt vector.org 0ffeh jp init ;reset vector.end 4/5 Doc ID 2078 Rev 2

Revision history 6 Revision history Table. Document revision history Date Revision Changes 2-Dec-992 Initial release. 02-Nov-20 2 Updated format and company logo. Doc ID 2078 Rev 2 5/5

Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. 20 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com Doc ID 2078 Rev 2 5/5