Introduction To Single Board Computers and Microcontrollers
Introduction To Single Board Computers and Microcontrollers
1
Single-Board Computer vs. Microcontroller
2
Outline
• Introduction: Why they are popular
• Characteristics
• Two main skillsets required
• Single-board computer vs microcontroller:
– When to use which?
– Different Types of Microcontrollers
– Different Types of Single-board Computers
3
About Me
• Vision-based robot control
• UBCO Mechatronics Club
• Time-Lapse Photography
4
My Knowledge about Arduino/RPi
• http://edisondev.net/
– Tutorials and information about single-board
computers and microcontrollers
– “Late”st News
5
What can you do with Arduinos or Raspberry
Pis?
7
Internet of Things (IoT)
• Connection of embedded computing devices
to the internet
– Home Automation
– Augmented Reality
• Connecting non-computer devices
– Aquariums
– Home Entertainment
– Etc.
8
Single-Board Computer vs. Microcontroller
What is the difference?
9
Single-Board Computer vs. Microcontroller
What is needed for a Computer/Microcontroller?
Storage RAM
Processor
10
Single-Board Computer vs. Microcontroller
Rough Specifications
Microcontrollers Single-Board
Computers
Processor Speed ~50 Mhz 1 Ghz +
Onboard Storage 64 Kb Flash, SD cards ~Gb
Memory (RAM) 64 Kb ~ 1 Gb
Power 12 mA 500 mA+
Consumption (2200 mAh battery -> 183hr) (2200 mAh battery-> 4.4 hr)
Reboot Time <1 sec ~ Multiple seconds
Other Features Operating system
Extendable Storage
Network Connection
11
Single-Board Computer vs. Microcontroller
Examples of Embedded Systems
Broadcom BCM2835
CPU, GPU, RAM ATMega328
Storage
CPU, RAM, Storage
Image Source
http://pixshark.com/raspberry-pi-model-b-schematic.htm
http://images.studica.com/images/product/arduino/9a9b5c9e479e1a5b237b41a173d34dcfimage472x354_72_200x.gif
12
Single-Board Computer vs. Microcontroller
Defining Features
• Single-board computer
– Lots of processing power
– Has operating system (Linux, Android, soon Windows)
– Monitor Connection
– Cheap, “weak” computer
• Microcontroller
– Devoted to having GPIO pins
– Low power, quick boot
– Very cheap (especially if you buy only IC)
13
Challenges for Beginners
• Working with these devices boils down to:
16
Second Challenge
Electronics – the hard part
• Difficult to get started
• Easy to make mistakes
– Some mistakes cannot be undone
• Often needs additional equipment:
– Soldering Iron
– Voltmeter
– Oscilloscope
17
Electronics
Simplifying Aspects
• Starter Packs and Kits
– Contain a minimum number of electronic
components that you may need
• Microcontroller Attachments
– Shields (for Arduino)
• Motor shields, sensor shields
– Capes (for Beagleboard)
– BoosterPacks (TI LaunchPad)
18
Electronics
Simplifying Aspects
• A lot of electronics come like this:
Source:
http://elecshop.blog.com/files/2014/01/313-44-TQFP.jpg
http://www.renesas.com/media/press/news/2010/20101006.jpg
19
Electronics
Simplifying Aspects
• Community
– People who know things and are willing to share
– Accessible tutorials
http://xkcd.com/979/ 20
Microcontroller
Microcontroller vs. Expansion Boards
• Microcontrollers:
• Expansion Board:
21
Microcontroller
Microcontrollers Features
• Processor Speed (Mhz)
• RAM
• On-board storage (FLASH)
• GPIO Pins
• Analog to Digital Converters (ADC)
• Logic Level Voltage (3.3V or 5V)
22
Microcontroller
Expansion Board Features
• Communication Cable Attachments
• Programmer
• Buttons
• Power Supply Connectors
• Pin connectors
• On-board Sensors
– (accelerometers, real-time clocks, temperature
sensors)
23
Microcontroller
Arduino UNO Board Diagram
USB Interface +
Arduino ATMEGA328P
Programmer
Source: http://arduino-info.wikispaces.com/file/view/Arduino_Uno_Rev3-schematic.jpg/346644662/Arduino_Uno_Rev3-schematic.jpg
24
Microcontrollers
Arduino
Arduino Nano
Arduino Mega2560
Arduino Uno (ATmega328)
http://arduino.cc/
25
Microcontrollers
Arduino IDE - Programming
• http://arduino.cc/
26
Microcontrollers
STM Microcontrollers
STM32L DISCOVERY STM32 Nucleo F401RE
STM32L152RBT6 Cortex-M3 STM32F401RET6
Microcontroller CPU
Flash Memory 128KB 2 MB
Clock Speed 32 Mhz 180 Mhz
RAM 16KB 256 KB
Price (approx, $10.50 here $12.40 here
USD)
1 touch sensor
Other 1 LCD display
27
http://www.st.com/web/catalog/tools/PF250990
Programming Any Microcontroller
• Eclipse https://eclipse.org/
28
Microcontrollers
Texas Instruments LaunchPad
Tiva C Series
MSP430F5529
MSP-EXP430G2 TMC4C1294
TM4C1294NCPDT
Microcontroller MSP430 MSP430 ARM Cortex-M4
Flash Memory 16 KB 128KB 1 MB
Clock Speed 16 Mhz 25 MHz 120 Mhz
RAM 512B 8KB 256 KB
Price (approx, USD) $9.99 here $12.99 here $19.99 here
Other Ethernet
http://www.ti.com/ww/en/launchpad/launchpad.html 29
Microcontrollers
LaunchPad Programming
Energia
Code Composer Studio
http://energia.nu/
30
Microcontrollers
Thousands Others
Some of these had limited production runs or have been discontinued.
32
Single-Board Computers
Hidden Costs
• Minimum:
• Other Requirements:
http://www.raspberrypi.org/
Image Source: http://www.techradar.com/news/computing-components/peripherals/raspberry-pi-2-outed-with-faster-cpu-double-ram-and-windows-10-support-1283075
34
Single-Board Computers
Beaglebone Black
Beaglebone Black
Processor 1GHZ
2GB 8-bit eMMC on-board
Flash Memory storage
RAM 512MB DDR3
• Open Hardware
Architecture
Other Features
• 1x USB port
• 92x GPIO pins
http://beagleboard.org/
35
Single board Computers
Banana Pi
Banana Pi
SATA Connection
Other Features Audio Connector
2x USB
http://www.bananapi.org/
36
Single board Computers
ODROID-C1
ODROID-C1
http://www.hardkernel.com
37
Single-Board Computers
UDOO
UDOO Quad
2x USB port
WiFi Module
Other Features 76 x GPIO pins
Analog Audio and Mic
http://www.udoo.org/
38
Single board Computers
Firefly-RK3288
Firefly-RK3288
Flash Memory 16 GB
RAM 2 GB DD3
http://www.t-firefly.com/en/
39
Conclusion
• Community is Key
– If you learn something, share.
• Don’t just stick to the “popular” devices.
• For low power requirements, simple tasks, use
microcontroller.
40