Picoscope 2208B MSO Review

There are few tools that are essential for an electronics hobbyist. When I started, I had a soldering iron, a multimeter and some components, and that was about it. That got me quite far because you can do simple debugging even with a multimeter, but once you start to do any communications, you will either work in the dark or get a signal analyzer, oscilloscope, or both. I reached that point about 9 months into my hobby, and eventually decided to get an entry-level PicoScope from Picotech. You can read the whole story from my PicoScope 2204 review from four years ago.

Long story short, I was extremely happy with my Picoscope, and I’ve been using Picotech’s products ever since in various projects. In the past years, I’ve also been collaborating with Picotech, so I’ve had the chance to use also their higher end models, including the frighteningly powerful 4-channel, 200 MHz, 16 bit PicoScope 5444B, which is really great but maybe even too hefty for my use. So when I was offered the chance to try out Picotech’s latest generation of their entry-level 2000 series published just a month ago, I was immediately in.

Without further ado, let’s get reviewing!

PicoScope 2000 series overview

The new PicoScope 2000 series is divided into roughly two groups of equipment: The entry models 2204 and 2205 range in price from 139€ for the 10 MHz 2-channel 2204A to 419€ 2205A and 2405A which are 25 MHz and have MSO (mixed-signal oscilloscope, i.e. it has 16 channel digital part as well) capability and 4-channels, respectively. Don’t let the low bandwith confuse you, even these models have sampling rates ranging from 100 MS/s to 500 MS/s, so you will get quite a lot of measuring power out of them.

Biggest limitation with 2204 and 2205 models is the buffer size, which ranges from 8 kS to 48 kS, so for longer captures than a few waveforms, only option is the continuous capture over USB which worked at a steady rate of 1 MS/s the last time I used it. So you can do unlimited capturing of signals around 100 kHz, but above that it’s the normal oscilloscope triggering business — that’s the way scopes have always worked from their beginnings, so it gets the job done as well.

  2204 2205 2206 2207 2208
Bandwith 10 MHz 20 MHz 50 MHz 70 MHz 100 MHz
Sample rate 100 MS/s 200 MS/s 500 MS/s 1000 MS/s 1000 MS/s
Resolution * 8 bit 8 bit 8 bit 8 bit 8 bit
Memory 8 kS 16 kS (48 kS w. MSO/4ch) 32 MS 64 MS 128 MS
Price (2015-22-05) 139 € 209 € 319 € 459 € 629 €
Options MSO or 4ch MSO or 4ch MSO or 4ch MSO or 4ch

*) Resolution for repeating signals can be increased to 12 bit with multiple samples
Continue reading Picoscope 2208B MSO Review

IR signal recorder with Arduino Uno

I’ve been tinkering with IR and the TSOP38238 IR receiver modules I got from Adafruit and Sparkfun. That’s right, plural, as I burned the first one — be REALLY sure not to mix ground and VCC with this one! I ordered 10 more from AliExpress just to make sure I have spares in case I burn my second one as well…

There are IR libraries for Arduino already, but they were a bit complex to my taste, as I’m first planning just to record one IR code from my bulky Sony projector remote and make a small trinket to send that on button press. The TSOP382 already demodulates the signal, so I just want to record the times the remote IR led is on, off, on, off, and so on. So I made an Arduino sketch to do just that: Count loop cycles, detect when signal goes from high (no IR signal detected) to low and vice versa:
Continue reading IR signal recorder with Arduino Uno

BeagleBone Black GPIO Benchmark

Look what the mailman brought: It’s a shiny (or maybe matte?) BeagleBone Black, freshly arrived (actually it’s been over a month, but time sure flies…) from Newark element14! I’ve been doing Raspberry Pi related hacking for a while, but especially when the Pi was still fresh and new, I did from time to time consider if the grass would be greener on other side of the fence. Or blacker, in this case, as I mean BeagleBone Black.

BeagleBone was long very much more powerful than Raspberry Pi, but now that Pi2 has come out, price and specification-wise they are closer than ever. A quick personal comparison chart:

  BeagleBone Black Raspberry Pi 2 (B)
Price 46 € (Element14) 32 € (Element14)
Processor 1GHz single-core Cortex-A8 0.9GHz quad-core Cortex-A7
Memory 512MB DDR3 1GB
Connections USB host, USB device, micro-HDMI 4x USB, HDMI, 3.5mm Audio/analog video
GPIO 2x 46 pin headers (65 digital I/O) 40 GPIO pins (26 digital I/O)
Other 4GB integrated flash, works as USB device camera and display interface on board

