Rapid BeagleBoard Prototyping with MATLAB and Simulink

By Dr Xuewu Dai , Dr Fei Qin
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Introducing BeagleBoard

About 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.

Publication date:
October 2013
Publisher
Packt
Pages
152
ISBN
9781849696043

 

Chapter 1. Introducing BeagleBoard

This chapter provides an overview of this book and serves as an introduction to the BeagleBoard and rapid prototyping.

We'll first have a quick overview of what we will explore in this book, followed by a brief look at the features of BeagleBoard (with focus on the latest xM version) —an open source hardware platform borne for audio, video, and digital signal processing. Then we will introduce the concept of rapid prototyping and explain what we can do with the BeagleBoard support tools from MATLAB® and Simulink® by MathWorks®. Finally, this chapter ends with a summary.

Different from most approaches that involve coding and compiling at a Linux PC and require intensive manual configuration in command-line manner, the rapid prototyping approach presented in this book is a Windows-based approach that features a Windows PC for embedded software development through user-friendly graphic interaction and relieves the developer from intensive coding so that you can concentrate on your application and algorithms and have the BeagleBoard run your inspiration.

First of all, let's begin with a quick overview of this book.

 

A quick overview of this book


In this book, we will go through a number of exciting projects to demonstrate how to build a prototype of an embedded audio, video, and digital signal processing system rapidly without intensive programming and coding. The main contents of this book and projects include:

  • Install Linux for BeagleBoard from a Windows PC

  • Developing C/C++ with Eclipse on a Windows PC

  • Automatic embedded code generation for BeagleBoard

  • Serial communication and digital I/O application: Infrared motion detector

  • Audio application: voice recognition

  • Video application: motion detection

By completing each chapter in the book, you will understand the workflow of building an embedded system. You will learn about setting up the development environment, writing software at a host PC running Microsoft Windows, and compiling the code for standalone ARM-executables at the BeagleBoard running Linux. Then you will learn the skills of rapid prototyping embedded audio and video systems via the BeagleBoard support tools from Simulink by MathWorks.

The main features of the techniques presented in this book are

  • Open source hardware

  • A Windows-based friendly development environment

  • Rapid prototyping and easy learning without intensive coding

These features will save you from intensive coding and will also relieve the pressure on you to build an embedded audio/video processing system without learning the complicated embedded Linux. The rapid prototyping techniques presented allow you to concentrate on your brilliant concept and algorithm design, rather than being distracted by the complicated embedded system and low-level manual programming. This is beneficial for students and academics who are primarily interested in the development of audio/video processing algorithms, and want to build an embedded prototype for proof-of-concept quickly.

 

BeagleBoard-xM


BeagleBoard, the brainchild of a small group of Texas Instruments (TI) engineers and volunteers, is a pocket-sized, low-cost, fan-less, single-board computer containing TI Open Multimedia Application Platform 3 (OMAP3) System on a chip (SoC) processor, which integrates a 1 GHz ARM core and a TI's Digital Signal Processor (DSP) together. Since many consumer electronics devices nowadays run some form of embedded Linux-based environment and usually are on an ARM-based platform, the BeagleBoard was proposed as an inexpensive development kit for hobbyists, academics, and professionals for high-performance, ARM-based embedded system learning and evaluation. As an open hardware embedded computer with open source software development in mind, the BeagleBoard was created for audio, video, and digital signal processing with the purpose of meeting the demands of those who want to get involved with embedded system development and build their own embedded devices or solutions.

Furthermore, by utilizing standard interfaces, the BeagleBoard comes with all of the expandability of today's desktop machines. The developers can easily bring their own peripherals and turn the pocket-sized BeagleBoard into a single-board computer with many additional features.

The following figure shows the PCB layout and major components of the latest xM version of the BeagleBoard. The BeagleBoard-xM (referred to as BeagleBoard in this book unless specified otherwise) is an 8.25 x 8.25cm (3.25" x 3.25") circuit board that includes the following components:

  • CPU: TI's DM3730 processor, which houses a 1 GHz ARM Cortex-A8 superscalar core and a TI's C64x+ DSP core. The power of the 32-bit ARM and C64+ DSP, plus a large amount of onboard DDR RAM arm the BeagleBoard with the capacity to deal with computational intensive tasks, such as audio and video processing.

  • Memory: 512 MB MDDR SDRAM working 166MHz. The processor and the 512 MB RAM comes in a .44 mm (Package on Package) POP package, where the memory is mounted on top of the processor.

  • microSD card slot: being provided as a means for the main nonvolatile memory. The SD cards are where we install our operating system and will act as a hard disk. The BeagleBoard is shipped with a 4GB microSD card containing factory-validated software (actually, an Angstrom distribution of embedded Linux tailored for BeagleBoard). Of course, this storage can be easily expanded by using, for example, an USB portable hard drive.

  • USB2.0 On-The-Go (OTG) mini port: This port can be used as a communication link to a host PC and the power source deriving power from the PC over the USB cable.

  • 4-port USB-2.0 hub: These four USB Type A connectors with full LS/FS/HS support. Each port can provide power on/off control and up to 500 mA as long as the input DC to the BeagleBoard is at least 3 A.

  • RS232 port: A single RS232 port via UART3 of DM3730 processor is provided by a DB9 connector on BeagleBoard-xM. A USB-to-serial cable can be plugged directly into the DB9 connector. By default, when the BeagleBoard boots, system information will be sent to the RS232 port and you can log in to the BeagleBoard through it.

  • 10/100 M Ethernet: The Ethernet port features auto-MDIX, which works for both crossover cable and straight-through cable.

  • Stereo audio output and input: BeagleBoard has a hardware accelerated audio encoding and decoding (CODEC) chip and provides stereo in and out ports via two 3.5 mm jacks to support external audio devices, such as headphones, powered speakers, and microphones (either stereo or mono).

  • Video interfaces: It includes S-video and Digital Visual Interface (DVI)-D output, LCD port, a Camera port.

  • Joint Test Action Group (JTAG) connector: reset button, a user button, and many developer-friendly expansion connectors. The user button can be used as an application button.

