How to choose the right hardware
There are two general choices
- System on a Chip (SoC)
- Single Board Computer (SBC)
Each IoT device prototype must adhere to these principles:
- Affordability -> Firstly, user must be able to purchase it
- Ease of use -> It must be easy to use, at least for naive users
- Beginner audiences -> There must be examples and sample projects to effectively learn base on
- Flexibility -> The device must be customizable, to some degree
- Modularity -> You must be able to independently upgrade different components of it
For mass production, we need to consider these factors:
- Possibility of high volume production (~ Affordability)
- Manufacturability
- Reliability (~ Flexibility)
- Ease of integration = needs to have certifications (~Modularity)
- Advanced audiences (~ Beginner audiences)
SoC
These are simple devices with the ability to 1) Store data 2) process data
They usually incorporate CPU, RAM and EPROM. They can connect to sensors or actuators through General Purpose I/O or GPIO pins, or using the bus connection which has two protocols, SPI and I2C.
When to use SoC?
- If you want to have very small devices
- If you want to have flexibility (in design process)
- If you want mass production
- If you want to have specialized devices
When it's probably not a good idea
- If your production is in low volume
- If you have resource limitations, or don't have enough expertise
- If you need it urgently. SoC could take months to design
Let's say you want to choose a SoC, what are the options?
Arduino
Its open source and has a variety of Boards:
- Arduino Uno, the first choice
- Arduino YUN if you want WIFI connection
- Arduino MKR if you want other types of connections as well like Bluetooth or LoRa
- Arduino 101 if you want a crypto chip, with BLE connection
And, there is an IDE for it.
The heart of each Arduino is MCU, which has
- Flash memory for the code
- EPROM to store persistent data
- RAM to store volatile data
- IO pins
- CPU
Power consumption:
Arduino keeps its power consumption low by employing two things:
- Low power communication
- Low duty-cycle operations
Two formulas:
A problem is concerned, that Arduino boards do now have dedicated OS.
The reason is the various architectures of them (16 bit, 8 bit ...)
Nevertheless, one Arduino board, Yun, has an OS (OpenWrt)
Yun also has WiFi support. But not BLE, which Arduino 101 has.
Arduino 101 is actually pretty cool, having sensors like accelerometer and gyroscope.
ESP8266
This SoC is especially good if you want WiFi connection. It has built in TCP/IP protocol stack.
ESP32
ESP8266, but even better. With two cores and Bluetooth 4.2 connection.
Particle Electron
Now this is a full stack cellular supporting device.
Advantages? Fully compatible with anything cellular
Disadvantages? Isn't free. Plus its huge, comparatively.
SBC
More like a mini computer, with everything it needs to operate, including and not limited to an embedded operating system.
When to choose SBC?
- You just want something easy to work with
- You want something reliable, hence no exclusive design
- You don't want to tackle with a large Bill of Material. You just need them already prepared
- If you want, you can still order a designed SBC for your need.
- You want something with shorter time to market
When not to choose them?
- Cost: for mass production, designing your own SoC is probably a better choice
- Flexibility: If you need lots of modification, it's probably better to make a SoC in the first place
- Complexity: SBC devices are made to satisfy wide range of needs, so they are fairly more complex than SoCs.
Let's say you want to use a SBC...
Raspberry Pi
The most powerful option is Raspberry Pi. It has the ability for an OS to be installed, like Raspbian OS.
It doesn't come with any onboard sensors, except for CPU related like temperature or voltage sensors, which can be queried using vcgencmd.
One concern is security, since all important data is stored in a SD card.
BeagleBone
A simpler Linux based device. It's easy to use, inexpensive and doesn't even need cooling system.
It also has a smaller version, PocketBeagle.
Disadvantages? It's not a good option for complex multimedia programs.
A rule of thumb
Arduino devices are usually used for repetitive tasks. Whereas Raspberry Pi is used for more complex multitasking.