UNIVERSITÁ DEGLI STUDI DI UDINE. Tesi di Laurea. Arduino programming using Matlab and Simulink

Size: px
Start display at page:

Download "UNIVERSITÁ DEGLI STUDI DI UDINE. Tesi di Laurea. Arduino programming using Matlab and Simulink"

Transcription

1 UNIVERSITÁ DEGLI STUDI DI UDINE Facoltà di Ingegneria Corso di Laurea in Ingegneria Elettronica Dipartimento di Ingegneria Elettrica, Gestionale e Meccanica Tesi di Laurea Arduino programming using Matlab and Simulink Relatore: Prof. Pier Luca Montessoro Laureando: Walter Miani Correlatori: Ing. Rui P. Rocha Ing. Micael Couceiro Ing. David Portugal Anno Accademico

2 ... a chi crede in me

3

4 Abstract The scale and scope of robotics continues to expand, and so also software for robotic applications has to follow this growth. As the number of robotic platforms available for research and development continue to increase, code reusability and extensibility appear as a major challenge that needs to be overcome. On top of this, the size of the required experience must contain a deep stack starting from driver-level software and continuing up through higher levels of abstraction. Since the required expertise is well beyond the capabilities of single researcher, robotics software architectures must also support large-scale software integration efforts. To meet these challenges, many researchers created a wide variety of frameworks, manage complexity and facilitate prototyping of software for experiments. Furthermore, when writing a code, many individuals have preferences for some programming languages or environments above others. These preferences are the result of personal tradeoffs between programming time, ease of debugging, syntax, runtime efficiency, and a lots of other reasons, both technical and cultural. Each of these frameworks was designed for a particular purpose, perhaps in response to perceived weakness of other available frameworks, or to place emphasis on aspects which were seen as most important in the design process. The field of robotics is far too broad for a single solution; it s up to every researcher or student to find which is the better way to follow to realize at best his own project. i

5 ii

6 Resumo A escala e o alcance da robótica continua a se expandir, e assim também um software para aplicações de robótica tem que seguir esse crescimento. Como o número de plataformas robóticas disponíveis para pesquisa e o desenvolvimento continuam a aumentar, a reutilização e a extensibilidade do código aparecem como um grande desafio que precisa ser superado. Além disso, o tamanho da pesquisa deve cobrir todos os níveis de programação, a partir de inferior (linguagem de máquina) até ao nível mais alto de abstracção. Por ser a perícia requerida bem além das capacidades de um único programador, arquiteturas de software de robótica devem também suportar grandes esforços de integração de software. Para enfrentar esses desafios, muitos pesquisadores criaram uma grande variedade de quadros,para controlar a complexidade e facilitar a criação de protótipos de software para experimentos. Mais, os vários utilizadores têm preferências por algumas linguagens de programação ou ambientes em detrimento de outras. Estas preferências são o resultado de compromissos pessoais entre o tempo de programação, facilidade de depuração, sintaxe, eficiência de execução, e uma série de outras razões, técnicas e culturais. Cada uma destas estruturas foi projectada para uma finalidade específica, talvez em resposta à fraqueza percebida em outras estruturas disponíveis, ou para colocar ênfase em aspectos que foram vistos como mais importante no processo de design. O campo da robótica é muito amplo para uma única solução, e é tarefa de cada pesquisador ou estudante descobrir qual é o melhor caminho a seguir para realizar o melhor de seu próprio projeto. iii

7 iv

8 Sommario La scala e la portata della robotica continuano ad espandersi, e così anche il software per applicazioni robotiche deve seguire questa crescita. Poiché il numero di piattaforme robotiche disponibili per la ricerca e lo sviluppo continua ad aumentare, arrivare ad una buona riusabilità ed estensibilità del codice appare come una grande sfida che deve essere superata. In cima a questo, la dimensione della ricerca deve coprire tutti i livelli di programmazione, dal più basso (linguaggio macchina) fino al livello più alto di astrazione. Dal momento che l esperienza richiesta è di ben oltre le capacità del singolo ricercatore, le architetture di software per la robotica devono anche sostenere grandi sforzi di integrazione software. Per rispondere a queste sfide, molti programmatori hanno creato una vasta gamma di strutture, per gestire la complessità e facilitare la realizzazione di prototipi di software per simulazioni ed esperimenti. Inoltre, i vari utenti hanno preferenze per alcuni linguaggi di programmazione o ambienti a scapito di altri. Queste preferenze sono il risultato di compromessi personali tra i tempi di programmazione, facilità di debug, sintassi, efficienza di esecuzione e una serie di altri motivi, sia tecnici che culturali. Ognuno di questi quadri è stato progettato per uno scopo particolare, forse in risposta alla debolezza percepita di altri quadri disponibili, o per porre l accento su aspetti che sono stati considerati più importante nel processo di progettazione. Il campo della robotica è troppo ampio per una soluzione unica, ma è compito di ogni ricercatore o studente trovare quale è la via migliore da seguire per realizzare al meglio il proprio progetto. v

9 vi

10 Contents List of Figures List of Tables x xii 1 Programming languages for robotics Pyro Features Phyton Pros & Cons ROS Features Nomenclature Pros & Cons Microsoft Robotics Developer Studio DSS CCR VPL VSE Pros & Cons Player/Stage Stage Simulation Environment Pros & Cons Urbi vii

11 1.5.1 Pros & Cons OROCOS Pros & Cons WeBots Features Usarsim Skilligent Our choice: Arduino Target... Why? Summary Arduino Target Installation The downlodable packet Actual state of the library: blocks Objectives Limtations Summary StingBot General description Main schematic system What can be done with StingBot and actual AT library StingBot sonars What can t be done with StingBot and actual AT library Summary Experiments and results Build a model: what does it mean? Serial communication Server/Host system Circuit examples Read a potentiometer viii

12 4.4.2 Digital counter PWM N bits to N pins Read values from Sonars Callback functions Legacy Code Tool Summary Conclusion & Future works Conclusions Cons & Pros Other platforms Future works and applications A Arduino Target installation and configuration 65 B Legacy Code Tool usage example 69 C Arduino Uno board description 73 C.1 Overview C.2 Summary C.3 Power C.4 Input & Output C.5 Communication C.6 USB Overcurrent Protection C.7 Physical Characteristics Bibliography 79 ix

13 x

14 List of Figures 1 Original Stinger chassis Arduino Target Blocks StingBot structure Main control circuit StingBot 3d model Arduino IDE code example Simulink Blinking led example Serial communication example Serial communication: host blocks diagram Reading a value from a potentiometer: circuit scheme Reading a value from a potentiometer: Simulink diagram Button State Change Detection (Edge Detection): Circuit scheme Button State Change Detection (Edge Detection): Simulink diagram PWM circuit scheme PWM simulink diagram Send N pins to N bits: simulink diagram Read Values from Sonars: simulink diagram Communications in the motor driver/stingbot/arduino system 63 C.1 Arduino Uno board xi

15 xii

16 List of Tables 1.1 List of the main environments for robotics Hardware Specifications of the StingBot xiii

17

18 Notation AT ISR LCT ROS Arduino Target Institute of Systems and Robotics Legacy Code Tool Robotic Operating System 1

19 2

20 Introduction This report describes the work done in the last semester with the open source libraries Arduino Target (AT) for Simulink, a software of MathWorks (directly integrated in Matlab), which took place in the Mobile Robots Laboratory of Institute of Systems and Robotics (ISR) in Coimbra. With the blocks of AT It is possible to realize models to build in Arduino, using also all the other features of Simulink. Doing this, it is necessary no more to write lots of Arduino code lines to program the board. The idea of this work is to study deeply the usage of the library and to understand its possibilities at the actual state, thinking of the possible new features which could be added. The main new future feature that is the possibility to open a I2C serial communication, necessary to communicate with the robots of the laboratory. In those first paragraphs an overview of the document is given; afterwards the AT library and the robots used are briefly presented. Arduino Target Arduino Target allows to develop applications for the Arduino platform right from Simulink. The target includes blocks to interface with the I/O ports on the Arduino board as well as a target file that automatically compiles and downloads the application onto the board directly from Simulink. AT allows to graphically represent, in a simple manner, the equivalent to hundreds or thousands of lines written in Arduino language (similar to C language) due to Simulink libraries and user interface. The installation and 3

21 configuration are easy and are explained in a text file present in the downloadable packet. Digital and analog write and read, serial write, read and configuration (port number and baud rate) are the library features. Integrating AT with others Simulink blocks, several models can be realized. StingBot Figure 1: Original Stinger chassis Robots used are the StingBot. They were assembled in Coimbra above the structure and the motors of the Singer Robot from RoboticsConnections 1. It is a mobile robot assembled in the Mobile Robotics Laboratory of the ISR based in two wide foam tires for excellent traction, which will easily spin around thanks to its differential drive configuration. It s controlled by a microcontroller, ATmega328 from ATMEL, implemented in a Arduino Uno board that manages process information from the sonar, encoder readings and sends velocity commands through a motor driver to control two DC motors. This mobile robot has an ideal size and is a solid platform to integrate 1 4

22 adequate sensors to perform mobile robot ground routines. Outline of the document The document is divided in four main parts: the first evaluates the various environments and programming languages existing in the world of robot communications, explains also why the couple Matlab-Arduino was chosen; a second shows and presents the AT library, with relative pros e cons; After that there is a concise description of the robots of the laboratory and in the final part all the results, the tests done, the difficulties met and the possible future works that can be done are presented. 5

23

24 Chapter 1 Programming languages for robotics The appropriate languages, structures, and software architectures for developing robot software has been the topic of debate and discussion since the earliest computer-controlled robot systems. These languages attempt to reach a compromise, offering the ability to program low-level behavior in some detail, while at the same time providing language abstractions that facilitate the description of higher-level system behavior. Now the main languages available in the programming world will be presented, emphasizing positive and negative characteristics and dividing them into different types. Table 1.1 shows the main environments, with their type and distribution. After that every one of them will be briefly described. 1.1 Pyro Pyro stands for Python Robotics. The goal of the project is to provide a programming environment for easily exploring advanced topics in artificial intelligence and robotics without having to worry about the low-level details of the underlying hardware. Pyro is written in Python. Python is an interpreted language, which means that you can experiment interactively 7

25 Environment Type Distribution Pyro/Python Platform Open Source ROS Platform Open Source MRDS Platform Commercial Player/Stage Platform Open Source URBI Platform Commercial OROCOS Machine and robot control libraries Open Source WeBots Simulation environment Commercial UsarSim Simulation environment Commercial Skilligent Robot learning add-on Commercial Arduino Target Simulink library Open source Table 1.1: List of the main environments for robotics with your robot programs. In addition to being an environment, Pyro is also a collection of object classes in Python. Because Pyro abstracts all of the underlying hardware details, it can be used for experimenting with several different types of mobile robots and robot simulators. Until now, it has been necessary to learn very different and specific control languages for different mobile robots, particularly those manufactured by different companies. Now, a single language can be used to program many different robots, allowing code to be shared across platforms as well as allowing students to experiment with different robots while learning a single language and environment. Pyro has the ability to define different styles of controllers which are called the robot s brain. For example, the control system could be a neural network, behavior based, or a symbolic planner. One unique characteristic of Pyro is the ability to write controllers using robot abstractions that enable the same controller to operate robots with vastly different morphologies Features Open source - available for study, or changing 8

26 Designed for students, faculty and researchers Works on many real robotics platforms and simulators Extensive course modules include control methods, vision (motion tracking, blobs, etc.), learning (neural networks, reinforcement learning, selforganizing maps, etc.), evolutionary algorithms, and more Phyton Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Its syntax is said to be clear and expressive. Python has a large and comprehensive standard library. Python supports multiple programming paradigms, primarily but not limited to object-oriented, imperative and, to a lesser extent, functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts Pros & Cons Python is open source, so the free availability is the best positive feature of this language. Has a stable version since more time than others. Has a good support for objects, modules, and other reusability mechanisms. Lastly permits an easy integration with and extensibility using C and Java. On the other side the developers community using Python is pretty small compared to other languages. Software performances ( benchmarks tests ) are nothing special and there is also a great lack: no true multiprocessor support. Moreover, the absence of a commercial support point, even for an Open Source project doesn t permit a fast spread of the product. 9

27 1.2 ROS Robot Operating System (ROS) is a software framework for robot software development, providing operating system-like functionality on a heterogenous computer cluster. ROS was originally developed in 2007 under the name switchyard by the Stanford Artificial Intelligence Laboratory in support of the Stanford AI Robot project. As of 2008, development continues primarily at Willow Garage, a robotics research institute/incubator, with more than twenty institutions collaborating in a federated development model Features The philosophical goals of ROS can be summarized as: Peer-to-peer Tools-based Multi-lingual Thin Free and open source Nomenclature The fundamental concepts of the ROS implementation are nodes, messages, topics, and services. Nodes communicate with each other by passing messages. A message is a strictly typed data structure. Standard primitives types (integer, floating point, boolean etc.) are supported. Message can be composed of other messages, and arrays of other messages, nested arbitrarily deep. A node sends a message by publishing it to a given topic or map. A node that is interested in a certain kind of data will subscribe to the appropriate topic. There may be multiple concurrent publisher and subscribers 10

28 for a single topic. In general, publishers and subscribers are not aware of each others existence. Although the topic-based publish-subscribe model is a flexible communications paradigm, its broadcast routing scheme is not appropriate for synchronous transactions, which can simplify the design of some nodes. In ROS, this is called service, defined by a string name and a pair of strictly typed messages: one for the request and one for the response Pros & Cons Code written for ROS is thin and can be used with other robot software frameworks. More, the ROS framework is easy to implement in any modern programming language (Python, C++). Easy testing: ROS has a built-in unit/integration test framework called ROStest that makes it easy to bring up and tear down test fixtures. ROS is appropriate for large runtime systems and for large development processes. Even if it has all those positive aspects, a very great learning time is required to use well and dominate ROS. Furthermore, there is the need of high processing time and memory to run large algorithmos, such as the navigation stack. 1.3 Microsoft Robotics Developer Studio MSRDS is powered by the strength of the C++ programming language and the rich.net framework. MSRDS comprises of the following: DSS: Decentralised Software Services CCR: Concurrency and Co-ordination Runtime VPL: Visual Programming Language VSE: Visual Simulation Environment 11

29 1.3.1 DSS It is a lightweigth runtime environment that sits on top of the CCR. It provides robustness by providing advanced error-handling features. Partial failures in sub-part of a system can lead to a complete halting of the whole system CCR It addresses the need to manage asynchronous operations, deal with concurrency, exploit parallelism and deal with partial failure. Applications which use CCR needs to coordinate through messages, deal with complex failure scenarios, or in other words has to deal with asynchronous programming VPL It is a GUI based programming logic system. It is actually a graphical data-flow programming model. The exact logic of the program is represented as sequences of blocks with inputs and outputs, which are connected VSE The VSE provides the simulation to substitute hardware. Hardware has multiple disadvantages like high cost, difficulty of debugging and tough to be worked upon concurrently. Whereas simulation has a low barrier to entry and its very easy prototype and test out new ideas. At the same time simulation has a lack of noisy data i.e. assumes a perfect world and it is also tough to model a hardware absolutely perfectly Pros & Cons MSRDS has got extremely efficient backend with fantastic simulator and with the added vantage of the VPL, robotics applications have become very easy to compose. But at the same time, knowledge of coding is required 12

30 for some significant work. real-time applications. It also doesn t provide any special support for 1.4 Player/Stage The Player/Stage project has got client side and modular architecture. Player supports C, C++, Tcl, Python and Java. The system is a queue-based message passing one. Each driver has a single incoming queue and they can send messages on the queues if others Stage Simulation Environment Player/Stage has got 3D rendering abilities, it is basically a 2D environment with a concept of elevation. It is like a plugin that connects to the Player server just in the same manner as the hardware would have connected to it. The Stage simulator tricks the Player Server by substituting the hardware and cloning the drivers. It permits to reduce the high costs of the hardware. The major features of Stage are: Optimal fidelity: it looks more into performance than accuracy Linear Scaling with Population: the algorythms are such designed that they do not depend on the number of the robots Configurable device models: The sensor models are modeled with a lot of flexibility and to conform as much closely as possible to the actual nature of the hardware. They are fully configurable as much as the original hardware provides Abstraction from Client mode: The sensors are available through the Player interface, hence the client code cannot distinguish from the real sensors or the simulated sensors. 13

31 1.4.2 Pros & Cons The ease of use and the simplicity along with the usage of programming language makes it a very popular platform amidst academicians and hobbyists. On the contrary, the absence of robustness, missing constraints of real-time demands, inability to be ported cleanly Windows platform and the difficulty of installation causes an obstacle for its popularity. 1.5 Urbi URBI stands for Universal Real Time Behaviour Interface, and is developed by a french company named Gostai. Their mission is to provide the users with the best universal robotic platform. URBI s observation is that we are entering the robotic age and still there is incompatibility in terms of software for the available hardware of robotics. The platform should work with any robot, operating system or programming environment. URBI is a quite innovation in the programming world as it not just a programming language (urbiscript) but also has a component architecture (UObject) and also several graphics programming tools (urbistudio) Pros & Cons The main advantage of the product is the ease with which parallelism and event handling can de done. The disadvantage would include the path of having to learn a new language. It does have the facility to integrate with other languages, but it doesn t give the full control to those languages. 1.6 OROCOS OROCOS stands for Open Robot Control Software. Their aim is to build a generic modular framework for robot and machine control. They just 14

32 provide libraries for building but does not strictly provide a platform. The design philosophy is centered around four main libraries: Real Time Toolkit (RTT) Orocos Components Library (OCL) Kinematics and Dynamics Library (KDL) Bayesian filtering library (BFL) Pros & Cons It is a platform that takes deep care of realtime applications. Unfortunately, it is not a platform as a whole. Yet, for those who want accurate results, and a perfect simulation, this is the best library to look out for. 1.7 WeBots Webots is a development environment used to model, program and simulate mobile robots. With Webots the user can design complex robotic setups, with one or several, similar or different robots, in a shared environment. The properties of each object, such as shape, color, texture, mass, friction, etc., are chosen by the user. A large choice of simulated sensors and actuators is available to equip each robot. The robot controllers can be programmed with the built-in IDE or with third party development environments. The robot behavior can be tested in physically realistic worlds. The controller programs can optionally be transferred to commercially available real robots Features Webots is a portable robot simulator: it runs natively on Windows, Mac and Linux. Both world files and API functions are cross-platform: they can easily be shared by people using different operating systems. 15

33 1.8 Usarsim UsarSim is a 3D simulator oriented to the rescue robot, developed as a research tool in a project of the US National Science Foundation. UsarSim is faithfully reproduced in an environment of robotic assistance, including a number of arenas, robot and all the necessary sensors. The simulator was designed as an extension of the game engine, Unreal Engine, a commercial software platform oriented to develop multiplayer first-person shooter developed by Epic Games. UsarSim defers completely to the Unreal Engine scene graph rendering three-dimensional simulation of the physical interactions between objects. In this way, leaving the most difficult aspects of the simulation to a commercial platform can provide a visual rendering upper and a good physical modeling, all efforts in developing UsarSim have focused on the specific tasks of robotics, such as modeling of environments, sensors, control systems and interface tools. Furthermore, the development is facilitated by the use of advanced editing software built into the game engine, which the editor Unreal Editor and Unreal Script scripting language. 1.9 Skilligent Skilligent s software product is a control system which allows service robots to interact with users (humans), learn new tasks and skills from humans, safely navigate in the environment, see objects and track them, use a robotic arm, and perform other functions. The software packages are built to run on control computers of autonomous multi-task service robots. The software enables building multi-task autonomous robots which can learn procedures and skills directly from human users while maintaining a social contact with them. The software includes a robotic behavior control and coordination system with task and skill learning functions, a powerful robot vision system, a visual localization system, a social human-to-machine interface, a database for storing knowledge, an operator control unit software, and 16

34 other integrated components. The software has been specifically designed for straightforward integration into PC-controlled robots and is based on recent advances in understanding of embodied cognition, grounded perception, robot learning, behavior coordination and human-to-machine interaction Our choice: Arduino Target... Why? Every introduced environment has got many positive qualities and potentialities. However, for this study the choice was on the couple Arduino Target + Simulink. There are multiple reasons. First of all: AT is used with an Arduino board; this means that AT was born to be an open source project. Every part of code written in Arduino language is open source, and so is AT. Moreover, the Arduino user community (both professional and amateur) is very large. Another reason is that AT is a Simulink library, which works in Matlab. Matlab has become an academic standard software and most of engineering students all over the world know Matlab or use it. That means that projects concerning AT could be easily diffused on a large scale. Lastly, the simplicity: a block scheme. No programming language to know, no lines and lines of commands to write; only linking blocks and setting their parameters. AT can be very attractive for people that would have a first soft contact with Arduino without having to study how to program the boards Summary There is a great number of programming languages and environments in the robot-programming world. Our choice is Arduino Target, a library of blocks for Simulink. Its connection with Arduino and Matlab makes it a potentially great project for future developments. In the next section the library will be briefly presented, showing how to install it, which is the downloadable stuff, and its limitations. 17

35 18

36 Chapter 2 Arduino Target It consists of blocks which can be part of a model to build for Arduino directly from Simulink. AT is downloadable for free from MathWorks 1. Installation and configuration are pretty simple and a.txt file that can be found in the downloaded packet explains how to do them. 2.1 Installation Before proceeding with the AT installation it is necessary to install the Arduino IDE and Drivers, both downloadable from the Arduino website 2. The last version of the IDE can be found, but to work with AT it is necessary to use a previous version (the arduino-0023 version worked well ); In the Appendix A it is possibile to find the steps to follow to configure AT on Matlab. 2.2 The downlodable packet Besides of the installation tutorial and a license text file, there are three directories. The first one contains the system file of the library: m files,

37 tlc files and makefiles. The second one contains the files of the blocks of AT (c,h, tlc,mex32 and mex64 files). Finally, the demos-directory: a few demo-models to understand how to work with the library.tcl, c and mex files for new blocks can be generated with a MATLAB Tool: the Legacy Code, that permits to create a MATLAB structure for registering the specification for existing C or C++ code and the S-function being generated. In addition, the function can generate, compile and link, and create a masked block for the specified S-function. This will be described later. 2.3 Actual state of the library: blocks AT consists of 7 blocks: Digital Input Digital Output Analog Input Analog Output Serial Read Serial Write Serial Configuration 2.4 Objectives The objective of this work is to study deeply the library to understand what it is possibile to do with the already present blocks. More: begin to produce diagrams more complex than the demonstrative ones (already available in the package) to perform new actions, try to avoid the limitations of the library and start to think about expanding the library with new blocks. 20

38 Figure 2.1: Arduino Target Blocks 2.5 Limtations AT is a library with great potentials. With it a user could theoretically create any type of executable to send to an Arduino board without using the Arduino programming language. So, programming Arduino without knowing a single word of a programming language. But nowadays still has got a lot of limitations and can be considered only a future great product that has to be improved. The on-line documentation is nearly absent; it consists only of the few demos already present in the downloadable content. There isn t any other description of the product, of the blocks and of their limitations. For being a relatively new product, only a few people is using it and 21

39 so help is difficult to find on forums or on-line communities. Furthermore, the communication with MathWorks and its on-line help-center isn t easy: they never respond in a short time and most of the answers are authomatic (generated by bots) or not helpful. For our purpose there is also another great limitation: for the moment AT doesn t permit to have access to all the peripherals and features of Arduino. So it isn t possible to use them in a Simulink model. In the following sections of the report further descriptions of the blocks will be given. I will also talk about the possibility of create new blocks using Arduino code and the Legacy Code Tool and the problems encountered during my period of study of AT. 2.6 Summary AT has only a few blocks for the moment, but is a really simple to be used and installed in Matlab. A user with a good knowledge of the Simulink blocks could realize interesting models, though the complexity is limited by the small number of Arduino functions of the library. The aim is to insert more Arduino functions in the AT blocks, even if a direct Arduino libraries compilation will be necessary. The main goal is to manage to communicate directly with the robots of the laboratory using Simulink models with AT blocks. The robots we use in our university will be presented in the following section. 22

40 Chapter 3 StingBot Figure 3.1: StingBot structure 23

41 3.1 General description The robotic platform is a differential drive system (non-holonomic robot) built upon the StingBot Robot Kit, equipped with 2 DC gearhead motors with quadrature wheel encoders. The following figure gives a general view of the StingBot Robot. The StingBot Robot is equipped with: 3x Maxbotix Sonars MB1300 Arduino Uno with ATmega328 Motor drive Omni 3MD ZigBee module Xbee Arduino Shield 2x DC Gearhead Motor with Quadrature Encoder 2x Battery Ni-MH pack 9.6V 2300mAh Foam tires The processing and control units are the Arduino Uno with a XBee shield module and the motor drive OMNI-3MD, which are located inside the Sting- Bot chassis. The battery pack is placed above the chassis, between the shield and the acrylic support and held together by two strips of velcro on the outside for easy access and replacement. The circuit switch power is located in the back of the platform. Table 3.1 presents some hardware specifications. 24

42 Specification Value Unit Voltage Range 9-14 V Electric Current in Operation 1200 ma Electric Current in Standby 110 ma Maximum Speed 0,95 m/s Weight 879 g Weight with notebook 1990 g Width 260 mm Length 235 mm Height 125 mm Table 3.1: Hardware Specifications of the StingBot 3.2 Main schematic system The processing unit consists of an Arduino Uno board equipped with a microcontroller ATmega 328p from Atmel, which controls the platform s motion through the use of the Bot n Roll OMNI-3MD board. For range sensing, the robot uses Maxbotix Sonars MB1300 with a maximum range of approximately 6 meters, which can have a configurable disposition with the possibility of using up to 4 sonars in one platform using the analog ports of the Arduino Uno board. For range sensing, the robot uses Maxbotix Sonars MB1300 with a maximum range of approximately 6 meters, which can have a configurable disposition with the possibility of using up to 4 sonars in one platform using the analog ports of the Arduino Uno board. Additionally, to enable point-to-point communication between robots, the Xbee Shield, consisting on a ZigBee communication antenna attached on top of the Arduino Uno board as an expansion module, was also incorporated. As for power source, two packs of 9.6V 2300mAh Ni-MH batteries are deployed above the chassis of each robot to ensure good autonomy. Finally, the platform also has the possibility of including a 10 netbook on top of an acrylic support, which extends the processing power and provides more flexibility. In our case, an 25

43 Figure 3.2: Main control circuit ASUS eeepc 1001PXD BLACK N455 is used due to its reduced price and size. Using the netbook has the advantage of enabling communication via Wireless WiFi b/g/n. Moreover, the netbook s battery does not limit the autonomy of the platform, since it can operate autonomously for around 6 hours. 3.3 What can be done with StingBot and actual AT library The main operation that can be done using AT blocks is the serial communication. It was tested using various communication velocities and gave always great performances. In the next section I ll show the Simulink blockdiagrams to use to perform various types of serial communications, with examples and descriptions. It is possible to receive from Arduino (and send 26

44 to) digital and anagogic data that can be read on the screen directly from a Simulink scope or that can be saved in a Matlab variable in order to create a report of the experiences done StingBot sonars Figure 3.3: StingBot 3d model The Maxbotix MB1300 range sonar provides very short (15.24cm) to long-distance (645.16cm) detection and ranging, with 2.54cm resolution. The interface format used is the analog output. Among the advantages of this device, it insures a reliable and stable range data, it is a very low cost sonar, with virtually gone dead zone, one of the gold mark of this sensor. It also has the very low power ranger, which is excellent for the battery system implemented in this project, with a fast measurement cycle with readings that can occur up to every 50ms (20-Hz rate), which are reported the range reading directly, freeing up user processor. 27

45 Main features: Continuously variable gain for beam control and side lobe suppression Object detection includes zero range objects 2.5V to 5.5V supply with 2mA typical current draw Sensor operate at 42KHz Free run operation can continually measure and output range information Triggered operation provides the range reading as desired Output used: AN: Outputs analog voltage with a scaling factor of (Vcc/512). A supply of 5V yields 3.9mV/cm. and 3.3V yields 2.5mV/cm. The output is buffered and corresponds to the most recent range data +5: Vcc Operates on 2.5V - 5.5V. Recommended current capability of 3mA for 5V, and 2mA for 3V GND: Return for the DC power supply. GND (& Vcc) must be ripple and noise free for best operation While moving in a space with obstacles, the robot can recognize the presence of the obstacles using the sonars and then communicate their distance via the anagogic pins of Arduino (a distance-depending value is sent). Our StingBot mounts three sonars but we can t perform a simultaneous reading of the three values. Fortunately (especially directly with Arduino code), the readings are really fast (more than 10 per second), and so we have an almost immediate reading of the data from all the three sonars. In the next chapter I ll show the Simulink diagram used to perform the readings, and the respective part of Arduino code used to test the sonars. 28

46 3.4 What can t be done with StingBot and actual AT library AT library will be even more powerful if other Arduino functions could be added to the blocks in an easy way. This would be fundamental to open for example an I 2 C communication, that is necessary to communicate with the robots and so to make them move in the space without using other hardware or other languages like ROS (we would like to do all the operation within an Arduino environment). The main idea is to compile Arduino code directly from MATLAB using features that would be explained in the next section. More, create new blocks to be added at the AT library; these blocks could have all the Arduino functions we like in their source code. For the moment it isn t possible to do this last step, but the instruments and the features of MATLAB that are under study are for sure the correct ones. 3.5 Summary AT libraries and StingBot were briefly presented. In the following section I ll explain how to work with the Simulink blocks of the library, showing how the blocks work and the various diagrams that can be created. Moreover, useful features of MATLAB will be added to the projects in order to extend the potentiality of the diagrams of blocks created. 29

47 30

48 Chapter 4 Experiments and results In this section will be explicated all the functions of the AT blocks, and the models obtained using them. Then will be presented the use of callback functions within Simulink, and a brief how to about creating new blocks compiling parts of Arduino code. AT at the moment consists of only 7 blocks. It could seem a very low number. However, because of being integrated in models using potentially almost all other Simulink blocks, the library offers the possibility to obtain great results, as far as developing complex schemes of blocks. 31

49 4.1 Build a model: what does it mean? Using the Arduino IDE 1 it is possible to upload part of Arduino code in a board linked with an USB cable to the PC. Here there is an example of code that can be uploaded within the original Arduino software interface: Figure 4.1: Arduino IDE code example As can be read from the code, normally an Arduino code has got two parts: in the first Setup part a user can initialize his variables and set parameters such as used pins, communication speed, type of communication and so on; the second Loop part is the list of the actions that the board will perform in loop, like the name of the function suggests. The upload of the code can be done from the interface of the IDA with an upload button (the right-arrow button of the screenshot). If you have a Simulink model, doing the built-in is the same thing that uploading a code from the IDE. The action can be done by pressing ctrl+b 1 Arduino Integrated Development Environment, downloadable from 32

50 or pushing the incremental build button in the model window (as can be seen in figure 4.2). Figure 4.2: Simulink Blinking led example As well as with the Arduino code, here there are blocks that performs the setup function and others that perform the loop function. In the simple example of the figure (that do the same actions of the previous Blink example) the Digital Output block acts like the Setup function while the Repeating Sequence Stair block acts like the Loop function. Either uploading the code from the IDE or building the model in from Simulink, the led of the 13th digital pin will turn on for one second, then off for one second, repeatedly. 33

51 4.2 Serial communication The main Arduino function that can be pretty easily done with AT is open a serial communication between the board and Matlab. In the donwloadable packet is already present a demo-model that explains how to perform a basic one. The model that does it is the follow: Figure 4.3: Serial communication example This model is divided in two parts: the first (blocks above) perform the transmission of a value received form a serial communication to a digital pin; the second (blocks below) receive a value from Arduino and send it to the PC with a serial communication. The blocks between those of AT are necessary to make the conversions between input and output data types: every block accept only some types of data, and so most of the times a conversion is 34

52 required. Analog Input block can be substituted with a Digital Input block if a user wanted to read the state of a digital pin (high or low). When using those Serial blocks of AT, also the Serial Config block is necessary. With it, the speed of the communication can be chosen. 35

53 4.3 Server/Host system To perform simulations, the users have to set up a couple of server/host models. What I mean is a first block that is built in the board and provide the board of the loop function(s); a second block that receive and send signals from/to the board. It can be done through a serial communication between Arduino and Matlab. Doing this the host block can perform several things: measure the level of an analog pin, evaluate the state of a digital pin, count the state variations of the pins and so on. A simple host demo-model equipped in the AT library is the follow: Figure 4.4: Serial communication: host blocks diagram The model is clearly strictly connected with the first presented one. Serial Send block send the value that will be written in the digital pin 13 and the Serial Receive block read the value from the Analog pin 2. It is important to think about a off-state of the communication, here realized with a 0 constant value and a switch. Normally, without the possibility to put the simulation into a off state, Matlab will send some kind of errors and will 36

54 not permit to perform the simulation. Display or Scope blocks are really useful to analyze graphically the input signals that we receive with a serial communication from Arudino. 4.4 Circuit examples Using a few electric parts and a breadboard we can realize small circuits and create Simulink models that substitute a lot of Arduino Code: Read a potentiometer Figure 4.5: Reading a value from a potentiometer: circuit scheme The circuit it s pretty simple: just connect the three wires from the potentiometer to the Arduino board. The first goes to ground from one of the outer pins of the potentiometer. The second goes from 5 volts to the other outer pin of the potentiometer. The third goes from analog input 2 to the middle pin of the potentiometer. By turning the shaft of the potentiometer, 37

55 it is possible to change the amount of resistance on either side of the wiper which is connected to the center pin of the potentiometer. This changes the voltage at the center pin. When the resistance between the center and the side connected to 5 volts is close to zero (and the resistance on the other side is close to 10 kiloohms), the voltage at the center pin nears 5 volts. When the resistances are reversed, the voltage at the center pin nears 0 volts, or ground. This voltage is the analog voltage that we are reading as an input. Simulink model In this case the server part of the project can be the same as before. We just have to send the read value from an Analog Pin to the Serial Write block. In the Host part (figure 4.6), we can add an Embedded Matlab Function block to send to the serial port values depending of the received one (for example we can send a 1 to the digital pin 13 if the value from the potentiometer is higher than a preset value). In the example we can also read the value directly on the Simulink windows from the Display block. The function that use can be like the following: Figure 4.6: Reading a value from a potentiometer: Simulink diagram 38

56 Corresponding Arduino code With this Simulink model a lot of Arduino code is substituted. Here are the corresponding lines (with comment that explain the code): /* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor. Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. */ // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin 0: int sensorvalue = analogread(a0); // print out the value you read: Serial.println(sensorValue); delay(1); // delay in between reads for stability } 39

57 Embedded coder Embedded Matlab is a subset of the Matlab language that supports efficient code generation for deployment in embedded systems and acceleration of fixed-point algorithms. In the Simulink environment it appears like a block in which you can write your own Matlab function that uses the inputs to generate depending outputs. Embedded MATLAB does not support the following MATLAB features: Cell arrays Command/function duality Dynamic variables Global variables Java Matrix deletion Nested functions Objects Sparse matrices Try/catch statements Even with those limitations, is a very useful mode to work with the signals received without having to think about additional blocks to look for in the Simulink Library. The blocks of the Embedded coder can be found in the user-defined functions Simulink section. 40

58 4.4.2 Digital counter Figure 4.7: Button State Change Detection (Edge Detection): Circuit scheme Connect three wires to the Arduino board. The first goes from one leg of the pushbutton through a pull-down resistor (here 10 KOhms) to ground. The second goes from the corresponding leg of the pushbutton to the 5 volt supply. The third connects to a digital i/o pin (here pin 2) which reads the button s state. When the pushbutton is open (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to voltage, so that we read a HIGH. (The pin is still connected to ground, but the resistor resists the flow of current, so the path of least resistance is to +5V). Simulink model To perform the count of the changes of state of the digital pin we can use the Counter Block. It has various parameters to be set: count direction, 41

59 Figure 4.8: Button State Change Detection (Edge Detection): Simulink diagram type of event to count and the maximum size of the counter. More, also the output can be set: count and hit, only count or only hit. The user can eventually add a reset input to externally reset the count. Note that the presence of the Serial Configuration block is necessary. Without it any kind of serial communication won t be possible. It permits to set the ports used and the communication rate speed for the Host model. Corresponding Arduino code /* State change detection (edge detection) Often, you don t need to know the state of a digital input all the time, but you just need to know when the input changes from one state to another. For example, you want to know when a button goes from OFF to ON. This is called state change detection, or edge detection. This example shows how to detect when a button or button 42

60 changes from off to on and on to off. The circuit: * pushbutton attached to pin 2 from +5V * 10K resistor attached to pin 2 from ground * LED attached from pin 13 to ground (or use the built-in LED on most Arduino boards) created 27 Sep 2005 modified 30 Aug 2011 by Tom Igoe This example code is in the public domain. */ // this constant won t change: const int buttonpin = 2; const int ledpin = 13; // Variables will change: int buttonpushcounter = 0; int buttonstate = 0; int lastbuttonstate = 0; void setup() { // initialize the button pin as a input: pinmode(buttonpin, INPUT); // initialize the LED as an output: 43

61 } pinmode(ledpin, OUTPUT); // initialize serial communication: Serial.begin(9600); void loop() { // read the pushbutton input pin: buttonstate = digitalread(buttonpin); // compare the buttonstate to its previous state if (buttonstate!= lastbuttonstate) { // if the state has changed, increment the counter if (buttonstate == HIGH) { // if the current state is HIGH then the button // wend from off to on: buttonpushcounter++; Serial.println("on"); Serial.print("number of button pushes: "); Serial.println(buttonPushCounter); } else { // if the current state is LOW then the button // wend from on to off: Serial.println("off"); } } // save the current state as the last state, //for next time through the loop lastbuttonstate = buttonstate; 44

62 // turns on the LED every four button pushes by // checking the modulo of the button push counter. // the modulo function gives you the remainder of // the division of two numbers: if (buttonpushcounter % 4 == 0) { digitalwrite(ledpin, HIGH); } else { digitalwrite(ledpin, LOW); } } 45

63 4.4.3 PWM This example shows how to read an analog input pin, map the result to a range from 0 to 255, and then use that result to set the pulsewidth modulation (PWM) of an output pin to dim or brighten an LED. Figure 4.9: PWM circuit scheme Connect one pin from your pot to 5V, the center pin to analog pin 0, and the remaining pin to ground. Next, connect a 220 ohm current limiting resistor to digital pin 9, with an LED in series. The long, positive leg (the 46

64 anode) of the LED should be connected to the output from the resistor, with the shorter, negative leg (the cathode) connected to ground. Simulink model Figure 4.10: PWM simulink diagram We can perform this action in Simulink using the variable delay event genetator block. It commands the event counter block that here is set on 0-1. The analog input determines the different delay wherewith the event is created. This event is substantially a 1 to send to the output (that is the digital pin where the led is connected). With this diagram I can make a led bright at different speeds, only using a potentiometer that modifies an analog input. Corresponding Arduino code /* Analog input, analog output, serial output Reads an analog input pin, maps the result to a range from 0 to 255 and uses the result to set the pulsewidth modulation (PWM) of an output pin. Also prints the results to the serial monitor. 47

65 The circuit: * potentiometer connected to analog pin 0. Center pin of the potentiometer goes to the analog pin. side pins of the potentiometer go to +5V and ground * LED connected from digital pin 9 to ground created 29 Dec modified 9 Apr 2012 by Tom Igoe This example code is in the public domain. */ // These constants won t change. They re used to give names // to the pins used: const int analoginpin = A0; const int digitaloutpin = 9; int sensorvalue = 0; int outputvalue = 0; void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); } void loop() { // read the analog in value: sensorvalue = analogread(analoginpin); 48

66 // map it to the range of the analog out: outputvalue = map(sensorvalue, 0, 1023, 0, 255); // change the analog out value: digitalwrite(analogoutpin, outputvalue); } // wait 2 milliseconds before the next loop // for the analog-to-digital converter to settle // after the last reading: delay(2); 49

67 4.4.4 N bits to N pins This example can be all done without a breadboard, but to test if is working, we can connect a led to every digital pin we are about to set to High or Low. Simulink model Figure 4.11: Send N pins to N bits: simulink diagram Another server-host couple. The first to be sent to Arduino, the second to be used during the simulation. With this diagram I can set N Arduino digital pins with N different values (High or Low) directly from Simulink (In the example N = 3). The values are sent to the Serial Send block in the host part. They are then read and elaborated with the Embedded coder block in the server part. 50

68 The function I wrote is the following 2 : function[a,b,c] = fcn(u,n) %#codegen a = 0; b = 0; c = 0; out = zeros(n); for i = 1:N att_val = 10^(N-i); att_div = u./att_val; if att_div == 1 out(n-i+1) = 1; u = u-att_val; end; end; a = out(3); b = out(2); c = out(1); Also Data conversion blocks are necessary, because the various blocks of the diagrams sometimes require different types of variables. We can test if the simulation is working connecting leds to the digital bits used in the server part. Also the Serial Write part in the Server diagram is used to test in the 2 First I create a out vector of zeros. It will have the same dimension of N, the number of pins that I want to set. Than in the for cycle I take advantage of the input being a decimal number with only 1 or 0 as digits. I subsequently divide it by powers of ten. If the result is 1, I substitute the value of the actual element of out with 1. At the end I copy the values of the out vector to the N output variables. 51

69 host model if the simulation is working well. In the host part we have only to send the desired values. For example to set all three pins to High we have to send a 111 (decimal); to set two pins to Low and one to High we have to send a 1, a 10 or a 100, depending on which block we want to set on High (sending 1 is the same that sending a 001 and sending 10 is the same that sending a 010 ). 52

70 4.5 Read values from Sonars Sonars of StingBot were presented and described in the past chapter. They are mounted in the front part of the chassis. Moving the robot within an environment with obstacles (with a ROS driver) we can receive informations about the distance between an obstacle and the robot, and than decide where and how to move the robot in order to avoid collisions. Simulink model Figure 4.12: Read Values from Sonars: simulink diagram The three analog inputs blocks represent the three sonars, witch are connected to three analog pins of Arduino. Unfortunately we can read only one value at a time, so is necessary a multiport that switches between the three inputs, one by one. The multiport is controlled by the same sequence of 53

71 blocks that we already used in the PWM example. The event that makes the switch work is a 1 again. It is generated by a sequence of zeros and ones (repeated stair sequence block). This sequence goes into a digital pin of Arduino. This pin is input and output at the same time. First it receives the zeros-ones sequence and then it controls the Event Counter block. The switching speed between the three sonars depends on the sampling time that I can set for the Repeated Stair Sequence block. Unfortunately it can t be lower than 0.1 seconds. For this reason I could read only 3 values per second for every sonar, and this is a negative aspect in this case: performing the same action directly with the Arduino IDE I could read a lot of more values per second. In the host part where I actually read the values I can save the data in MATLAB vectors of variables, in order to create a sort of report of the simulation. It can be done using the callback functions of MATLAB. They will be presented in the following section. Corresponding Arduino code This is the code that is used to test if the Sonars are working. With it we can take the values from the sonars and read them on the serial monitor. // Standard lib #include <stdio.h> #include <string.h> #include <math.h> /***************** Functions *****************/ // SONARS int getrange(int pin_num) { 54

