Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Installation of Jupyter


Einleitung → Bildchen's der module


The modules of the the AnalogMax series offer software demonstrations of their basic functionality and
communication interface.

This manual provides a step by step guide for installing the required software and running the demos in general.

For the ease of access- and program -ability the programming accessibility and programmability the language Python (since version 3.5) has been chosen.
The project Jupyter provides an excellent and open source entry for beginners and professionals.
Jupyter files are called Notebooks and have the ending fileName.ipynb, this manual refers to them as demo.

The following description of steps applies in its details to computers running windows 10, for other
operation systems they , the steps are in general similar.

So running and editing the Demos requires the following steps:

  • Step 1 - Installation of Anaconda respectively jupyter
  • Step 2 - Installation of "pyserial"
  • Step 3 - Driver installation for the module
  • Step 4 - Making the demos accessible for Jupyter
  • Step 5 - Starting Jupyter
  • Step 6 - Opening a demo
  • Step 7 - Alter the comport to yours
  • Step 8 - Running the demo
  • Annotations


Installation of Anaconda respectively Jupyter

The simplest way to execute the demos in Jupyter is accomplished throw the installtion installation of Anaconda.
This will install more than is needed but nearly all requirements in one step.

...

The communication with a module supposes a comport, and therefore a driver is required.
When connecting the module with to your computer, windows starts the Automatic driver Installation,
but often the automatic driver installation fails and the driver needs to be installed manually.

...

Through a right mouse click on each device, a context menu opens. Chose "Update driver" afterwords chose
"Search automatically for updated driver software", this proper driver installation changes the devices names
into USB Serial Converter A & B, in addition, also the a comport is installed.

Check its number (“ComX” ) and memorize it for the later use within the demos.

In dependency to the modules firmware, the driver installation can lead to the appearance of two comports,
in this instance, the higher numbered comport is of importance.

FEHLER FALL BESCHREIBUNG HINZUFÜGEN?

Making the demos accessible for Jupyter

...

So opening it starts the server, which opens a console displays displaying status messages of the server.
The console must be open all the time, you want Jupyter to run. You can minimize it.

...

Every demo communicates with the module by a serial communication port. This port has been assigned
a number during the driver installation. In our case it is COM5.
At the beginning of the each demo is a line:

ser = serial.Serial('COM5', 115200)

...

A notebook consists of cells, in which its content isresides. Demos so far only contain one cell. , to run itthe demo,
the PC's focus must
be upon the cell, left clicking into the cell cells source code focuses this cell.


Now the demo can be run through pressing the run button,
stopped by the button with the black rectangular,
reloaded through the circular arrow and lastly
reloaded and rerun by the two arrowed button.

The notebook can be closed either by closing the tab or via File → "Close and Halt".

Often demos gather data from the module and display them in graph plots.

...

  • The demos are linked to Jupyter through the import and use of only the following modules:
    IPython (Interactive Python) - Interacting from within the Notebook with its output / plots
    ipywidgets - Interactive Widgets/GUI elements for the Jupyter Notebook
  • Show line numbers inside a notebook: View → Toggle Line Numbers

...

The Communication Interface within TEI0015-02

...

The modules TEI0015 and TEI0016 implements a handler for executing commands. The serial interface speed
must be set to 115200 bits, commands consists of a single  character in UTF-8 encoding.
Each command must be transmitted individually.

...

"?"   The module returns its ID, TEI0015 returns "1" and TEI0016 returns "2"

ADC data acquisition and Fourier transformation Demo


This demo works with the modules TEI0015 and TEI0016. In this example the ADC of the module measures one million samples
and stores them inside its SD-RAM. The data is collected, converted and shown as graph plot, showing its value and
time behaviour and for the second graph a Fourier transformation is performed, showing the Frequency spectrum.

...

Using the ADC for high speed consecutive measurements

Besides measuring single values, via command "r", the module provides a method to collect ADC data with

The module provides a method to gather highly accurate consecutive ADC measurements in a single event.
In this mode of operation, one mega sample of ADC values are performed and stored inside the modules
SD-RAM.

...

  • Open a serial comport
  • Send the command "2 or 5", "4 or 6" or "8 or 7" for the ADC pre-amplification, if a gain greater 1 is desired
  • Send the command "t" to trigger the consecutive measurement
  • Clear the PCs serial comport input buffer of the opened comport
  • Send the command "+" or "*", the module transmits 128 or 16384 Samples of ADC values
  • Read the amount of ADC values in one chunk of 128 or 16384 samples from the serial input buffer of the PC
  • Repeat the reading of chunks to a maximium maximum of 1 mega sample
  • Close the comport

After a trigger event, the one mega sample of data is stored until your retrigger. So processing the data can
be done for each chunk individually or the whole one mega sample.

The ADC values are 18bit wide and contained in 5 nibbles of data.
The Information to convert the RAW ADC data positive values reach from 0 to 131071

TEI0015:

into standard integer values.

Module TEI0015 - ADC = AD4003BCPZ-RL7

Resolution: 18-bit 2MSPS

# ADC resolution is 18bit
positive reach from 0 to 131071
negatives from 131072 to 262142

negative full scale is 0x20000 / 131072, mid scale is 0x0, -1 LSB 0x3ffff / 262143 and positive full scale is 0x1ffff / 131071

TEI0016:

ADC = ADAQ7988BCCZ, 16-bit 500kSPS

# ADC resolution is 16bit
negative full scale is 0, mid scale is 0x8000 / 32768 and positive full scale is 0xffff / 65536

CLOSE the comport

Convert the data

...

/ 5 nibbles
Maximum sampling rate: 2 MSPS

Order of Values:


HexDec
HexDec
Mid scale0x000000


Positive 1 LSB0x000011x1ffffto full scale -1 LSB0x1ffff131071
Negative full scale0x20000131072to -1 LSB0x3FFFF262143

Module TEI0016 - ADAQ7988BCCZ

Resolution: 16-bit / 4 nibbles
Maximum sampling rate: 0.5 MSPS

Order of Values:


HexDec
HexDec
Negative full scale is0x00000to -1 LSB0x7fff32767
Mid scale is0x8000 32768


Positve 1 LSB0x800132769to full scale0xffff65536