Spresense HeaderSpresense Header

Professional IoT development made easy

The Spresense development board removes the effort of developing high quality IoT solutions.

Overview

1. Introduction

The Spresense project consists of a Arduino compatible board with Sony’s high performance CXD5602 micro-controller. The CXD5602 has built-in GPS and high-resolution audio capabilities.

overview hardware both

This section outlines the Spresense hardware and software in the following two chapters:

To start programming the Spresense directly see the Getting started guides for the two available SDKs:

For further information on CXD5602, please refer to the following.

2. Spresense Hardware

2.1. Spresense Board

This section describes the Spresense hardware.

Spresense consists of two boards:

It is also possible to design your own

The main board uses a processor developed by Sony for IoT and sensing applications. The main board can be operated alone or with the extension board.

The Spresense uses Sony’s new chipset on the main board:

  • The CXD5602 System on Chip (SoC) multi core processor with GNSS

  • The CXD5247 power management and audio analog interface chip

The Spresense extension board is a board which extends the interfaces compared to the Spresense main board. The Spresense main board and the Spresense extension board are connected by a Board-to-Board (B-2-B) connector. The Spresense extension board has Arduino Uno pin compatible shape and pin socket locations. However, there are some differences compared to the Arduino Uno. For details, please refer the Differences between Spresense and Arduino Uno.

overview hardware both
Figure 1. Extension board at the bottom and the main board mounted on top.

2.1.1. Main board

The Spresense main board has the following features.

  • Sony’s CXD5602 Processor

  • 8 MB Flash memory

  • PCB with small footprint

  • Dedicated camera connector

  • GNSS (GPS) antenna

  • Pins and LEDs

    • Multiple GPIO (UART, SPI, I2C, I2S)

    • 2 ADC channels

    • Application LED x 4 (Green)

    • Power LED (Blue)

    • USB serial port

All Spresense main board pins operate at 1.8V. Connecting the main board pins to higher voltage can cause permanent damage.

overview hardware mainboard signal
Figure 2. Spresense main board.

The name and location of connectors, LEDs and switches on the main board are shown below.

Table 1. Connectors, switches and LEDs.
Name Description

[PWR] Power LED

Power LED. Emits blue light when power is supplied.

[RST] Reset button

Reset button.

[LED0] to [LED3]

Four user controllable green LEDs.

[CN2]

Micro USB Type-B connector.

[CN4]

B-2-B 100-pin connector to interface to additional boards. This connector is on the underside.

[CN5]

Camera connector.

[BR] Boot recovery button

This is used when restoring to the factory reset state. Only for recovery, normally not needed.

The following schematic block diagram shows the main board design:

block diagram mainboard
Figure 3. Spresense main board block diagram

PDF file of the main board circuit diagram can be obtained from the following link. Circuit diagram of Spresense main board

2.1.2. Extension board

The Spresense extension board has the following connectors in addition to Arduino Uno compatible pin sockets.

  • 3.5 mm headphone jack

  • Micro SD card

  • An extra USB port

  • Multiple microphone pins

overview hardware extboard signal
Figure 4. Spresense extension board

The extension boards configuration is set by jumpers.

Table 2. Extension Board Connectors and Jumpers
Name Description

CN3

B-2-B connector 100 pins connector for the main board.

CN4

Micro SD card.

CN6

Micro USB Type-B connector. It can provide USB MSC (Mass Storage Class) function allowing access to the SD card on the extension board directly from the PC.

CN7

Headphone 3-pole 3.5mm jack.

JP1

GPIO voltage can be set to 5V or 3.3V by using a jumper on JP1. A standard 2.54mm pitch jumper should be used. This one will be supplied with the extension board.

JP10 - pins 3 to 16

Microphone connector. These pins connect analog or digital microphone. Please refer How to use microphones for details.

JP10 - pins 1 and 2

You can disable UART2 on the extension board by closing pin 1 and 2 on JP10. This allows UART2 on the main board to be used at 1.8V I/O. No jumper is shipped with the extension board, a 2.54 mm pitch jumper should be used.

JP14