72 int aux_sensorvalue=0, sensorvalue=0, cnt=0; int samples = 20; delay(10); while (cnt!= samples) { digitalwrite(12, HIGH); // Activate chain reading on sonars sensorvalue = analogread(pin_num); sensorvalue = * pow(sensorvalue,0.9465) ; aux_sensorvalue = aux_sensorvalue + sensorvalue; cnt = cnt + 1; digitalwrite(12, LOW); } cnt=0; sensorvalue = round( aux_sensorvalue / samples); return (sensorvalue); } /***************** Setup *****************/ void setup() { Serial.begin(19200); //DEBUG on default serial port 55

73 /* Give 5v to power sonars, digital pin 13 */ pinmode(13, OUTPUT); digitalwrite(13, HIGH); /* Give 5v to digital pin 12 */ pinmode(12, OUTPUT); digitalwrite(12, LOW); delay(250); // Wait 250ms before reading sonars } void loop() { delay(500); Serial.println(getRange(A0), DEC); delay(10); Serial.println(getRange(A1), DEC); delay(10); Serial.println(getRange(A2), DEC); delay(10); Serial.print("------\n"); } 56

74 4.6 Callback functions Callback functions are a powerful way of customizing your Simulink model. A callback is a function that executes when you perform various actions on your model, such as clicking on a block or starting a simulation. You can use callbacks to execute a MATLAB script or other MATLAB commands. You can use block, port, or model parameters to specify callback functions. Common tasks you can achieve by using callback functions include: Loading variables into the MATLAB workspace automatically when you open your Simulink model Executing a MATLAB script by double-clicking on a block Executing a series of commands before starting a simulation Executing commands when a block diagram is closed You can create model callback functions interactively or programmatically. Use the Callbacks pane of the model s Model Properties dialog box to create model callbacks interactively. To create a callback programmatically, use the set param command to assign a MATLAB expression that implements the function to the model parameter corresponding to the callback. For example, the following command evaluates the variable testvar when the user double-clicks the Test block in mymodel model: set param( mymodel/test, OpenFcn, testvar) You can examine the clutch system (sldemo clutch.mdl) for routines associated with many model callbacks. This model defines the following callbacks: PreLoadFcn PostLoadFcn 57

75 StartFcn StopFcn CloseFcn There also also three useful function that can be used to start, pause or continue the simulation when you perform one of the actions listed here: Set param ( mymodel/test, SimulationCommand, start ) Set param ( mymodel/test, SimulationCommand, pause) Set param ( mymodel/test, SimulationCommand, continue) The complete documentation can be found here : Legacy Code Tool You can use the Simulink Legacy Code Tool to automatically generate fully inlined C MEX S-functions for legacy or custom code that is optimized for embedded components, such as device drivers and lookup tables, that call existing C or C++ functions. You can use the tool to: Compile and build the generated S-function for simulation. Generate a masked S-Function block that is configured to call the existing external code. If you want to include these types of S-functions in models for which you intend to generate code, you must use the tool to generate a TLC block file. The TLC block file specifies how the generated code for a model calls the existing C or C++ function. If the S-function depends on files in folders other than the folder containing the S-function dynamically loadable executable file, and you want to maintain those dependencies for building a model that 58

76 includes the S-function, use the tool to also generate an rtwmakecfg.m file for the S-function. For example, for some applications, such as custom targets, you might want to locate files in a target-specific location. The Simulink Coder build process looks for the generated rtwmakecfg.m file in the same folder as the S-function s dynamically loadable executable and calls the rtwmakecfg function if the software finds the file. An example of how to compile an own C++ code using also Arduino functions can be found in the Appendix B. 4.8 Summary A valid simulator of Arduino Uno (usable in Simulink) doesn t exist yet. Testing models requires the presence of external components like a breadboard, resistances, switches, leds etc. Anyway, with only a few of them it is possible to realize and simulate pretty complex and interesting projects. Those simulations are necessary to understand that the models we create are good and can be exported to bigger projects. Beyond the blocks libraries, Simulink and Matlab offer others tools that permit to improve our Arduino experience, like callback functions and Legacy Code Tool. Even the study of AT library isn t completed yet and in the future it could become a more complex and complete library, I will try to give a general opinion about this product. In the following section also some ideas for future works and improvements will be presented. 59

77 60

78 Chapter 5 Conclusion & Future works I would say that AT is a great product. Once improved and diffused more widely will be a library of great use also in academic field. Being integrated in a blocks-scheme environment, it permits to perform many simulations of many types in a short time. This fact also helps a lot when debugging. Block and parameters of the models to debug can be substituted or variated easily, in contrast to working with a programming language. 5.1 Conclusions Cons... The AT users community is still small but growing. For this reason is still difficult to share information, projects and ideas with a wide group of people. Furthermore, as I already said, the technical help of Mathworks for AT is nearly absent, as well as a relative documentation. Documents like this one, sorts of how to don t exist or are very hard to find. There are good news: Matworks released a few months ago a new version of the library. There aren t substantial differences with the older one at a first sight, but for sure the code was a bit re-writted and some small bugs were corrected. This fact could mean that AT is still an alive project and that 61

79 some Simulink/Arduino users started using it. Lastly, it is still hard to add Arduino functions to new blocks, because of many compiling errors, but this is for sure a work in progress & Pros For sure AT has got much positive aspects than negative ones. It is inside a completely open-source environment: AT code is open source in its own and it works with Arduino, that was born to be a open-source project. An open-source context permits to share data without limitations and helps a fast development. Another positive aspect of the library is that it works with Simulink, which is a Matworks product, integrated in Matlab. Matlab nowadays is a worldwide known software and I think that realizing Arduino projects could be part of informatics or electronics thesis. Even if aren t many, the already present blocks are very simple to use. They don t require practically any configuration (except very few parameters like the number of a pin or the serial port used), and so a new user can start to work with the AT library easily from the beginning, also without having a great knowledge of Simulink or Matlab. Moreover, the possibility to use also useful Matlab tools like the Embedded Coder and the Callback Functions give to the models enormous potentiality. 5.2 Other platforms Other two AT-like platforms were found on Matlab downloadable stuff. They are very similar to the one I used in my study and it would be intresting to do a detailed comparison between them. For the moment the other libraries were only mentioned, and weren t used for lack of time. By the way, they can be found here: and here: 62

80 5.3 Future works and applications As already anticipated, the main idea to improve AT library is to extend the library with new blocks. We could create our own Arduino code, directly compile it from MATLAB and then, using MATLAB tools like LCT, create a new Simulink block that uses the Arduino functions from our code. The possibility of adding other Arduino functions to the library would permit to have access also to other features that can normally be done with Arduino pins. In Appendix C there is a detailed description of the Uno Board. One example is the external interrupt (with the function attachinterrupt() ): imaging of moving the robot around, we can block the simulation using the Callback Function, but having the possibility to use an external interrupt directly in a block of a Simulink model the performances would be greater. Figure 5.1: Communications in the motor driver/stingbot/arduino system 63

Surveillance System Using Wireless Sensor Networks

Surveillance System Using Wireless Sensor Networks Surveillance System Using Wireless Sensor Networks Dan Nguyen, Leo Chang Computer Engineering, Santa Clara University Santa Clara, California, USA dantnguyen84@gmail.com chihshun@gmail.com Abstract The

More information

Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure

Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure Micah Dowty University of Colorado at Boulder micah@navi.cx March 26, 2004 Abstract Traditional software development

More information

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

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home Building a Basic Communication Network using XBee DigiMesh Jennifer Byford April 5, 2013 Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home Abstract: Using Digi International s in-house

More information

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications Joshua Ellul jellul@imperial.ac.uk Overview Brief introduction to Body Sensor Networks BSN Hardware

More information

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

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Abstract This application note is a tutorial of how to use an Arduino UNO microcontroller to

More information

Freescale Semiconductor, I

Freescale Semiconductor, I nc. Application Note 6/2002 8-Bit Software Development Kit By Jiri Ryba Introduction 8-Bit SDK Overview This application note describes the features and advantages of the 8-bit SDK (software development

More information

Accurate Measurement of the Mains Electricity Frequency

Accurate Measurement of the Mains Electricity Frequency Accurate Measurement of the Mains Electricity Frequency Dogan Ibrahim Near East University, Faculty of Engineering, Lefkosa, TRNC dogan@neu.edu.tr Abstract The frequency of the mains electricity supply

More information

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Using Arduino Microcontrollers to Sense DC Motor Speed and Position ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------

More information

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Microcontroller Programming Beginning with Arduino. Charlie Mooney Microcontroller Programming Beginning with Arduino Charlie Mooney Microcontrollers Tiny, self contained computers in an IC Often contain peripherals Different packages availible Vast array of size and

More information

A Practical Approach to Education of Embedded Systems Engineering

A Practical Approach to Education of Embedded Systems Engineering A Practical Approach to Education of Embedded Systems Engineering Özgür Yürür Department of Electrical Engineering University of South Florida Tampa, Florida, 33620 oyurur@mail.usf.edu Wilfrido Moreno

More information

Course Project Documentation

Course Project Documentation Course Project Documentation CS308 Project Android Interface Firebird API TEAM 2: Pararth Shah (09005009) Aditya Ayyar (09005001) Darshan Kapashi (09005004) Siddhesh Chaubal (09005008) Table Of Contents

More information

In: Proceedings of RECPAD 2002-12th Portuguese Conference on Pattern Recognition June 27th- 28th, 2002 Aveiro, Portugal

In: Proceedings of RECPAD 2002-12th Portuguese Conference on Pattern Recognition June 27th- 28th, 2002 Aveiro, Portugal Paper Title: Generic Framework for Video Analysis Authors: Luís Filipe Tavares INESC Porto lft@inescporto.pt Luís Teixeira INESC Porto, Universidade Católica Portuguesa lmt@inescporto.pt Luís Corte-Real

More information

Robot Task-Level Programming Language and Simulation

Robot Task-Level Programming Language and Simulation Robot Task-Level Programming Language and Simulation M. Samaka Abstract This paper presents the development of a software application for Off-line robot task programming and simulation. Such application

More information

Measuring Temperature withthermistors a Tutorial David Potter

Measuring Temperature withthermistors a Tutorial David Potter NATIONAL INSTRUMENTS The Software is the Instrument Application Note 065 Measuring Temperature withthermistors a Tutorial David Potter Introduction Thermistors are thermally sensitive resistors used in

More information

STEPPER MOTOR SPEED AND POSITION CONTROL

STEPPER MOTOR SPEED AND POSITION CONTROL STEPPER MOTOR SPEED AND POSITION CONTROL Group 8: Subash Anigandla Hemanth Rachakonda Bala Subramanyam Yannam Sri Divya Krovvidi Instructor: Dr. Jens - Peter Kaps ECE 511 Microprocessors Fall Semester

More information

C4DI Arduino tutorial 4 Things beginning with the letter i

C4DI Arduino tutorial 4 Things beginning with the letter i C4DI Arduino tutorial 4 Things beginning with the letter i If you haven t completed the first three tutorials, it might be wise to do that before attempting this one. This tutorial assumes you are using

More information

INTRODUCTION TO SERIAL ARM

INTRODUCTION TO SERIAL ARM INTRODUCTION TO SERIAL ARM A robot manipulator consists of links connected by joints. The links of the manipulator can be considered to form a kinematic chain. The business end of the kinematic chain of

More information

Instruction Manual Service Program ULTRA-PROG-IR

Instruction Manual Service Program ULTRA-PROG-IR Instruction Manual Service Program ULTRA-PROG-IR Parameterizing Software for Ultrasonic Sensors with Infrared Interface Contents 1 Installation of the Software ULTRA-PROG-IR... 4 1.1 System Requirements...

More information

Prototyping Connected-Devices for the Internet of Things. Angus Wong

Prototyping Connected-Devices for the Internet of Things. Angus Wong Prototyping Connected-Devices for the Internet of Things Angus Wong Agenda 1) Trends of implementation of IoT applications REST Cloud 2) Connected-device Prototyping Tools Arduino Raspberry Pi Gadgeteer

More information

Lecture 7: Programming for the Arduino

Lecture 7: Programming for the Arduino Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page1 The hardware

More information

Work with Arduino Hardware

Work with Arduino Hardware 1 Work with Arduino Hardware Install Support for Arduino Hardware on page 1-2 Open Block Libraries for Arduino Hardware on page 1-9 Run Model on Arduino Hardware on page 1-12 Tune and Monitor Models Running

More information

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs) Embedded Systems on ARM Cortex-M3 (4weeks/45hrs) Course & Kit Contents LEARN HOW TO: Use of Keil Real View for ARM Use ARM Cortex-M3 MCU for professional embedded application development Understanding

More information

Arduino project. Arduino board. Serial transmission

Arduino project. Arduino board. Serial transmission Arduino project Arduino is an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Open source means that the

More information

Controlling a Dot Matrix LED Display with a Microcontroller

Controlling a Dot Matrix LED Display with a Microcontroller Controlling a Dot Matrix LED Display with a Microcontroller By Matt Stabile and programming will be explained in general terms as well to allow for adaptation to any comparable microcontroller or LED matrix.

More information

EasyC. Programming Tips

EasyC. Programming Tips EasyC Programming Tips PART 1: EASYC PROGRAMMING ENVIRONMENT The EasyC package is an integrated development environment for creating C Programs and loading them to run on the Vex Control System. Its Opening

More information

DEPARTMENT OF ELECTRONICS ENGINEERING

DEPARTMENT OF ELECTRONICS ENGINEERING UNIVERSITY OF MUMBAI A PROJECT REPORT ON Home Security Alarm System Using Arduino SUBMITTED BY- Suman Pandit Shakyanand Kamble Vinit Vasudevan (13103A0011) (13103A0012) (13103A0018) UNDER THE GUIDANCE

More information

Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com

Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com Office: (916) 624-8333 Fax: (916) 624-8003 Sales: (888) 512-1024 Tech Support: (888) 997-8267

More information

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply Servo Motors (SensorDAQ only) Project 7 Servos are small, relatively inexpensive motors known for their ability to provide a large torque or turning force. They draw current proportional to the mechanical

More information

Monitoring Software using Sun Spots. Corey Andalora February 19, 2008

Monitoring Software using Sun Spots. Corey Andalora February 19, 2008 Monitoring Software using Sun Spots Corey Andalora February 19, 2008 Abstract Sun has developed small devices named Spots designed to provide developers familiar with the Java programming language a platform

More information

DKWF121 WF121-A 802.11 B/G/N MODULE EVALUATION BOARD

