1 (edited by Sourcerer 2015-06-23 06:12:45)

Topic: Oscilloscope

Since I was in need of one, I developed an oscilloscope for Novena today:
I created a plugin for osqoop (based on xobs work), which utilizes the GPBB (general purpose breakout board) analog input.
The resulting tarball can be retrieved here: http://www2.futureware.at/~philipp/osqoop-gpbb.tar.gz

Unfortunately, this solution has a few disadvantages:
* It can currently sample about 200 samples per second, osqoop requires 512 samples per update, so osqoop becomes a bit unresponsive. But I think this should be improveable.
* The input voltage range MUST BE from 0-5V, with 10 bit resolution, only positives voltages are handled, negative voltages are not handled. This is a hardware restriction, if you need a different range, you have to add some hardware circuitry to adapt the range.

BE CAREFUL, NOT TO ATTACH IT TO ANY HIGHER VOLTAGES OR EVEN REVERSE VOLTAGES! THIS CAN DAMAGE YOUR NOVENA!

Oh, and at the moment, you have to manually load the FPGA firmware for the gpbb before you start osqoop: sudo ./configure.sh novena_fpga.bit

So we have a starting point for further oscilloscope development on Novena:

There are 2 things where we should work on an improvement:
1. Making it fast
2. Perhaps switching to a better oscilloscope software (sigrok?)

Regarding 1:
Bunnie developed a hardware oscilloscope, and if I remember correctly I read somewhere that it was based on the gpbb design. There is the whole software-stack available for that hardware oscilloscop, and xobs developed a high-speed linux netlink API stack. (FPGA bitstream+kernel driver+userspace library + osqoop plugin)
Now my question is whether we can reuse that code for the gpbb again. What are the differences, and what (and if) has to be changed so that it works on a vanilla gpbb.
I guess that we will need a few change in the FPGA code, so that it retrieves the data from the ADCs on the GPBB and delivers the data to the netlink interface like it does on the oscilloscope, since they are likely completely different ADCs, or they are perhaps connected differently, I haven´t researched that yet.

Regarding 2:
I haven´t researched the sigrok API yet. Any other suggestions instead of sigrok?

Re: Oscilloscope

The DMA engine might be handy here for pulling samples out.  I was using memcpy() in the kernel.

An alternative may be to use the Industrial IO (IIO) kernel subsystem for this sort of thing.

Sigrok seems like a good approach, though I don't recall evaluating it when I was looking for a frontend.