Scilab Arduino Blinking LED Tutorial



Similar documents
TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

Select Correct USB Driver

TouchKit Software User manual for Windows 7 Version:

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

ISP Engineering Kit Model 300

Warnings: This manual is intended to guide a technicians or customers who would like to repair DBL's

EMBEDDED C USING CODEWARRIOR Getting Started Manual

Vmed QUICKSTART PC-DISPLAY INSTALLATION & PC-Display and Bluetooth Instructions

Introduction to Arduino

Work with Arduino Hardware

ScanWin Installation and Windows 7-64 bit operating system

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

USING USB FLASH DISK WITH TCMS V2

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Chapter 12. Development Tools for Microcontroller Applications

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

MS830 / MS833 Barcode Reader v1.0 9-December-2014

Radio Toolbox And Player Embedding

TBS Help Index / On Board Software User Manual

Arduino Lab 1 - The Voltage Divider

DUKANE Intelligent Assembly Solutions

MANUAL FOR RX700 LR and NR

Set up and Blink - Simulink with Arduino

Instructions for the installation of drivers and data reading software (TOOLBOX 4) The simple and reliable way to measure radioactivity.

RFID Logger Software User Manual Rev 1.0

Application Note CTAN #374

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

AUDITVIEW USER INSTRUCTIONS

SEC 4100 SYSTEM MONITOR Programmable Serial Interface Card Series 2

Communications Instructions for DOOSAN, FANUC Controls

Accurate Measurement of the Mains Electricity Frequency

TPG MOBILE BROADBAND QUICK SETUP GUIDE

For support on the Beijer HMI please contact:

Step by Step. Use the Cloud Login Website

Connecting your Omega/BetaPAT PLUS to a PC via a USB

User s Manual for Fingerprint Door Control Software

In order to enable BitLocker, your hard drive must be partitioned in a particular manner.

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

P300 Spelling Device with g.usbamp and Simulink V Copyright 2012 g.tec medical engineering GmbH

Using and Installing: HCS12C32 Board, HCS12C128 Board, USB-to-Serial port driver, and HyperTerminal

The 104 Duke_ACC Machine

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

Accessing I2C devices with Digi Embedded Linux 5.2 example on Digi Connect ME 9210

Surveillance System Using Wireless Sensor Networks

User s Guide DDS-3X25 USB ARBITRARY FUNCTION GENERATOR

Guide for Remote Control PDA

Quick Note 32. Using Digi RealPort with a Digi TransPort Router. UK Support September 2012

