Safari Jupyter Notebook Copy - ArrowElectronics/arrow-safari GitHub Wiki

Arrow Logo ADI Logo


Description: Using Jupyter Notebook you can pull up plots for the various sensors connected to the inputs of the Safari board.

Note: This requires a different image to be placed onto the SD card than is used to run the standalone GUI. Instructions for this are contained in the section Flashing the SD Card below.

Table of Contents

  1. Prerequisites
  2. Software Installation
  3. Hardware Components
  4. Power Test
  5. Input Test
  6. Connect Sensors
  7. Running the Demo
  8. Theory of Operation
  9. Appendix

Prerequisites

  1. Windows 10 PC
  2. Meerkat 96Board
  3. Safari 96Board Mezzanine Card
  4. Git (optional)

Software Installation

  • Note: These first 3 steps are for initial installation only. If Anaconda is already installed, step #2 may be skipped. If the Safari environment has already been imported into Anaconda, step #3 may be skipped also.
  1. Obtain this repository
  2. Install Anaconda 3
  3. Import Safari environment into Anaconda
  4. Start Jupyter notebook with the Safari environment
  5. Open the Notebook

Obtain This Repository

Create the directory C:\Users\username\arrow_demos. Download and extract this repository to the newly created directory or if you have Git installed, you can clone it to your local machine. To clone it using Git, open Git, cd to this directory and enter the following command
git clone https://github.com/ArrowElectronics/arrow-safari.git

Installing Anaconda

  1. Download and install Anaconda

    • Leave all settings as the default
  2. Launch Anaconda Navigator

Importing Safari Environment

  1. In Anaconda Navigator, select the Environments tab


    Anaconda Import

  2. Select Import
    Import Select

  3. In the window that opens name your environment Safari as shown in the picture below.

  4. Click on the folder icon and navigate to C:\Users\username\arrow_demos\arrow-safari-master\safari_env.yaml.


    Import


    Import Filled

  5. Select Import. Note: This takes a few minutes- be patient!

  6. Once the import is complete, you will see a new environment named Safari in the list of available environments


    Safari Imported

Start Jupyter Notebook

  1. After the Safari environment has been imported, Select the Home tab


    Safari Home

  2. Ensure the Applications on dropdown menu is set to Safari


    Home Apps

  3. Find the Jupyter Notebook application and select Launch


    Jupyter Launch

  4. Select your preferred browser
    Browser selection

  5. Jupyter will launch a web browser and allow you to run the Notebook


    Jupyter Running

Running the Safari 96Boards Demo

Introduction

This demo is designed to demonstrate the functionality of the AD7124 using Arrow's Safari 96Board mezzanine card.

Required Components:

  1. Novtech Meerkat 96Board
  2. Arrow Safari Multi-Sensor Input 96Boards Mezzanine Card - p/n 96B-05SENSORADC-V2.0-ARROW
  3. 12V/2A Power Supply (Not Pictured)
  4. 8GB or larger MicroSD Card (Not Pictured)
  5. USB-to-UART Cable (Not Pictured)
  6. Analog Devices ADXL203EB Accelerometer Eval Board
  7. 4-pin Connector Cable (not shown)
  8. Adafruit 3290 PT100 RTD Temperature Probe
  9. Sensirion SDP816-125PA Differential Pressure Sensor (not shown)
Safari Kit Unassembled

Flashing The SD Card

For the Safari kit the Meerkat board requires an 8GB microSD card with the necessary software downloaded (flashed) onto it. Here are the instructions for doing this.

  1. Obtain 8GB or larger microSD card
  2. Locate the image 'safari_jupyter.img.bz2'. It is in your arrow-safari-master folder.
  3. Extract image using winzip, 7zip, etc. File name will now be 'safari_jupyter.img'
  4. Format microSD card to 'FAT32' using SD Card Formatter or another program
  5. Using balenaEtcher, Win32DiskImager or similar software transfer image from your PC to the memory card

Board Preparation

1. Insert Memory Card

Insert microSD card containing Linux OS and Safari demo into Meerkat.

SD Card

2. Set DIP Switch to Boot from SD Card

Turn the Meerkat board over and identify the small DPDT DIP switch on the bottom. Make sure both switches 1 and 2 are in the ON position as shown.

Meerkat Bottom DIP

3. Bend Connector to Provide Clearance

Before connecting the Safari and Meerkat boards together it is necessary to modify one of the connectors. This will provide clearance for the Safari board and allow access to pins which are needed for the UART connection. Very carefully bend the 3 pins on connector J3 located next to the power input jack on the Meerkat board taking special care not to rip it off the board while doing so.

Meerkat Top Pins Meerkat Side Pins

4. Connect Safari Mezzanine to Meerkat

Assemble Safari board on top of Meerkat board using the mating low-speed connectors on each board. It should like this:

Safari Kit Assembled

Power Test

Before connecting anything to the inputs it is a good idea to test the power to both the Meerkat and Safari boards first.

  1. Plug AC-to-DC power supply into AC wall outlet and insert barrel jack into receptacle on the Meerkat board.

  2. Check that all 4 LEDs on the Safari- red, blue, yellow, green- are on. These LEDs correspond to the following power supplies: Red: 5VDC output from Meerkat Blue: 1.8VDC output from Meerkat Yellow: 3.3VDC supply 'AVDD' on Safari board Green: 1.8VDC supply 'IOVDD' on Safari board

