KEMBAR78
Making Open Source Hardware IoT with Raspberry Pi | PDF
Making Open Source Hardware IoT
with Raspberry Pi
Leon Anavi
Konsulko Group
leon.anavi@konsulko.com
OpenIoT Summit
21-23 February, Portland, Oregon
Agenda
 Raspberry Pi add-on boards for IoT
 Raspberry Pi HAT
 Raspberry Pi pHAT
 Designing an open source hardware
 Software support
What is Open Source Hardware?
 Design of physical objects that is publicly
available so that anyone can study, modify,
distribute, make, and sell the design or
hardware based on that design
Open Source Hardware Licenses
 GNU General Public License (GPL)
 Creative Commons Attribution-ShareAlike
 CERN Open Hardware License (OHL)
 TAPR Open Hardware License (OHL)
 FreeBSD
 MIT
 Other
Why Raspberry Pi?
 Low cost credit-card-sized computer
 Good software support
 Huge community
 NOT open source hardware!
Raspberry Pi
 2009 - Raspberry Pi Foundation
 2012 – The 1st
Raspberry Pi
 2014 – Raspberry Pi B+
 2016 – Raspberry Pi Zero
Raspberry Pi Flavors
Many add-on boards
Important Change in B+
40
pins
26
pins
Raspberry Pi B+
(2014)
Raspberry Pi B
(2011)
Raspberry Pi Flavors
40 Pin Header
Raspberry Pi HAT
Since 31st
July 2014
Raspberry Pi HAT
!=
Hat HAT
(Hardware Attached on Top)
HAT Requirements
 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
pHAT
 Form factor suitable for Raspberry Pi Zero
with 4 mount holes and dimensions
65x30mm
 40 pin through-hole header
 EEPROM not mandatory
* Not an official standard of the Raspberry Pi Foundation
Sense HAT
 Official product of the Raspberry Pi
Foundation
 Sensors for temperature, humidity,
barometric pressure, gyroscope,
accelerometer, magnetometer
 8x8 RGB LED matrix
 Five-button joystick
More...
Making Your 1st
HAT
Requirements:
 Idea (for example: a blinking
LED)
 Soldering equipment
 Adafruit Perma-Proto HAT
 Additional hardware resources
(depending on the idea)
Device Tree Fragment
 Data structure with hardware description of
the Raspberry Pi HAT stored on EEPROM
 8 pin DIP I2C EEPROM
 Recommended EEPROM CAT24C32
Flashing the EEPROM
 Download and build eepromutils
https://github.com/raspberrypi/hats
 Create a text file with description of your HAT
using eeprom_settings.txt for example
 Generate .epp file using eepmake
 Flash the binary file to the EEPROM using
eepflash.sh
EEPROM Wiring
 Flashing the EEPROM: pin 2 and 3
 Reading from the EEPROM: pin 27 and 28
device-tree/hat
 Directory /proc/device-tree/hat
 Information about product name, version,
vendor and UUID
Designing PCB
Electronics Design Automation Suites:
 KiCAD (free & open source software)
 Eagle (free for small 2 Layer PCB)
 Other
KiCAD Advantages
 Free & open source software (GPLv3+)
 Cross platform (works on GNU/Linux
distributions, MS Windows and Mac OS X)
 Integrated 3D viewer
 Contributions from CERN developers
 Used by Olimex for the design of their new
open source hardware boards
HAT Templates
 KiCAD
https://github.com/xesscorp/RPi_Hat_Template
http://gitlab.openfet.com/julien/pihat-template
 Eagle
http://www.flyfish-tech.com/pub/RasPi-BplusHAT.zip
My OSHW HAT & pHAT
Anavi Flex HAT
https://github.com/AnaviTech/anavi-flex
Anavi Infrared pHAT
https://github.com/AnaviTech/anavi-infrared
KiCAD Pcbnew
Recommendations
 Comply with the minimum requirements of the
PCB manufacturer for trace spaces, drills and
angular rings
 Keep in mind the complexity of the assembly
process while designing the PCB
 Consider the location of Raspberry Pi
components while placing components on
your HAT and avoid any potential negative
impact
Prototypes
PCB printing services from:
 OSHPark (Made in the USA)
 China
 Local
Software
 Python is popular programming language
among Raspberry Pi makers
 WiringPi library for C/C++
 WiringPi language bindings: Java, JavaScript
(Node.js), PHP, Perl, Go, Rust, etc.
 Other FOSS (LIRC, OpenCV, etc.)
… and one more thing
Share your hardware and
software under open
source licenses :)
Thank You!
Useful links:
 https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/
 https://www.raspberrypi.org/magpi/make-your-own-hat/
 http://pinout.xyz/
 https://github.com/raspberrypi/hats
 https://github.com/AnaviTech
 http://wiringpi.com/
 http://kicad-pcb.org
 https://oshpark.com/
 http://www.slideshare.net/leonanavi/making-open-source-hardware-iot-with-raspberry-pi

