Professional Documents
Culture Documents
Applied Project-Based Learning - Building Applications For Low-Cost Hardware
Applied Project-Based Learning - Building Applications For Low-Cost Hardware
Solutions
Academ ia
Support
Events
Com pany
Newsletters
New sletters Technical Articles Cleve's Corner Collection
Contact sales
Share
Receive the latest MATLAB and Simulink technical articles. Subscribe to new sletters
Project-based learning is a comprehensive teaching and learning approach that engages students in the investigation of authentic engineering problems 1. To make this approach effective, the teacher must identify a problem that is accessible but challenging enough to stimulate the learning process. Unfortunately, many hardware applications are too complex, distracting students from the real task with low-level hardware issues. MATLAB and Simulink address this challenge by making it easy for students to implement their projects on low-cost hardware platforms. This article describes three project-based learning activities that demonstrate the range of approaches and skills that can be taught with MATLAB and Simulink.
Related Resources Webinars Examples User Stories New sroom Books Latest Blogs
Using dbstop if error and conditional breakpoints to debug MATLAB 3 saat nce Creating Driver Blocks for Arduino, Lego, and other targets 07 Nis 2013 LINPACK Benchmark, Pros and Cons 07 Nis 2013
www.mathworks.com/company/newsletters/articles/applied-project-based-learning-building-applications-for-low-cost-hardware.html?s_eid=PSM_3997
1/4
08 04 2013
Figure 1. Arduino Blink Challenge Simulink model ready for deployment on the board.
They can download a set of libraries, examples, and documentation to help them deploy their models on different hardware platforms, including Arduino (UNO and MEGA 2560), LEGO MINDSTORMS NXT, BeagleBoard, and PandaBoard. A possible Simulink implementation for solving the Blink Challenge consists of three main subsystems: Inputs from Arduino. Students can add analog and digital input blocks for acquiring information from the potentiometer and the button. Modes (Figure 2). Thanks to the large library of blocks, students can design a scheduler that controls the operation modes. LEDs. Students can use PWM Arduino blocks to control the outputs and switch the different LEDs on and off.
Figure 2. Modes subsystem. Conditional subsystems can react to user input in a timely manner.
The students run the complete model on the board automatically by selecting Tools > Run On Target Hardware > Prepare To Run. This option lets users select the target hardware, host COM port, and other simple configuration settings. To start the executable application generation and deployment process that will transfer the model to the board, they select Tools > Run On Target Hardware > Run. The board is then programmed with their algorithm and can run autonomously, without any connection to the PC. This one-click approach to executable generation lets the student concentrate on system modeling. Applications from different fields, such as controls, image processing, computer science, and signal processing, can be easily experienced interacting with the hardware platform. The student is immediately able to design, simulate, and test on the hardware without facing all the low-level issues related to the interaction with the board.
www.mathworks.com/company/newsletters/articles/applied-project-based-learning-building-applications-for-low-cost-hardware.html?s_eid=PSM_3997
2/4
08 04 2013
Students begin by creating a system model in Simulink. To deploy the model on the robot they can use the additional libraries described in the section on solving the Arduino Blink Challenge. They can simulate the model to understand the robots behavior, and tune parameters and controllers to enable it to perform the required tasks. Using Simulink support for target hardware they can automatically convert the model into an executable application for deployment on the LEGO MINDSTORMS NXT control brick. They can simulate and test the algorithm and control logic on the computer and then compile it for the hardware. By enabling External Mode, students can establish a Bluetooth connection with the robot so as to change parameters during execution. A simple application based on the LEGO MINDSTORMS NXT Robot in the Tribot configuration will illustrate this workflow. In this example, the goal is to move the robot forward or backward a certain distance. Before working with the actual hardware, the students create a model of the robot servomotors and design a PID controller using Simulink PID autotuning features (Figure 4). They use this model to design the controller before assembling the actual robot.
Figure 4. Tribot model for simulation and control design. The PID block can be automatically tuned to meet system response time requirements.
When the controller is ready, they replace the simulation subsystem with an Input-Output model based on the LEGO MINDSTORMS NXT Motor and Encoders blocks. This model can be used to generate an executable to be deployed on the robot. Students can test different working conditions for the system by enabling External Mode and changing the position of the Tribot during execution.
www.mathworks.com/company/newsletters/articles/applied-project-based-learning-building-applications-for-low-cost-hardware.html?s_eid=PSM_3997
3/4
08 04 2013
As we have seen with Arduino and LEGO MINDSTORMS NXT, this algorithm can be automatically compiled into an executable application and deployed on BeagleBoard. Using External Mode students can tune the threshold manually during simulation in order to adapt the process to different light conditions.
Motivating Project-Based Learning: Sustaining the Doing, Supporting the Learning. Educational Psychologist
Products Used
MATLAB Simulink Computer Vision System Toolbox
Learn More
Dow nload: Models and Examples Arduino Blink Challenge Hardw are for Project-Based Learning Teaching Mechatronics w ith MATLAB, Simulink, and Low -Cost Hardw are
Site Help
Patents
Trademarks
Privacy Policy
www.mathworks.com/company/newsletters/articles/applied-project-based-learning-building-applications-for-low-cost-hardware.html?s_eid=PSM_3997
4/4