How To Connect A Directsofl To A Powerpoint With An Acd With An Ctel With An Dm-Tel Modem On A Pc Or Ipad Or Ipa (Powerpoint) With A Powerline 2 (Powerline

iloq P10S.10/20 Programming device User's Guide

E-Loader Operation Manual

ERIKA Enterprise pre-built Virtual Machine

mybullard Personal Control Panel User Guide

Technical Bulletin. Teledyne PDS Clock Synchronization Considerations. Version 1.2

PCMCIA 1 Port RS EDITION OCTOBER 1999

How To Set Up A Smart Card Programmer With Titan (Titan) And Titan 2.3 (Tok) (Tonga) (Powerbook) (Smart Card) (Programmer) (S

WiFi Setup Guide for Windows7 or Vista

Electronics 5: Arduino, PWM, Mosfetts and Motors

1. Make sure that no client accounts are open. 2. Click on Setup, then click Modem. The Modem Setup window will appear.

Model DFG-RSA Configurable Load Cell Adapter

Using a USB to Serial adapter and Terminal Emulator in Windows 7 to communicate with a DM101

A L ERT. Quick Start With

EZ-View Network Communications Guide

IGSS. Interactive Graphical SCADA System. Quick Start Guide

STEELSERIES FREE MOBILE WIRELESS CONTROLLER USER GUIDE

How to use the VMware Workstation / Player to create an ISaGRAF (Ver. 3.55) development environment?

mypro Installation and Handling Manual Version: 7

Health Monitoring Demo for ice40 Ultra Wearable Development Platform User Guide. UG103 Version 1.0, September 2015

Using the Parani SD1000U/SD1000 with Carlson SurvCE

Connecting the Console Port to a PC

Using the T&D Thermo App with TR-7wf Data Loggers

Lab Experiment 1: The LPC 2148 Education Board

Quick Start Using DASYLab with your Measurement Computing USB device

AUDITVIEW USER INSTRUCTIONS

TP- 051 GPS RECEIVER

PRODUCTIVITY THROUGH INNOVATION 600 CONTROL DIRECT DRIVE TECHNICAL/OPERATION MANUAL

Omron I/O Driver (Series 2) Programmable Serial Interface Card

Lab 1: Introduction to Xilinx ISE Tutorial

TE100-P21/TEW-P21G Windows 7 Installation Instruction

Configuring Serial Terminal Emulation Programs

Creating a Project with PSoC Designer

EMBEDDED ACCESS CONTROL Hardware Installation Guide

Basic Software Setup Guide.

UDG1000 Hach PCX2200 Serial Port Input Driver configuration

Bill Redirect Software How To Schedule Tasks in Bill Redirect

Manual. EN Appendix. Blue Solar PWM Pro setup and monitoring software

Configuration of Kepware OPC Server in PanelMate Configuration Editor

dspic30f4012 Microcontroller

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide

EVA Drivers 6.1 and TWAIN Installation Guide for EVA Classic Digital Sensors

T-BOXN12R. First steps with T-BOXN12R. You can make it wireless. Date: Version 1.0

Remote Access. Table Of Contents. Rev: 3.30, 8/03

RPLIDAR. Low Cost 360 degree 2D Laser Scanner (LIDAR) System Development Kit User Manual Rev.1

Royal Mail Despatch Manager Online Printer Installation Guide

Digitrax DT402D Duplex Radio Throttle Firmware Update

P&E Microcomputer Systems, Inc. P.O. Box 2044, Woburn, MA 01888, USA

PM1122 INT DIGITAL INTERFACE REMOTE

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

Transcription:

Scilab Arduino Blinking LED Tutorial Document version 1 Yann Debray Scilab Enterprises 07/06/2015 This tutorial aims at showcasing the capabilities of Scilab for prototyping electronic embedded systems with Arduino. First step (described in this tutorial): Soft realtime HardwareIntheLoop Second step: Code generation Another approach: (Modeling with a) State Machine Configuration/Arduino Setup In order to follow this tutorial you need the following configuration: Software: Scilab on Windows 32 or 64 bits (Version >= 5.4) Arduino toolbox http://atoms.scilab.org/toolboxes/arduino Help on the installation of the module (in French): https://www.scilab.org/en/community/education/si/install Arduino IDE http://arduino.cc/en/main/software Hardware: Arduino Board (driver installation on http://www.arduino.cc/en/guide/windows#toc4 ) LED Breadboard, Resistance of 10kOhm?, wires (optional) Installation & Setup Go on the following website: http://www.demosciences.fr/projets/scilabarduino And download the following file: toolbox_arduino_v3.ino (you can also download the module from this page) Plug your Arduino Board to your PC, open the Arduino IDE and flash the file toolbox_arduino_v3.ino on the Arduino Board. Set up the following hardware configuration:

Configuration blocks In order to acquire the Port number linked with the Arduino board, look in the bottom right corner of your Arduino IDE: Start to build the Xcos schema, with the configuration blocks: This allows a serial communication between Arduino and Scilab. Double click on the block to let the following dialog box appear:

Set the Serial com port number with the information acquired in the previous step. The sampling of the signal for the blocks of the model and the time of acquisition are configured by this block: The sampling period can be specified and has to be at least twice smaller than the period of evolution of the model (NyquistShannon sampling theorem) Xcos model Simulating an input signal for the LED can be done with the Pulse Generator block PULSE_SC: http://help.scilab.org/docs/5.5.2/en_us/pulse_sc.html By double clicking, you can adapt the following parameters: Phase delay (secs) The offset of the block. It must be less than Frequency*(1(Pulse_width/100)). Type 'pol' of size 1. Pulse Width (% of period) The pulse width. It can take values from 1 to 100. Type 'pol' of size 1.

Period (secs) The Period of the signal. Properties : Type 'pol' of size 1. Amplitude The amplitude of the pulse. It can support all scicos types. Properties : Type 'mat' of size [1,1]. As specified in the configuration blocks, the period of the signal (1s) is more than twice the period of sampling (0.1s). Digital input of the Arduino board In our example, we plugged the LED in the digital I/O 13 of the Arduino board, so we will have to set the pin 13 successively to 1 and 0 (electrically speaking to 5V or 0V), to turn respectively the LED on and off. Behavior visualization In order to display the signal turning on and off the LED while the command of the circuit, we will add a scope to the model: We need to use here a scope provided by the Arduino module s blockset, which doesn t require a clock parameter input, as it is directly synchronized with the sampling period of the configuration block.

Simulation/Acquisition of the signal After linking all of the previously described blocks, the Xcos schema should look like this: After hitting on the play button, the LED blinks at the same time as the following curve is plotting: Sources TP3 : Acquérir et piloter des systèmes à l'aide de cartes Arduino et d'une Toolbox Xcos dédiée TP3 Démosciences 2012.pdf http://www.demosciences.fr/projets/scilabarduino Scilab / Xcos pour l enseignement des sciences de l ingénieur 2013 Scilab Enterprises chapitre «4 acquisition et pilotage de moteur (module arduino)» livret_xcos.pdf www.scilab.org/fr/content/download/1017/9485/file/livret_xcos.pdf Contributors : Bruno Jofret, Scilab Enterprises, Alain Caignot, Lycée Stanislas (Paris), Vincent Crespel, Lycée Saint Louis (Paris), Marc Derumaux, Lycée Saint Louis (Paris), Cédric Lusseau, Lycée Hoche (Versailles), Gilles Moissard, Lycée Janson de Sailly (Paris), Pascal Serrier, Lycée Benjamin Franklin (Orléans) et David Violeau, Lycée Janson de Sailly (Paris).