Real World Instrumentation with Python
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