When Pi1 was out, the BeagleBone Black with the more modern Cortex-A8 chip and higher clockrate was definitely the more powerful, but now with 4-core Pi2, the tables have somewhat turned. Still, the clockrate is higher and there’s more GPIO. And speaking of GPIO, my Raspberry Pi vs. Pi2 GPIO benchmark has gotten a lot of interest, so I thought the best way to take this black beauty for a test drive would be to benchmark BeagleBone Black GPIO in a similar way.

Test setup

Test bench

The test subject is the most recent revision C of BeagleBone Black. I followed the (a bit lacking in detail and readability) Getting Started guide and downloaded the latest Debian Jessie image (8.3, 2016-01-24), flashed it to card and ran apt-get update and apt-get dist-upgrade (2016-04-14).
Continue reading BeagleBone Black GPIO Benchmark

RedBear Duo First Impressions

Look what a little beauty the mailman brought! I participated the Red Bear Duo Kickstarter Campaign a while ago, and the folks at Redbear did a really professional job in delivering on the promises of that campaign.

Headline features include ARM Cortex M3 120 MHz microcontroller with plenty of RAM and flash, and of course dual WiFi and Bluetooth connectivity. Setting up the Duo was quite simple by following the instructions provided, once I realized I’ll need to use the Zadig tool as instructed in this sub-howto (Redbear guys: I think 4-5 separate pages to get one started on Windows is something that might be optimized), I got the firmware updated and everything set up. Basic outline of my installation was about this:

  1. Plug in the board and see LEDs light up
  2. Try to install the serial driver, only to realize I already had working serial (I probably have all usb serial drivers between heaven and earth installed due to encounters with various devboards)
  3. Connect to COM6, 9600 with Putty to verify it works as it should, note down device ID
  4. Install dfu-util, and wonder why I cannot connect to the device, even with the yellow LED (looked more like yellow-green though) was blinking as it should
  5. Use Zadig tool to install drivers when in DFU mode
  6. Successfully update firmware and stuff
  7. Reboot the board a couple of times and connect with Putty to COM6 to see the IP address
  8. Visit the IP address to see the LED demo is working as it should! Nice!

Particle.io Cloud Programming

Once I had the basics figured out, I wanted to try out the Particle.io cloud development platform. It seems like an Arduino on cloud steroids, meaning that instead of flashing the device over USB cable, you write the software in a web interface, and flashing the device will upload the sketch to your device using the active wifi connection on Redbear Duo (I believe the device is periodically polling Particle.io service to see if there is a new sketch to download).
Continue reading RedBear Duo First Impressions

USB Mouse with ATmega32U4 Pro Micro Clone and LUFA

I have spent a fair amount of time with 8-bit AVR microcontrollers and one of the cooler things has been the V-USB library which implements low-speed USB with clever (and very time-critical) bit-banging. The popularity of my USB tutorials is a testament to its usefulness, and I’ve gotten lots of mileage out of that.

There are, however, some limitations to software USB with such a low spec microcontroller. USB communication hogs up the MCU completely during USB communication, which means you lose dozens of microseconds in random (or in many cases 8 ms) intervals. This rules out things like software UART at reasonable speeds (which I discovered when trying to implement MIDI on Adafruit Trinket). And more powerful ATmega328-based dev boards like Pro Trinket start to get quite large.

ProMicro on a breadboard

Not so with this tiny beauty shown in the image. It’s a ATmega32U4 based board, where the U4 means it has hardware USB support. The form factor is extremely compact 12 pin header length, which leaves 5 rows free on the smallest prototyping breadboards. That means you can have a DIP8 component with a few resistors on the same breadboard (such as a 6N137 optocoupler which is nice for MIDI… ;).

And the best part is, that because the chip is flashed with same firmware used in Arduino Leonardo (and a largely matching pinout), you can use Arduino for programming, and avrdude supports it out of the box.

Actually, scratch the above statement. The best part is the price. The board is based on Sparkfun Pro Micro 16 MHz, but it’s actually a Chinese clone, which you can get for $4 via DealExtreme and from quite many places in AliExpress: Just search for ATmega32U4 and they will come up. This means you can just order five and solder them into whatever project you’ll make permanently. And unlike Arduino Micro (for which clones exist as well), this has the micro-USB port already in place.

