Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Mike Riley

Dr. Dobb's Bloggers

Real World Instrumentation with Python

November 26, 2010

Computers are at their best when interacting with the world around them, whether that be via a network connection or a sensor or actuator of some sort. How well does this new book written by embedded systems engineer John Hughes capture the essentials of programmatic instrumentation? Read on to find out.Nearly a quarter of the book is spent on introducing the concept of data acquisition, basic electronics and brief tutorial chapters on learning the Python and C languages. Chapters 6 and 7 set the stage with a discussion of the essential tools and the types of physical interfaces connecting measurement and actuating devices (of which "old doesn't mean bad") to computational machines.

Things don't get really rolling until Chapter 8, aptly titled "Getting Started". The standard list of project definition, requirements, design, testing, implementing and documenting an instrumentation project are reviewed. Chapter 9 offers a quick review of basic control system concepts and how to implement these in Python. The next four chapters are really what the book is all about, from building simulators in Python to acquiring instrumentation data I/O, and reading and writing out that data to ASCII or binary files. Finally, the author instructs readers on best practices for building user interfaces in Python (via console-based text to ugly Tkinter and more attractive wxPython GUI's) to interpret and visualize all that data flow information. The book concludes with a chapter on the author's own real-world implementations via serial port and USB data conduits. Readers interested in following the author's footsteps should be prepared to spend a couple hundred dollars on a good RS-232 digital multimeter (DMM) and the LabJack U3 USB data acquisition and control devices (although given the rising popularity of USB data analysis, an evaluation of the increasingly popular Total Phase Beagle USB 480 Protocol Analyzer would have been ideal). The book contains two appendixes on FOSS resources and a list of equipment sources respectively.

One overlooked opportunity was showing examples using the showcase of the open hardware microcontroller world, the Arduino Uno. Given the number of interesting control programs that people have posted on blogs, websites like Instructables and videos of their work on YouTube. It's also too bad that the author released the book just weeks before Limor Fried, a.k.a. Ladyada of Adafruit fame released her guide on hacking the Microsoft Kinect using Python, a Beagle USB480 logic analyzer and a handful of open source tools and libraries.

And while the omission of Arduino examples is a downer, the fact that the author has a resume of experience that most aeronautic-oriented software developers could only dream makes him well qualified to write about the subject matter. How many other O'Reilly authors can claim to have written software for the Phoenix Mars Lander and the James Webb Space Telescope?

Overall, the book offers a self-contained foundation to learn, explore and write applications that collect and process data from simple and not so simple control systems. The code is digestible, especially for the experienced C and Python programmer, and the writing is densely packed with plenty of new concepts and abbreviations. DMM, GPIB, SCPI, VISA and VXIbus are just a sample of such, and the ones I demonstrated all came from the same page in the book! If you have started working with or have an interest in taking the next step toward machine-driven data collection and making sense of the information that transacts between physical interfaces, Real World Instrumentation with Python can offer readers a great primer and a notable head start.

Title: Real World Instrumentation with Python Authors: John M. Hughes Publisher: O'Reilly Media ISBN: 978-0-596-80958-4 Pages: 624 Price: $43.99

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.