Book Image

Rapid BeagleBoard Prototyping with MATLAB and Simulink

Book Image

Rapid BeagleBoard Prototyping with MATLAB and Simulink

Overview of this book

As an open source embedded single-board computer with many standard interfaces, Beagleboard is ideal for building embedded audio/video systems to realize your practical ideas. The challenge is how to design and implement a good digital processing algorithm on Beagleboard quickly and easily without intensive low-level coding. Rapid BeagleBoard Prototyping with MATLAB and Simulink is a practical, hands-on guide providing you with a number of clear, step-by-step exercises which will help you take advantage of the power of Beagleboard and give you a good grounding in rapid prototyping techniques for your audio/video applications. Rapid BeagleBoard Prototyping with MATLAB and Simulink looks at rapid prototyping and how to apply these techniques to your audio/video applications with Beagleboard quickly and painlessly without intensive manual low-level coding. It will take you through a number of clear, practical recipes that will help you to take advantage of both the Beagleboard hardware platform and Matlab/Simulink signal processing. We will also take a look at building S-function blocks that work as hardware drivers and interfaces for Matlab/Simulink. This gives you more freedom to explore the full range of advantages provided by Beagleboard. By the end of this book, you will have a clear idea about Beagleboard and Matlab/Simulink rapid prototyping as well as how to develop voice recognition systems, motion detection systems with I/O access, and serial communication for your own applications such as a smart home.
Table of Contents (15 chapters)
Rapid BeagleBoard Prototyping with MATLAB and Simulink
About the Authors
About the Reviewers

Ideas for next-step projects

Armed with the knowledge and skills of rapid prototyping, you are now able to create exciting new applications to realize your unique ideas quickly.

Expanding the IR motion detector to include verbal alarms

We developed a music player in Chapter 4, Automatic Code Generation, and motion detection via the IR sensor in Chapter 5, Digital I/O and Serial Communication. We can now try combining them together to give verbal alarms when a motion is detected. If we have multiple IR sensors in different rooms, we may have the BeagleBoard speak out to tell us in which room a motion is detected.

Voice-controlled light switch

In Chapter 5, Digital I/O and Serial Communication, we learned how to control a digital I/O, and in Chapter 6, Voice Recognition, we learned how to switch on the user LED on a BeagleBoard by voice recognition. Controlling an LED was easy enough, but a table lamp requires high currents and voltages. With the extension board xM-Trainer (as shown in Chapter 5, Digital I/O and Serial Communication), we can build an additional power control circuit that controls high currents and voltages (that is, 230 V main supply to the table lamp) through a low voltage signal (that is, the GPIO output). Building such a power control switch is demonstrated at The core of the switch is a silicon-controlled switch (SCS, or referred to as thyristor) or a relay. A good introduction to relays can be found at, and you can buy a cheap single-channel relay for power control on sparkfun. Then replacing the LED block with a GPIO Write block in our voice recognition example, and connecting the GPIO to your power control switch, you will get a voice-controlled light switch.

Voice biometric authentication systems

Another application of the voice recognition system we developed in Chapter 6, Voice Recognition is speaker identification. This provides us with the technology to make a voice authentication system. The core of voice processing is almost ready; what you need is a better user interface for training and device controlling (for example, a magnetic switch controlling a door). Using voice biometrics to authenticate a person through natural voice patterns, not robotic PINs, passwords, and questions is a brand new user experience.

2D Ball tracking

For advanced image processing, tracking a ball (such as the Hawk-Eye system used in cricket, tennis, football, and so on) is an interesting task to start with. Hawk-Eye is an advanced commercial system for 3D tracking. It is too complicated and expensive, but we can start with a simple 2D ball tracking. We may find a lot of video processing algorithms at MATLAB File Exchange ( for free, and you can evaluate their performances using real hardware. A good example is the Kalman Filter demo for Ball Tracking ( The demo of C code generation for a MATLAB Kalman Filtering Algorithm ( would be helpful for implementing the Kalman filter on a BeagleBoard.

Gesture-controlled devices

Other interesting video applications of object tracking would be hand tracking and gesture control. Hewlett-Packard recently introduced a laptop with a built-in sensor that lets users control the onscreen action with hand gestures. You may create your own gesture control for your BeagleBoard. The Virtual Touch Screen project and American Sign Language Detection using PCA and LDA are freely available on MATLAB File Exchange. By integrating the source code of the aforementioned projects into your BeagleBoard rapid prototyping project, it is much easier and quicker to have your own gesture control system on your BeagleBoard.