EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

Similar documents
ARDUINO PRIMO. Code: A000135

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Mercury System SB310

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

EZ-Bv4 Datasheet v0.7

Doc: page 1 of 8

Raspberry Pi - I/O Interfaces

Unlocking the Potential of Your Microcontroller

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Husarion CORE2. Husarion CORE2 is a development board for Internet-connected automation & robotic devices.

pcduino V3B XC4350 User Manual

ARDUINO BOARD LINE UP

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Designing with ALTERA SoC Hardware

Raspberry Pi. Hans-Petter Halvorsen, M.Sc.

MYD-JA5D2X Development Board

Choosing a Micro for an Embedded System Application

Programming in the MAXQ environment

LinkSprite Technologies,.Inc. pcduino V2

3.3V regulator. JA H-bridge. Doc: page 1 of 7

PCI to SH-3 AN Hitachi SH3 to PCI bus

Digital Circuits Part 2 - Communication

Lesson 5 Arduino Prototype Development Platforms. Chapter-8 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Farklı Arduino Boardlar

ARDUINO YÚN MINI Code: A000108

STM32 Cortex-M3 STM32F STM32L STM32W

PBLN52832 DataSheet V Copyright c 2017 Prochild.

Doc: page 1 of 6

Health monitoring of an power amplifier using an ethernet controller

esi-risc Development Suite Getting Started Guide

i.mx 7 - Hetereogenous Multiprocessing Architecture

Adafruit Feather nrf52840 Express

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

USER GUIDE EDBG. Description

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Copyright 2016 Xilinx

FreeBSD and Beaglebone Black, a robotic application.

EDBG. Description. Programmers and Debuggers USER GUIDE

