|
|
Subscribe / Log in / New account

LinuxCon: Open hardware for open hardware

Benefits for LWN subscribers

The primary benefit from subscribing to LWN is helping to keep us publishing, but, beyond that, subscribers get immediate access to all site content and access to a number of extra site features. Please sign up today!

By Nathan Willis
September 12, 2012

Open hardware platforms like the Arduino have turned device development into a hobbyist enterprise in recent years, but the $20 price tag of a microcontroller board seems a lot less tantalizing when one adds in the costs of testing and debugging it. At LinuxCon 2012 in San Diego, David Anders addressed this issue and offered some guidance on finding and selecting tools for open hardware development, the majority of which are open hardware themselves.

Openness and tools

"Open hardware" can mean a variety of things, from expensive commercial products with published schematics and chip designs all the way down to one-off experiments and home-brewed devices built from cheap parts like the Arduino microcontroller board. What the various definitions have in common, however, is the sharing of information, which in turn lowers the barrier to entry for participants in the community. But despite the "maker" movement's popularity of late, the tools problem that accompanies it is rarely discussed. Reality is that the hardware to build rapid-prototyping and one-off projects may be cheap and plentiful — but the tools required to test and debug that hardware is expensive, specialized, and proprietary.

[Anders at LinuxCon]

For example, bench-top oscilloscopes start at $250 and can go up well into the hundreds of thousands of dollars. Logic analyzers start at around $1000. Even sticking with the low end, Anders said, buying a tool that costs ten or one hundred times the price of the device you are building takes some of the shine off of the process, particularly for someone who only needs to make hardware on infrequent occasions. Furthermore, the commercial versions of tools like the oscilloscope are designed for use by people like electrical engineers, and have a difficult learning curve.

