Lynsyn Lite: Difference between revisions

From SundanceWiki
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 23: Line 23:
Full information on the Lynsyn Lite can be found here:
Full information on the Lynsyn Lite can be found here:
https://github.com/EECS-NTNU/lynsyn-host-software/wiki
https://github.com/EECS-NTNU/lynsyn-host-software/wiki
== Hardware Setup ==
=== Power Measurement setup ===
Connect the NEGATIVE (GND) from both the power supply '''AND''' the unit under test to GND.<br>
Connect Positive '''FROM''' the power supply to S1+ (or S2+ or S3+).<br>
Connect Positive '''TO''' the unit under test to S1- (or S2- or S3-).<br>
(If they are the wrong way round, you will view some strange current readings.)<br>
[[File:Lynsyn power measurement connections.png|frame|left|Lynsyn power measurement connections]]
<div style="clear: both"></div>
=== JTAG setup ===
An adaptor needed to convert the 0.1” header on the Lynsyn Lite to the standard 2mm JTAG cable.<br>
It is included in the box. Both connections are keyed meaning it should be hard to get it the wrong way round.<br>
[[File:Lynsyn JTAG connection.png|frame|left|Lynsyn JTAG connection]]
<div style="clear: both"></div>
=== Power for the Lynsyn Lite ===
The Lynsyn  Lit is powered using the same MicroUSB port that is used for communication.<br>
It's in the bottom left corner of the module.<br>
[[File:Lynsyn Lite power and comms.png|frame|left|Lynsyn Lite power and comms]]
<div style="clear: both"></div>


== Software Setup ==
== Software Setup ==
Line 226: Line 247:


== Using the Lynsyn Lite as an AMD/Xilinx JTAG Cable ==
== Using the Lynsyn Lite as an AMD/Xilinx JTAG Cable ==
<p>
This example is for a Xilinx ZU3 FPGA with a built in ARM core.
<p>
<ol>
<li>
Open Vivado and select “Open Hardware Manager”<br>
[[File:Vivado open hardware manager.png|frame|left|Vivado open hardware manager]]
<div style="clear: both"></div>
</li>
<li>
Start the Open New Target wizard: “'''Tools''' -> '''Open new Target'''”<br>
Press “'''Next'''” on the first screen.<br>
On the next screen, ensure that '''Local Server''' is selected. Press "'''Next'''".<br>
[[File:HWManager localserver.png|frame|left|Vivado Hardware manager - Local server]]<br>
<div style="clear: both"></div>
</li>
<li>
The next screen will look blank, this is OK.<br>
Press the "'''Add Xilinx Virtual Cable (XVC)'''" button.<br>
[[File:HWManager Add XVC.png|frame|left|Add Xilinx Virtual Cable]]<br>
<div style="clear: both"></div>
In the box that pops up, set the host name to “'''localhost'''”.  Leave the port as '''2542'''.<br>
[[File:HWManager XVC settings.png|frame|left|Virtual Cable Settings]]
<div style="clear: both"></div>
Press '''OK'''.<br>
The wizard then connects to the Lynsyn Lite and checks what is connected.<br>
[[File:HWManager XVC good result.png|frame|left|Virtual Cable: Good Result]]
<div style="clear: both"></div>
It should show like above, where there is a hardware target listed, and two hardware devices show, the xczu3 and the arm core.<br>
Press "'''Next'''", then "'''Finish'''".<br>
It will then connect and refresh the devices. You can now use it as normal.<br>
[[File:Vivado Connected devices.png|frame|left|Vivado Connected devices]]
<div style="clear: both"></div>
</li>

Latest revision as of 11:38, 1 November 2024

About

The Lynsyn Lite is a dual-purpose card for both power measurement and JTAG communications.

It can monitor voltage and current on three independent sensors, with voltage ranges between 0V and 23V and currents between 0A and 5A.

By default, and as supplied for the V3.1 hardware, the sensors are set to be as the table below:

Current Sensor ranges.
Sensor Current Range Shunt Resistor Shunt Size
S1 0 - 5 Amps R4 0.025 Ohms
S2 0 - 2.5 Amps R5 0.05 Ohms
S3 0 – 1.25 Amps R6 0.1 Ohms

When in doubt, use S1 as it has the largest current range, but for developments where the current draw is known to be within the lower ranges these would be better to use as they would give a more detailed view of currents drawn at different times.

Full information on the Lynsyn Lite can be found here: https://github.com/EECS-NTNU/lynsyn-host-software/wiki

Hardware Setup

Power Measurement setup

