Hands-on Digital transmission with your soundcard

This article is part of the fundamentals of my real-world tutorial on digital communications using a cheap soundcard as the radio. If this notebook is interesting to you, check out the full tutorial!

00 - Setting up the Development Environment

Welcome to this introduction to digital transmission presented by dspillustrations.com! Throughout this course, we will develop an end-to-end signal transmission chain, that transmits textual data using your soundcard. However, before we can dive into the actual coding, let's setup the coding environment.

The project uses Jupyter notebooks to present the content. The project requires Python 3.4 or higher. A quite handy distribution for python is e.g. Anaconda, but a standard Python3 installation also fits. To setup your development environment, follow these steps:

  1. Obtain the required hardware. An overview is given on dspillustrations.com. Essentially, you will need a USB soundcard, speakers and a microphone.

Please note: This description has been superseeded by a more detailed description here: Setting up Anaconda

  1. Open a command line and move to the directory where the ipynb-files are located.
  2. Create a virtual environment. For example with the following commands:

    # in the command line: pip install virtualenv virtualenv ewAudio ewAudio\scripts\activate # on Windows source ewAudio/bin/activate # on Linux

  3. Install all required packages:

    pip install -r requirements.txt

    This will load all the files from the requirements txt file and install the packages

  4. Install the ipython-tikzmagic extension:

    pip install git+git://github.com/mkrphys/ipython-tikzmagic.git

  5. (Optional:) Install a LaTeX distribution to regenerate the block diagrams.
  6. Run the jupyter notebook with

    jupyter notebook

Below, you can try out if you got the packages installed (need to open the Jupyter notebook in Jupyter to run these cells):

In [1]:
# try out numpy and scipy
import numpy as np
print("Numpy:", np.version.full_version)
import scipy as sp
print("Scipy:", sp.version.full_version)
Numpy: 1.11.3
Scipy: 0.18.1
In [2]:
# try out matplotlib
import matplotlib
print("Matplotlib:", matplotlib.__version__)
Matplotlib: 1.5.3
In [3]:
# try out sounddevice
import sounddevice as sd
print("sounddevice:", sd.__version__)
sounddevice: 0.3.11
In [4]:
# try loading the tikzmagic extension
%load_ext tikzmagic

Great, if the above cells run without errors, you are ready for diving into the actual content.

For completeness, let's try out the tikz extension to draw a simple figure. Remember, that this requires LaTeX to be installed:

In [5]:
%%tikz
\draw (0,0) [fill=blue!10!white] ellipse (2cm and 1cm);
\node at (0,0) {\sffamily DSPIllustrations.com};

Now, I wish you fun with the first notebook which is about setting up your soundcard for the upcoming experiments!

Your Max (dspillustrations.com)

This article is part of the fundamentals of my real-world tutorial on digital communications using a cheap soundcard as the radio. If this notebook is interesting to you, check out the full tutorial!

Copyright (C) 2018 - dspillustrations.com


DSPIllustrations.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com, amazon.de, amazon.co.uk, amazon.it.