Consulting Services
Hardware ToolsMicros

Hands-on Test: Saleae USB Logic Analyzer (24MHz 8CH Cheap Clone)

It has been more than one year when I ordered a clone of Saleae USB Logic Analyzer from Aliexpress for about $6. The cheapest original one costs more than $100. I know this should be the cost of development, and these cloning techniques is bad for companies that make their living from selling the hardware, but this is life (sorry Saleae team).

I always planned to try it, and this week I had the time for that. I would like to share with you a quick overview of this tool.

The Hardware

The package of Saleae Analyzer Clone contained the analyzer itself, a USB Cable and 10 Jumper Wires female-female.

Saleae Logic Analyzer Clone Package

The PCB inside the enclosure looks like this:

Saleae Logic Analyzer Clone PCB

The PCB is very simple. It contains:

  • CY7C68013A: A Microcontroller from Cypress with USB interface and 8051 microprocessor core.
  • AT24C01B: A 128 Byte serial EEPROM from ATMEL.
  • 74HC245: An Octal bus transceiver.

 Saleae-Logic Analyzer PCB Bottom
 Saleae-Logic-Analyzer-PCB-TopFrom Left to Right: AT24C01B, CY7C68013A and 74HC245

I always find it nice to understand some of the undergoing process behind the tool-chain of hardware and software. Firstly, you must know that CYC68013A MCU doesn’t have a Flash (non-volatile) memory, instead, the code is loaded into the internal RAM via USB or the EEPROM and while the EEPROM is 128 Byte, I was sure that the code is loaded from the USB. So the first interesting fact is that I basically bought only the PCB with no firmware inside. Secondly and apparently, the EEPROM contains some information related to the device as a USB device (VID, PID, .. etc). This information is important to make the clone tool look like the original one for the software tool (I mean the tool from Saleae). Here is an example output of lsusb -v command using Linux machine with the clone attached.

Bus 001 Device 032: ID 0925:3881 Lakeview Research Saleae Logic
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol       255 Vendor Specific Protocol
  bMaxPacketSize0        64
  idVendor           0x0925 Lakeview Research
  idProduct          0x3881 Saleae Logic

Thirdly, the Octal bus transceiver is to protect (I think) the “3.3-V operation with 5-V tolerant” inputs, where the inputs of the transceivers have clamping diodes.

You may find other clones. I’ve found a slightly different one in this article. In the same article, the writer introduces how to reach and change the EEPROM content without de-soldering it.

I should say by the end of this paragraph that maybe if I knew the first fact before buying this tool, I think I would buy a same function breakout board like this one!

Test Use Case

Just for the test, I will try to sniff the RX/TX lines of ESP8266 while uploading a firmware using Bootloader.

Saleae logic analyzer test circuit

Although the sniff can be done using some software sniffing tools, this is not my case.

The Software

sigrok Tool

A long time ago, I’ve heard about an open-source tool called sigrok and I wanted to give it a try. According to sigrok official definition it’s a project aims at creating a portable, cross-platform, Free/Libre/Open-Source signal analysis software suite that supports various device types

This tool is cross-platform, so choose what fits you. The most important parts of this project are (as a normal user):

  • sigrok-cli : The command-line client for the sigrok software.
  • PulseView : a Qt-based GUI for sigrok.
  • fx2lafw : an open-source firmware for Cypress FX2 (CY7C68013A uses FX2) that makes them usable as simple logic analyzer and/or oscilloscope.

 

Note: fxlafw will not be testing in this micro-blog, but Markus Zenspammer in the comments section mentioned fx2lafw and seems he tested it successfully.

 

After you download the tools and before running them, you should get the right firmware for this Saleae logic analyzer. As most firmware files are non-free and sigrok team don’t have the permission to (re-)distribute them. So you need to add it to the installed package manually. In our case, first, you need to download Saleae Logic official tool, then download the script files here. Now, put these scripts in the same directory of Logic tool and execute sigrok-fwextract-saleae-logic16 python script. The script will extract (from the “Logic” binary) the FX2 firmware. Finally, you need to move the output files to /sigrok-firmware directory (it’s /usr/share/sigrok-firmware on my machine). Here is an example of the process:

$ sigrok-fwextract-saleae-logic16 Logic
saved 5214 bytes to saleae-logic16-fx2.fw
saved 149516 bytes to saleae-logic16-fpga-18.bitstream
saved 149516 bytes to saleae-logic16-fpga-33.bitstream

 

Now you can run PulseView and connect to the analyzer.

sigrok pulseview connect

If you’re a bit curious like me, you can enable debug output messages from PulseView (pulseview -l 5) to see what’s happening in the background. This is an interesting debugging information.

