+ All Categories
Home > Documents > Dorian’s TS1 Systemes Electroniques students

Dorian’s TS1 Systemes Electroniques students

Date post: 10-Jan-2016
Category:
Upload: breck
View: 35 times
Download: 3 times
Share this document with a friend
Description:
Dorian’s TS1 Systemes Electroniques students. CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD. Objective : - PowerPoint PPT Presentation
Popular Tags:
44
Transcript
Page 1: Dorian’s TS1 Systemes Electroniques students
Page 2: Dorian’s TS1 Systemes Electroniques students

Dorian’s TS1 Systemes Electroniques students

Page 3: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF A DIGITAL TOCONCEPTION OF A DIGITAL TOANALOG CONVERSION BOARDANALOG CONVERSION BOARD

ObjectiveObjective : :To conceive a Digital to Analog conversion board To conceive a Digital to Analog conversion board driven by a microcontroller, allowing the driven by a microcontroller, allowing the elaboration of an output triangular wave whose elaboration of an output triangular wave whose amplitude, offset and frequency are programmableamplitude, offset and frequency are programmable

Digital to Analogconversion board

MicrocontrollerNb Vo

Page 4: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF A DIGITAL TOCONCEPTION OF A DIGITAL TOANALOG CONVERSION BOARDANALOG CONVERSION BOARD

Limiting values :• Vomin = -10V• Vomax = +10V• Vo(peak to peak)min = 0V• Vo(peak to peak)max = 20V• Programmable frequency

Vo

Vomax=10V

Vomin=-10V

T=1/f

0 t

5V

-7.5V

Example:

• Vomax = 5V

• Vomin = -7.5V

• Vo(p-p) = 12.5V

• Offset = -1.25V

Page 5: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF A DIGITALCONCEPTION OF A DIGITALTO ANALOG BOARDTO ANALOG BOARD

Specification manual :We have to conceive 2 distinct Digital to Analog conversion boards :• the first one equipped with the 8 bits parallel inputs DAC DAC0832• the second one equipped with the 16 bits serial inputs DAC DAC714

Each conversion board will be driven by the evaluation boardMC68HC12A4EVB equipped with the Freescale 68HC812A4 16 bits µC

The programmation language will be C language

Optocouplers will be used in order to electricaly isolate digital partsfrom analog parts

Page 6: Dorian’s TS1 Systemes Electroniques students

SummarySummary

A : Parallel inputs Digital to AnalogA : Parallel inputs Digital to Analog conversion boardconversion board

B : Serial inputs Digital to AnalogB : Serial inputs Digital to Analog conversion boardconversion board

C : Comparison of both technologi-C : Comparison of both technologi- cal solutionscal solutions

Page 7: Dorian’s TS1 Systemes Electroniques students

A : Parallel inputs digital to analogA : Parallel inputs digital to analog conversion board conversion board

B : Serial inputs digital to analog conversion board

C : Comparison of both technologi- cal solutions

Page 8: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC0832 (1 of 3)

• 8 bits resolution

• 2 current outputs IOUT1 and IOUT2

Needs addition of a Current to Voltage converter

• Single supply

• Capacity to operate in a double buffered configuration

Page 9: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC0832 (2 of 3)

Bipolar mode configuration

To obtain -10 V < Vo < +10 V , we choose VREF = + 10 V

Thus, 1 LSB = 2.VREF/256 = 78 mV

So, -10 V < Vo < +9.92 V

Vo = VREF.(DIGITAL CODE – 128)/128

Remark : Although the DAC just needs a single supply, the OPAmpsof the Current to Voltage converter need a symetrical double powersupply V+/V- in order to deliver a bipolar output voltage

Page 10: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC0832 (3 of 3)

The outputs IOUT1 and IOUT2are updated after the negativeedge of/WR, provided that theDAC is enabled(/CS=ILE=0)

The number Nb to convert must remain stable as long as /WR is low

We decide to drive the DAC with the /WR input exclusivelyand we will connect the other inputs (ILE and /CS) to their activelow level

We name the control signal driving the /WR input Conv_Ord(Conversion Order).This signal will be elaborated by the microcontroller

Conv_Ord

Page 11: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

2. Elaboration of the reference voltage VREF = 10V

VZ = 1.233V

LM4041-ADJ

V+ = 15V

VZR1

R2

VREF

V+ = 15V

R1

Radj

VREF

Stable reference diode :VZ = 1.233 V +/- 12mV

VREF = VZ(1 + R2/R1)

Final proposition :

Page 12: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

3. Block diagram of the digital to analog conversion

Current toVoltage

conversion

Digital toAnalog

conversion

IOUT1

IOUT2

Conv_Ord

NbVo

Referencevoltage

VREF=10V

8

* 9 digital input signals :• Conv_ord : Conversion Order signal

• Nb : Number varying between 0 and 255

* 1 analog output signal : Vo

Page 13: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

4. The electrical isolation between digital and analog parts

µC

MC68HC812A4

Electricalisolation

Digital toAnalog

conversion+

Current toVoltage

conversion

Conv_Ord_d Conv_Ord

Nb_d Nb

0V_d 0V_a

Vo

o

Vcc=5V V+=15V

8

V-=-15V

8

Digitalparts

Analogparts

Optocouplers(x9)

Page 14: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

5. The connection of ILQ74 optocouplers (1 of 2)

Vcc=5V V+=15V

GPIO

µC V

IF

V+=15V

GPIO

µC

V

IF

Diagram 1 Diagram 2

1

C

0

S

1

0

10

SC

0

1IOL

IOH

We prefer the non inverting diagram 1 IF[ILQ74] = IOL[68HC12]

Problem :IF[ILQ74] recommanded = 10 mAIOLmax[68HC12] = 2 mA

Need to add a buffer between the µC and the optocoupler

Page 15: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

5. The connection of ILQ74 optocouplers (2 of 2)

Vcc=5V V+=15V

GPIO

µC V

IF

ILQ741

74LS645

IOLmax[74LS645] = 24 mAIF[ILQ74] = 10 mA

IOLmax[68HC12] = 2 mAIIL[74LS645] = 0.4 mA

Synthesis of used components

74LS645 : 8 buffers/deviceILQ74 : 4 optocouplers/device

1x74LS645 + 2xILQ74 for the isolation of Nb data

Buffer

Page 16: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

6. Calculus of resistors used in conjunction with ILQ74 optocouplers

2

CTRmin.IFICsat

IF

