Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dorian’s TS1 Systemes Electroniques students CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD Objective : To conceive a Digital to Analog conversion.

Similar presentations


Presentation on theme: "Dorian’s TS1 Systemes Electroniques students CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD Objective : To conceive a Digital to Analog conversion."— Presentation transcript:

1

2 Dorian’s TS1 Systemes Electroniques students

3 CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD Objective : To conceive a Digital to Analog conversion board driven by a microcontroller, allowing the elaboration of an output triangular wave whose amplitude, offset and frequency are programmable

4 CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD Limiting values : Vomin = -10V Vomax = +10V Vo(peak to peak)min = 0V Vo(peak to peak)max = 20V Programmable frequency Example: Vomax = 5V Vomin = -7.5V Vo(p-p) = 12.5V Offset = -1.25V

5 CONCEPTION OF A DIGITAL TO 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 board MC68HC12A4EVB 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 parts from analog parts

6 Summary A : Parallel inputs Digital to Analog conversion board conversion board B : Serial inputs Digital to Analog conversion board conversion board C : Comparison of both technologi- cal solutions cal solutions

7 A : Parallel inputs digital to analog conversion board conversion board B : Serial inputs digital to analog conversion board C : Comparison of both technologi- cal solutions

8 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO 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

9 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO 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 OPAmps of the Current to Voltage converter need a symetrical double power supply V+/V- in order to deliver a bipolar output voltage

10 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC0832 (3 of 3) The outputs IOUT1 and IOUT2 are updated after the negative edge of/WR, provided that the DAC 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 exclusively and we will connect the other inputs (ILE and /CS) to their active low level We name the control signal driving the /WR input Conv_Ord (Conversion Order). This signal will be elaborated by the microcontroller Conv_Ord

11 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 2. Elaboration of the reference voltage VREF = 10V Stable reference diode : VZ = 1.233 V +/- 12mV VREF = VZ(1 + R2/R1) Final proposition :

12 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 3. Block diagram of the digital to analog conversion * 9 digital input signals : Conv_ord : Conversion Order signal Nb : Number varying between 0 and 255 * 1 analog output signal : Vo

13 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 4. The electrical isolation between digital and analog parts Digital parts Analog parts Optocouplers (x9)

14 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 5. The connection of ILQ74 optocouplers (1 of 2) Diagram 1 Diagram 2 1 C 0 S 1 0 1 0 S C 0 1IOL IOH We prefer the non inverting diagram 1  IF[ILQ74] = IOL[68HC12] Problem : IF[ILQ74] recommanded = 10 mA IOLmax[68HC12] = 2 mA  Need to add a buffer between the µC and the optocoupler

15 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 5. The connection of ILQ74 optocouplers (2 of 2) IOLmax[74LS645] = 24 mA IF[ILQ74] = 10 mA IOLmax[68HC12] = 2 mA IIL[74LS645] = 0.4 mA Synthesis of used components 74LS645 : 8 buffers/device ILQ74 : 4 optocouplers/device  1x74LS645 + 2xILQ74 for the isolation of Nb data Buffer

16 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 6. Calculus of resistors used in conjunction with ILQ74 optocouplers R1 sets IF to 10 mA R2 imposes saturation of the optotransistor We choose Thus

17 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 7. The connection of SFH615 optocoupler For the last data to isolate (Conv_Ord) we decide to use a SFH615 optocoupler (single opto per device) and to elaborate the buffer with a PNP transistor 1 0 C S C S 1 0

18 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 8. Block diagram of the Digital to Analog conversion system The conversion board is driven by 9 Input/Output Port pins declared as outputs : PF0 : Conversion order signal (Conv_Ord) PH[0-7] : Number Nb to convert into an analog voltage

19 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 9. The electrical diagram BUFFERSBUFFERS OPTOCOUPLERS DAC VOLTAGE REF CURRENT TO VOLTAGE CONVERTER

20 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 10. Production of a test program 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

21 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO 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

22 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO 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 t0t1t2 PORTH PF0 delay(T) allows adjustment of the frequency to the desired value (here 0.1 Hz)

23 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 11. Laboratory activities

24 CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 11. Laboratory activities : the output voltage

25 A : Parallel inputs digital to analog conversion board B : Serial inputs digital to analog conversion board conversion board C : Comparison of both technologi- cal solutions

26 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO 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

27 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC714 (2 of 6) DAC714 will be driven by a SPI (Serial Peripheral Interface) :

28 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC714 (3 of 6) Configuration of 68HC812 SPI : Master mode MSB first transmission Transmission of data bits (Nb) in synchronism with negative edges of the clock signal

29 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC714 (4 of 6) The conversion of a 16 bits Nb needs 17 clock pulses : Problem Problem : The negative pulse on /A1 input must be elaborated in synchronism with the positive edge of a 17 th clock pulse. How can we solve the problem ? ? But a SPI can elaborate multiple of 8 clock pulses exclusively.

30 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC714 (5 of 6) A deep study of internal structure of the DAC714 shows that it can be driven with the next control signals : Thus the connections : And the name given to the different signals : CLK Nb Conv_Ord DAC_En Nb CLK DAC_En Conv_Ord

31 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC714 (6 of 6) The DAC714 can operate in unipolar or bipolar mode :  We choose to supply the DAC with a +15V/-15V power supply Thus 1 LSB = 20/65536 = 305 µV

32 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 2. The electrical isolation between digital parts and analog parts Digital parts Optocouplers (x4) Analog parts

33 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO 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 optocoupler which allows 5 Mbits/s data rates Moreover, the input current IF is low enough so that the µC can drive the optocoupler without any buffer

34 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO 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.6V we will supply the HCPL2232 with 9V.  VOH[HCPL2232] = 7.5V Thus : 1 1 0 0 Calculus of R :

35 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 5. Block diagram of the Digital to Analog conversion system 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

36 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 6. The electrical diagram Optocouplers DAC POWER SUPPLY

37 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 7. Production of a test program 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

38 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO 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

39 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 7. Flowchart of the test program : conversion(Nb) function t0 t1 t2 t3 t4 t t0 t1t2 t3t4 delay(T) allows adjustment of the frequency to the desired value (here 0.1 Hz)

40 CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 8. Laboratory activities : the output voltage

41 A : Parallel inputs digital to analog conversion board B : Serial inputs digital to analog conversion board C : Comparison of both technologi- cal solutions cal solutions

42 COMPARISON OF BOTH TECHNOLOGICAL SOLUTIONS 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 parallel inputs 2 current outputs 1 reference voltage input  Same functionalities as the DAC0832 but with a 16 bits resolution

43 COMPARISON OF BOTH TECHNOLOGICAL SOLUTIONS AD768 2 OPAmps LM4041 1 SFH615 + 4 ILQ74 + 17 Buffers 17 GPIO 1 SPI 2 GPIO2 HCPL2232 DAC714 78L09

44 Belaïd Daoudi MathieuSylvain PierrickRaphaëlHervé Yves Fayçal Sarah Mickaël Cédric Morgan Maureen MathieuStephenSoundarRomain Thanks a lot for your attention Belaïd Daoudi MathieuSylvain PierrickRaphaëlHervé Yves Fayçal Sarah Mickaël Cédric Morgan Maureen MathieuStephenSoundarRomain


Download ppt "Dorian’s TS1 Systemes Electroniques students CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD Objective : To conceive a Digital to Analog conversion."

Similar presentations


Ads by Google