Using Pro Micro without Arduino IDE

Now you can just follow SparkFun’s instructions on how to use that thing on Arduino (short version: select Leonardo as board type, and look up the schematic if you are unsure which pins are connected to LEDs, etc.). But if you’re like me and want to get to raw metal, avr-gcc and avrdude is the way to go. Here’s a simple blinky demo:
Continue reading USB Mouse with ATmega32U4 Pro Micro Clone and LUFA

MIDI to USB Adapter with Teensy LC

Among my recent electronics purchase spree was the amazing Teensy LC from PJRC. It has a nice ARM Cortex-M0+ processor, real hardware USB, and what’s the nicest part, an Arduino add-on called Teensyduino which enables easy programming with Arduino, but with support for many of the hardware features.

Now I started playing piano a while ago, and just a few weeks ago bought a Pianoteq license to send notes via MIDI to my computer, and render high quality piano sound to speakers. However, it turns out my $8 USB-MIDI adapter from DealExtreme had a less than perfect implementation, essentially changing pedal events into “note on” events!

Thankfully, I had a MIDI connector and a high-speed optocoupler at hand, and with these I could implement a MIDI in rather easily. After some investigation with Arduino Uno, it seemed quite simple to receive the serial MIDI bytes and dump them over Arduino serial (I’ll write another post about this later).

However, Arduino cannot become a USB MIDI device very easily, so here comes the really nice part: Teensy LC can, and the Teensyduino add-on included a working USB MIDI and also serial MIDI libraries!

The Hardware

The Wikipedia page for MIDI essentially shows the required circuitry for receiving MIDI data – wire the DIN cable pins 4 and 5 through the receiving side of optocoupler and put a 200 ohm resistor in series with it. A diode is also suggested for reverse current (ESD) protection, but I skipped that. You can start with a LED instead of optocoupler to see it lights up if you’re unsure you have pins 4 and 5 the right way. Or just put the LED (with a resistor) on the other side of the optocoupler first.

The HCPL-2531 I had at hand requires an additional VCC connection on the sending side. After some experimentation, a 4k7 ohm pullup resistor between VCC and VO1 (NPN-transistor base?) gave the cleanest signal out. The wiring diagram (thanks Diptrace!) is shown below:

Teensy LC MIDI schematic
Continue reading MIDI to USB Adapter with Teensy LC

Adafruit Trinket USB keyboard without Arduino

Happy New Year 2016! After a long hiatus in electronics, I have been quite busy in the last month or so. I have a bigger (USB MIDI related) project posting coming up, but just wanted share a small nugget already.

I ordered a big chunk of things recently from Adafruit shop and Sparkfun. Among them was the lovely Adafruit Trinket (which actually came as a free bonus because I spent way too much on black friday :).

Now I am planning a project which involves transforming the very compact, but already USB-enabled Trinket into a USB MIDI device. However, there are two problems:

  1. Adafruit examples for USB come in Arduino form
  2. There are no USB MIDI examples

I somewhat dislike the high-level Arduino environment in cases where low-level performance is needed (and the V-USB implementation is one of those places), and for my later MIDI part, I will need fine-grained control to juggle serial communication and USB. Also, all USB MIDI examples are on “bare metal”, so the Adafruit example Arduino code would require deeper knowledge of Arduino inner workings than I have.

Time to do some chopping!

Slimming Down the TrinketKeyboard Example

I decided to adapt the excellent base code in Adafruit Trinket USB GitHub repository, but trim the keyboard example to bare essentials (my next step will be to transform it into a USB MIDI device, so the less code I have to adapt, the better). Turns out this was quite simple to do:
Continue reading Adafruit Trinket USB keyboard without Arduino

Simple X Audio Switch (Double-Y)

I’ve had a small problem over a year: I have two headphone amplifiers, a transistor-based O2 headphone amp, and a tube-based Little Dot MKII. I also have two sets of headsets. Because switching the cables all the time is somewhat tedious, I haven’t really used the other amp and headphone set.