5]VOL[74LS64-VF-VccR1

ICsat

VCEsat- (VR2

)

• R1 sets IF to 10 mA

• R2 imposes saturation of the optotransistor

• We choose

Vcc=5V V+=15V

GPIO

µC VCEsat

IF

ILQ74

1

74LS645

R1 R2

VOL[74LS645]

VF

ICsat

• Thus

Page 17: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

7. The connection of SFH615 optocoupler

For the last data to isolate(Conv_Ord) we decide to use aSFH615 optocoupler (single optoper device) and to elaborate thebuffer with a PNP transistor

Vcc=5V V+=15V

GPIO

µC

VCEsat

IF

SFH615A-1

R2

VF

ICsat

2N2907AIB

R1

RB

VOL[68HC12]

IF

VF-907]VECsat[2N2-VccR1

1

0

C

S

C

S

1

0

IB

]VOL[68HC12-]VEB[2N2907-VccRB

2

CTRmin.IF o]ICsat[Topt

o]ICsat[Topt

to]VCEsat[Top-)(VR2

]min[2N2907h

IF2.IB

FE

Page 18: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

8. Block diagram of the Digital to Analog conversion system

ConversionCourantTension

ConversionNumériqueAnalogique

IOUT1

IOUT2

Conv_Ord

NbVo

Tension deréférence

VREF=10V

8

Current toVoltage

conversion

Digital toAnalog

conversion

IOUT1

IOUT2

ReferenceVoltage

VREF=10V

8

Buffers+

Electricalisolation

Conv_Ord_d

Nb_d

88

µC68HC812

PF0

PH[0-7]

Digital to Analog conversion board

The conversion board is driven by 9 Input/Output Port pinsdeclared as outputs :

• PF0 : Conversion order signal (Conv_Ord)

• PH[0-7] : Number Nb to convert into an analog voltage

Page 19: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

9. The electrical diagram

PH7

PH6

PH5

PH4

PH0

PH1

PH2

PH3

PF0

0V_a

0V_aNb-2

Nb-1

Nb-0

DI7Nb-7

DI6Nb-6

Nb-3

Nb-5

Nb-4

Dem_conv

OV_a

0V_a

0V_a

U3

ILQ74

G3

3 EN 1(BA)3 EN 2(AB)

1

2

2 18

3 17

4 16

5 15

6 14

7 13

8 12

9 11

19

1

U1

74LS645

R14

R13

R12

R11

U4

ILQ74

R22

R21

R20

R19

DI34

DI25

DI16

DI07

DI416

DI515

DI614

DI713 X

FE

R

17

ILE

19

WR

2

18

CS

1

WR

1

2

Vcc

20

RF

B

9

Vre

f

8

AG

ND

3

DG

ND

10

OUT111

OUT212

U5

DAC0832

R23

R24

R25

R26

3

21

84 U6:A

TL082

5

67

84

U6:B

TL082

R9

20k

R710k

R8

20k

2

1

3

DZ-REF

LM4041-ADJ

RAJUSTPOT

R6

R5

PTB

R15

R16

R17

R18

T2N2907 1

2

4

3

U2

SFH615

R2

R3

R4

0V_n

Vcc

Vcc V+

Vcc

Vcc

V+

V+

V+

V-

V+

V+

Tensions d'alimentations

Vcc = +5V par rapport au potentiel de référence numérique 0V_n

V+ = +15V par rapport au potentiel de référence analogique 0V_a

V- = -15V par rapport au potentiel de référence analogique 0V_a

0V_n OV_a

Vs

Carte de conversion numérique - analogiqueà entrées parallèles

BUFFERS

OPTOCOUPLERS

DAC

VOLTAGEREF

CURRENT TOVOLTAGE

CONVERTER

Page 20: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

10. Production of a test program

Vo

Vomax=10V

Vomin=-10V

T=1/f

0 t

5V

-7.5V

• Vomax = 5V

• Vomin = -7.5V

• Vo(pk-pk) = 12.5V

• Offset = -1.25V

We suggest to elaborate the next output voltage :

• f = 0.1 Hz

Given that Vo = VREF.(Nb – 128)/128 we can deduce :

• For Vo = Vomin = -7.5V, Nb = Nbmin = 32• For Vo = Vomax = +5V, Nb = Nbmax = 192

To elaborate a full period T we will successively convert numbers Nb from 32 to 192 and then from 191 to 31

Page 21: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

10. Flowchart of the test program : main function main()

In init() :

• Nbmin = 32

• Nbmax = 192

• PF0 and PH[0-7] Input/Output Port pins declared as outputs

Start

init()

Nbmin --» Nb

conversion(Nb)

(Nb+1) --» Nb

Nb=(Nbmax+1) ?

(Nbmax-1) --» Nb

conversion(Nb)

(Nb-1) --» Nb

Nb=Nbmin ?no

no

Page 22: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

10. Flowchart of the test program: conversion(Nb) function

t0

t1

t2

t

• Start_Conv_Ord = 0xFE

• End_Conv_Ord = 0x01

Nb

t0 t1 t2

PORTH

PF0

delay(T) allows adjustmentof the frequency to the desiredvalue (here 0.1 Hz)

Start

delay(T1)

Nb --» PORTH

PORTF&Start_Conv_Ord --» PORTF

PORTF|End_Conv_Ord --» PORTF

delay(T2)

delay(T)

End

Page 23: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

11. Laboratory activities

Page 24: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE PARALLEL INPUTS DIGITALCONCEPTION OF THE PARALLEL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

11. Laboratory activities : the output voltage

Page 25: Dorian’s TS1 Systemes Electroniques students

A : Parallel inputs digital to analog conversion board

B : Serial inputs digital to analogB : Serial inputs digital to analog conversion boardconversion board

C : Comparison of both technologi- cal solutions

Page 26: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC714 (1 of 6)

• 16 bits resolution

• The number Nb to convert must be serially transmitted :* MSB first* In synchronism with a clock signal

• The DAC must be enabled during transmission• After transmission of a number Nb, a low level pulse triggers conversion process

Page 27: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC714 (2 of 6)

DAC714 will be driven by a SPI (Serial Peripheral Interface) :

DAC714

/CLK

SDIMOSI

SCKSPI

/A0

/A1

µC

68HC812

GPIO

Page 28: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC714 (3 of 6)

DAC714

/CLK

SDIMOSI

SCKSPI

/A0

/A1

µC

68HC812

GPIO

Configuration of 68HC812 SPI :• Master mode

• MSB first transmission

• Transmission of data bits (Nb) in synchronism with negative edges of the clock signal

Page 29: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC714 (4 of 6)

The conversion of a 16 bits Nb needs 17 clock pulses :

ProblemProblem : The negative pulse on /A1 input must be elaborated in synchronismwith the positive edge of a 17th clock pulse.

/CLK

SDI

/A1

D15 D8 D7 D0

/A0

How can we solve the problem ?

??

But a SPI can elaborate multiple of 8 clock pulses exclusively.

Page 30: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC714 (5 of 6)

/CLK

SDI

/A1

D15 D8 D7 D0

/A0

A deep study of internal structure of the DAC714 shows that it can bedriven with the next control signals :

Thus the connections :

And the name given to thedifferent signals :

CLK

Nb

Conv_Ord

DAC_En

DAC714

/A0

SDIMOSI

SCKSPI

/CLK

/A1

µC68HC812

GPIOPS7

PS4

Nb

CLK

DAC_En

Conv_Ord

Page 31: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

1. The main characteristics of the DAC714 (6 of 6)

The DAC714 can operate inunipolar or bipolar mode :

We choose to supply the DACwith a +15V/-15V power supply

Thus 1 LSB = 20/65536 = 305 µV

Page 32: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

2. The electrical isolation between digital parts and analog parts

MC68HC812A4

Electricalisolation

Digital toAnalog

conversion

0V_d 0V_a

Vo

o

Vcc=5V V+=15V V-=-15V

Nb

CLK

DAC_En

Conv_Ord

Nb_d

CLK_d

DAC_En_d

Conv_Ord_d

MOSI

SCK

PS7

PS4

SPI

GPIO

Digitalparts

Optocouplers(x4)

Analogparts

Page 33: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

3. The choice of HCPL2232 optocouplers

• The maximum frequency of SPI clock signal is 4 MHz

• ILQ74 :

This optocoupler cannot fit SPI specifications because the switching times ton and toff of the optotransistor are too long

Thus we choose HCPL2232 optocouplerwhich allows 5 Mbits/s data rates

Moreover, the input current IF is lowenough so that the µC can drive theoptocoupler without any buffer

Page 34: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

4. The connection of HCPL2232 optocouplers

HCPL2232 DAC714

2V < VIH < V+ - 1.4V (13.6V)

. If we supply the HCPL2232 with 15V, we have VOH[HCPL2232] = 13.5V

Given that VIH[DAC714]max = 13.6Vwe will supply the HCPL2232 with 9V

.

VOH[HCPL2232] = 7.5V

GPIO

µC

V

IF

Vdd=9V

VOH[HC12]

R

Thus :1

10

0IF

VF-]VOH[68HC12R

Calculus of R :

Page 35: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

5. Block diagram of the Digital to Analog conversion system

Nb

CLK

DAC_En

Conv_Ord

Electricalisolation

Digital toAnalog

conversion

Power supplyVdd = 9V

Vo

Nb_d

CLK_d

DAC_En_d

Conv_Ord_d

MOSI

SCK

PS7

PS4

SPI

GPIO

µC68HC812

Digital to Analog conversion board

The Digital to Analog conversion board is driven by :

• the 2 MOSI and SCK SPI pins

• the 2 PS4 and PS7 Input/Output Port pins declared as outputs

Page 36: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

6. The electrical diagram

Dem_Conv

Nb

CLK

Val_CNA

Vs

Vdd=9V

PS4

PS5=MOSI

PS6=SCK

PS7

1

2

3

4

7

8

6

5

U2

HCPL2232

1

2

3

4

7

8

6

5

U3

HCPL2232

R1

1.2k

R2

1.2k

R3

1.2k

R4

1.2k

Vdd

/A13

SDI4

/A02

/CLK1

/CLR16

+Vcc

7

AC

OM

8

DC

OM

6

-Vcc

15

SDO 5

GAIN 14

OFFSET 13

RFB2 10

REFOUT 12

BIP 11

VOUT 9

U4DAC714

3

26

74 1 5

U5TL081

VI3 VO 1

GN

D2

U178L09

OV_a

OV_a

OV_a

OV_a

OV_a

OV_a

C3

100nF

C4

100nF

V+V-

V+

V+

V-

C6

100nF

C5

100nF

V+

C1220nF

C2100nF

Tensions d'alimentations

Vcc = +5V par rapport au potentiel de référence numérique 0V_n

V+ = +15V par rapport au potentiel de référence analogique 0V_a

V- = -15V par rapport au potentiel de référence analogique 0V_a

0V_n OV_a

Carte de conversion numérique - analogique à entrées sérielles

0V_n

Optocouplers

DAC

POWER SUPPLY

Page 37: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

7. Production of a test program

Vo

Vomax=10V

Vomin=-10V

T=1/f

0 t

5V

-7.5V

• Vomax = 5V

• Vomin = -7.5V

• Vo(pk-pk) = 12.5V

• Offset = -1.25V

Same output voltage :

• f = 0.1 Hz

Given that 1 LSB = 20/65536V we can deduce :

• For Vo = Vomin = -7.5V, Nb = Nbmin = -24576• For Vo = Vomax = +5V, Nb = Nbmax = 16384

To elaborate a full period T we will successively convert numbers Nb from -24576 to 16384 and then from 16383 to -24575

Page 38: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

7. Flowchart of the test program : main function main()

In init() :

• Nbmin = -24576

• Nbmax = 16384

• Configuration of the SPI

• The 2 PS4 and PS7 Input/Output Port pins declared as outputs

Start

init()

Nbmin --» Nb

conversion(Nb)

(Nb+1) --» Nb

Nb=(Nbmax+1) ?

(Nbmax-1) --» Nb

conversion(Nb)

(Nb-1) --» Nb

Nb=Nbmin ?no

no

Page 39: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

7. Flowchart of the test program : conversion(Nb) function

DAC_En

Nb

Conv_Ord

D15 D8 D7 D0

CLK

t0

t1

t2

t3

t4

t

t0 t1 t2t3 t4

delay(T) allows adjustment of the frequency to the desired value (here 0.1 Hz)

Start

Enable DAC(DAC_En)=0

TransmitNb[15-8]

Transmissionover

?

TransmitNb[7-0]

Transmissionover

?

Conversion order(Conv_Ord) = 0 then 1

Disable DAC(DAC_En)=1

End

no

delay(T)

no

Page 40: Dorian’s TS1 Systemes Electroniques students

CONCEPTION OF THE SERIAL INPUTS DIGITALCONCEPTION OF THE SERIAL INPUTS DIGITALTO ANALOG CONVERSION BOARDTO ANALOG CONVERSION BOARD

8. Laboratory activities : the output voltage

Page 41: Dorian’s TS1 Systemes Electroniques students

A : Parallel inputs digital to analog conversion board

B : Serial inputs digital to analog conversion board

C : Comparison of both technologi-C : Comparison of both technologi- cal solutionscal solutions

Page 42: Dorian’s TS1 Systemes Electroniques students

COMPARISON OF BOTH TECHNOLOGICALCOMPARISON OF BOTH TECHNOLOGICALSOLUTIONSSOLUTIONS

• Parallel inputs board : 8 bits resolution / 1 LSB = 78 mV

• Serial inputs board : 16 bits resolution / 1 LSB = 305 µV

Performances of both boards are very different :

Let’s consider a 16 bits parallel inputs DAC : AD768

16 parallelinputs

2 current outputs

1 reference voltageinput

Same functionalities as the DAC0832 but with a 16 bits resolution

Page 43: Dorian’s TS1 Systemes Electroniques students

COMPARISON OF BOTH TECHNOLOGICALCOMPARISON OF BOTH TECHNOLOGICALSOLUTIONSSOLUTIONS

ConversionCourantTension

ConversionNumériqueAnalogique

IOUT1

IOUT2

Conv_Ord

NbVo

Tension deréférence

VREF=10V

Current toVoltage

conversion

Digital toAnalog

conversion

IOUT1

IOUT2

ReferenceVoltage

VREF=10V

Buffers+

Electricalisolation

Conv_Ord_d

Nb_d

µC68HC812

Parallel inputs DAC conversion board

16

1 GPIO

16 GPIO16

Nb

CLK

DAC_En

Conv_Ord

Electricalisolation

Digital toAnalog

conversion

Power supplyVdd = 9V

Vo

Nb_d

CLK_d

DAC_En_d

Conv_Ord_d

MOSI

SCKSPI

2 GPIO

µC68HC812

Serial inputs DAC conversion board

AD768 2 OPAmps

LM4041

1 SFH615 +4 ILQ74 +17 Buffers17 GPIO

1 SPI

2 GPIO 2 HCPL2232

DAC714

78L09

Page 44: Dorian’s TS1 Systemes Electroniques students

Belaïd

Daoudi

Mathieu Sylvain

Pierrick Raphaël Hervé

Yves

Fayçal

Sarah

Mickaël

Cédric

Morgan

Maureen

MathieuStephen SoundarRomainThanks a lot for your attention

Belaïd

Daoudi

Mathieu Sylvain

Pierrick Raphaël Hervé

Yves

Fayçal

Sarah

Mickaël

Cédric

Morgan

Maureen

MathieuStephen SoundarRomain


Recommended