Grabbing data from a Rigol 'scope with Python

While a fancy Rigol 1052E oscilloscope is a great tool and a wonderful portable oscilloscope we heartily recommend, sometimes you just need to use the more ‘advanced’ functions of an oscilloscope. Luckily, [cibomahto] figured out how to use a Rigol scope with Python, allowing for easy remote viewing and control of a Rigol 1052E ‘scope on any desktop computer.

[cibomahto]’s Python script grabs the screen and can send commands to the oscilloscope, effectively obviating the need for the slightly-terrible Rigol Ultrascope software. Not only that, controlling the 1052E is possible under OS X and Linux because of the portable Python nature of [cibomahto]’s work.

The Rigol DS1052E has become the de facto standard oscilloscope to grace the workbenches of makers and hackers around the globe. With a small price tag, the ability to double the bandwidth, and an active homebrew development scene, we doubt [cibomahto]’s work of grabbing data over USB will be the last hack we’ll see for this fine machine.

Thanks to [Markus] for sending this one in.

Adding speech control to an old robotic arm

[Joris Laurenssen] has been hanging onto this robotic arm for about twenty years. His most recent project uses some familiar tools to add voice control for each of the arm’s joints.

The arm has its own controller which connects via a DB-25 port. [Joris’] first task was to figure out what type of commands are being sent through the connection. He did some testing to establish the levels of the signals, then hooked up his Arduino and had it read out the values coming through the standard parallel connection. This let him quickly establish the simple ASCII character syntax used to command movement from the device. There’s only eight command sets, and it didn’t take much work to whip up a sketch that can now drive the device.

The second portion of the project is to use voice commands to push these parallel signals to the arm. Instead of reinventing the wheel he decided to use the speech recognition feature of his Android phone. He used Scripting Layer for Android (SL4A) and a Python script to interpret commands, push them to his computer via Telnet, and finally drive the arm. We’ve embedded the video demo after the break. He gives the commands in Dutch but he overlaid comments in English so you can tell what’s going on.

[Read more…]

Bringing a 19th century stock ticker into the 21st century

[Ames]’s father has had an old stock ticker sitting on a shelf for some time. He may have become quite listless over his spring break, because he decided connect a century-old stock ticker to his laptop.

When stock tickers were in use, they were all connected to a stock ticker circuit that would broadcast stock prices as a sequence of pulses. For each of these pulses, the letter wheel would advance by one character and finally print the letter with a great ca-thunk. Because stock tickers are incredibly simple devices – just a few solenoids and a couple of gears – [Ames] knew it would be relatively easy to connect one to his laptop.

[Ames]’ tool of choice for moving electrons back and forth in a wire is an Arduino, with none handy he needed to rig up something with the tools available on hand. [Ames] took a USB FTDI serial port connected the flow control lines to his ticker. A pair of MOSFETS and a tiny Python script advances the letter wheel and prints on the paper tape, a success by any measure.

After the break, you can see [Ames]’ stock ticker going about its antique machinations for the first time in possibly a hundred years. Not bad for a something put together over spring break.

[Read more…]

Reverse engineering an oscilloscope circumvents vendor crippleware

oscope-reverse-engineering

The crew over at the Hungarian Autonomous Center for Knowledge (H.A.C.K.) say they aren’t the most well-funded organization out there, so they were stoked when they found they could afford to bring a slightly used UNI-T UT2025B digital oscilloscope into the shop. As they started to tinker with it, the scope revealed one major shortcoming – screenshots were only accessible via a USB connection to a Windows computer.

Since they didn’t have any Windows boxes in house, [András Veres-Szentkirályi] decided he would try reverse-engineering the protocol so they could get access to this useful feature.

He set up a Windows VM, and using Wireshark on the host Linux box, [András] sniffed the data passing over the scope’s USB interface. He was able to identify what looked like image packets being sent to the VM, which he was able to decode using a small Python script. The resultant images were monochrome and they didn’t look quite right, but it was a start. As he dug further [András] found that he was overlooking some of the color data packed into the images, and after a bit of fiddling he got the sharp, colorful image you see above.

It turns out that while the scope has a monochrome LCD, it sends 16-bit color images over the USB interface – images that the Windows’ client degrades before displaying them on the screen. So in the end, he was not only able to get the scope working on any OS with the ability to run Python, he was able to grab far better images than the manufacturer ever intended – A very nice hack if we do say so.

Be sure to swing by the H.A.C.K. wiki as well as the project’s github repository if you have one of these scopes and are looking to wring some better images out of the hardware.

Simple hardware and Python drive this Splunk LED meter

Want to monitor the company system without continually loading up the Splunk dashboard? It turns out that they’ve got their own Python package which makes pulling down data a snap. All [Rick] needed to do was hook up an LED meter as an external display.

It used to be that this would take a lot of wire and bit of soldering (or some special Christmas lights), but the advent of affordable LED strips has really taken the guess-work out of it. He’s using an RGB version acquired from Adafruit Industries. These strips are driven using SPI and multiple-colors mean you can display multi-dimensional data using one column. He chose to use a Teensy microcontroller, grabbing some plastic packaging for welding rods as the enclosure. These strips are extremely bright and to help soften the impact he added wax paper to the inside of the enclosure to act as a diffuser.

Looking for more projects that use strips like this one? They make fantastic addressable accent lighting for your home.

Python PIC useful when attached to a computer

[Richard] sent in a link to the Python controlled microcontroller he’s been working on. Unlike the previous portable Python boards we’ve seen, [Richard] thinks his pyMCU isn’t best used autonomously. This board is meant to be used only when connected to a computer and to serve as a bridge between the digital world of computers and our analog world.

We’ve seen boards running lightweight Python interpreters, but we’re fairly intrigued by the idea of this board only being useful when plugged into a computer. The on-board PIC 16F chip has enough digital, analog and PWM pins to just about any task imaginable, and there’s also a 16-pin LCD display header if you’d like some output with your microcontrollers.

[Richard] says he’s been working with PICs for longer than the Arduino is around, but depending on the level of interest he’ll consider developing an Arduino version of the pyMCU. All we know is that the pyMCU would be awesome to teach electronics and programming to the younglings, and we could certainly find a few more uses for the board when they’re done with it.