7th November 2017

Turning Raspberry Pi into an Arbitrary Waveform Generator and the simple scope using Universal Plus hat

In this post I will show how to use Universal Plus family hat to turn Raspberry Pi into an Arbitrary Waveform Generator and visualise the generated waveforms (ie to create the simple oscilloscope). I use the Universal Zero Plus hat – but all of them have the same functionality (except the SERVO version which has only one DAC port available).

From the Universal Plus datasheet:

DAC ports are on the pins 7 and 8. I will use ADC ports on the ports 3, 4 and 5. As a source of the digital signal I will use the port 28 which is the PWM port number 19

Waveform generator (DAC):

Universal Plus DAC can autonomously generate the analog signal. It is enough to create the list of the values (the DAC converter is 12 bit so the values should be in the range 0-4095), set the number of the samples and period or frequency of the generated signal and start the generation:

PWM generation  (PWM)

Universal Plus hats can autonomously read the real time ADC data and then send it to the Raspberry Pi. Similar to DAC it is enough to configure the channels  to be read, number of sequences (of the channels configured) of conversions and period or frequency.

 

Data acquisition  (ADC)

Universal Plus hats can autonomously read the real time ADC data and then send it to the Raspberry Pi. Similar to DAC it is enough to configure the channels  to be read, number of sequences (of the channels configured) of conversions and period or frequency.

And the result

Leave a Reply

Your email address will not be published. Required fields are marked *