EDGE DEVICES, WHAT ARE THEY?
Edge is certainly an installed word in the tech industry. There isn’t a clear definition about what edge is, some tech companies refer to edge devices to anything that is not a desktop / laptop computer even when they are connected to an electrical outlet consuming lots of Amperes. My conception of edge devices is clear, an edge device is a device with enough computing power to be deployed on the field, be it on a city light tower, or a camera in the middle of the jungle. So, a true edge device should be:
Minimal, size matters. Easy to hide is good for my case, wearable is a trend.
Sensors, sensors and more sensors. Sensing is the word of the near future, from autonomous cars to industries. In my case, sensing the environment is vital.
It must have a low consumption processor to ensure it will last as long as it can running on batteries without requiring excessive maintenance
It must have enough computer power to be as autonomous as possible, IoT cloud centric is also an installed word in the tech world. Well, let me say that cloud computing is not required if you have a good processor. You can think of an edge device as the front line of your solution, the more autonomous it is, the better.
It must have connectivity options, LoRa, SigFox, depending on the type of response you expect from your device. A reactive device, could find LoRa suitable while a periodic monitoring system could be a good case for SigFox.
Depending on the criticality of the responsiveness, a real time operating system could be required. In my case, the number of sensors and shared resources need a real time operating system. If you are deploying a solution to monitor and shutdown a valve in a crisis scenario for the oil industry you definitively need an RTOS. There are a few option on the market today that matches the criteria, the GAP9! processor (things move too fast), some FPGA from Microchip (a bit expensive), a Raspberry Pi could work in some scenarios, but you won’t find dozens of options for sure. The rest of this paper will be focused on the Sony Spresense, which I found appropriated after a heavy research.
COMPUTER POWER AT THE EDGE, MEET THE THE SONY SPRESENSE
The Hardware
This is how the Sony Spresense looks like, yeah, it looks like an Arduino nano, but it is not, not even close. This board contains:
A CXD5602 SoC, which is the heart of the Spresense, it is composed of eight cores, six for the application (6 Cortex M4F), two additional ones (Cortex M4 and M0+) for the GNSS (Several satellite positioning systems are supported including GPS) and the battery charge circuit, and the last cortex to separate the I/O flow from your application. The great thing about this architecture is that no matter what your code do it will never affect the proper hardware functions.
The metallic plate on top of the Sony logo is the GNSS integrated antenna.
On the opposite extreme you will find a 8 bit parallel connector for a 5MP low power consumption camera.
Near the Spresense logo, you will find yet another chip, the CXD5247which will deal with the audio capabilities of the board, it supports up to 8 digital microphones or 4 analog and has all the features you need for audio processing (including codecs support)
micro USB for flashing (programming) the board, the energy feed and battery charger are connected to this port.
As you can see, this tiny thing is filled with surprising features. I won’t re-write what it is already written, if you want to know more about every detail, you can check the Sony Spresense site.
This is a key part, the extension board, now it looks like and Arduino Uno, not the case again. Depending on your skills, this board will add a few relevant features, on this board you have:
The connectors to plug the microphones
A microSD card, important to edge devices, for easy configuration updates,logging and data retrieval.
The GPIOs that will operate at 5v or 3.3v (that is not the case for the pins on the main board which operates at 1.8v) that will allow you to plug many available components on the market. You will find digital (Including PWM) and analog pins. An important thing to mention here is that you will find an additional pair of TX/RX (Serial Connection Pins) and SPI / I2C that won’t conflict with the rest of the system because they are handled by a separated UART.
A JTAG connector (located near the SD card), if you are used to embedded systems, this connector is used to flash devices (in this case you will do it though the USB) but, it can be used to debug your code with an external debugger, which is an important tool to have if you are going serious.
An additional USB plug that will bring power to the whole system (the extension board and the main board)
Audio plug, it is great if you want to monitor your audio device for some reason.
To complete the picture, you have the camera attached to the main board. The camera will be a key component on the device.
Sony partners have other add-ons I am not taking into account in this work but you can check their add-ons at the Sony Spresense site.
THE RTOS, NUTTX
Either you notice or not, this board runs an RTOS (Real Time Operating System). If you chose to use the Arduino IDE, you won’t notice it is there. If you go the Native SDK and in the case you are not familiar with real time operating systems, you will need to know a few concepts. An RTOS is not a regular operating system like Unix or Windows, the first notorious difference about an RTOS is the fact that you will need to configure a custom version of the OS according to your needs.
What makes an RTOS unique is its response time while dealing with different tasks. An RTOS is designed to perform sporadic and short-lived tasks, most of the time as the response to some event from the surrounding environment. We will have time for that, for now, I think this is a good introduction to this world. The next step is to understand the resources you have at hand to create your responsive device, Cores, Threads, and several APIs that will help your batteries to last as long as possible.
In the following posts, we will dig into some details and concepts regarding the resources at your disposal to create great devices. Stay tuned.
Comments