Jumpers to support digital microphones on JP10. Please refer How to use microphones for details.

The following block diagram shows the extension board design.

block diagram extboard
Figure 5. Spresense extension board block diagram.

PDF file of the extension board circuit diagram can be obtained from the following link: schematics of Spresense extension board.

2.1.3. Spresense camera board

The Spresense camera board has the Sony ISX012 image sensor mounted together with a lens. The Sony ISX012 has an effective pixel count of 5.11M pixels and an onboard encoder that can aquire pictures in JPEG, RAW, Y/C or RGB format.

HW camera board
Figure 6. Spresense camera board with the ISX012 camera module.
Table 3. Sony ISX012 image sensor specification:
Image sensor

Sensor type

1/4 type CMOS image sensor

Effective pixel

5.11M pixels

Recording pixel

5.04M pixels

Camera control

ISO sensitivity

ISO 40~800

Scene selection

12 preset

Exposure control mode

Auto, Shutter proprity, ISO sensitivity priority, Long time AE

Photometry

Multi pattern, Center weight, Average, Spot

Exposure compensation

±2EV, 1/3 EV stes

Shutter speed range

1/8 s (long AE mode) to 1/42000 s

White balance

Auto, Daylight, Cloud, Fluorescent, Lamp

Focus control

Auto, Single AF, Continuous AF, Manual control

Picture format

Output still picture format

JPEG(4:2:2), Y/Cb/Cr, YUV, RGB, RAW, JPEG+YUV(thumbnail)

Still data rate

5M pixel 15 frame/s JPEG output

Movie data rate

SVGA 30 frame/s YCbCr output

HD movie support

1080p(1920×1030 30 frame/s), 720p(1208×720 60 frame/s)
JPEG output, JPEG+YCbCr output

In addition, the following table is the specification of the lens.

Table 4. Camera module lens specification
Function Spec

Lens type

1/4 inch 4 pieces

Effective Focal Length

2.74mm

F-number

2.0±5%

Field of view

78°±3°

Chief ray angle

<33.5°

Distortion

<1.5%

Image quality

Center 1100 lines, Near the corners 900 lines

Forcus distance

1.5m

Foucusing range

77.5 to 237.06cm

PDF file of the camera board circuit diagram can be obtained from the following link: Circuit diagram of Spresense camera board

2.2. Custom Board

The B-2-B connector can be used to interface to your own custom board, rather than the Extension board.

For details of mechanical and power supply requirements see the add on board design guidelines

For details of the B-2-B connector pinout and functions see the Circuit diagram of Spresense main board

Your custom board may replicate some of the features from the Extension board which you can copy from the schematics of Spresense extension board.

2.3. How to use Spresense board

2.3.1. How to fit a shading seal on the main board

A shading seal is provided with the kit and should be mounted on IC4 in Spresense main board before it is used. The location of where to fit the seal is shown in the picture.

Malfunction might occur if the board is placed under direct or in the proximity of a strong light source, e.g. sunlight or a bright lamp if no shading seal is mounted.
HW shading seal E
Figure 7. Shading seal position.
shading seal picture
Figure 8. Shading seal.
Table 5. The recommended shading seal details are if you loose the provided one:
Vendor Model

Shurtape

CP-743

2.3.2. How to attach the Spresense extension board and the Spresense main board

This section explains how to install the Spresense extension board and the Spresense main board. The package of the Spresense board has 4 spacers to attach the Spresense main board.

overview spacer
Figure 9. Spresense spacers.

These spacers are put in to the through-holes on the Spresense extension board. Please note the positions of the through-holes.

overview spacer through hole
Figure 10. The positions of the through-holes for the spacers.

After putting in the spacers on the Spresense extension board, attach the Spresense main board.

overview spacer connection
Figure 11. Exploded view of the Spresense extension board, spacers and the Spresense main board.
overview spacer direction
Figure 12. The direction of the Spresense extension board and the Spresense main board.

The USB connectors face the same direction. On this picture the Spresense main board and the Spresense extension board have been mounted.

overview spacer finish
Figure 13. The Spresense main board attached to the Spresense extension board.

Please confirm the mating of the B-2-B connector by pressing the Spresense main board and Spresense expansion board from the top and bottom again after completing the installation etc. Please note that the function on the Spresense expansion board such as the micro SD card and the audio function may not work if the mating is incomplete.

Do not separate the Spresense main board from the extension board by force once mounted.

2.3.3. How to connect and prepare the Spresense main board and Spresense camera board

This section explains how to attach the Spresense camera board to the Spresense main board.

Since the camera module is very sensitive to static electricity it is advised to discharge any static electricity from the body before handling the camera module. This can be done by touching a grounded part, like a grounded computer chassis. Static electricity can cause the camera module to malfunction.

The camera module is connected to the main board (CN5) via a flat cable. The picture below shows how the flat cable is supposed to be mounted. The flat cable can only be inserted in one way to work so it is important to take note on which side it should be connected on.

HW camera setting en
Figure 14. How to connect the Spresense camera board.

The lens of this camera is covered with a small translucent blue plastic film. This is for protection, please remove it before use. Please be gentle when removing the protecting plastic film.

2.3.4. About the flat cable on the Spresense camera board side

The flat cable connector on both the camera board and main board is rather fragile it is advised not to insert/remove the cable more than necessary.

Please follow the instructions below when inserting/removing the flat cable.

  • When pulling out the flat cable:

    • A. Apply a uniform force to both sides of the lever of the connector, slide the lever slowly and horizontally and pull it out horizontally.

    • B. Pull out the flat cable.

  • When inserting the flat cable

    • C. Insert the flat cable firmly into the connector. The electrode side of the flat cable should be facing away from the PCB. See image below.

    • D. Apply a uniform force to both sides of the lever of the connector and slide the lever slowly horizontally and push it in parallel with the board.

HW FFC camera side en
Figure 15. How to insert or remove a flat cable on the Spresense camera board side.
Please operate the lever of the connector of the camera board slowly and carefully. If you apply uneven force to sides of the lever or move it in an other than horizontal direction with respect to the board you might damage the lever.

Also, the flat cable that can be used as a substitute when the flat cable for the camera is damaged is shown below. Below is list of replacement flat cables, it is advised to use a flat cable as short as possible.

Table 6. Alternative flat cable list:
Vendor Model Length

Molex

15166-0211

102mm

Molex

15166-0213

127mm

Wurth Electronics

687620100002

100mm

2.3.5. Powering the Spresense Board

There are several ways to power the Spresense boards:

spresense musb connect
Figure 16. Spresense main board USB connector
  • Use the main board’s micro USB connector. Simply connect your PC to the micro USB connector on the main board to get started. It will power the main board alone, or the main board and extension board as a set. This is the preferred method for most development. The main board USB is intended for serial port applications only.

  • Connect a 5V±0.25V power source to the VOUT pin on the main board.

  • If you are using the Spresense extension board the micro USB connector on the extension board can be used to power the system when the two boards are being used as a set.

The Spresense can be powered by a USB battery pack. Some USB battery packs require a minimum load current and Spresense may take less than this current, which will cause the USB battery pack to turn off after a few seconds. For reliable USB battery pack operation choose a battery pack that has an "always on" feature or use a USB "keep-alive load".

The above power supply can be performed simultaneously from plural. Also, when supplying power via the micro USB connector, please use micro USB cable that is as thick and short as possible.

3. Spresense Software

Spresense provides the following two software development environments:

Spresense Arduino Library

By selecting to use the Spresense Arduino Library software development can be undertaken relatively easily using Arduino IDE, which will be familiar to many developers.

Spresense SDK

The Spresense SDK is Sony’s original development environment for the CXD5602 chipset. It based on NuttX and uses GNU Make. This system provides a low level API, allowing users to maximising the performance of a Spresense based system, such as optimizing memory use, power saving, control of multicore processing, etc.

The features and structure of these two development environments are explained in the coming sections.

3.1. Development environment using the Spresense Arduino Library

The Spresense Arduino Library is a software library for developing application software for Spresense using the Arduino IDE. It is compatible with the Arduino programming language and you can use many existing Arduino sketches. If you have experience of developing software with the Arduino IDE, you can easily begin Spresense software development.

