This project is submitted for

Description

Three years ago, the BeagleLogic project showed how to use a BeagleBone as a 100MSa/s, 14-channel logic analyzer.

BeagleLogic Standalone is the next step in the evolution of BeagleLogic from just an add-on to the BeagleBone to a standalone logic analyzer in itself. It is based on the OSD3358 System-In-Package (SiP) from Octavo Systems and increases the specifications to 16-channels @100MSa/s and adds Gigabit Ethernet vs. 100Mbps on the BeagleBone(s).

BeagleLogic standalone is alive and booting! Check out the project logs for more information

Details

If you'd like to be informed when the first batch of BeagleLogic Standalone boards will be made available for purchase, please fill up this form. Thanks!

The challenge that this project addresses is to make connected instrumentation affordable (BeagleBone with the BeagleLogic cape is one of the cheapest yet feature-rich logic analyzer out there), enable remote debugging of hardware projects and provide an unconventional web-based user interface for the logic analyzer.

BeagleLogic is not just a Logic Analyzer but a full-featured Linux computer in the same package. BeagleLogic enables the user to not just capture logic data but also analyze them on the device itself as the powerful sigrok set of tools can run on top of the GNU/Linux OS running on the BeagleBoard hardware enabling in-situ protocol analysis, all on the BeagleLogic hardware itself.

BeagleLogic's web interface is the first of its kind ( as far as I am aware ) and will enable a much smoother out-of-the-box user experience than conventional logic analyzers. Today's browsers are very capable and with BeagleLogic I want to prove that a good web interface for a logic analyzer is both possible and achievable. Unfortunately the web interface that is currently available is very basic and could not be rebuilt in time for the competition, although this is high up on my priority list for the BeagleLogic project and I will make sure that this happens.

Implementation

To implement the BeagleLogic Standalone hardware I use the Octavo Systems' OSD3358 SIP [BeagleBone on a chip], as it incorporates all the essential components including the SoC, power management and DDR RAM and allows me to focus on the features I want to add.

1. Features

-> 16 logic channels @100MSa/s (vs max possible 14 on the BeagleBone)

-> Gigabit Ethernet Connectivity (vs max 100Mbps on the BeagleBone Black) via a Micrel KSZ9031 Gigabit PHY connected to the OSD3358 SiP. This will enable real-time sampling at higher rates than currently possible

I want to stress here that the 100Mbps link (either through Ethernet or USB - which is a little lower than 100Mbps) is a major bottleneck in getting data out of the BeagleBone. BeagleLogic can easily generate in excess of 100MB of data per second (that's 800Mbps!), and an interface that can get data out at the speed of 1000Mbps is a major improvement and should make sampling of 8 channels @100MSa/s in real time feasible.

USP: In-situ protocol analysis (through the sigrok suite of software), networking capabilities enabling remote debugging of hardware projects, and the web-based interface (first-of-its-kind for a logic analyzer) at a very attractive price point near to, or a little bit above $100.

Target Market: Makers, single-board-computer users (including the BeagleBoard and the Raspberry Pi) and beginner-to-intermediate level engineers looking for a capable and expandable logic analyzer on a budget.

Competitive Advantage: There are a few logic analyzers in the up-to $100 category, including the Dangerous...

For packaging the BeagleLogic standalone, I wanted to give the user a complete experience right from the unboxing to the first use. Hence I included everything a user might need to start using BeagleLogic. This includes a set of wires and probe clips, and a micro USB cable. The BeagleLogic standalone board itself is enclosed in a 3D printed case and already includes a microSD card inserted with the latest microSD image ready to boot.

Now that the core functionality of BeagleLogic Standalone was working alright, I wanted to have it in a case for aesthetical reasons. However I wanted the case to be open so that the buttons and LEDs are user accessible. Also I wanted the golden BeagleLogic logo to show :)

I prototyped the case in FreeCAD. After a couple of false starts, I got a good design in the 2nd iteration:

The board is supposed to be a snug fit all the way into the case, no fasteners or screws needed.

The first and the second iteration were 3D printed in PLA - the first revision used blue whereas the second revision used orange. This is iteration 1. The problems of this iteration were that there was not enough margin on the edges to compensate for variation in the board dimension, so the board would be too tight to fit in completely, and that the connector positions were slightly astray. Also the edges were too thick and without a recession, the connectors won't fit. These were fixed in rev 2, as you can see above.

This is iteration 2, with the BeagleLogic standalone board comfortably seated.

I posted about how BeagleLogic could now be used via the TCP backend. It involved writing a TCP server in NodeJS that ran on the BeagleBoard hardware (BeagleLogic standalone / BeagleBone(s)) .

However I soon realized that the NodeJS was a memory hog. After doing two large captures (100Msamples) with the BeagleLogic, I was left with < 50MB of free memory on the board! A few more captures and I was certain the board would have crashed. This wasn't going to be good.

I saw on my Twitter feed that someone had tweeted that "writing servers in Go is a pleasure". Well I had to write a server and fast. So I decided to write a prototype in Go and it was rolling in a few hours. I started in the afternoon, and by the evening I had data streaming out of BeagleLogic in Go. The memory footprint? A few MB, which was a significant improvement compared to the NodeJS counterpart. The best part? There's no difference to the end user, it's totally invisible.

