Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:eval:user-guides:circuits-from-the-lab:cn0566:quickstart [20 Apr 2023 16:45] – Link to 2021_r2 image. WooHoo! Mark Thorenresources:eval:user-guides:circuits-from-the-lab:cn0566:quickstart [03 Apr 2024 01:29] (current) – Fix HB100 power supply voltage / cell count Mark Thoren
Line 7: Line 7:
  
  
-===== Videos =====+===== Unboxing / Setup Video =====
  
 <WRAP centeralign> <WRAP centeralign>
-{{youtube>WR1DHfraLf8?t=765?medium}} +{{youtube>a6MeTsatTUg?large}}
-\\ +
-**(The Phaser comes mostly assembled. Start at around 12:45, after it's been completely assembled.) **+
 </WRAP> </WRAP>
  
Line 23: Line 21:
     * 5 V, 3 A, USB-C wall adapter      * 5 V, 3 A, USB-C wall adapter 
     * HB100 microwave source     * HB100 microwave source
-      * 3V benchtop supply or AA cells for HB100 power+      * 5V benchtop supply or 3 AAA (or AAcells for HB100 power
     * Micro HDMI to HDMI cable (or suitable adapters)     * Micro HDMI to HDMI cable (or suitable adapters)
     * 16GB or larger SD card     * 16GB or larger SD card
-    * USB keyboard and mouse 
-    * Monitor with HDMI display 
     * Tripod     * Tripod
 +    * One of the following:
 +      * Ethernet cable and DHCP-enabled network with internet access
 +      * Wireless network
 +    * One of the following:
 +      * USB keyboard and mouse, HDMI display (if running locally)
 +      * Host computer with SSH client and / or VNC client.
   * **Software**   * **Software**
     * ADI Kuiper Linux image     * ADI Kuiper Linux image
Line 34: Line 36:
     * Wired or Wireless network connection, with access to the internet (for accessing update files from Github.)     * Wired or Wireless network connection, with access to the internet (for accessing update files from Github.)
 \\ \\
 +<WRAP lo round download 80%>
 +This is the step file for the HB100 holder, with a 1/4-20 thread for a standard camera mount. HB100s can vary from manufacturer to manufacturer, so please do a quick measurement on the one you have, and make any necessary adjustments to the step file.
 +\\
 +Alternatively, use one of the other mounting methods described in the quick-start video.
 +\\
 +**{{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:hb100_holder.zip | HB100 Holder Step File}}**
 +</WRAP>
 ---- ----
  
Line 45: Line 54:
 </wrap> </wrap>
 \\ \\
- 
-\\ 
- 
 ---- ----
  
 ===== SD card / Software Setup ===== ===== SD card / Software Setup =====
  
-**The SD card that ships with the first phaser production run MUST be updated with a new image.**\\ +**The SD card that ships with the first phaser production run MUST be updated with a new image.** The Phaser works with Kuiper Linux 2021_R2 (or later)whichin spite of the "2021" in the namewas released in Spring, 2023.\\
-In order to control the CN0566 from the Raspberry Pi, you will need to install ADI Kuiper Linux on an SD card. A summary of the minim steps followswhile complete instructionsincluding where to download the SD card image, how to write it to the SD cardand how to configure the system are provided at **[[:resources:tools-software:linux-software:kuiper-linux |Analog Devices Kuiper Linux]]**. +
- +
-<WRAP todo> +
-Kuiper 2021_r2 is not documented at  **[[:resources:tools-software:linux-software:kuiper-linux#download_linux_image|Download Linux Image]]** yet. Remove this box once it is. Until then, use this direct link to the file:\\ +
-**[[https://swdownloads.analog.com/cse/kuiper/image_2023-04-02-ADI-Kuiper-full.zip|image_2023-04-02-ADI-Kuiper-full.zip]]**+
 \\ \\
-</WRAP> +In order for the Raspberry Pi to control the Phaser devices, you will need to write the ADI Kuiper Linux image to an SD card and configure it. Complete instructions, including where to download the SD card image, how to write it to the SD card, and how to configure an example system are provided at **[[:resources:tools-software:linux-software:kuiper-linux |Analog Devices Kuiper Linux]]**.
- +
-Pay particular attention to the localization settingskeyboard settings, etc. if you will be running examples on the Raspberry Pi itself (versus remotely.)+
 \\ \\
-Download the Kuiper Linux SD card image and unzip it to a convenient location, and write the image to the SD card. The Kuiper Linux wiki pages give a few options, but the "official" Raspberry Pi imager is very straightforward:\\+**Hints:** The Kuiper Linux wiki pages give a few options, but the "official" Raspberry Pi imager is very straightforward:\\
 **[[https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility/|Raspberry Pi Imager]]** **[[https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility/|Raspberry Pi Imager]]**
 \\ \\
Line 70: Line 69:
 </WRAP> </WRAP>
  
-After burning, if a window pops up saying "this card needs to be formatted, would you like to format it now?", the answer is **NO.** Eject the card and insert it into the Raspberry Pi's SD card slot. +After writing the image, if a window pops up saying "this card needs to be formatted, would you like to format it now?", the answer is **NO.** Eject the card and insert it into the Raspberry Pi's SD card slot.
  
 ===== Assembling, Booting and Configuring the System =====  ===== Assembling, Booting and Configuring the System ===== 
 {{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:2-23-2023_4-37-00_pm.png?400 |}} {{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:2-23-2023_4-37-00_pm.png?400 |}}
 <wrap center 50%> <wrap center 50%>
-//<fc #c0c0c0>Figure 3. Test Setup Functional Block Diagram</fc>//+Figure 3. Test Setup Functional Block Diagram
 </wrap> </wrap>
   - Connect ADALM-Pluto's **CENTER** micro-USB port to Raspberry Pi via micro-USB to USB cable.   - Connect ADALM-Pluto's **CENTER** micro-USB port to Raspberry Pi via micro-USB to USB cable.
   - **CAREFULLY** thread the tripod into the tripod mount. Please minmize stress on the tripod mount while plugging in cables and other operations, as it is screwed directly to the PC board.   - **CAREFULLY** thread the tripod into the tripod mount. Please minmize stress on the tripod mount while plugging in cables and other operations, as it is screwed directly to the PC board.
-  - Connect the Raspberry Pi to the monitor via the HDMI cable+  - Verify that the SD card is properly inserted into the slot on the Raspberry Pi. 
-  - Connect the keyboard and mouse to the USB port of Raspberry Pi. +  - EITHER: 
-  Verify that the burned SD card is properly inserted into the slot on the Raspberry Pi.+    - Connect an HDMI display, USB keyboardand USB mouse to the Raspberry pi, OR 
 +    For remote login, connect the Raspberry Pi's Ethernet jack to your wired network, or directly to a host computer's Ethernet jack
   - Power up the setup through the type-C port of the CN0566. Do NOT connect a supply to the Raspberry Pi.   - Power up the setup through the type-C port of the CN0566. Do NOT connect a supply to the Raspberry Pi.
-  - Wait for Raspberry Pi to boot. Upon booting, open a terminal as seen on the taskbar. +  - Wait for Raspberry Pi to boot. (This may take a minute or two, as the filesystem is expanded on first boot.) 
-  - Configure the device tree overlay file. See [[/resources/eval/user-guides/circuits-from-the-lab/cn0566#software_setup | software section]] for detailed instructions.  +  - After booting, if you are using a keyboard and local display open a terminal as seen on the taskbar. If you are logging in over the network connection, you can open a graphical desktop VNC session or command line SSH session to hostname **analog.local**
-  - Make sure to reboot the Raspberry Pi after saving the //config.txt// file. +
-  - Wait for the Raspberry Pi to boot up again+
  
-\\ 
 ---- ----
- 
  
 ==== Configuring the SD Card ==== ==== Configuring the SD Card ====
- +The easiest way to configure the SD card is by running a setup script. This does require a wired or wireless internet connectionbut it is much easier than doing things manuallyA wired connection is fairly straightforward if your network supports DHCP. If you need to use a wireless connection, you'll have to boot to the graphical desktop and connect manually.\\ 
- +Once connected to a network, run the following commands (and take a look at the setup script if you're suspicious, and note that there may be some updates as newer versions of Kuiper Linux are released.) The script is commented if you want a detailed description of what it's doing.
-After burning the image abovelog into the Raspberry Pi and open the Raspberry Pi configuration utility.\\ +
-Set the hostname to "phaser"set the locale, keyboard, and wifi country (if you'll be connecting to your network by wifi.) +
-Next, run the following commands (and take a look at the setup script if you're suspicious, and note that there may be some updates as newer versions of Kuiper Linux are released.)+
 <code> <code>
 wget https://github.com/mthoren-adi/rpi_setup_stuff/raw/main/phaser/phaser_sdcard_setup.sh wget https://github.com/mthoren-adi/rpi_setup_stuff/raw/main/phaser/phaser_sdcard_setup.sh
Line 105: Line 97:
 sudo reboot sudo reboot
 </code> </code>
-(Wait for the system to reboot)+(Wait for the system to reboot)\\ 
 +**Note:** After running the script, the hostname will be **phaser.local** 
 +\\ 
 +If you are going to be running scripts and other software directly on the Raspberry Pi, it's a good idea set a few options using the Raspberry Pi configuration utility. This can be accessed from the Start Menu under Preferences, or by running: 
 +<code> 
 +sudo raspi-config 
 +</code> 
 +from the command line. Set the locale, keyboard, timezone, and wifi country (if you'll be connecting to your network by wifi.) 
 +\\ 
  
 ==== Software Quick Start ==== ==== Software Quick Start ====
Line 111: Line 112:
 At this point, the GUI can be run from the command line. Power up the HB100 source with either a 3V benchtop power supply or two AA cells and aim it a the phaser antenna. Run the following command to find the HB100 frequency:\\ At this point, the GUI can be run from the command line. Power up the HB100 source with either a 3V benchtop power supply or two AA cells and aim it a the phaser antenna. Run the following command to find the HB100 frequency:\\
 <code> <code>
-python cn0566_find_hb100.py+cd ~/pyadi-iio/examples/phaser 
 +python phaser_find_hb100.py
 </code> </code>
  
Line 124: Line 126:
  
 <code> <code>
-cd ~/pyadi-iio/examples/cn0566 +cd ~/pyadi-iio/examples/phaser 
-python cn0566_gui.py+python phaser_gui.py
 </code> </code>
 The GUI should load and begin displaying the beam pattern as shown below. The GUI should load and begin displaying the beam pattern as shown below.
Line 134: Line 136:
  
 ==== Initial Calibration ==== ==== Initial Calibration ====
-The phaser board is initially uncalibrated; each element will have a slightly different gain and slight phase error due to numerous factors. the cn0566_examples.py script provides a calibration utility that will generate calibration files. Make sure an antenna is attached to J1, and is facing straight at the antenna array from approximately 1.5m away. Then run:+The phaser board is initially uncalibrated; each element will have a slightly different gain and slight phase error due to numerous factors. The phaser_examples.py script provides a calibration utility that will generate calibration files. Shut down the GUI if it is running. Place the HB100 directly in front of the array at **[[wp>Antenna_boresight|mechanical boresight]]** , approximately 1.5 m away. Then run:
 <code> <code>
-python3 cn0566_examples.py cal+cd ~/pyadi-iio/examples/phaser 
 +python phaser_examples.py cal
 </code> </code>
-The script provides debug information and plots as it is running, you may have to close out of each plot for the script to proceed. After running this script, files gain_cal_val.pkl and phase_cal_val.pkl will be placed in the working directory. The GUI program will also load these files automatically.+The script provides debug information and plots as it is running, you may have to close out of each plot for the script to proceed. After running this script, files gain_cal_val.pkl and phase_cal_val.pkl will be placed in the working directory. The GUI program will also load these files automatically when run again.
  
 Refer to **[[resources:eval:user-guides:circuits-from-the-lab:cn0566:calibration|CN0566 Calibration]]** for additional details Refer to **[[resources:eval:user-guides:circuits-from-the-lab:cn0566:calibration|CN0566 Calibration]]** for additional details
Line 148: Line 151:
 ===== Appendix: Pluto Setup ===== ===== Appendix: Pluto Setup =====
  
-The Pluto that ships with the phaser kit has been pre-configured. In case something goes wrong, here is how to update the firmware and settings.+The Pluto that ships with the phaser kit has been pre-configured. In case something goes wrong, here is how to update the firmware and settings. For the CN0566, the TDD engine and additional control signals are required for some configurations, and were added as of Pluto firmware 0.38. The latest firmware is available from:
  
-A Pluto Rev C or higher is required. For the CN0566, a custom firmware image is used that incorporates a TDD engine and additional control signals. +**[[repo>plutosdr-fw/releases]]**
- +
-<WRAP todo> +
-REMOVE this when it's got a proper home on Github releases\\ +
-The first step is to update the firmware to the latest release, following the procedure at:\ +
-[[https://wiki.analog.com/university/tools/pluto/users/firmware | Pluto/M2k Firmware Updates]]. Make sure to upload the entire zip file, not the pluto.frm contained within.\\ +
-Next, download and unzip the updated firmware image, located here:\\ +
-{{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:pluto_dw_march_16_2022.zip |}}\\ +
- +
-(**Yes**, unzip, UNlike upgrading to the latest release.)\\ +
-Drag and drop the pluto_DW_feb_7_2022.frm to the Pluto mass storage device, then eject.\\ +
-\\ +
-For Reference - OLD version (do NOT use):\\ +
-{{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:pluto_dw_march_9_2022.zip |}}\\ +
-{{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:pluto_dw_feb_7_2022.zip |}}\\ +
-</WRAP>+
  
 The next step is to update the Pluto configuration to enable the AD9361's second channel. Follow the directions at:\\ The next step is to update the Pluto configuration to enable the AD9361's second channel. Follow the directions at:\\
Line 194: Line 182:
 ===== Appendix: Configuration Script Notes ===== ===== Appendix: Configuration Script Notes =====
  
-A complete config.txt file is posted for convenience. Enter the following commands from a terminal to download and apply a complete config.txt file with all edits above included: +
-<code> +
-wget https://github.com/mthoren-adi/rpi_setup_stuff/raw/main/phaser/config_phaser.txt +
-rename config_phaser.txt config.txt +
-sudo mv /boot/config.txt /boot/config_original.txt +
-sudo cp config.txt /boot/ +
-</code> +
-\\+
 <WRAP tip> <WRAP tip>
-Or alternativelyfollow the Hardware Configuration procedure under **Preparing the Image: Raspberry Pi** in the [[:resources:tools-software:linux-software:kuiper-linux |Analog Devices Kuiper Linux]] page, adding the following lines to the very end of **/boot/config.txt**:+To manually edit config.txtadd the following:
 \\ \\
 <code> <code>
Line 217: Line 198:
 </code> </code>
  
-If you will be logging in via VNC, comment out the following lineand set the HDMI group and mode accordingly:+If you will be logging in via VNC, see this article:\\ 
 +**[[https://raspberrypi.stackexchange.com/questions/141147/rpi-4-4gb-slow-vnc|RPi 4 4gb slow VNC]]**\\ 
 +Also if running "headless" without a monitor, set the HDMI group and mode accordingly:
 <code> <code>
 # dtoverlay=vc4-kms-v3d # dtoverlay=vc4-kms-v3d
Line 226: Line 209:
 </code> </code>
 </WRAP> </WRAP>
- 
-\\ 
-<WRAP todo> 
-REMOVE this when merged:\\ 
-For now - the CN0566 GUI and required pyadi-iio additions are in a development branch. The pyadi-iio that is pre-installed on Kuiper needs to be cleanly removed and replaced. Run the following commands: 
-<code> 
-cd ~ 
-# Uninstall existing pyadi, reinstall from source: 
-sudo pip3 uninstall -y pyadi-iio 
-git clone https://github.com/analogdevicesinc/pyadi-iio.git 
-cd pyadi-iio 
-git checkout cn0566_dev 
-sudo python3 setup.py install 
-</code> 
-</WRAP> 
- 
  
 //End of Document// //End of Document//
resources/eval/user-guides/circuits-from-the-lab/cn0566/quickstart.1682001907.txt.gz · Last modified: 20 Apr 2023 16:45 by Mark Thoren