This library not only provides an Arduino compatible development environment, but also provides access Spresense unique features such as GPS positioning function and high resolution audio functions. Using these advanced features is possible in the Arduino IDE.

For those who would like to develop software using Spresense Arduino Library, please refer to following chapters.

3.1.1. Structure of the Spresense Arduino Library

The Spresense Arduino Library is an extension wrapper library designed to make the Spresense SDK easy to use from the Arduino IDE. Internally the Arduino’s sketch works as a tasks running on the NuttX real time operating system, but when Spresense software development is undertaken using the Arduino IDE, the developer is able to program without being conscious of the Spresense SDK or the NuttX operating system.

overview software SDK structure
Figure 17. Structure of Spresense Arduino Library

3.1.2. Features of the Spresense Arduino Library

The Spresense Arduino Library uses the Arduino programming language and includes functions such as digitalRead and digitalWrite etc so you can use them on Spresense.

In addition it includes libraries equivalent to Arduino Libraries such as SPI and Software Serial.

Although the Spresense Arduino Library is largely compatible with the Arduino programming language there are some differences because of hardware features and constraints. For details, see the Functional Differences described in Spresense Arduino Library Developer Guide.

The Spresense Arduino Library also offers the following libraries not found in Arduino the standard Library:

Table 7. Spresense Arduino Library specific library

Audio

High-resolution audio playback / recording function

GNSS

GNSS positioning function

3.2. Development environment using the Spresense SDK

The Spresense SDK is a development environment that allows full access to Spresense’s unique functions. It is based on the NuttX real-time operating systems. It provides low-level APIs to maximize the performance of Spresense, such as memory optimization, power saving, and control of multi-core processing. If you are an experienced programmer and are interested in multicore programming, power saving, effective utilization of memory, please consider using the Spresense SDK.

If you would like to try developing software immediately using the Spresense SDK, please refer to following chapters.

3.2.1. Structure of the Spresense SDK

The Spresense SDK is designed to maximize access to the features of CXD5602 using NuttX as the operating system.

sdk overview
Figure 18. SDK overview

It consists of a series of drivers, implemented according to the NuttX driver framework, and middleware that provides services to software applications beyond those available from the operating system.

3.2.2. Features of the Spresense SDK

The features of the Spresense SDK are as follows.

Since it adopts NuttX as the operating system, it has the following features.

  • Multitasking RTOS

  • Optimization of configuration using Kconfig

  • Support of standard C library

  • C ++ language support

  • Support for various file systems

  • Support for various device drivers

  • Flash memory support

  • USB function (MSC and CDC) support

In addition to this, various specialist functions of CXD5602 are supported by middleware.

  • Audio recording playback function

  • Asymmetric multicore programming library

  • GPS positioning function

  • Power save function

In addition to this, almost all features of CXD5602, such as DMA controller driver, can be used within the Spresense SDK.

The usage of API is demonstrated in a range of examples.

For details, please refer to the examples.

4. Repository overview

Spresense is an open source project where the related source code is stored on GitHub. We highly welcome contributions from you and appreciate your help and time to make the source code better for everyone! Each repository has contribution guidelines on how you can contribute to the project. Please read them when you are ready to make your first contribution.

This chapter provides an overview of how the Spresense repositories are organized if you require to work directly with them.

4.1. Structure

Group Repository name Related repository Description

Spresense Arduino Library repositories

Repository for the Spresense Arduino Library.

Example sketches applications for Spresense Arduino Library.

Spresense SDK repositories

Repository for the Spresense SDK.

spresense-nuttx

Submodule: Spresense NuttX port.

HW design files repository

Repository for Spresense board schematics, BOM lists etc. for you to design your own boards.

4.1.1. Fetching the source

Spresense Arduino Library source
git clone https://github.com/sonydevworld/spresense-arduino-compatible.git
git clone https://github.com/sonydevworld/spresense-sketches.git
Spresense SDK source
git clone --recursive https://github.com/sonydevworld/spresense.git