sr: fx2lafw: fx2lafw: Closing device 0 on 1.26 interface 0.
sr: ezusb: uploading firmware to device on 1.33
sr: ezusb: setting CPU reset mode on...
sr: ezusb: Uploading firmware at /usr/share/sigrok-firmware/fx2lafw-saleae-logic.fw
sr: ezusb: Uploaded 4096 bytes
sr: ezusb: Uploaded 4024 bytes
sr: ezusb: Firmware upload done

Using PulseView is very straightforward; first you need to configure the frequency of sampling and the size, also you have 8 channels displayed and you can rename it from the numeric value to any meaningful name by clicking on the tag.

Sigrok pulseview

The last important cornerstone feature is the protocol decoder. You can add it from (decoders>add>UART). To configure the decoder you need to click on the decoder name tag shown in the margin. If you like to measure time exactly you can use the cursors (view>Show Cursors).

Note: Increase the samples size when you increase the sample rate. When I choose less than 1G samples with 1MHz rate the tool won’t run.

Saleae Logic

It’s the official software tool for Saleae’s products. The cloned version works well using it. I should admit, this tool is more user-friendly and has more features than sigrok tool. You can find a nice guide in Saleae’s website.

Saleae Logic UI

 

Last, try to read Markus Zenspammer handy comparison between Saleae and Sigrok project in the comments section.

Yahya Tawil

Embedded Hardware Engineer interested in open hardware and was born in the same year as Linux. Yahya is the editor-in-chief of Atadiat and believes in the importance of sharing free, practical, spam-free and high quality written content with others. His experience with Embedded Systems includes developing firmware with bare-metal C and Arduino, designing PCB&schematic and content creation.

2 Comments

  1. I think this article needs an update.
    It’s been years since I tried to run the Salaea software, because I’m so happy with Sigrok that I see no need to.
    Was this written in 2017-09-29 ?
    From one or 2 years before that there is an open source firmware for the Cypress processor which is part of the Sigrok project, called “fx2lafw”. This means there is no dependency anymore on copyrighted firmware.
    On my Debian box I have to install this part separately with: “sudo apt install sigrok-firmware-fx2lafw”.

    The Saleae software has extremely fast scrolling / zooming, and the protocol decoders are also a lot faster than in Sigrok.
    Zoom / Scrolling in Pulseview is … adequate, but the protocol decoders are pretty (sometimes even annoyingly) slow. But they are written in Python, and new protocol decoders get added almost every month. There are now (2018-10) already over a 100.
    From Z80 dissasembly and ARM debug protocols to simple stuff such as keeping track of the position of a stepper motor with Step and Direction interface.
    I also really like the way protocol decoders can be stacked. First you have a decoder for I2C, and on top of that you add a decoder for some specific EEprom or RTC chip or whatever your hardware is. This adds a lot of meaning to the bare squiggly lines that the logic analyser traces are without the decoders.

    I have to agree that Salaea “looks better” and “feels better”, (mostly because of the more responsive gui) but when it comes down to real usability, I think Pulseview is starting to win from the Salaea software. It uses the screen area more efficient ( Salaea has big unused areas left and right), but mostly because of the many protocol decoders.
    Sigrok / Pulseview also supports a wide range of other more capable Logic Analyser hardware.
    For around EUR 200 you can have hardware with 32 channels and sample rates upto 400Msps.

    Just for fun I grabbed some data from low-speed USB (1500kbps) with the CY7C68013A and Pulseview.
    In half an hour of toying with the USB protocol decoders I learned more about USB than by days of studying the USB specifications and firmware stack. And all with a EUR6 box from China and Open Source software.

    If you work with a lot of serial channels (uart, SPI, I2C, etc) in a project, then the 8 channels can be a bit limiting, but with a general purpose CY7C68013A development board you can have 16 channels. Those boards have no I/O protection, so I recommend to add your own.

    It also seems like Salaea has thrown in the towel for the “low end” market. They stopped selling the CY7C68013A box years ago, and their lowest cost product is now an USD 350 (Ex vat) box with 8 channels. On Adafruit the Logic8 is even listed at USD400. This is getting pretty near the price for a Siglent 4-channel oscilloscope with built in Logic analyser.

    1. I must say thanks for this informative comment! I will add a mention to it for sure.

      The purpose of this Micro-blog was not comparing between Salaea firmware/tool and Sigrok firmware/tool. It’s indeed only a quick walkthrough and hands-on testing of what’s entitled as “”Saleae”” USB Logic Analyzer clone. I tried to explain between lines that it’s not really a clone; it’s just a simple hardware that can run a certain firmware which could be Salaea firmware or even fx2lafw that you mentioned.

      Best

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button