On the subject of occasional use, Anders noted that although the maker and open hardware movements are often associated with non-professional settings (such as teaching young people about electronics or scratching one's own project-itch), they are proving to be a disruptive force in software circles as well. He spoke mostly about Arduinos and similar microcontroller boards, since they are the most popular flavor of amateur hardware development, but he made it clear that the same issues apply to most other projects, from sensors to embedded systems. Furthermore, he said, even if open hardware devices are not the issue at hand, most Linux and open source software developers will find themselves needing to build or debug a hardware device at some point.

Despite the high sticker prices of these devices in the commercial world, Anders said, science in general has a long history of developing and sharing open tools — dating at least as far back as Robert Bunsen's 1854 invention of the Bunsen burner, which he licensed for others to make as long as they adhered to his guidelines. Scientists have often documented their tools because their experiments require specialized equipment, he said, and sharing that part of the process is important for peer review and the ability to reproduce others' results.

In some ways, he said, open source software is a continuation of the same principle: developers build and share the tools needed to get work done. As open hardware has become more popular, a number of projects have started to develop the tools needed to analyze and debug devices — even if most of them are still under the radar.

Oscilloscopes

The first tool Anders looked at was the oscilloscope. The earliest versions of the tool drew graphs on paper tape, until CRT-based oscilloscopes took over in the 1950s — and the tool remained essentially unchanged for the next 50 years. It reads analog voltage signals, and displays the result as time-series data for analysis. Recent innovations have introduced updates, he said, like LCD screens, better portability, and built-in storage and analytics. But the core feature set remains the primary selling point; more expensive oscilloscopes justify their higher prices by supporting multiple inputs, higher sample rates, higher sample resolution, and larger frequency ranges.

With those factors in mind, Anders described three tiers of open hardware oscilloscopes to consider. The mid-range are based on PIC microcontrollers. There are about ten vendors on the market, he said, with the cheapest selling kits for $60. A typical example from Sparkfun offers 8-bit sample resolution, 1MHz bandwidth, and memory to store 256 samples. The device can grab screen captures of the signals it reads, and export them as bitmap images.

An even cheaper option is Atmel AVR-based oscilloscopes, which can be had for less than $30. Some AVR-based designs are assembled from off-the-shelf components, and are intended to be plugged directly into a breadboard. Consequently, at that price point they do not contain storage memory or an attached display, but both could be added. At the high end of the spectrum is the Nano-DSO, for around $100. The Nano-DSO is a commercial project, but it has open source firmware that can be modified and re-flashed. It offers a higher sampling resolution (12-bit) than the PIC-based units, but a narrower bandwidth (200KHz). However, it also includes a color LCD display, battery power, and a built-in signal generator.

Dedicated hardware is not the only option, however. Anders showed two open source software oscilloscopes, xoscillo and OsciPrime. Xoscillo runs on Linux, Windows, and Mac OS X, and can use commercial USB oscilloscope dongles or an Arduino (which has analog input pins built-in) to read signals. OsciPrime is an Android application, and can read signals from probes connected to the Android device's microphone port.

Logic analyzers

The logic analyzer is a tool that evolved from the oscilloscope, Anders said. Its purpose is not to monitor the shape of signals, but to analyze their timing — particularly to capture and decode digital signals. For that usage, they typically offer far more probes than an oscilloscope, which increases the cost. Commercial models cost thousands of dollars, an amount most people cannot see investing in their home projects.

The most do-it-yourself friendly option is the Open Bench Logic Sniffer, which can read 32 simultaneous input channels at up to 70MHz. The Open Bench Logic Sniffer can be found for around $50. The same company also offers the Logic Shrimp, a more modest model with four input channels and a 20MHz maximum sampling speed. The lower specifications make the Logic Shrimp a $35 tool, Anders said, but it is more than adequate for sampling I2C, SPI, RS-232, and other low-speed connections. Both are USB peripherals designed to be compatible with the open source SUMP analyzer software.

There are also several open hardware logic analyzer boards based on microcontrollers, including FX2-based models ranging in price from $20 to $150, MSP430-based models ranging from $25 to $35, and AVR-based models ranging from $35 to $50. Some of these latter options include built-in displays, but for the most part the open hardware logic analyzer community relies on PC-based software to display the signals and to decode the protocols within them.

The major player in open source logic analysis software is Sigrok, Anders said. It supports a wide range of hardware devices and is growing by leaps and bounds, he said, so it is worth keeping on the radar even if your hardware is not supported at the moment. One of Sigrok's major selling points is that it is easily extended. It provides an API for writing protocol decoders in Python, and the project maintains a lengthy list of protocols it understands. Even those protocols for which there is no decoder can still be captured as raw signals, of course.

In addition to Sigrok, the Logic Sniffer application is the other major open source software option. It was written to support the Open Bench Logic Sniffer (extending SUMP's feature set), but has expanded to cover additional hardware devices.

Other tools

Anders concluded the talk with a question-and-answer session that covered several other hardware tool topics. The Bus Pirate, for example, is a device designed to provide a serial port interface to a variety of chips, and even program serial ROMs. Anders said that he omitted the Bus Pirate from his main discussion because it is not primarily designed to perform oscilloscope or logic analyzer functions. It can be used to perform some of the same tasks, but it makes those tasks more difficult than do the other tools.

Similarly, when another audience member asked about JTAG tools, Anders observed that the are several open tools on the market. In addition, the Bus Pirate hardware can even be re-flashed with different firmware so that it functions as a JTAG interface.

Anders also alluded to support for automotive communication buses as a feature of Sigrok. Another member of the audience asked whether that support included Controller Area Network (CAN) bus, one of the leading automotive buses, and one for which PC interfaces are expensive. CAN bus uses differential logic, Anders explained, which requires a transceiver module to convert the signal into generic GPIO. However, the actual parts involved are not expensive, he said, so amateurs can build an interface that allows them to read CAN bus traffic with Sigrok.

Ultimately, Anders's talk only had enough time to conduct a survey of the available options for hardware development tools, rather than provide in-depth comparisons. But it was still a valuable session; most of the attendees at an event like LinuxCon come from the software realm — but as Anders said, most of them will (at one time or another) need to build or debug a hardware device. Having an alternative to the high prices of professional equipment is nice, but having an alternative that respects the same ideals as Linux and open source software is even better.


Index entries for this article
ConferenceLinuxCon North America/2012


(Log in to post comments)

LinuxCon: Open hardware for open hardware

Posted Sep 13, 2012 1:12 UTC (Thu) by jcm (subscriber, #18262) [Link]

I've got one of the Open Bench devices and have used it to sniff the JTAG protocol going between a flyswatter and a beagleboard.

LinuxCon: Open hardware for open hardware

Posted Sep 13, 2012 17:06 UTC (Thu) by prpplague (guest, #83092) [Link]

resources and references for the presentation are available at: http://elinux.org/LCNA-opentools

LinuxCon: Open hardware for open hardware

Posted Sep 13, 2012 17:43 UTC (Thu) by a0273237@ti.com (guest, #74346) [Link]

Looks like it was a great session Dave! Wish I could have been there.

I also use an Openbench Logic Sniffer with both the alternative java client and sigrok. It's used on an almost daily basis now as a part of my kernel devel work. This is infinitely more flexible than the software that comes with commercial tools such as Saleae...though one can run sigrok with Saleae's h/w...it has less capability than the cheaper OLS.

sigrok is easy to integrate into test scenarios...really useful in conjunction with ktest.pl.

LinuxCon: Open hardware for open hardware

Posted Sep 17, 2012 15:52 UTC (Mon) by daglwn (guest, #65432) [Link]

One thing sorely needed is open FPGA tools. Particularly the tools to create and transfer bitstreams to the device. Any progress in this area?

LinuxCon: Open hardware for open hardware

Posted Sep 18, 2012 2:05 UTC (Tue) by Trelane (subscriber, #56877) [Link]

I'm also quite interested in this. I intend to get into FPGAs for amateur radio, and I'm all-linux.

LinuxCon: Open hardware for open hardware

Posted Sep 19, 2012 6:05 UTC (Wed) by mmorrow (guest, #83845) [Link]

Yes, this is sorely needed, and I think the most important next step that FPGA manufacturers need to take.

What are the current impediments to this happening?

LinuxCon: Open hardware for open hardware

Posted Sep 19, 2012 6:12 UTC (Wed) by mmorrow (guest, #83845) [Link]

To clarify, in particular I'm referring to the documentation of their bitstream formats, in analogy with cpu ISAs.

FPGA tools

Posted Sep 24, 2012 13:12 UTC (Mon) by oldtomas (guest, #72579) [Link]

At some point, Xilinx seems to have had software for Linux:

<http://www.linuxjournal.com/article/6857>

There seems to be folks out there developing FPGAs under Linux

<http://www.polybus.com/linux_hardware/>

I know this is the "wrong way 'round", but some are running Linux *in* an FPGA:

<http://wiki.debian.org/FPGA/Xilinx>

This one seems to be a "no" to your question:

<http://www.ni.com/white-paper/12008/en>

All in all, it seems worth poking around. Just let us know your results ;-D

Oh, and this one seems promising too:

<http://hamsterworks.co.nz/mediawiki/index.php/FPGA_course>

FPGA tools

Posted Sep 27, 2012 23:34 UTC (Thu) by Trelane (subscriber, #56877) [Link]

Thanks for the links! indeed, a more linux journal article (http://m.linuxjournal.com/magazine/fpga-programming-linux) points at xilinx (http://www.xilinx.com/products/design-tools/ise-design-su...) whose webpack claims to support linux. So now to save up. :-)


Copyright © 2012, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds