Open source electronics project: Oscilloscope

No readers like this yet.
If you want a culture of collaboration, you need to accept the LOLCats too

Opensource.com

A couple of years ago, I needed an oscilloscope for a fun electronics project I was working on: a 500W Tesla coil. I'd already spent quite a bit of money importing a kit of parts for the project from the United States, so the budget for the scope was pretty tight.

I also had a demanding requirements list: the scope needed to have at least two channels, support better than 1MS/sec resolution, and ideally sport some sort of spectrum analyzer and function generator (for determining the frequency characteristics of the coil without having to measure waveforms on the screen). A new scope with the features I wanted was completely out of budget, and searching around the usual auction sites turned up lots of broken and "needs a little attention" units with the kind of spec I was after, but nothing I could pick up and use right away.


View the complete collection of Open Science Week articles

I'd just spent ten days working until the early hours on my project, so the last thing I wanted to do was start another "fix-er-up" job just to complete the testing! After giving up on another round of searching for a secondhand scope, my eyes settled on the OLPC XO laptop sitting on the back of my workbench. This is a dinky little ARM-based laptop running a Fedora-based distro that was produced by the One Laptop Per Child project. The screen is about the same size as a high-end digital storage scope and that got me thinking. More searching around, and I eventually came across the Syscomp Circuitgear CGR-101, a USB AD/DA and IO box and software package claiming to offer a 20MS/sec oscilloscope, function generator, network analyzer, noise generator, programmable digital IO, PWM outputs, and more, for a retail price of under $200. Wow. The real killer though? The software that drives it is licensed under the GPL.

It was a little more than I'd planned to spend, but I'd be kidding myself if I claimed I could resist an offer like that! After patiently waiting out the delivery (it took all of a week to arrive!), I ripped the box open like a kid at Christmas and dived straight in. Within minutes I had the TCL/TK GUI installed on the XO but for some reason it wasn't recognising the CGR-101 attached to the USB port. No problem: it's open source. A few minutes browsing the source in vim, and I'd hacked up a fix to get me running. In less than 20 minutes, I was attaching probes to the Tesla coil primary circuit and grinning like a mad professor. The OLPC-o-Scope was born.

Everyone who's used open source for a while has come across occasions where they had to choose between features and a desirable license, and even though I've been involved in open source since the late '90s and lucky enough to work at Red Hat for the last 10 years, I was amazed at how functional the funky looking pile of cables and boxes I'd assembled was. Even ignoring the ability to hack on the scope's software, I had something more capable than the hardware solutions on sale for 3-4 times the price. Getting on with the testing, I soon ran into some niggles with the spectrum analyzer module. It didn't give me quite the options I wanted in order to measure the behaviour of the coil's secondary circuit. Another trip to vim, and I soon had something that while not pretty let me use the hardware the way that I wanted. With my electronics skills there would have been no way that I could achieve the same flexibility with a hardware unit. Not only that but I had an awesome new toy in my collection that as well as helping me hack other things was itself a great platform for creative experimentation.

Syscomp has since released a 'mini' version of the CGR-101 for around half the cost of its big brother, making it an even more appealing instrument for people interested in projects where the digital and analog worlds meet. I eventually measured the coil's resonant frequency at around 226kHZ—right around the predicted value for its design parameters.

See photos and videos of the coil in operation. And, the schematics and notes are available on git.errorists.org.

View the complete collection of stories for Open Science Week.

Dodgy looking bearded Welshman.
Bryn M. Reeves | An open source engineer with a passion for storage, support, seriously high voltages and sliding around in Land Rovers.

3 Comments

Hi Bryan,
just installed my CGR-101 (again, after a crash), and it displays something like: "cannot open port", and (after manual selection of <cu.ttyCGT...> I get the message that the port might be in use. Same error as the one you stumbled upon? If
so, what did you do? I am running this on a MAC 10.6.8. (It did work a year back, when I last used it, pretty fine).

The problem I was having was down to device naming - I think it was fixed in a later version of the Syscomp software but let me check when I'm at home (I don't have the OLPC to hand right now).

If you get a chance to check the exact error message you were seeing that could be helpful.

In reply to by lutz bickhardt (not verified)

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.