Power LEDs
  1. Check LEDs (a) If these are all lit up, we are ready to go to the next step which is connecting the sensors. Remove power to the Meerkat board before proceeding to this step. (b) If the LEDs are not all lit up, there is a problem with a power supply. Using a multimeter and the schematics, troubleshoot and identify the problem and fix before proceeding.

Safari Sensor Connections

The demo software allows you to connect the Analog Devices ADXL203EB accelerometer eval board, Adafruit 3290 RTD temperature probe and Sensirion SDP816-125PA differential pressure sensor and view the outputs.

ADXL203EB Accelerometer Eval Board

Connect 4-pin connector cable to the ADXL203EB accelerometer board leaving pin ST unconnected. Identify the color of the wire connected to pin +V on the ADLX203EB; connect the other end to Safari board connector J1 pin 1 (AVdd) and tighten down using a small screwdriver. Similarly connect the wire on pin X to J1 pin 2 (IN0) on Safari, and the wire on pin G to J1 pin 4 (ground). See picture below.

Adafruit 3290 RTD Temperature Probe

This is a little tricky. Using 22-26 gauge insulated wire, cut small pieces and insert into terminal J2 on Safari as shown in these diagrams, tightening down on corresponding screws.

  1. Connect wire between pins IN2 and REF+
  2. Connect wire between pins IN3 and IN5
  3. Connect wire between pins REF- and IN4
  4. Connect precision resistor between REF+ and REF-
  5. Now take the RTD probe and determine which two wires are connected together at one end by using an ohmmeter. Resistance should be approximately zero ohms. Take the wire which is not connected directly to the others (resistance approx 100 ohms) and connect to J2 pin 6 (IN4) (will have to loosen screw first). Take one of the remaining wires and connect to J2 pin 5 (IN5) and the other wire to J2 pin 6 (HDRM).
Safari Sensor Wiring

Sensirion SDP816-125PA Differential Pressure Sensor

  1. Connect wiring harness to the pressure sensor
  2. Connect wires for OCS and GND together (pins 3 and 1- see diagram) then connect to AGND on board
  3. Connect wire from VDD on sensor (pin 2) to AVDD on board
  4. Connect wire from AOUT on sensor (pin 4) to IN6 on board

Running the Demo

1. Connect UART Cable

Connect the USB-to-UART cable between connector J3 on the Meerkat board and any available port on your PC.

UART Connections

2. Set Jumpers on Top of Safari Board

Set jumpers on top of Safari board as follows (see picture below):

Jumper Settings Description
JP1 off enables 30.9k resistor R6A for resistive divider on input IN6
JP2 on enables 100k resistor R6B for resistive divider on input IN6
JP3 off enables 30.9k resistor R6A for resistive divider on input IN7
JP4 on enables 100k resistor R6B for resistive divider on input IN7
JP5 across pins 1-2 enables positive output (2.5V) from precision voltage reference U5
JP6 across pins 3-4 enables negative output (GND) from precision voltage reference U5
Test Jumpers

3. Connect Power Supply

Connect the 12V power supply to the Meerkat board. Wait approximately 15 seconds for the Meerkat to fully boot.

4. Identify COM Port

On your PC running Windows 10 open up Device Manager. Look under 'Ports' and make a note of which COM port the Meerkat is connected to. If there are multiple devices listed, you can unplug the USB cable and plug it back in to identify the right one.

Device Manager Ports

Open the Jupyter Notebook

  1. With Jupyter Notebook running, click on 'arrow-safari' to navigate to the location of Safari_IPython.ipynb.

  2. Click the filename Safari_IPython.ipynb to launch the notebook.

    • The notebook should open in a new tab Notebook Select Note: If you are unable to locate the files you downloaded/cloned earlier please follow the instructions here to change the starting directory of Jupyter.
  3. Follow the instructions inside the notebook.


Modifying the AD7124 On-Chip Registers

If you would like to modify the functionality of the AD7124, follow the below steps

Open the Notebook

  1. With Jupyter Notebook running, click on 'arrow-safari' to navigate to the location of Safari_IPython_Modifying_Registers.ipynb.

  2. Click the filename Safari_IPython_Modifying_Registers.ipynb to launch the notebook.

    • The notebook should open in a new tab Notebook Select Note: If you are unable to locate the files you downloaded/cloned earlier please follow the instructions here to change the starting directory of Jupyter.
  3. Follow the instructions inside the notebook.


Running Test Mode

If you would like to run the test mode, which enables all of the channels, follow the steps below

Open the Jupyter Notebook

  1. With Jupyter Notebook running, click on 'arrow-safari' to navigate to the location of Safari_IPython_Test_Mode.ipynb.

  2. Click the filename Safari_IPython_Test_Mode.ipynb to launch the notebook.

    • The notebook should open in a new tab Notebook Select Note: If you are unable to locate the files you downloaded/cloned earlier please follow the instructions here to change the starting directory of Jupyter.
  3. Follow the instructions inside the notebook.

⚠️ **GitHub.com Fallback** ⚠️