Making Open Source Hardware IoT with Raspberry Pi

  • 1.
    Making Open SourceHardware IoT with Raspberry Pi Leon Anavi Konsulko Group leon.anavi@konsulko.com OpenIoT Summit 21-23 February, Portland, Oregon
  • 2.
    Agenda  Raspberry Piadd-on boards for IoT  Raspberry Pi HAT  Raspberry Pi pHAT  Designing an open source hardware  Software support
  • 3.
    What is OpenSource Hardware?  Design of physical objects that is publicly available so that anyone can study, modify, distribute, make, and sell the design or hardware based on that design
  • 4.
    Open Source HardwareLicenses  GNU General Public License (GPL)  Creative Commons Attribution-ShareAlike  CERN Open Hardware License (OHL)  TAPR Open Hardware License (OHL)  FreeBSD  MIT  Other
  • 5.
    Why Raspberry Pi? Low cost credit-card-sized computer  Good software support  Huge community  NOT open source hardware!
  • 6.
    Raspberry Pi  2009- Raspberry Pi Foundation  2012 – The 1st Raspberry Pi  2014 – Raspberry Pi B+  2016 – Raspberry Pi Zero
  • 7.
  • 8.
  • 9.
    Important Change inB+ 40 pins 26 pins Raspberry Pi B+ (2014) Raspberry Pi B (2011)
  • 10.
  • 11.
  • 12.
    Raspberry Pi HAT Since31st July 2014
  • 13.
    Raspberry Pi HAT != HatHAT (Hardware Attached on Top)
  • 14.
    HAT Requirements  Formfactor 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
  • 15.
    pHAT  Form factorsuitable for Raspberry Pi Zero with 4 mount holes and dimensions 65x30mm  40 pin through-hole header  EEPROM not mandatory * Not an official standard of the Raspberry Pi Foundation
  • 16.
    Sense HAT  Officialproduct of the Raspberry Pi Foundation  Sensors for temperature, humidity, barometric pressure, gyroscope, accelerometer, magnetometer  8x8 RGB LED matrix  Five-button joystick
  • 17.
  • 18.
    Making Your 1st HAT Requirements: Idea (for example: a blinking LED)  Soldering equipment  Adafruit Perma-Proto HAT  Additional hardware resources (depending on the idea)
  • 19.
    Device Tree Fragment Data structure with hardware description of the Raspberry Pi HAT stored on EEPROM  8 pin DIP I2C EEPROM  Recommended EEPROM CAT24C32
  • 20.
    Flashing the EEPROM Download and build eepromutils https://github.com/raspberrypi/hats  Create a text file with description of your HAT using eeprom_settings.txt for example  Generate .epp file using eepmake  Flash the binary file to the EEPROM using eepflash.sh
  • 21.
    EEPROM Wiring  Flashingthe EEPROM: pin 2 and 3  Reading from the EEPROM: pin 27 and 28
  • 22.
    device-tree/hat  Directory /proc/device-tree/hat Information about product name, version, vendor and UUID
  • 23.
    Designing PCB Electronics DesignAutomation Suites:  KiCAD (free & open source software)  Eagle (free for small 2 Layer PCB)  Other
  • 24.
    KiCAD Advantages  Free& open source software (GPLv3+)  Cross platform (works on GNU/Linux distributions, MS Windows and Mac OS X)  Integrated 3D viewer  Contributions from CERN developers  Used by Olimex for the design of their new open source hardware boards
  • 25.
  • 26.
    My OSHW HAT& pHAT Anavi Flex HAT https://github.com/AnaviTech/anavi-flex Anavi Infrared pHAT https://github.com/AnaviTech/anavi-infrared
  • 27.
  • 28.
    Recommendations  Comply withthe minimum requirements of the PCB manufacturer for trace spaces, drills and angular rings  Keep in mind the complexity of the assembly process while designing the PCB  Consider the location of Raspberry Pi components while placing components on your HAT and avoid any potential negative impact
  • 29.
    Prototypes PCB printing servicesfrom:  OSHPark (Made in the USA)  China  Local
  • 30.
    Software  Python ispopular programming language among Raspberry Pi makers  WiringPi library for C/C++  WiringPi language bindings: Java, JavaScript (Node.js), PHP, Perl, Go, Rust, etc.  Other FOSS (LIRC, OpenCV, etc.)
  • 31.
    … and onemore thing Share your hardware and software under open source licenses :)
  • 32.
    Thank You! Useful links: https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/  https://www.raspberrypi.org/magpi/make-your-own-hat/  http://pinout.xyz/  https://github.com/raspberrypi/hats  https://github.com/AnaviTech  http://wiringpi.com/  http://kicad-pcb.org  https://oshpark.com/  http://www.slideshare.net/leonanavi/making-open-source-hardware-iot-with-raspberry-pi