26
votes
\$\begingroup\$

Can anyone recommend a low cost or DIY buildable logic analyzer?

Mostly, it would be for debugging serial protocols (SPI, I2C, RS232) at low voltages.

\$\endgroup\$
1
  • \$\begingroup\$ Shopping questions are closed! \$\endgroup\$ Oct 4, 2012 at 10:22

15 Answers 15

32
votes
\$\begingroup\$

The Bus Pirate is probably your best bet - open source software and hardware, easy to build if you don't mind SMT, cheap if you buy it assembled ($30 shipped worldwide).

http://code.google.com/p/the-bus-pirate/

Lots of variants, with a lot of people supporting it:

http://www.google.com/search?q=bus+pirate

The bus pirate is mostly useful for serial work, though it can do some small amount of simple logic analyzer functions. If you need to do a lot of logic analyzer work, this product looks very nice:

http://dangerousprototypes.com/open-logic-sniffer/

Open source, but has very good capabilities. Very inexpensive, though.

\$\endgroup\$
5
10
votes
\$\begingroup\$

Not sure if this matches your definition of low-cost but the Saleae Logic Pod is around $150. Eight channels and works well for decoding SPI and I2C. Haven't tried any other protocols.

The software is OK but the interface seems a little strange compared to an oscilloscope or real logic analyzer. On the website there was mention of an API definition so that you could write your software interface or scripted data collection. I haven't had time to look into this any further.

Not sure if the levels go negative for true RS232 work.

\$\endgroup\$
7
  • \$\begingroup\$ I haven't seen real RS232 in years, thankfully. The API idea appeals \$\endgroup\$ Mar 25, 2010 at 0:47
  • 1
    \$\begingroup\$ Do you mean the Saleae Logic Pod? saleae.com/logic \$\endgroup\$
    – Coleman
    Jun 15, 2010 at 17:54
  • \$\begingroup\$ That's the one. Sorry about the misspelling. Since March I have used the pod quite a bit to debug a uSD library. The device is worth the money but the software interface is awkward. I am not sure if other devices in the price range are any better. If I used this tool a lot I would look into writing my own interface. \$\endgroup\$
    – jluciani
    Jun 16, 2010 at 2:30
  • \$\begingroup\$ I use it almost daily for working with half-duplex RS-485. Personally, I like the interface compared to others in the price range. A different scope I've used is the USBee line of devices, but they're pricier for similar functionality. FWIW, they've migrated to more of a Saleae interface recently. \$\endgroup\$
    – Coleman
    Jun 16, 2010 at 15:06
  • \$\begingroup\$ The device is not RS232 level compatible. It uses 3.3V internally, but is 5V compatible so it'll work with most digital circuits. Not sure how far down it can go though, it would be nice to use it with 2.5V or even 1.8V stuff too. \$\endgroup\$ Mar 21, 2011 at 14:26
8
votes
\$\begingroup\$

There is the Sump.org logic analyser, using a low-cost ($99) Digilent Spartan 3 board.

For slow stuff like I2C and SPI, you could use a Microchip PICkit 2 ($35). It comes with three-channel logic analyser software.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Sump-spin-off: seeedstudio.com/depot/… (~43USD) \$\endgroup\$
    – hhh
    Jun 18, 2010 at 15:17
  • \$\begingroup\$ is sump.org outdated? There haven't been any recent updates. I'm wondering because I have the Spartan 3E starter board and would like to get some use out of it, and sump seems like a good option. But the port for the 3E hasn't been updated in a couple of years. EDIT -- ok, google is my friend: skippari.net/projects/?p=187 \$\endgroup\$
    – Dave
    Jan 4, 2011 at 14:31
7
votes
\$\begingroup\$

As far as actual logic analyzers go (versus something like the Bus Pirate), I wrote a basic comparison of (relatively) inexpensive ones:

Comparison of PC-based logic analyzers

One thing to note about sampling speed, a rule of thumb is you generally need at least 4x your data rate in order to get an accurate reading, and up to 10x is better. So if you want to monitor a 8MHz signal (which you can easily generate from an inexpensive AVR in SPI for example), you'd want a 32-80MHz sampling rate analyzer. This only applies when capturing in 'async' mode. If you are capturing in 'synchronous' mode (eg with a clock signal), then your sampling rate only needs to match the rate of the clock signal. So for example in that case, 8MHz synchronous sampling would be enough to capture a 8MHz SPI signal (since it has a dedicated clock signal).

\$\endgroup\$
5
votes
\$\begingroup\$

I stumbled across this at www.seeedstudio.com

Open Workbench Logic Sniffer (pre-order only)

I really don't know anything about it beyond their description. It might be worth looking into.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ It's based on the sump.org design I mentioned earlier. \$\endgroup\$ Mar 28, 2010 at 13:02
  • \$\begingroup\$ I've got one of these. The only real complaint I have is that you have to be really careful with your settings - if you set it up incorrectly (the software has NO idea what the limits on the board's buffer really are), you get garbage results with no warning. Otherwise it works like a charm. \$\endgroup\$ Dec 23, 2010 at 2:28
5
votes
\$\begingroup\$

A little more expensive ($389) than the ones mentioned so far, but very capable:

Logicport by Intronix

34 channels Adjustable logic threshold (+6V to -6V) I2C, SPI, RS232 and CAN interpreters

plus the software can be run in demo mode before you buy it.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I have one, they're excellent. Also, they have hardware compression, so you can get ~30 sec of sampling on two data lines, if the bus is quiescent for a while between packets. \$\endgroup\$ Aug 28, 2010 at 5:53
4
votes
\$\begingroup\$

