1 / 44

Dorian’s TS1 Systemes Electroniques students

Dorian’s TS1 Systemes Electroniques students. CONCEPTION OF A DIGITAL TO ANALOG CONVERSION BOARD. Objective :

breck
Download Presentation

Dorian’s TS1 Systemes Electroniques students

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dorian’s TS1 Systemes Electroniques students

  2. CONCEPTION OF A DIGITAL TOANALOG 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

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

  4. 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

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

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

  7. 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

  8. CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 1. The main characteristics of the DAC0832 (2 of 3) Bipolar mode configuration Vo = VREF.(DIGITAL CODE – 128)/128 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 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

  9. 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) Conv_Ord 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

  10. 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 :

  11. 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

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

  13. CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 5. The connection of ILQ74 optocouplers (1 of 2) IOH 1 0 1 0 C S S C IOL 0 1 1 0 Diagram 2 Diagram 1 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

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

  15. 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

  16. 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 C 1 0 S C 1 S 0

  17. 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

  18. CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 9. The electrical diagram OPTOCOUPLERS CURRENT TO VOLTAGE CONVERTER B U F F E R S DAC VOLTAGE REF

  19. CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 10. Production of a test program We suggest to elaborate the next output voltage : • Vomax = 5V • Vomin = -7.5V • Vo(pk-pk) = 12.5V • Offset = -1.25V • 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

  20. 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

  21. CONCEPTION OF THE PARALLEL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 10. Flowchart of the test program: conversion(Nb) function • Start_Conv_Ord = 0xFE t0 • End_Conv_Ord = 0x01 PORTH Nb t1 PF0 t0 t1 t2 t2 delay(T) allows adjustment of the frequency to the desired value (here 0.1 Hz) t

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

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

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

  25. 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

  26. 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) :

  27. 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

  28. 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 : The negative pulse on /A1 input must be elaborated in synchronism with the positive edge of a 17th clock pulse. But a SPI can elaborate multiple of 8 clock pulses exclusively. How can we solve the problem ?

  29. 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 : CLK Nb Conv_Ord DAC_En Nb CLK Thus the connections : DAC_En And the name given to the different signals : Conv_Ord

  30. 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

  31. 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

  32. 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

  33. CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 4. The connection of HCPL2232 optocouplers DAC714 HCPL2232 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 Calculus of R : 1 Thus : 0 1 0

  34. 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

  35. CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 6. The electrical diagram POWERSUPPLY Optocouplers DAC

  36. CONCEPTION OF THE SERIAL INPUTS DIGITAL TO ANALOG CONVERSION BOARD 7. Production of a test program Same output voltage : • Vomax = 5V • Vomin = -7.5V • Vo(pk-pk) = 12.5V • Offset = -1.25V • 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

  37. 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

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

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

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

  41. COMPARISON OF BOTH TECHNOLOGICAL SOLUTIONS Performances of both boards are very different : • Parallel inputs board : 8 bits resolution / 1 LSB = 78 mV • Serial inputs board : 16 bits resolution / 1 LSB = 305 µV  Let’s consider a 16 bits parallel inputs DAC : AD768 2 current outputs 16 parallel inputs 1 reference voltage input • Same functionalities as the DAC0832 but with a 16 bits resolution

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

  43. Daoudi Pierrick Raphaël Hervé Fayçal Mickaël Belaïd Mathieu Sylvain Yves Sarah Cédric Maureen Morgan Stephen Romain Mathieu Soundar Daoudi Pierrick Raphaël Hervé Fayçal Mickaël Belaïd Mathieu Sylvain Yves Sarah Cédric Maureen Thanks a lot for your attention Morgan Stephen Romain Mathieu Soundar

More Related