PCB-STM32-F3U. Development baseboard for the STMicro Discovery-F3 module (STMicro part# STM32F3DISCOVERY)

Cerebot Nano Reference Manual. Overview. Revised April 15, 2016 This manual applies to the Cerebot Nano rev. A

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

Basics of UART Communication

keyestudio Keyestudio MEGA 2560 R3 Board

IMU6420 V0.98 Data Logger Release Notes January 12, 2013

Introduction to L.A.P. 1

ARDUINO YÚN Code: A000008

386EX PC/104 Computer with CompactFlash and PCMCIA SBC1390

Chapter 15. ARM MCUs Architecture, Programming and Development Tools

参考資料. LinkSprite.com. pcduino V2

Basic Components of Digital Computer

Advantages of MIPI Interfaces in IoT Applications

FriendlyARM. Mini2440.

Hello, and welcome to this presentation of the STM32L4 System Configuration Controller.

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Doc: page 1 of 6

STM32F429 Overview. Steve Miller STMicroelectronics, MMS Applications Team October 26 th 2015

Microcontroller: CPU and Memory

Freedom FRDM-KV31F Development Platform User s Guide

Hugo Cunha. Senior Firmware Developer Globaltronics

Overview The Microcontroller The Flex Board Expansion boards Multibus board Demo board How to: Compile demo Flash & Run Demos

IJREAT International Journal of Research in Engineering & Advanced Technology, Volume 1, Issue 5, Oct-Nov, 2013 ISSN:

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Various power connectors. 3.3V regulator. 64K Flash (Internal) 2K EEPROM (Internal) 4K SRAM (Internal) JA Mem Adr/ Data. Doc: page 1 of 9

ARDUINO MEGA INTRODUCTION

MYD-IMX28X Development Board

Intel Galileo gen 2 Board

MiCOKit-3166 Development Kit Hardware Manual

ARDUINO INDUSTRIAL 1 01 Code: A000126

AT-501 Cortex-A5 System On Module Product Brief

Final Exam Study Guide

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Interconnects, Memory, GPIO

Pmod ESP32 Reference Manual

Unwired One. Main Features. Wireless embedded computer

The Riverside Robotic Society June 2016 ESP8266

Introduction to ARM LPC2148 Microcontroller

Overview of the Raspberry Pi Models 3B & 2B

Zatara Series ARM ASSP High-Performance 32-bit Solution for Secure Transactions

Bluegiga Wi-Fi Software 9/19/2013 1

Prototyping Module Datasheet

Serial Peripheral Interface Bus SPI

Use of ISP1880 Accelero-Magnetometer, Temperature and Barometer Sensor

Product Technical Brief S3C2413 Rev 2.2, Apr. 2006

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

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

Microcontroller basics

Creator Ci40 product brief

Product Specification

XC2000 Family AP Application Note. Microcontrollers. XC2236N Drive Card Description V1.0,

HEXIWEAR COMPLETE IOT DEVELOPMENT SOLUTION

ESPino - Specifications

Kinetis KE1xF512 MCUs

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

Interesting Items Volume 16. Dave Jaffe 04/23/2011

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

ARROW ARIS EDGE Board User s Guide 27/09/2017

EMBEDDED HARDWARE. Core Board. ARM7 Development board. ARM7 Evaluation Board. Page 1 of 5

XE166 Family AP Application Note. Microcontrollers. X E D r i v e C a r d H a r d w a r e D e s c r i p t i o n Board REV.

Arduino Dock 2. The Hardware

Xynergy It really makes the difference!

Transcription:

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

Adam Lindberg github.com/eproxus

HARDWARE COMPONENTS SOFTWARE FUTURE

Boot, Serial console, Erlang shell DEMO

THE GRISP BOARD SPECS Hardware & specifications

EMBEDDED WIRELESS DEVICE

REAL ERLANG ON REAL BARE METAL You ll never get Erlang this close to hardware anywhere else

CONNECTORS FOR SENSORS & ACTUATORS

300 MHZ 64 MiB RAM WIFI MICROSD

CPU

ARM CORTEX M7 ATMEL SAM V71 UP TO 300MHZ FPU & DSP EXT. ARM Cortex M7 Core 32-bit System on a Chip (SoC) Atmel SAM V71 Microcontroller (MCU) Runs up to 300 Mhz Single- and double-precision HW Floating Point Unit (FPU) Digital Signal Processing extensions

RAM Storage

MICROSD Storage

INTERNAL 2048 KiB FLASH 384 KiB SRAM Flash used for bootloader

EXTERNAL 64 MiB SDRAM 2 KiB EEPROM MICROSD 64 MiB SDRAM, plenty for Erlang EEPROM for storing configs MicroSD socket for external storage

WIFI Storage

802.11N 2.4 GHZ UP TO 150 MBPS POWER SAVING IEEE 802.11 b/g/n for the 2.4 Ghz band On-board USB2.0 interface 72.2Mbps receive and transmit rate using 20MHz bandwidth 150Mbps receive and transmit rate using 40MHz bandwidth Power saving mechanism

GPIO Two generic GPIO 6-pin ports

GPIO Two generic GPIO 6-pin ports

RGB LEDS Two RGB LEDs

SWITCHES 5 generic DIP switches

RESET Reset button

GENERAL PURPOSE INPUT/OUTPUT SUPPORTS PWM Generic pins controllable at runtime Support for Pulse Width Modulation (PWM) LED brightness & precise motor control

UART

ASYNCHRONOUS SERIAL COMMUNICATION BIT STREAMS CONFIGURABLE Universal Asynchronous Receiver/Transmitter (UART) Asynchronous serial communication Generic bit streams Data format and transmission speeds are configurable

SPI One SPI 6-pin port

SPI One SPI 12-pin port

SYNCHRONOUS SERIAL COMMUNICATION BROAD CHIP SUPPORT UP TO 20 MBIT/S Serial Peripheral Interface Synchronous serial communication bus Simple as GPIO, but serial Lots of chips support it Fast, up to 20 Mbit/s

MASTER SLAVE PROTOCOL 2 LINES IO 1 CLOCK LINE 1 SLAVE SELECT POWER & GROUND 6-pin master/slave protocol with 4 wires + power & ground 2 lines for input/otput (MOSI/MISO) 2 lines for clock and slave select One extended SPI port with extra interrupt lines (12-pin)

I2C

MASTER SLAVE PROTOCOL 1 DATA LINE 1 CLOCK LINE POWER & GROUND ADRESSABLE Inter-Integrated Circuit Master/slave protocol Two lines (data + clock) + power & ground Addressable clients, send data packets with address Usually for board-local communication, unreliable over longer distances Slow, only 0.4 Mbit/s

1-WIRE

DALLAS 1-WIRE 1 DATA + POWER LINE GROUND ADDRESSABLE MICROLAN Developed by Dallas Semiconductor Corp. Only 1 wire for data (plus ground) To power themselves, devices charges a small capacitor when data line is not used Similar to I2C but lower data rate and longer distance Master plus devices constitutes a MicroLAN Devices has a unique 64-bit address (ID + device type) Popular devices are buttons, key fobs, weather sensors etc.

MICROUSB

JTAG JTAG debugger

MICROUSB FOR POWER & SERIAL CONSOLE JTAG DEBUGGER USB connector Power from laptop or battery pack Serial console JTAG debugger access External JTAG connector ARM 2 10 pin

ACCESSORIES PMODS

TEXT

TEXT CON3 GPIO Four standard 3-wire servo motor connectors

TEXT NAV SPI 9-axis Inertial Measurement Unit (IMU) Plus Barometer 3-axis accelerometer, 3-axis gyroscope, 3-axis magnetometer

TEXT GYRO SPI 3-axis Digital Gyroscope

TEXT ACL2 SPI 3-axis Microelectromechanical System (MEMS) Accelerometer

TEXT HB3 GPIO H-bridge Driver with Feedback Inputs Drive a DC motor with operation voltage up to 12V

TEXT HB5 GPIO H-bridge Driver with Feedback Inputs 6-pin JST connector for direct connection to Digilent motor/gearboxes Drive a DC motor with operation voltage up to 12V

TEXT GPS UART GPS Receiver 3m 2D satellite positioning accuracy

PmodACL2 Accelerando? DEMO

TOOLCHAIN, OS & RUNTIME SOFTWARE

RTEMS RTOS OS-AS-A-LIBRARY POSIX Real-Time Executive for Multiprocessor Systems Real Time Operating System (RTOS) Free & open source OS-as-a-library Supports open standard APIs (e.g. POSIX)

PERFORMANT SMP PROCESSES VIA THREADS FREEBSD NETWORKING Scalable timer and timeout support Uses fine-grained locking Processes emulated by threads SMP support Uses the FreeBSD networking stack

BEAM COMPILED WITH RTEMS STARTS FROM BOOTLOADER OS APIS PROVIDED BY RTEMS We compile BEAM with RTEMS headers and libraries The VM can be started directly from the boot loader The OS APIs that the VM needs are implemented by RTEMS

BEAM APPLICATION OTP GRiSP RUNTIME RTEMS HARDWARE

GRiSP RUNTIME HARDWARE ABSTRACTION LOW LEVEL DRIVERS HIGH LEVEL DRIVERS Erlang application and linked-in drivers Interface to interact with the GRiSP hardware and devices Low-level drivers for SPI & GPIO High-level drivers LEDs DIP switches PMODs

EXAMPLE SPI DRIVER

SPI DRIVER (C) void grisp_spi_output (ErlDrvData drv_data, char *buf, ErlDrvSizeT len) { // // Grab first byte as chip select cs = buf[0]; bufgh; len -= 1;

SPI DRIVER (C) // msg.cs = cs; msg.tx_buf = buf; msg.rx_buf = res; msg.len = len; rv = ioctl(grisp_spi_data.fd, SPI_IOC_MESSAGE(1), &msg); assert(rv == 0); driver_output(grisp_spi_data.port, res, len); }

SPI DRIVER (ERLANG) -module(grisp_spi_drv). -export([open/0, command/3]). open() Y> open_port({spawn_driver, "grisp_spi_drv"}, [binary]). command(port, Slot, Command) Y> Slot = slave_select(slot), # gpio1 Y> 2 Command = <<Slot, Command/binary>>, Port! {self(), {command, Command}}. slave_select is a function that maps the slot name to a number

SPI DRIVER (SHELL) 1> Command = <<16#0B, 16#0E>>. <<16#0B, 16#0E>> 2> Raw = <<Command/binary, 0>>. <<16#0B, 16#0E, 0>> 3> grisp_spi_drv:command(port, spi1, Raw). {<0.132.0>,{command,spi1,<<11,14,0>>}} 4> flush(). Shell got {<0.127.0>,{data,<<0,0,172>>}} ok 5> grisp_spi:send_recv(spi1, Command, 2, 1). <<" ">>

Motor Robot? DEMO

WHAT WE RE WORKING ON THE FUTURE

ISSUES FULL WIFI SUPPORT MICROSD SPEED CLOCK SPEED OFF Direct memory access (DMA) Some low-lever time mechanism used by Erlang has the wrong time

IOT SYNCHRONIZATION-FREE PROGRAMMING HYBRID GOSSIP PROTOCOLS

ROADMAP ERLANG 19/20 REBAR3 TOOLING PMOD DRIVERS & WIFI Rebar3 tooling (releases, cross compiling custom VM build) More high-level PMOD drivers Wi-Fi connection management Upgrade to Erlang 19/20

grisp.org github.com/grisp stritzinger.com THANK YOU! QUESTIONS?