There are several Y switches that you can buy, but most seemed either expensive or mostly tailored towards electric guitar enthusiasts. And I would still need to combine two Y switches to toggle between the two amps and headphones. As the construction is really simple, I decided to solder my own. Here’s a short tutorial on how to make one yourself. You’ll need:

  1. 4 audio connectors (I chose 3.5mm over RCA), two to each end
  2. 2 switches with at least 3 connectors (left, right, ground) – I chose two 4 way switches
  3. A box where you can drill holes for the connectors and switches
  4. Small length of wire, some solder and soldering iron

1. The Schematic

Audio X switch schematic

The design of the switch is extremely simple. In both ends, three wires come from each of the two connectors to a switch, and the switches are connected to each other. I chose not to combine any ground lines to avoid ground loops. You need also to select a switch which breaks the connection on one side before connecting the other so the amplifiers will not feed into each other.

2. Soldering the wires

Despite the simple construction, there is a lot of soldering involved. Each of the four connectors will have ground plus left and right channels, and all have the switch on the other end. That makes 24 solder points (4x3x2), and there’s six more between the switches for a total of 30 points. The 3.5mm connectors had small “L” and “R” markings to tell which channel is left and which is right. I used different colors of wires for each type to avoid mixing L, R and ground.

Continue reading Simple X Audio Switch (Double-Y)

Giving Raspberry Pi Camera Nearsight with Reading Glasses

Raspberry Pi with Reading Glasses

Back again! The summer holidays gave me some time to write after a long hiatus, and this time it’s a Raspberry Pi related article. I’ve had the excellent opportunity to play around with a Raspberry Pi Camera Module for a few days. Or actually modules, as I got both the normal and NoIR without IR filter (more about that later) from Farnell / Element 14. They also stock an excellent selection of Pi accessories, so be sure to check those out, too.

But without further ado, let’s get onward. I’m still thinking up cool projects to do with the camera, so if you have nice ideas, please feel free to share them in the comments section!

Unboxing and First Impressions

Raspberry Pi IR camera and a normal one

The camera modules arrived in simple boxes, branded with element14 logo and URL. A nice additional touch was an included instruction sheet outlining the installation procedure, as well as a link to www.element14.com/picamera with further info.

Both the IR-filtered (the one showing normal visible light) and the NoIR (the one without the filter, and thus showing both normal light AND infrared) have exact same outward appearance. The installation was quite easy, but the flat cable offers less positioning and flexing freedom that your standard webcam – obviously the Pi camera is meant for more integrated installations.

Raspberry Pi camera electronics
Continue reading Giving Raspberry Pi Camera Nearsight with Reading Glasses

Picoscope Beta for Linux

Picoscope for Linux

Tux logo by Larry Ewing, Simon Budig, Anja Gerwinski

I’ve been a big fan of Picotech’s USB connected PC oscilloscopes ever since I purchased my first PicoScope 2204 almost two years ago. I liked the compact form factor on my desk a lot, and the powerful Picoscope software for Windows – Picotech makes only one version of this software so you get the same functionality with a £159 ($260) 2204 scope as a £5,995 ($9,900) PicoScope 6407 user would – although of course the scope features would be wildly different.

Now Picoscope is a great piece of Windows software and as I generally use Win7 to avoid reboots every time I want to use Photoshop or play a session of Mass Effect, it’s been perfect for me. However, quite a few of electronics enthusiasts are also big advocates of open software movement, and while Picotech has had drivers and SDK for Linux for a while to implement things like my realtime composite decoder, the fact that there is no Linux version of the oscilloscope software has been unfortunate. So when I noticed in the latest Picotech newsletter that there is now a beta of Picoscope for Linux, I knew I had to take it for a spin.

Installing Picoscope on Linux Mint 15

Picotech’s installation process is built on apt packaging system, so a Debian-based Linux distro is the easiest installation target. This includes the wildly popular Ubuntu and Linux Mint distros, which means mainstream Linux users are well catered to. In Picotech forums, the beta thread had at least one user who extracted necessary stuff from the .deb packages and installed the software for Fedora, too.

In Debian-based Mint, the installation went without any hiccups just by following the instructions at Picotech’s Linux Drivers page. Note that sudo apt-get install picoscope also installs all drivers so you don’t need to install your model-specific driver separately. Essentially the installation is just:

sudo echo deb http://labs.picotech.com/debian picoscope main >> /etc/apt/sources.list
wget -O - http://labs.picotech.com/debian/dists/picoscope/Release.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install picoscope

Continue reading Picoscope Beta for Linux