The pickit2 has a simple logic analyzer (as well as a programmer for pic uC's and a UART tool)

\$\endgroup\$
2
  • \$\begingroup\$ Check out pk2-la if you're running linux + PICkit2 \$\endgroup\$
    – Marty
    Aug 26, 2010 at 19:41
  • \$\begingroup\$ This is true, but there are some quite nasty limits: It has only 3 (?) available channels and can only capture a small amount of data. The pickit 2 however is a nice tool overall, even it is only a crappy logic analyzer. \$\endgroup\$
    – 0x6d64
    Nov 25, 2011 at 8:53
4
votes
\$\begingroup\$

Scanalogic 2 is, well, less expensive than many other logic analyzer, but it's worth the 59€ i think

http://www.ikalogic.com/scanalogic2/

\$\endgroup\$
1
  • \$\begingroup\$ Absolutely. I really get a lot of use out of mine. Much easier to use for beginners than the Bus Pirate. \$\endgroup\$
    – user1307
    Oct 10, 2010 at 7:35
4
votes
\$\begingroup\$

For a logic analyser, I highly recommend the Saleae Logic.

Saleae Logic

There are two versions with 8 or 16 input channels. It can sample upto 24MHz or 50MHz depending on which one you buy. And the software can interpret the signals, allowing you to easily read I2C, SPI, CAN etc.

Saleae Logic Software

This has saved me, probably, hundreds of hours of my life. They aren't that expensive, especially considering how much time they save you. And the software works on Windows, Mac and Linux. Data can be exported to a a file, and there's even an API so you can write your own software for it if you really want.

\$\endgroup\$
6
  • \$\begingroup\$ Only 18 more for 10 k rep! (I hope you spent the hundreds of saved hours of your life in a useful way :-)) \$\endgroup\$
    – stevenvh
    Oct 4, 2012 at 8:09
  • \$\begingroup\$ @stevenvh - No I basically wasted all that time on, er, something else. \$\endgroup\$ Oct 4, 2012 at 8:10
  • \$\begingroup\$ looks slick but a bit pricey @ 150. How about Open Logic Analyzer? \$\endgroup\$
    – Ankit
    Oct 4, 2012 at 11:45
  • \$\begingroup\$ @Ankit - It's good, but only has a small memory. The Saleae Logic uses the PC memory, and can happily hold 10 billion samples. Cheaper though. It depends how much you value your time. \$\endgroup\$ Oct 4, 2012 at 13:19
  • \$\begingroup\$ @Rocketmagnet. On its page it says 16K sample depth @ 8 channels. So that means while using all the 8 channels I can capture 16K clock cycles per channel ? also whats the diff b/w async mode and sync mode? sorry for sounding like such a tool but I'm new to all this! \$\endgroup\$
    – Ankit
    Oct 4, 2012 at 16:44
3
votes
\$\begingroup\$

The scanalogic is a simple but nice 4 channel logic analyzer.

http://www.ikalogic.com/scanalogic_home.php

\$\endgroup\$
3
votes
\$\begingroup\$

What is also interesting is the open sourcing of the software to run the devices.

The bus pirate is on the list and coming along if you look at the commits for SiGrok

http://sigrok.org/wiki/Main_Page

\$\endgroup\$
2
votes
\$\begingroup\$

I use a BusBee. The hardware/software is very simple to use and it can log a lot of data. Works on many different protocols, but I typically use it for I2C.

http://www.usbee.com/busbee.html

\$\endgroup\$
1
vote
\$\begingroup\$

Open Workbench Logic Sniffer

I bought it and it works great, I'm not sure if they are still preorder but I think it is exactly what you're asking about. :D

\$\endgroup\$
3
  • \$\begingroup\$ I bought two, neither worked. Though, there's now a new firmware which uses SPI rather than rs232-ttl from the FPGA to PIC. But, the support from the forums is excellent. Not for the faint hearted! \$\endgroup\$ Jun 13, 2010 at 20:15
  • \$\begingroup\$ The software is now classed as "mature" and it's all a lot easier. \$\endgroup\$ Oct 10, 2010 at 0:10
  • \$\begingroup\$ I have both the Open Workbench Logic Sniffer and the Saleae Logic16. The Saleae is a better choice for most microcontroller development work. The Saleae streams data over USB rather than storing it. This means there is no limit on sample depth. The OWLS never seems to show enough data, although careful triggering can usually show events of interest. Saleae is less hassle to use, for sure. OWLS is a better choice for 50-150MHz signals, or sampling synchronously with an external clock. \$\endgroup\$
    – markrages
    Jan 17, 2012 at 22:17
1
vote
\$\begingroup\$

I use the logic analyser from saleae (http://www.saleae.com/home/). It's very good and works fine. It's priced at US$ 149.00.

\$\endgroup\$
1
vote
\$\begingroup\$

This answer is rather late for the original question, but a new product, and an excellent little device is the Gabotronics xminilab, ref:

http://www.gabotronics.com/development-boards/xmega-xminilab.htm

It is an analogue, two channel 'scope, a waveform generator, and an eight channel logic analyser/protocol sniffer (it shows not only the waveforms, but also the hex values on the channels). Sample rate is 2 MSPS, so it is only good for about 200kHz, but its cost at about $69 means you get all these features in one cheap package.

I have no connection with the firm except as the owner of a couple of the xminilab's smaller brother; the xprotolab, claimed to be the world's smallest ..., with a tiny screen, a novelty and fun, but you need the bigger screen of the xminilab for serious work.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.