Introduction to PoliArd

Similar documents
Introduction to ARDUINO/SIMULINK

Experiment 4.A. Speed and Position Control. ECEN 2270 Electronics Design Laboratory 1

Rotary Motion Servo Plant: SRV02. Rotary Experiment #00: QuaRC Integration. Using SRV02 with QuaRC. Student Manual

Signal Connections CHAPTER

Control Systems Laboratory Manual Hardware and Software Overview. 2 Hardware Equipment. 2.1 Analog Plant Simulator (EE357 Only)

Evaluation Kit LDE-type Pressure Sensors

ARDUINO MINI 05 Code: A000087

Closed Loop Step Response

Submittal Data Sheet WAGO Node for itm

Developing Customized Measurements and Automated Analysis Routines using MATLAB

GUIDE TO SP STARTER SHIELD (V3.0)

Stellaris LM3S3748 Evaluation Kit README FIRST

USER S MANUAL VER.2. C76- MULTIFUNCTION CNC BOARD Rev. 1.4

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Using LabVIEW. with. BiPOM Boards. Quick Start Guide. Document Revision: Date: 18 September, 2009

Open Loop Step Response

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

Performing real-time BCI experiments

Modeling, Design, and Control of Robotic Mechanisms (MathWorks/Kyungnam Univ.) -1-

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

Unlocking the Potential of Your Microcontroller

DT9828. USB Powered Thermocouple Measurement Module. Key Features: Analog Input Channels

DEVELOPMENT OF USER FRIENDLY DATA ACQUISITION AND ACTUATION SYSTEM ON EMBEDDED PLATFORM

S32K144 EVB QUICK START GUIDE REV4.2 APPLIES FOR: S32K144 EVB (SCH REV B) EXTERNAL USE

NI mydaq HANS-PETTER HALVORSEN, Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Procedure: Determine the polarity of the LED. Use the following image to help:

Introduction to MATLABs Data Acquisition Toolbox, the USB DAQ, and accelerometers

- Software may become unresponsive during some operations, always wait before reclicking.

S32K142 EVB QUICK START GUDE REV3.1 APPLIES FOR: S32K142 EVB (SCH_29701 REV D/C) EXTERNAL USE

ECE-320 Lab 3: Utilizing a dspic30f6015 to model a DC motor and a wheel

WRTU Client User Manual. Date: 29 May, 2014 Document Revision: 1.05

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas

DC3IOB Revision User Guide Updated 3/29/10. Overview