Connect the NEGATIVE (GND) from both the power supply AND the unit under test to GND.
Connect Positive FROM the power supply to S1+ (or S2+ or S3+).
Connect Positive TO the unit under test to S1- (or S2- or S3-).
(If they are the wrong way round, you will view some strange current readings.)

Lynsyn power measurement connections

JTAG setup

An adaptor needed to convert the 0.1” header on the Lynsyn Lite to the standard 2mm JTAG cable.
It is included in the box. Both connections are keyed meaning it should be hard to get it the wrong way round.

Lynsyn JTAG connection

Power for the Lynsyn Lite

The Lynsyn Lit is powered using the same MicroUSB port that is used for communication.
It's in the bottom left corner of the module.

Lynsyn Lite power and comms

Software Setup

Windows

(https://github.com/EECS-NTNU/lynsyn-host-software/wiki/Installing-on-Windows)

  1. Download the pre-built binaries (executables) of the Lynsyn tools. These can be found here:
    DOWNLOAD LYNSYN TOOLS V1.3 LINK
    (https://github.com/EECS-NTNU/lynsyn-host-software/releases)
  2. Unzip the tools to a location on your computer.
    The software tools are not installed and are just run from within this folder so it can be anywhere,
    but for ease of use we would suggest C:\lynsyn\.
  3. Install the driver for the card.
    1. Connect the Lynsyn Lite to your PC. It gets power over the MicroUSB connection.

    2. Open the Zadig application. Your PC may ask if you want to run it (UAC), you do.
      It should pop up like this:

      zadig application

    3. From the “Options” menu, select “List All Devices”.

      Zadig ListAll

    4. The drop-down box in the middle of the application will now be populated. Open this and select the Lynsyn.

      Zadig Select Lynsyn

    5. Press the button to Install / Reinstall driver.

    6. This may take a few minutes, please wait till you see the pop up saying that the driver was successfully installed:

      Zadig Instal Done

The Lynsyn Lite should now be ready to use.

Linux

As there are many variations of Linux, this guide is for Ubuntu 22.04.

  1. Open a terminal window and update and upgrade
    sudo apt-get update && sudo apt-get upgrade
  2. Install the required dependencies for the Lynsyn project.
    sudo apt install build-essential qtbase5-dev libqt5sql5-sqlite libusb-1.0-0-dev git dbus-x11
  3. Clone the GitHub repository to your machine.
    git clone https://github.com/EECS-NTNU/lynsyn-host-software.git
  4. Go to the cloned directory
    cd lynsyn-host-software/
  5. Run the make (Just type “make” – no inverted commas) file to compile the software. It will look like a lot has gone wrong, but as long as it says “Host software compilation successful” at the end, you are OK.
    make
  6. Install the made software by running this command:
    sudo make install Again, it will say a lot, but as long as it shows “Host software compilation successful” and “Software and hardware installed” it is all OK.

You have now built the software packages required for the Lynsyn Lite.

Running the Power Measurement Tools

Windows

Recording a Session

From the command line
  1. Open a command prompt window and navigate to C:\Lynsyn (or wherever you saved the tools earlier)
  2. To start logging a session you need to use the lynsyn_sampler application.
    Lynsyn sampler windows


    For this simple example we will be just setting to run the application for a 30 second session and saving the data to the default “output.csv” file. To run it for longer or shorter, just change the number at the end.
    WARNING – These files can get large fast. This 30 second sample is around 63Mb.
    The format for this is:
    lynsyn_sampler -d 30

    Running the Sampler for 30 Seconds

    Once finished you will get the command line prompt back.

From the GUI

From the Lynsyn folder you created, launch the “lynsyn_viewer.exe” application.
In the top left corner there are two buttons, “Profile” and “Live

Lynsyn viewer Profile and live

Pressing the “Live” button brings up a box showing what is happening NOW:

Lynsyn viewer LIVE
Lynsyn viewer LIVE

The “Profile” button brings up a box in which you select the length of the sampling you wish to have.
Pressing OK starts the sampling. When complete, “Profiling Done” is shown and the new set of samples are shown in the graph.

Next to these two buttons are three dropdown lists. One selects the parameter shown (Current, Voltage or Power), the second selects which sensor.
In our example, the third is un-used.
You can interact with the graph using your mouse. If you draw a box round a section (left button), it will zoom in. Left clicking will show the values at that point.
Right clicking will zoom out again.

Lynsyn viewer Profile graph

To save this data, go to “File” then “Export CSV.”

Viewing a Session if Recorded from the Command Line or from a Previous Save

If you recorded the session via the command line, from the Lynsyn folder you created, launch the “lynsyn_viewer.exe” application.

When opening it will display the previous result by default. To load the latest set of sampled data, go to “File” then “import CSV.

Lynsyn viewer import

Select the file (by default it has “output.csv”) and press OK.
After a few moments it should say “Import Done” and a graph of the recorded session will be shown.

Lynsyn viewer Profile graph

You can interact with the graph using your mouse. If you draw a box round a section (left button), it will zoom in. Left clicking will show the values at that point. Right clicking will zoom out again.

LINUX

Recording a Session

From the command line
  1. Open a terminal window. As you got, built and installed the files previously, you don't need to be in a specific folder to run the applications.
  2. To start logging a session you need to use the lynsyn_sampler application.
    Lynsyn sampler windows


    For this simple example we will be just setting to run the application for a 30 second session and saving the data to the default “output.csv” file. To run it for longer or shorter, just change the number at the end.
    WARNING – These files can get large fast. This 30 second sample is around 63Mb
    You need to be sudo so the computer can interact with the Lynsyn Lite.
    .
    The format for this is:
    sudo lynsyn_sampler -d 30

    Running the Sampler for 30 Seconds

    Once finished you will get the command line prompt back.

From the GUI

Open a terminal window and type:
sudo lynsyn_viewer
You need to be sudo for the computer to interact with the Lynsyn Lite.
This will launch the Lynsyn Viewer application.
Once loaded, in the top left corner there are two buttons, “Profile” and “Live

Lynsyn viewer Profile and live

Pressing the “Live” button brings up a box showing what is happening NOW:

Lynsyn viewer LIVE
Lynsyn viewer LIVE

The “Profile” button brings up a box in which you select the length of the sampling you wish to have.
Pressing OK starts the sampling. When complete, “Profiling Done” is shown and the new set of samples are shown in the graph.

Next to these two buttons are three dropdown lists. One selects the parameter shown (Current, Voltage or Power), the second selects which sensor.
In our example, the third is un-used.
You can interact with the graph using your mouse. If you draw a box round a section (left button), it will zoom in. Left clicking will show the values at that point.
Right clicking will zoom out again.

Lynsyn viewer Profile graph

To save this data, go to “File” then “Export CSV.”

Viewing a Session if Recorded from the Command Line or from a Previous Save

If you recorded the session via the command line and wish to view the results, launch the “lynsyn_viewer” application sudo lynsyn_viewer.

When opening it will display the previous result by default. To load the latest set of sampled data, go to “File” then “import CSV.

Lynsyn viewer import

Select the file (by default it has “output.csv”) and press OK.
After a few moments it should say “Import Done” and a graph of the recorded session will be shown.

Lynsyn viewer Profile graph

You can interact with the graph using your mouse. If you draw a box round a section (left button), it will zoom in. Left clicking will show the values at that point. Right clicking will zoom out again.

Using the Lynsyn Lite as an AMD/Xilinx JTAG Cable - Before launching any AMD / Xilinx tools

Windows

From the Lynsyn folder run “lynsyn_xvc.exe
Windows Firewall may ask if you want to allow this application. Press Allow.
Without that running in the background, the lynsyn will not work as a JTAG pod. Do not close this window.

LINUX

From the terminal run “sudo lynsyn_xvc
Without that running in the background, the lynsyn will not work as a JTAG pod. Do not close this window.

Lynsyn xvc running

Using the Lynsyn Lite as an AMD/Xilinx JTAG Cable

This example is for a Xilinx ZU3 FPGA with a built in ARM core.

  1. Open Vivado and select “Open Hardware Manager”
    Vivado open hardware manager
  2. Start the Open New Target wizard: “Tools -> Open new Target
    Press “Next” on the first screen.
    On the next screen, ensure that Local Server is selected. Press "Next".
    Vivado Hardware manager - Local server

  3. The next screen will look blank, this is OK.
    Press the "Add Xilinx Virtual Cable (XVC)" button.
    Add Xilinx Virtual Cable

    In the box that pops up, set the host name to “localhost”. Leave the port as 2542.

    Virtual Cable Settings

    Press OK.
    The wizard then connects to the Lynsyn Lite and checks what is connected.

    Virtual Cable: Good Result

    It should show like above, where there is a hardware target listed, and two hardware devices show, the xczu3 and the arm core.
    Press "Next", then "Finish".
    It will then connect and refresh the devices. You can now use it as normal.

    Vivado Connected devices