Difference: DigitalToAnalogueConversion (1 vs. 2)

Revision 22017-11-27 - uli

Line: 1 to 1
 
META TOPICPARENT name="CourseExercises"

The mcp4725 Digital to Analogue Converter

Goal:

Line: 32 to 32
 
<--/commentPlugin-->

META FILEATTACHMENT attachment="dac_front.png" attr="" comment="" date="1509439945" name="dac_front.png" path="dac_front.png" size="1123972" user="uli" version="1"
Added:
>
>
META FILEATTACHMENT attachment="dac.pdf" attr="" comment="" date="1511779095" name="dac.pdf" path="dac.pdf" size="1684554" user="uli" version="1"

Revision 12017-10-31 - uli

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CourseExercises"

The mcp4725 Digital to Analogue Converter

Goal:

The digital to analogue converter is a device very often used in control applications. Some HV power supplies are controlled by a low voltage analogue signal level: 0V .. 10V → 0kV .. 10 kV. Some DACs convert fast enough such that they can we used to generate arbitrary wave forms.

dac_front.png

The MCP4725 is a I2C based DAC with 12 bits resolution.

Exercise 1:

First find out on which I2C address the MCP4725 can be reached.

Write a program that allows you to send a 12 bit digital value to the DAC. Use the pigpio library to do this using the pigpiod interface. Make sure the pigpiod deamon is started:

sudo pigpiod

You must first the initialize the pigpio library with pigpio_start and open the i2c bus with i2c_open. Have a look at the pigpio library documentation for details.

Get a value to be sent to the DAC through command line arguments and check that the analogue level on the DAC output changes using a multi-meter.

Exercise 2:

Create a pulse generator capable of producing sine, rectangular, triangular and sawtooth wave forms.

Send these to the DAC. Make sure the time between 2 samples is always the same, independent of the wave form chosen.

-- Uli Raich - 2017-10-31

Comments

<--/commentPlugin-->

META FILEATTACHMENT attachment="dac_front.png" attr="" comment="" date="1509439945" name="dac_front.png" path="dac_front.png" size="1123972" user="uli" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback