Note: “BitScope DSO” is the software interface for the BitScope USB oscilloscope. This is totally different from the “Bitscope” package used to monitor digital audio in JACK Audio Connection Kit.
I have an old 2-channel analog oscilloscope, but it’s not very convenient and doesn’t have any storage capabilities, making it really difficult to measure transients or things that happen long after the trigger.
I looked around at different options and decided a USB scope would be nice to have. Since I’ve started using predominantly Ubuntu Linux at home, but Windows XP at work, I wanted something that would work in both operating systems. The BitScope seemed to be what I wanted, but is quite expensive, with even the cheapest pocket analyzer at $475. (My old analog scope was less than $50 on eBay.) With the help of a saved eBay search for “bitscope”, though, I eventually ended up finding one for 1/3 the normal price.
As is often the case with deals like this, the unit didn’t work when I got it.
The seller said it worked fine for him, so I poked around some more. I tried it in Windows and it didn’t work there, either. I went to Gnome System Log (/var/log/messages), and saw this among the messages it displays when I plug it in:
Jun 1 23:18:24 Inspiron kernel: [53398.974351] hub 1-0:1.0: over-current change on port 1
Aha. It’s drawing too much current from the USB bus and getting shut down. This is the sort of thing I develop at work, so I should (theoretically) know how to fix this. I found a compatible DC power supply (12 VDC, 800 mA, 2.5 mm center positive) and tried it with that, and it worked! It also worked when I first plugged it into the external supply, then plugged in the USB cable, and then disconnected the external supply. So it seemed like an inrush current problem rather than a short circuit/bus power problem.
(According to the USB spec, devices cannot draw more than 100 mA in an unconfigured state, except for a brief inrush current spike, but the amount of excess charge during that spike is limited to 50 µC. In other words, you aren’t allowed to put more than 10 µF across the VBUS line to ground. A lot of USB device manufacturers ignore these requirements, and most computers don’t care, but my Dell Inspiron 8600 seems to be especially picky.)
The BitScope website emphasizes the fact that it’s “open design hardware”, but there were no schematics for this unit on their web site, and the eBay purchase didn’t include a manual. So I wrote to the company and asked for help. They were very helpful, going so far as to scan in a manual and convert it to PDF for me:
The company told me there’s a “slow-start” circuit, but it’s more of a “delayed start”. While plugging in USB, the PWREN pin on the USB FIFO (FT245BM) is brought high immediately. This keeps the PMOS switch IRF7314Q open, so no current can flow from VBUS into the rest of the circuit. After initialization, the PWREN pin snaps low, opening the PMOS switch and connecting 47 µF directly across VBUS to ground. My computer doesn’t like this much current, and presumably shuts down the FIFO, evidenced by the PWREN pin going high again about 8 ms later. (Remember that I am just eyeing this up on an analog scope with no storage ability. Thankfully, Linux was kind enough to continually re-initialize the USB port, trying to connect and failing over and over again, so I didn’t have to keep plugging and unplugging the USB cable manually while holding the probes against the relevant pins.)
After realizing this, I decided I should try to make the FET open up a little more slowly so the current into the cap is not so high. So I connected a 1 µF cap (time constant of 10 ms) from the gate of the FET to ground. It worked! But when I looked at the system log, it was still showing the over-current error. In fact, it looked like it got the over-current error, shut down, re-initialized, and then started correctly, probably because the cap was still charged from the previous attempt. Then I realized what I had done. By putting the cap to ground, the FET was held closed during startup, so there was still an inrush spike while plugging in, instead of after initialization. So I connected the cap between the gate and VBUS instead:
Now the gate is pulled up instantly along with VBUS at plug-in, but when PWREN goes low, the FET gate voltage is slowly dropped down, so it doesn’t open fully until after ~10 ms. Now it works on bus power with the laptop, and doesn’t complain about over-current at all.
After getting the electronics working, I started up the DSO software.
You have to download and install kylixlibs3-borqt along with the BitScope DSO software or it won’t work. I used the BitScope-maintained kylixlibs3-borqt_3.0.2bs-1_i386.deb package from the download page. Other .deb files are available from the kylixlibs SourceForge site, but I don’t know if they work for this.
So then it continually popped up the .csv import screen, indicating that it can’t connect to the hardware. Eventually I figured out that I had the wrong thing entered in the configuration dialog. Press the SETUP button and put
/dev/ttyUSB0 in the IP Address or Port box under the Setup tab.
I had tried just
ttyUSB0 alone and it wasn’t working.
After getting it working, I made a Launcher for the main panel. Right-click Applications, click Edit Menus, go to the Other menu, press New Item.
I got the real icon out of the Windows version, which you can download directly here:
My body has a built-in signal generator: