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.
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
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).
Lots of variants, with a lot of people supporting it:
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:
Open source, but has very good capabilities. Very inexpensive, though.
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.
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.
As far as actual logic analyzers go (versus something like the Bus Pirate), I wrote a basic comparison of (relatively) inexpensive ones:
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).
A little more expensive ($389) than the ones mentioned so far, but very capable:
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.
Scanalogic 2 is, well, less expensive than many other logic analyzer, but it's worth the 59€ i think
For a logic analyser, I highly recommend the 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.
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.
The scanalogic is a simple but nice 4 channel logic analyzer.
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
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.
This answer is rather late for the original question, but a new product, and an excellent little device is the Gabotronics xminilab, ref:
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.