To get going, we need to power the BeagleBoard by either the USB OTG mini port, which just provides current of up to 500 mA to run the board alone, or a 5V power source to run with external peripherals. The BeagleBoard boots from the microSD card once the power is on. Various alternative software images are available on the BeagleBoard website, so we can replace the factory default images and have the BeagleBoard run with many other popular embedded operating systems (like Andria and Windows CE). The off-the-shelf expansion via standard interfaces on the BeagleBoard allows developers to choose various components and operating systems they prefer to build their own embedded solutions or a desktop-like system as shown below:

 

BeagleBoard for rapid prototyping


A rapid prototyping approach allows you to quickly create a working implementation of your proof-of-concept and verify your audio or video applications on hardware early, which overcomes barriers in the design-implementation-validation loops and helps you find the right solution for your applications. Rapid prototyping not only reduces the development time from concept to product, but also allows you to identify defects and mistakes in system and algorithm design at an early stage. Prototyping your concept and evaluating its performance on a target hardware platform gives you confidence in your design, and promotes its success in applications.

The powerful BeagleBoard equipped with many standard interfaces provides a good hardware platform for rapid embedded system prototyping. On the other hand, the rapid prototyping tool, the BeagleBoard Support from Simulink package, provided by MathWorks with graphic user interface (GUI) allows developers to easily implement their concept and algorithm graphically in Simulink, and then directly run the algorithms at the BeagleBoard. In short, you design algorithms in MATLAB/Simulink and see them perform as a standalone application on the BeagleBoard. In this way, you can concentrate on your brilliant concept and algorithm design, rather than being distracted by the complicated embedded system and low-level manual programming.

The prototyping tool reduces the steep learning curve of embedded systems and helps hobbyists, students, and academics who have a great idea, but have little background knowledge of embedded systems. This feature is particularly useful to those who want to build a prototype of their applications in a short time.

MathWorks introduced the BeagleBoard support package for rapid prototyping in 2010. Since the release of MATLAB 2012a, support for the BeagleBoard-xM has been integrated into Simulink and is also available in the student version of MATLAB and Simulink. Your rapid prototyping starts with modeling your systems and implementing algorithms in MATLAB and Simulink. From your models, you can automatically generate algorithmic C code along with processor-specific, real-time scheduling code and peripheral drivers, and run them as standalone executables on embedded processors in real time. The following steps provide an overview of the work flow for BeagleBoard rapid prototyping in MATLAB/Simulink:

  1. Create algorithms for various applications in Simulink and MATLAB with a user-friendly GUI. The applications can be audio processing (for example, digital amplifiers), computer vision applications (for example, object tracking), control systems (for example, flight control), and so on.

  2. Verify and improve the algorithm work by simulation. With intensive simulation, it is expected that most defects, errors, and mistakes in algorithms will be identified. Then the algorithms are easily modified and updated to fix the identified issues.

  3. Run the algorithms as standalone applications on the BeagleBoard.

  4. Interactive parameter turning, signal monitoring, and performance optimization of applications running on the BeagleBoard.

 

Summary


In this chapter, we have familiarized ourselves with the BeagleBoard and rapid prototyping by using MATLAB/Simulink. We have also looked at the features of the rapid prototyping we are going to explore in this book and the basic steps in rapid prototyping in MATLAB/Simulink.

With this in mind, we will get started on our first project— setting up the BeagleBoard-xM.

About the Authors

  • Dr Xuewu Dai

    Dr Xuewu Dai graduated (BEng) in Electronic Engineering and received his MSc in Computer Science, both from the Southwest University, Chongqing, China, in 1999 and 2003, respectively, and completed his PhD study at the School of Electrical and Electronic Engineering, University of Manchester, in 2008. He joined the School of Electronic and Information Engineering, Southwest University, as a Lecturer Assistant in 2002 and did research projects at University College London and University of Oxford. As a researcher and R&D engineer in signal processing and dynamic system modeling, he has over 10 years' experience in MATLAB/Simulink simulation and embedded software development. More recently, he has been actively involved in wireless sensor actuator networks for various research and industrial projects (such as condition monitoring of aircraft engines, buildings, DFIG wind generators, CAN field-bus for SCADA, and optic sensors for water quality monitoring).

    Browse publications by this author
  • Dr Fei Qin

    Dr Fei Qin is currently an Assistant Professor in the Department of Electronic and Communications, University of Chinese Academy of Science, Beijing, China. He received his PhD degree from University College London, UK, in 2012. Prior to the start of his PhD, he was working for Crossbow Technology, Beijing Rep. Office as a Sr Application Engineer. He has been working on the development of embedded systems for many different products and applications for almost ten years, including wireless network, sensor, and radar systems.

    Browse publications by this author
Book Title
Access this book, plus 7,500 other titles for FREE
Access now