Small rectangles (and sometimes squares like this

Model-Based Design: Generating Embedded Code for Prototyping or Production

Controlling a fischertechnik Conveyor Belt with Arduino board

Development of a MATLAB Data Acquisition and Control Toolbox for PIC Microcontrollers

8438/8838 User Manual User Manual of the 8438/8838 MATLAB Embedded Controllers

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino

Supply voltage. Input current. Encoder supply. Memory

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

Description Building Automation Platform ARM mbed and Arduino

Cube67 - Modular I/O station

DATA LOGGER GEOLOGGER G8 PLUS

Cypress FM4 Tools Set-up with Keil 5.x

PCI-AIO02. User s Manual

CourseContents: 1.Introduction to MATLAB. 2. Handling data and data flow in MATLAB. 3. Editing and Debugging M-FILES

Blue Point Engineering

COL862 - Low Power Computing

AX1500. Dual Channel Digital Motor Controller. Quick Start Manual. v1.9b, June 1, 2007

TA0297 WEMOS D1 R2 WIFI ARDUINO DEVELOPMENT BOARD ESP8266

Configuring the LI-1400 Datalogger for Illuminance and Irradiance Studies

OP5600 & OP7000. High performance Real-Time simulators. Yahia Bouzid 25 th June2013

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

PERUN Technologies LARA-100 GPIO BOARD USER MANUAL

Exen Mini. Setup Guide - V1. nerdonic.com

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc.

ARDUINO M0 PRO Code: A000111

LABORATORY USE OF A MICROCOMPUTER (Last Revision: August 27, 2000)

FAE Summit Interfacing the ADS8361 to the MSP430F449 Low Power Micro Controller

Modeling HDL components for FPGAs in control applications

Experiment 3. Getting Start with Simulink

Arduino Micro Breadboard Laboratory Interface Processor (Micro BLIP) User Manual

4Trio Motion Technology3

PCI-AIO01. User s Manual

How to use the Zduino LEE Module with the Trainer Board

LDR_Light_Switch5 -- Overview

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

1.0 The System Architecture and Design Features

Industrial Automation course

LDR_Light_Switch1 -- Overview

APPLICATION NOTE /20/02 Getting started using IPM240-5E with a brushless motor

RS 485 Mini Modbus 1AO

Sten-SLATE ESP Kit. Description and Programming

Data Acquisition Laboratory

USER MANUAL ARDUINO I/O EXPANSION SHIELD

dspace DS1103 Control Workstation Tutorial and DC Motor Speed Control Tutorial

Ultra-Accurate Measurement for Temperature and Voltage

Mechatronics and Pneumatics Kit Manual

APPLICATION NOTE

Internet-Based Remote Control using a Microcontroller and an Embedded Ethernet Board 1

ACE-SDC-V3 Stepper Driver +Controller with USB 2.0 Communication

A Control System Plant Simulator

BrewTroller Phoenix. Owners Manual. Updated - March 14, 2016 BREWTROLLER PHOENIX 1

LDR_Light_Switch2 -- Overview

Module 003: Introduction to the Arduino/RedBoard

Getting started Guide

MotionView Configuration and Programming Software USER S MANUAL

Arduino Programming and Interfacing

uarm Slider User Manual V1.0.0

USB-Based 14-Channel Data-Acquisition Module

Light Sensor. Overview. Features

DC3IOB Revision User Guide Updated 7/12/12. Overview

S32K118 EVB QUICK START GUIDE APPLIES FOR: S32K118 EVB (SCH_29945 REV B) EXTERNAL USE

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Goal: We want to build an autonomous vehicle (robot)

Rotary Motion Servo Plant: SRV02. 2D Ball Balancer. User Manual

Introduction to Arduino

Introduction to Arduino. Wilson Wingston Sharon

Quick Installation Guide: QUARC TM on NI ELVIS III

Transcription:

Introduction to PoliArd Damiano Milani Politecnico di Milano Department of Mechanical Engineering

PoliArd Project PoliArd is a complete environment for implementing control logics on real-time hardware. It is based on Simulink software and Arduino hardware. It is developed and maintained by the Department of Mechanical Engineering and it is free to use for students. It includes: PoliArd Board: a real-time controller board PoliArd Library: a Simulink blockset PoliScope: an acquisition application Official website: http://mecsys.mecc.polimi.it/mechlab

Outline The PoliArd Project PoliArd Board PoliArd Simulink Library PoliScope Examples

Outline The PoliArd Project PoliArd Board PoliArd Simulink Library PoliScope Examples

PoliArd Board The Board PoliArd Board allows to perform real-time control logics thanks to an Arduino Due board (32-bit ARM Cortex-M3). PoliArd Board presents several interfaces for generic input/output, motors, encoders You can find the board schematics at http://mecsys.mecc.polimi.it/mechlab/files/poliard/paboard.zip

PoliArd Board The Board

PoliArd Board Analog Inputs 6 Analog Inputs (12-bit ADC) ±10 V 2x4 Mini-Fit or BNC

PoliArd Board Analog Outputs 2 Analog Outputs (12-bit DAC) ±10 V BNC

PoliArd Board Motor driver 2 DC motor drivers 6, 12 or 24 Vdc PWM controlled Current sensor 2x1 Mini-Fit

PoliArd Board Encoder interface 4 encoder interfaces 2x2 Mini-Fit

PoliArd Board NTC Internal External (2x1 Mini-Fit)

PoliArd Board User I/O System Status/Alarm LEDs 2 configurable LEDs Enable switch 2 configurable switches 2 potentiometers

PoliArd Board Power Emergency button Power Status LEDs

Outline The PoliArd Project PoliArd Board PoliArd Simulink Library PoliScope Examples

PoliArd Library PoliArd Simulink Library Installing the PoliArd Library you can easily implement control logics on the PoliArd Board using a custom Simulink blockset. The supported version is MATLAB 2015a 64bit. First you need to download the Mathworks support for Arduino hardware, following these instructions: http://mathworks.com/help/supportpkg/arduino/ug/installsupport-for-arduino-hardware.html and download the Simulink package for Arduino Due. * Note that during this step and in the next one, some Antivirus software may freeze the installation processes.

PoliArd Library Library Installation You can download the required files from http://mecsys.mecc.polimi.it/mechlab/files/poliard/palibrary.zip and run the MATLAB file install_palibrary.m following the instructions. With the same file you can remove or update from the official repository the library files. Requirements (supported and tested): Microsoft Windows OS 64bit MATLAB 2015a 64bit (available with the campus license) Arduino Due support package for Target Hardware

PoliArd Library Simulink Target Hardware To implement the control logics on the PoliArd Board, you need to setup any Simulink model: go to Tools menu, Run on Target Hardware and Prepare to Run From the new window select Arduino Due and check Enable overrun detection. In the Configuration Parameters window you can set the fixed-step size (minimum value suggested 0.001) and the stop time (could be inf).

PoliArd Library The PoliArd Library After installing the PoliArd Library, a new following blockset will appear in the Simulink Library Browser:

PoliArd Library PoliArd init This block must be present in any PoliArd model. It contains the initialization routines needed by the PoliArd Board. Alarm Useful to implement a custom alarm: when it is enabled, all the Digital Output, Analog Output and the motors are turned off. Only one Alarm block can be present in the same program.

PoliArd Library Analog Input Measures the voltage of a specified analog input pin. The block acquires the voltage as a digital value (12-bit ADC, 0-4095, minimum to maximum). AI1-AI6: Input signals (±10 V) AI7: NTC (0-3.3 V) AI8-AI9: Potentiometers (0-3.3 V) AI10: Vdc (0-3.3 V) Do not assign the same pin number to multiple blocks within a model.

PoliArd Library Analog Output Set the value of a specified analog output pin. The block generates the voltage as a digital value (12 bit, 0-4095, minimum to maximum). AO1-AO2: Analog Output (±10 V) Do not assign the same pin number to multiple blocks within a model.

PoliArd Library Digital Input Get the logical value of a specified digital input pin. DI2-DI3: Switch 2-3 Digital Output Set the logical value of a specified digital output pin. DO1-DO2: LED 1-2 Do not assign the same pin number to multiple blocks within a model.

PoliArd Library Encoder Get the Position counter value for the encoder selected. If Reset is enabled, the counter is set to zero. Encoder ID 1-4

PoliArd Library Motor Command the Motor selected, by imposing a proper voltage (input V signal is in volt). Enable boolean signal turns on the Motor. The block gets the measured Current (in ampere), the PWM (12 bit) and the DCbus (in volt) set internally. Be sure to select the proper Vdc! Motor ID 1-2

PoliArd Library Transmission Send data on serial port to PoliArd Scope software. The transmission frequency must be lower than the loop frequency and must match the parameter set in PoliArd Scope. The number of float signals must be specified in the block parameters. L1-L4: logical (boolean) values S1-S6: float (single precision 32-bit) signals

Outline The PoliArd Project PoliArd Board PoliArd Simulink Library PoliScope Examples

PoliScope Installation PoliScope is a virtual oscilloscope that reads, shows and records data from the PoliArd Board. You can download the installer here: http://mecsys.mecc.polimi.it/mechlab/files/poliard/psinstaller.exe Note: You can install PoliScope even without installing PoliArd Library. Just plug the USB cable to your PC and you will be able to connect to the PoliArd Board.

PoliScope Interface Boolean flags visualization Float signals configuration Acquisition controls

PoliScope Interface Plot toolbar Plots for signal visualization Time buffer slider

PoliScope Recording mode PoliArd Scope can write to file the data acquired. Before starting the acquisition, check the Recording box. PoliArd writes a configuration file, containing the details about the acquisition, and saves only the selected signals in multiple data files. The configuration file and the data files are stored in a folder named with a unique timestamp. N.B. When the acquisition is started, the board is reset!

PoliScope Configuration Panel You can set the name of the signals and the y-axes. The Recording Path is the base path for the saving folders. Warning Before the acquisition be sure to select the proper COM port. The sampling frequency and the number of signals must match the parameters configured in the Transmission block!

PoliScope You can import the saved data to MATLAB workspace. Use the MATLAB function PA_import.m that allows you to load and merge the files recorded with PoliScope. Syntax examples: acq = PA_import acq = PA_import(acq_dir) acq = PA_import(acq_dir,show_plot) acq = PA_import(acq_dir,show_plot,save_name) Wizard mode Acq folder Show plot (bool) Save to.mat You can download this function from: http://mecsys.mecc.polimi.it/mechlab/files/poliard/pa_import.zip

Outline The PoliArd Project PoliArd Board PoliArd Simulink Library PoliScope Examples

PoliArd Programming Procedure 1. Check that the Emergency button is pushed down and the Enable switch is down 2. Create your Simulink model, setting the Target Hardware options (Arduino Due, Enable overrun detection, Fixed-step size) 3. Implement your Simulink model using blocks from the PoliArd Library (always insert PoliArd Init block) 4. Download your control logic to the PoliArd Board using the Deploy to Hardware button. Check if the procedure is successful. 5. Open PoliScope and start the acquisition 6. Release the Emergency button 7. Turn on the Enable switch on the board

PoliArd Shut-down procedure 1. Turn the Enable switch off 2. Press the Emergency button Emergency procedure Press immediately the Emergency button

PoliArd Warnings The last downloaded control logic is always resident and running on the PoliArd Board! Always check the Power Status LEDs to be sure that the power supply is not faulty Alarm or Overrun status can lead to unpredictable behavior of the system When the acquisition is started in PoliScope the board is automatically reset Simulink cannot upload a new program to the PoliArd Board if a serial connection is opened with PoliScope

Examples Digital and Analog signals

Examples DAC and ADC

Examples Motors and encoders

Acknowledgement Please report any bug or suggestion to the developers of the project: Andrea Costa andrea.costa@polimi.it Damiano Milani damiano.milani@polimi.it Davide Tarsitano davide.tarsitano@polimi.it Visit http://mecsys.mecc.polimi.it/mechlab to download the last revision of the software.