DKWF121 WF121-A 802.11 B/G/N MODULE EVALUATION BOARD DKWF121 WF121-A 802.11 B/G/N MODULE EVALUATION BOARD PRELIMINARY DATA SHEET Wednesday, 16 May 2012 Version 0.5 Copyright 2000-2012 Bluegiga Technologies All rights reserved. Bluegiga Technologies assumes

More information

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 CMPS03 Magnetic Compass. Voltage : 5v only required Current : 20mA Typ. Resolution : 0.1 Degree Accuracy : 3-4 degrees approx. after calibration Output

More information

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering ECE 495 Project 3: Shocker Actuator Subsystem and Website Design Group 1: One Awesome Engineering Luquita Edwards Evan Whetsell Sunny Verma Thomas Ryan Willis Long I. Executive Summary The main goal behind

More information

ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering

ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering Daniel Estrada Taylor, Dev Harrington, Sekou Harris December 2012 Abstract This document is the final report for ENGI E1112,

More information

Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot

Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot 1. Objective Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot In this lab, you will: i. Become familiar with the irobot and AVR tools. ii. Understand how to program a

More information

EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering

EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering Introduction: In this lab, you will develop a simple kernel

More information

Embedded Component Based Programming with DAVE 3

Embedded Component Based Programming with DAVE 3 Embedded Component Based Programming with DAVE 3 By Mike Copeland, Infineon Technologies Introduction Infineon recently introduced the XMC4000 family of ARM Cortex -M4F processor-based MCUs for industrial

More information

DAQ in MATLAB HANS-PETTER HALVORSEN, 2012.09.11

DAQ in MATLAB HANS-PETTER HALVORSEN, 2012.09.11 Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics DAQ in MATLAB HANS-PETTER HALVORSEN, 2012.09.11 Faculty of Technology, Postboks 203, Kjølnes ring

More information

Impedance 50 (75 connectors via adapters)

Impedance 50 (75 connectors via adapters) VECTOR NETWORK ANALYZER PLANAR TR1300/1 DATA SHEET Frequency range: 300 khz to 1.3 GHz Measured parameters: S11, S21 Dynamic range of transmission measurement magnitude: 130 db Measurement time per point:

More information

Digital Electronics Detailed Outline

Digital Electronics Detailed Outline Digital Electronics Detailed Outline Unit 1: Fundamentals of Analog and Digital Electronics (32 Total Days) Lesson 1.1: Foundations and the Board Game Counter (9 days) 1. Safety is an important concept

More information

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation UPS PIco Uninterruptible Power Supply with Peripherals and I 2 C control Interface to be used with Raspberry Pi B+, A+, B, and A HAT Compliant Raspberry Pi is a trademark of the Raspberry Pi Foundation

More information

Lab Experiment 1: The LPC 2148 Education Board

Lab Experiment 1: The LPC 2148 Education Board Lab Experiment 1: The LPC 2148 Education Board 1 Introduction The aim of this course ECE 425L is to help you understand and utilize the functionalities of ARM7TDMI LPC2148 microcontroller. To do that,

More information

Basic Pulse Width Modulation

Basic Pulse Width Modulation EAS 199 Fall 211 Basic Pulse Width Modulation Gerald Recktenwald v: September 16, 211 gerry@me.pdx.edu 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power

More information

Tutorial for MPLAB Starter Kit for PIC18F

Tutorial for MPLAB Starter Kit for PIC18F Tutorial for MPLAB Starter Kit for PIC18F 2006 Microchip Technology Incorporated. All Rights Reserved. WebSeminar Title Slide 1 Welcome to the tutorial for the MPLAB Starter Kit for PIC18F. My name is

More information

DS1104 R&D Controller Board

DS1104 R&D Controller Board DS1104 R&D Controller Board Cost-effective system for controller development Highlights Single-board system with real-time hardware and comprehensive I/O Cost-effective PCI hardware for use in PCs Application

More information

An Introduction to MPLAB Integrated Development Environment

An Introduction to MPLAB Integrated Development Environment An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to

More information

Lab 6 Introduction to Serial and Wireless Communication

Lab 6 Introduction to Serial and Wireless Communication University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Elec/Comp/Sys Engineering Lab 6 Introduction to Serial and Wireless Communication Introduction: Up to this point,

More information

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

Microcontroller-based experiments for a control systems course in electrical engineering technology

Microcontroller-based experiments for a control systems course in electrical engineering technology Microcontroller-based experiments for a control systems course in electrical engineering technology Albert Lozano-Nieto Penn State University, Wilkes-Barre Campus, Lehman, PA, USA E-mail: AXL17@psu.edu

More information

Massachusetts Institute of Technology

Massachusetts Institute of Technology Objectives Massachusetts Institute of Technology Robotics: Science and Systems I Lab 1: System Overview and Introduction to the µorcboard Distributed: February 4, 2015, 3:30pm Checkoffs due: February 9,

More information

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically EE389 Electronic Design Lab Project Report, EE Dept, IIT Bombay, Nov 2009 Fully-automated control of lighting and security system of a Room Group No: D2 Bharat Bhushan (06d04026) Sravan

More information

Component-based Robotics Middleware

Component-based Robotics Middleware Component-based Robotics Middleware Software Development and Integration in Robotics (SDIR V) Tutorial on Component-based Robotics Engineering 2010 IEEE International Conference on Robotics and Automation

More information

Applications to Computational Financial and GPU Computing. May 16th. Dr. Daniel Egloff +41 44 520 01 17 +41 79 430 03 61

Applications to Computational Financial and GPU Computing. May 16th. Dr. Daniel Egloff +41 44 520 01 17 +41 79 430 03 61 F# Applications to Computational Financial and GPU Computing May 16th Dr. Daniel Egloff +41 44 520 01 17 +41 79 430 03 61 Today! Why care about F#? Just another fashion?! Three success stories! How Alea.cuBase

More information

Semester Thesis Traffic Monitoring in Sensor Networks

Semester Thesis Traffic Monitoring in Sensor Networks Semester Thesis Traffic Monitoring in Sensor Networks Raphael Schmid Departments of Computer Science and Information Technology and Electrical Engineering, ETH Zurich Summer Term 2006 Supervisors: Nicolas

More information

Next Gen Platform: Team & Mentor Guide

Next Gen Platform: Team & Mentor Guide Next Gen Platform: Team & Mentor Guide 1 Introduction For the 2015-2016 season, the FIRST Tech Challenge (FTC) will be adopting a new controller for its robot competitions. The new platform, which will

More information

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller Overview The objective of this lab is to introduce ourselves to the Arduino interrupt capabilities and to use

More information

Domains and Competencies

Domains and Competencies Domains and Competencies DOMAIN I TECHNOLOGY APPLICATIONS CORE Standards Assessed: Computer Science 8 12 I VII Competency 001: The computer science teacher knows technology terminology and concepts; the

More information

Board also Supports MicroBridge

Board also Supports MicroBridge This product is ATmega2560 based Freeduino-Mega with USB Host Interface to Communicate with Android Powered Devices* like Android Phone or Tab using Android Open Accessory API and Development Kit (ADK)

More information

XBee Wireless Sensor Networks for Temperature Monitoring

XBee Wireless Sensor Networks for Temperature Monitoring XBee Wireless Sensor Networks for Temperature Monitoring Vongsagon Boonsawat, Jurarat Ekchamanonta, Kulwadee Bumrungkhet, and Somsak Kittipiyakul School of Information, Computer, and Communication Technology

More information

Synapse s SNAP Network Operating System

Synapse s SNAP Network Operating System Synapse s SNAP Network Operating System by David Ewing, Chief Technology Officer, Synapse Wireless Today we are surrounded by tiny embedded machines electro-mechanical systems that monitor the environment

More information

New Technology Introduction: Android Studio with PushBot

New Technology Introduction: Android Studio with PushBot FIRST Tech Challenge New Technology Introduction: Android Studio with PushBot Carol Chiang, Stephen O Keefe 12 September 2015 Overview Android Studio What is it? Android Studio system requirements Android

More information

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs AN033101-0412 Abstract This describes how to interface the Dallas 1-Wire bus with Zilog s Z8F1680 Series of MCUs as master devices. The Z8F0880,

More information

Chapter I Model801, Model802 Functions and Features

Chapter I Model801, Model802 Functions and Features Chapter I Model801, Model802 Functions and Features 1. Completely Compatible with the Seventh Generation Control System The eighth generation is developed based on the seventh. Compared with the seventh,

More information

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver Electronics Exercise 2: The 555 Timer and its Applications Mechatronics Instructional Laboratory Woodruff School of Mechanical Engineering Georgia Institute of Technology Lab Director: I. Charles Ume,

More information

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

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205] Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205] Users Manual Robokits India info@robokits.co.in http://www.robokitsworld.com Page 1 Bluetooth + USB 16 Servo Controller is used to control up to

More information

Linux. Reverse Debugging. Target Communication Framework. Nexus. Intel Trace Hub GDB. PIL Simulation CONTENTS

Linux. Reverse Debugging. Target Communication Framework. Nexus. Intel Trace Hub GDB. PIL Simulation CONTENTS Android NEWS 2016 AUTOSAR Linux Windows 10 Reverse ging Target Communication Framework ARM CoreSight Requirements Analysis Nexus Timing Tools Intel Trace Hub GDB Unit Testing PIL Simulation Infineon MCDS

More information

Force/position control of a robotic system for transcranial magnetic stimulation

Force/position control of a robotic system for transcranial magnetic stimulation Force/position control of a robotic system for transcranial magnetic stimulation W.N. Wan Zakaria School of Mechanical and System Engineering Newcastle University Abstract To develop a force control scheme

More information

Android, Bluetooth and MIAC