Will I write more code in Go? I found the language interesting, even though I was writing this on a very tight schedule and had just a few moments to learn the language. I might write more code in Go, but I guess this would be all for now.

When I first booted the board, I booted it using the device tree sources for the PocketBeagle as a fail-safe as the board was not really booting until the second patch was applied to u-boot (see the previous log). Once I had the board booting with the second patch applied to u-boot, I switched to my own version of the device tree sources which can be found here, and booted the board with it. It booted successfully.

Once the device tree was in place, the next step was to verify whether all peripherals were appropriately recognized and there. One by one, I got the eMMC, USB Host, Gigabit Ethernet all working. The SPI Flash and RTC are the only peripherals that are currently untested and this is due to them being lower on the priority order right now.

Then the next step was to get BeagleLogic installed on this thing. I installed it, and it was successfully detected. And the moment of truth was to get some logic samples captured. Before I could do that I had to make some changes in the startup script of BeagleLogic so that the GPIOs that enable the 74LVCH16T245 logic buffer on the chip were set correctly.

After that, here are the results using PulseView:

The board captured its own UART serial console stream that was connected to the TX Pin on the 6-pin serial console header.

One more example I made was the board capturing an SPI stream at 24MHz which is the fastest signal the BeagleLogic standalone board can capture, at 100MSa/s (according to Nyquist, it's Fs/2 = 50MHz but because the rising and falling edges need to be captured, it becomes Fs/4). Here are the results:

All in all, this means that the board bring up was successful! No blue wiring needed. The logic inputs also happily took 5V without affecting the performance, so this was great too.

After I got the boards on the 4th of October, I set about getting them to boot. Robert Nelson provided the first set of patches into u-boot adding support for the BeagleLogic board (thanks Robert!). Even after the patches, the BeagleBoard u-boot bootloader expects a board ID in the on-board EEPROM of the SiP in order to recognize the board and boot it correctly. To program the EEPROM, the board needed to be booted. How to solve this chicken-and-egg situation?

There are two ways - (i) Write the EEPROM using u-boot and (ii) Apply a third patch to u-boot that causes the board to be recognized as a BeagleBone (the original, white one) and once booted, write the EEPROM from userspace. I chose the second option.

I got stuck after writing to the board EEPROM, the board refused to boot once the EEPROM was written to. I dug deeper and found that it was a voltage scaling issue, the voltages to the CPU were not getting set correctly causing the board to crash once control was handed over to the kernel from the bootloader. This led to a second set of patches that went into u-boot. That led to this:

Yes, the board booted. However the peripherals needed to be brought up. That will form the next project log.

Once the boards were ready from OSHPark, they were sent over to GHI Electronics for assembly on the 26th of September. GHI Electronics is also the manufacturer of the new PocketBeagle boards that uses the same OSD3358-SM SiP as BeagleLogic standalone does. Had it not been for them, I probably wouldn't have been able to get the boards back in time for the Best Product round.

They were kind enough to send a few pictures and videos of the boards undergoing the assembly process. Here are the pictures:

1. Bottom side, after solder paste application.

2. Bottom side, all parts placed

3. Bottom side, coming out of reflow

4. Top side, after application of solder paste

5. Top side, after Pick-n-Place

6. Top side coming out of reflow:

The boards were shipped to me on the 28th September, and I received them on the 4th of October. The wait was excruciatingly long, and I was brimming with excitement when I received them. More on the board bring-up in the next post!

Previously, in order to use the data generated from BeagleLogic and further analyze it, one had to:

SSH into the BeagleBone

Execute sigrok-cli to capture data

Get the data out of the BeagleBone using SCP/SFTP/FTP

View the data/further process it using PulseView , the official GUI client for sigrok.

Complicated, right? Not anymore.

With the new BeagleLogic TCP Server and TCP client for BeagleLogic in sigrok, one can now directly visualize the data in PulseView on the PC itself by connecting to a local or remote BeagleLogic. All you need is the IP address of the BeagleLogic, and you're set.

Here's a video of the thing in action:

How this works is that there is a TCP server runs on the BeagleLogic (written in Node.JS, code can be viewed here) and serves data to sigrok running on the PulseView GUI that acts as a desktop client. I've written a TCP backend for the BeagleLogic driver in sigrok that connects to the BeagleLogic server and retrieves logic data.

And now, regarding the BeagleLogic standalone build, all the components have arrived, just waiting for the PCBs to arrive before assembly commences. GHI Electronics, LLC will be building the first prototype units of BeagleLogic, and I can't wait in excitement to have the first units of BeagleLogic Standalone in my hands by the end of next week!

hi Abhishek, I'd be keen on trying to get an add-on board for the standalone board. I need high speed daq and have played interestingly with a raspberry one to reach 24Msps https://hackaday.io/project/20455-20msps-adc-raspberrypi-extension-bomanz. Reading this bbb standalone board makes me think to do a high speed adc board. Reaching, and streaming as you mention 100msps at 8 bit (or just getting 2 channels, or one at 16bit, but not streaming it) would definitely be of interest to me. Let's keep in touch, and let me know when you release prototypes :)