This document discusses rapid IoT prototyping using Tizen on Raspberry Pi. It provides an overview of Tizen and Raspberry Pi, describes how to build Tizen for Raspberry Pi using Yocto Project tools, and discusses connecting sensors and communicating between IoT devices. It also presents examples of open source hardware add-on boards that can be designed for Raspberry Pi to create IoT prototypes.
Advantages of Hiring UIUX Design Service Providers for Your Business
Rapid IoT Prototyping with Tizen on Raspberry Pi
1. Rapid IoT Prototyping with
Tizen on Raspberry Pi
Leon Anavi
leon.anavi@konsulko.com
leon@anavi.org
2. Agenda
Tizen
Raspberry Pi
Sensors and peripherals
Building Tizen for Raspberry Pi
Communication between IoT
Open source hardware HAT
3. Tizen
Open source Linux-based software platform
Project of the Linux foundation
Compatible with ARM, MIPS and Intel architectures
Excellent HTML5 and web apps support
Suitable of all device areas: mobile, wearable, embedded, TV, IVI, IoT, etc.
4. Tizen Milestones
2011 - Start of the project
2012 - Initial release
2013 - First Tizen devices (Samsung NX200 & NX300 cameras)
2014 - First Tizen smartwatches (Samsung Gear 2 & Gear 2 Neo)
2015 - Samsung Z1 - the first Tizen smarthone
2015 - Tizen ported to Raspberry Pi
6. Raspberry Pi
Low cost single board computer
Broadcom ARM SoC
Huge community
Most popular programming languages:
Python, C, C++, etc.
7. Raspberry Pi Milestones
2009 - Raspberry Pi Foundation
2012 - The 1st Raspberry Pi
2014 - Raspberry Pi B+
2015 - Tizen ported to Raspberry Pi
2016 - Raspberry Pi Zero
2017 – Raspberry Pi Zero W
12. I2C
Inter-integrated Circuit (I2C) Protocol
Full-duplex bidirectional two-wire serial bus for communication of
multiple slave devices with one or more master devices
Raspberry Pi B+ and newer models have two I2C buses
SCL
SDA
Master
Raspberry Pi
(pins: 3, 5) Slave 1 Slave 2 Slave N...
13. Popular I2C Sensors
HTU21D – temperature and humidity
BME280 - temperature, barometric pressure and humidity
BMP280/BMP180/BMP085 – temperature and barometric pressure
HMC5883L - compass
TSL2561 – light
BH1750 - light
14. 1-Wire
Single-wire communication protocol
Half-duplex bidirectional communication (master-slave)
Slower data transfer but longer range than I2C
DS18B20 temperature sensor
15. SPI
Serial Peripheral Interface (SPI) bus
Synchronous serial communication in master-slave architecture
Popular SPI peripheral devices such as sensors, displays, NFC/RFID
readers/writers
16. Analog sensors
Raspberry Pi does NOT have a built-in A/D converter
Popular external A/D converters:
● Microchip MCP3002 dual channel A/D converter
● Microchip MCP3008 8 channel A/D converter
17. Tizen for Raspberry Pi
Samsung Open Source Group (OSG) initially ported Tizen 3.0 to Raspberry Pi
2 Model B using the Yocto Project and OpenEmbedded (OE)
Tizen on Yocto/OE aims at building Tizen images using the tools provided by
the Yocto Project
Tizen on Yocto/OE provides Tizen distribution layer meta-tizen
Tizen for Raspberry Pi uses BSP layer meta-raspberrypi
Craftroom with Tizen 4.0 and Raspberry Pi support
announced at TDC2017
18. What is in Tizen 3.0 for Raspberry Pi?
Linux kernel
Smack
RPM Package Manager
systemd
GCC
Crosswalk
Cynara
SQLite
PulseAudio
Wayland & Weston
GNU C Library
EFL
19. The Yocto Project
Open source collaborative project for creating custom Linux-based systems for
embedded devices
Based on the OpenEmbedded build framework
Project of the Linux Foundation
Used for building Poky, Automotive Grade Linux (AGL), GENIVI Development
Platform (GDP), Tizen, Reference Design Kit (RDK), Ångström, Arago, Ostro,
AsteroidOS, etc.
Getting started:
https://www.yoctoproject.org/
https://www.yoctoproject.org/documentation
20. Raspberry Pi Yocto/OE BSP
Yocto/OE BSP layer for Raspberry Pi: meta-raspberrypi
Upstream of meta-raspberrypi:
http://git.yoctoproject.org/cgit.cgi/meta-raspberrypi/
Fork of meta-raspberrypi from Samsung Open Source Group (OSG) with
enabled 3D hardware acceleration for Wayland/Weston:
http://git.s-osg.org/meta-raspberrypi.git/
21. Building Tizen for Raspberry Pi
Download tizen-distro
Download meta layers with additional board support packages (BSP)
Configure conf/local.conf and conf/bblayers.conf
Launch a build of a Tizen image... get a cup of tea while waiting...
Grab the generated image from tmp-glibc/deploy/images/${MACHINE}
Details:
https://wiki.tizen.org/Raspberry_Pi#Build_using_Tizen_Yocto
22. Adding Packages
Append packages, for example vim, to image by adding the following
command to conf/local.conf or the image's recipe:
IMAGE_INSTALL_append = " vim "
Customize the Tizen image by adding or removing packages
23. Bitbake Cheat Sheet
Check value of a variable in a recipe
bitbake tizen-common-core-image-crosswalk -e | grep ^ROOTFS_PKGMANAGE
Check recipe version
bitbake -s | grep crosswalk
Build a package or an image
bitbake foo
Clean up
bitbake -c clean foo
Recompile if the source has been changed
bitbake -f -c compile foo
Output dependency tree in graphviz format
bitbake -g tizen-common-core-image-crosswalk
24. Contributing to Tizen on Yocto
Tizen-distro uses combo-layer script git://git.tizen.org/scm/bb/tizen-distro
Tizen-distro layers:
openembedded-core, meta-openembedded, meta-qt5, meta-tizen
Meta-tizen git://git.tizen.org/scm/bb/meta-tizen
Step by step instructions for contributing through Git and Gerrit
https://wiki.tizen.org/How_to_contribute_to_Tizen_on_Yocto_Project
26. Putting the Pieces Together
Customize Tizen image for Raspberry Pi using Yocto/OE
Pick up the right peripherals
Design custom add-on board for Raspberry Pi
Consider using the free and open source software tool KiCAD for designing open
source hardware add-on boards
Create prototypes using the services of OSHPark, Chinese companies or your
local PCB manufacturer
27. Open Source Hardware
Design specifications of a PCB or another physical object which are licensed in
such a way that said object can be studied, modified, created, and distributed by
anyone
Popular open source hardware devices:
Arduino, OLinuXino, Beaglebone, MinnowBoard
Open Source Hardware Association (OSHW)
https://www.oshwa.org/
28. Making Raspberry Pi HAT
Form factor and dimensions (65x56mm)
40 pin header compatible with Raspberry Pi B+ and the newer models
EEPROM with device tree fragment
Details:
https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/
https://github.com/raspberrypi/hats
29. Making Raspberry Pi pHAT
Form factor suitable for Raspberry Pi Zero with 4 mount holes
Dimensions 65x30mm
40 pin through-hole header
EEPROM not mandatory
*Not an official standard of the Raspberry Pi Foundation
30. Showcase 1: Bringing Life in Retro Devices
ANAVI Infrared pHAT (open source hardware)
Linux Infrared Remote Control (LIRC)
Replacing IR remote controls of old TV, HiFi, air conditioners and making them IoT
31. Showcase 2: Raspberry Pi Gardening
ANAVI Gardening pHAT with MCP3002 A/D Converter
Analog soil moisture sensors
1-wire DS18B20 waterproof sensor
I2C sensors for light, temperature and humidity