Android, Bluetooth and MIAC Android, Bluetooth and MIAC by Ben Rowland, June 2012 Abstract Discover how easy it is to use TCP network communications to link together high level systems. This article demonstrates techniques to pass

More information

JNIOR. Overview. Get Connected. Get Results. JNIOR Model 310. JNIOR Model 312. JNIOR Model 314. JNIOR Model 410

JNIOR. Overview. Get Connected. Get Results. JNIOR Model 310. JNIOR Model 312. JNIOR Model 314. JNIOR Model 410 The INTEG is an Ethernet I/O (digital, analog) device that monitors and controls a small set of process signals. functions as both basic I/O for integration with another application or system AND as a

More information

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Fondamenti su strumenti di sviluppo per microcontrollori PIC Fondamenti su strumenti di sviluppo per microcontrollori PIC MPSIM ICE 2000 ICD 2 REAL ICE PICSTART Ad uso interno del corso Elettronica e Telecomunicazioni 1 2 MPLAB SIM /1 MPLAB SIM is a discrete-event

More information

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs Welcome to this tutorial on Microchip s MPLAB Starter Kit for dspic Digital Signal Controllers, or DSCs. The starter kit is an all-in-one

More information

Operating Systems 4 th Class

Operating Systems 4 th Class Operating Systems 4 th Class Lecture 1 Operating Systems Operating systems are essential part of any computer system. Therefore, a course in operating systems is an essential part of any computer science

More information

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22. www.dragino.com

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22. www.dragino.com Yun Shield User Manual VERSION: 1.0 Version Description Date 0.1 Initiate 2014-Jun-21 1.0 Release 2014-Jul-08 Yun Shield User Manual 1 / 22 Index: 1 Introduction... 3 1.1 What is Yun Shield... 3 1.2 Specifications...

More information

MANUAL FOR RX700 LR and NR

MANUAL FOR RX700 LR and NR MANUAL FOR RX700 LR and NR 2013, November 11 Revision/ updates Date, updates, and person Revision 1.2 03-12-2013, By Patrick M Affected pages, ETC ALL Content Revision/ updates... 1 Preface... 2 Technical

More information

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION Introduction The outputs from sensors and communications receivers are analogue signals that have continuously varying amplitudes. In many systems

More information

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

Intro to Intel Galileo - IoT Apps GERARDO CARMONA Intro to Intel Galileo - IoT Apps GERARDO CARMONA IRVING LLAMAS Welcome! Campus Party Guadalajara 2015 Introduction In this course we will focus on how to get started with the Intel Galileo Gen 2 development

More information

Networking Remote-Controlled Moving Image Monitoring System

Networking Remote-Controlled Moving Image Monitoring System Networking Remote-Controlled Moving Image Monitoring System First Prize Networking Remote-Controlled Moving Image Monitoring System Institution: Participants: Instructor: National Chung Hsing University

More information

Integrated Open-Source Geophysical Processing and Visualization

Integrated Open-Source Geophysical Processing and Visualization Integrated Open-Source Geophysical Processing and Visualization Glenn Chubak* University of Saskatchewan, Saskatoon, Saskatchewan, Canada gdc178@mail.usask.ca and Igor Morozov University of Saskatchewan,

More information

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com Best Practises for LabVIEW FPGA Design Flow 1 Agenda Overall Application Design Flow Host, Real-Time and FPGA LabVIEW FPGA Architecture Development FPGA Design Flow Common FPGA Architectures Testing and

More information

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Objectives: Analyze the operation of sequential logic circuits. Understand the operation of digital counters.

More information

Computer Automation Techniques. Arthur Carroll

Computer Automation Techniques. Arthur Carroll Computer Automation Techniques Arthur Carroll 1 Three Types of Computers Micro-Controller Single Board Computer Desktop Computer 2 The Micro-Controller Small inexpensive DIP or surface mount chips Roughly

More information

ROBOTICS AND AUTONOMOUS SYSTEMS

ROBOTICS AND AUTONOMOUS SYSTEMS ROBOTICS AND AUTONOMOUS SYSTEMS Simon Parsons Department of Computer Science University of Liverpool LECTURE 3 PROGRAMMING ROBOTS comp329-2013-parsons-lect03 2/50 Today Before the labs start on Monday,

More information

System Structures. Services Interface Structure

System Structures. Services Interface Structure System Structures Services Interface Structure Operating system services (1) Operating system services (2) Functions that are helpful to the user User interface Command line interpreter Batch interface

More information

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version 2.1.0 (2014-01-16)

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version 2.1.0 (2014-01-16) PCAN-MicroMod Universal I/O Module with CAN Interface User Manual Document version 2.1.0 (2014-01-16) Products taken into account Product Name Part number Model PCAN-MicroMod IPEH-002080 with firmware

More information

Inwall 4 Input / 4 Output Module

Inwall 4 Input / 4 Output Module Inwall 4 Input / 4 Output Module IO44C02KNX Product Handbook Product: Inwall 4 Input / 4 Output Module Order Code: IO44C02KNX 1/27 INDEX 1. General Introduction... 3 2. Technical data... 3 2.1 Wiring Diagram...

More information

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1 The I2C Bus Introduction The I2C-bus is a de facto world standard that is now implemented in over 1000 different ICs manufactured by more than 50 companies. Additionally, the versatile I2C-bus is used

More information

2.0 Command and Data Handling Subsystem

2.0 Command and Data Handling Subsystem 2.0 Command and Data Handling Subsystem The Command and Data Handling Subsystem is the brain of the whole autonomous CubeSat. The C&DH system consists of an Onboard Computer, OBC, which controls the operation

More information

A REST API for Arduino & the CC3000 WiFi Chip

A REST API for Arduino & the CC3000 WiFi Chip A REST API for Arduino & the CC3000 WiFi Chip Created by Marc-Olivier Schwartz Last updated on 2014-04-22 03:01:12 PM EDT Guide Contents Guide Contents Overview Hardware configuration Installing the library

More information

Visual Programming of Logic, Motion, and Robotics

Visual Programming of Logic, Motion, and Robotics ADVANCED Motion Controls October 2014 Visual Programming of Logic, Motion, and Robotics Sándor Barta Overview The art of programming consists of mentally translating a workflow into a sequential programming

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ 2008, Prentice Hall I/O Devices Roadmap Organization

More information

GPS & GSM BASED REAL-TIME VEHICLE TRACKING SYSTEM.

GPS & GSM BASED REAL-TIME VEHICLE TRACKING SYSTEM. GPS & GSM BASED REAL-TIME VEHICLE TRACKING SYSTEM. Introduction: The Proposed design is cost-effective, reliable and has the function of accurate tracking. When large object or vehicles were spread out

More information

Lezione 10 Introduzione a OPNET

Lezione 10 Introduzione a OPNET Corso di A.A. 2007-2008 Lezione 10 Introduzione a OPNET Ing. Marco GALEAZZI 1 What is OPNET? Con il nome OPNET viene indicata una suite di prodotti software sviluppati e commercializzati da OPNET Technologies,

More information

New Relic & JMeter - Perfect Performance Testing

New Relic & JMeter - Perfect Performance Testing TUTORIAL New Relic & JMeter - Perfect Performance Testing by David Sale Contents Introduction 3 Demo Application 4 Hooking Into New Relic 4 What Is JMeter? 6 Installation and Usage 6 Analysis In New Relic

More information

How to program a Zumo Robot with Simulink

How to program a Zumo Robot with Simulink How to program a Zumo Robot with Simulink Created by Anuja Apte Last updated on 2015-03-13 11:15:06 AM EDT Guide Contents Guide Contents Overview Hardware Software List of Software components: Simulink

More information

A UNIVERSAL MACHINE FOR THE INDUSTRIAL INTERNET OF THINGS. MultiConnect Conduit

A UNIVERSAL MACHINE FOR THE INDUSTRIAL INTERNET OF THINGS. MultiConnect Conduit A UNIVERSAL MACHINE FOR THE INDUSTRIAL INTERNET OF THINGS MultiConnect Conduit 1 A Universal Machine for the Industrial Internet of Things The term Universal Machine, introduced in 1936 by the mathematician

More information

HOME ALARM MONITORING NETWORK GOH SWEE TIAN

HOME ALARM MONITORING NETWORK GOH SWEE TIAN iv HOME ALARM MONITORING NETWORK GOH SWEE TIAN This thesis is submitted as partial fulfillment of the requirements for the award of the Bachelor of Electrical Engineering (Hons.) (Electronics) Faculty

More information

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player Watt Saver for a Cell Phone AC Adapter Reference Design Document Number: DRM130 Rev 1, 10/2013 2 Freescale Semiconductor, Inc. Contents Section number Title Page Chapter 1 Introduction 1.1 Overview...5

More information

Multi-Touch Control Wheel Software Development Kit User s Guide

Multi-Touch Control Wheel Software Development Kit User s Guide Multi-Touch Control Wheel Software Development Kit User s Guide V3.0 Bulletin #1204 561 Hillgrove Avenue LaGrange, IL 60525 Phone: (708) 354-1040 Fax: (708) 354-2820 E-mail: instinct@grayhill.com www.grayhill.com/instinct

More information

Waspmote. Quickstart Guide

Waspmote. Quickstart Guide Waspmote Quickstart Guide Index Document version: v4.3-11/2014 Libelium Comunicaciones Distribuidas S.L. INDEX 1. Introduction... 3 2. General and safety information... 4 3. Waspmote s Hardware Setup...

More information

Java Embedded Applications

Java Embedded Applications TM a One-Stop Shop for Java Embedded Applications GeeseWare offer brings Java in your constrained embedded systems. You develop and simulate your Java application on PC, and enjoy a seamless hardware validation.

More information

A Surveillance Robot with Climbing Capabilities for Home Security

A Surveillance Robot with Climbing Capabilities for Home Security Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology IJCSMC, Vol. 2, Issue. 11, November 2013,

More information