arduino Audio Content development board gps Hardware nuttx Review sony Testing Tutorial

Sony Spresense Board Review with NuttX based Spresense SDK

Orange Pi Development Boards
Orange Pi Development Boards

Sony Spresense Arduino suitable board with audio and international navigation sateliite techniques (GNSS) help and its extension board launched in Japan this summer time. The corporate has now expanded markets, and is providing the boards in america and Europe as nicely.

Additionally they tasked an company to ship samples to varied reviewers, and I acquired chosen to obtain one as properly. I’ll begin the assessment by testing the hardware, shortly talk about software program improvement choices, and report my expertise with Spresense SDK.

I acquired two packages…

Sony Spresense review
… one the primary board, and the opposite for the extension board.

Spresense main board & extension board

The primary board package deal solely comes with CXD5602PWBMAIN1 board and an info sheet. The highest of the board features a reset button, 4 consumer LEDs, an influence LED, a boot restoration button, the digital camera interface, Sony CXD5247 energy administration and audio analog interface chip (Black on the photograph under, however in actuality it’s a reflective floor), Sony CXD5602 hexa core Arm Cortex-M4F microcontroller with GNSS help – seen as D5602GG on the package deal, two rows of two.54mm pitch I/O headers, in addition to the GNSS antenna on the very proper fringe of the board.

Sony Spresense boardClick on to Enlarge

The underside a part of the board options MXIC MX25U6435F SPI NOR flash with 8MB capability, a 100-pin connector to attach the primary board to the extension board, CP2102N USB to TTL chip, and a micro USB port for energy and programming.

The essential info sheet principally incorporates legalese, in addition to specs, and a hyperlink and QR code to Spresense help web site.

Spresense user manual

The extension board comes with an identical info sheet, in addition to 4 plastic bits that will probably be used to carry the primary board into place.

Spresense extension board unboxingClick on to Enlarge

The extension board comes with Arduino suitable headers, a 100-pin socket to hook up with the primary board, some jumpers, a Three.5mm audio jack, and a micro SD card slot.

Spresense extension board topClick on to Enlarge

That was for the highest aspect of the board, and the opposite aspect principally options two extra chips: 72040 which have to be a degree shifter, and TI LSF0108 octal bidirectional multi-voltage-level translator, in addition to the “extension” micro USB port.

Spresense extension board bottomClick on to Enlarge

Meeting of each boards is simple. Merely insert the 4 black plastic bits within the mounting holes of the extension board, place the primary board on prime, and push it down.

Sony Spresence Kit AssembledClick on to Enlarge

There are two methods to work with Spresense board as defined in Spresense software program documentation:

  • Spresense Arduino Library – To work with the Arduino IDE acquainted to many builders.
  • Spresense SDK – Sony’s unique improvement surroundings for the CXD5602 chipset, based on NuttX real-time working system, and leveraging GNU Make toolchain. The low degree API allows builders to optimize reminiscence use, energy saving, management of multicore processing, and extra, which is probably not potential with the Arduino library.

I’ve revealed many evaluations with the Arduino IDE for different hardware platforms, and others have already revealed tasks utilizing Spresense with the Arduino IDE, so I assumed it might be extra fascinating for myself and readers to as an alternative take a look at Spresense SDK.

Spresense SDK ArchitectureConstruction of Spresense SDK – Click on to Enlarge

A information is already obtainable to get began with the SDK. So let’s attempt to comply with it in a laptop computer operating Ubuntu 18.04.

Putting in Spresense SDK

  • First we have to set up some dependencies in a terminal home windows:
  • The subsequent step os to put in the kconfig-frontends package deal from nuttx-tools:
  • And take a look at the SDK supply code:

USB Connection

You might also need to add your present consumer to the dialout group, and logout to be sure to can entry the serial port:

Time to attach the primary board to your pc by way of USB. Right here’s the output from the kernel log:

The board is correctly detected as a CP210x converter with 10c4 VID and ea60 PID.

Spresense SDK Setup

  • First set the preliminary NuttX kernel configuration:
  • Then set the preliminary SDK configuration:

Output:

We’ve being ask to…

The obtain URL requires you to simply accept an EULA, so it may possibly’t downloaded from the command from the command line. However after obtain, I might simply flash it to the board with the next instructions:

Final command output:

It is best to find yourself with nuttx.spk firmware within the present listing:

Flash and run the firmware

At this level, we’re requested to flash the bootloader, however we’ve already completed it above, so we will simply flash nuttx.spk:

Output from the command:

To run the hiya world program we have to join with serial with 115200 8N1 parameters utilizing minicom or different instruments:

Disable hardware circulate management in Serial port setup, and exit by urgent Esc and choosing Exit. We should always now have entry to NuttShell (NSH) shell for NuttX.

NuttShellClick on to Enlarge

Sort good day to run the demo program:

Success. The supply code of the howdy world program might be present in examples/whats up/hello_main.c, and is usually your typical C hey world program:

For reference NuttX shell has some comparable instructions as you’d discover in busybox:

Hiya phrase is ok to get began however there are different, extra fascinating samples in Spresense SDK:

Every pattern is described in Spresense NuttX developer information. Someway there isn’t a blinky pattern, what sort of develeloper information is that! ?

Some samples requires further hardware corresponding to digital camera add-on, Bluetooth LE add-on, sensors add-ons and so forth. You’ll discover a record by scrolling down on the primary web page of the developer web site.

Since audio and GNSS are a few of the primary options of the board, I’ll attempt the audio_player and gnss samples respectively written in C++ and C programming languages.

Spresense Audio Participant

The construct and flash process is identical as for the howdy world program with the next instructions executed in sdk listing:

This system is loaded to the board, however we’ll want some additional information saved in a micro SD card with music, playlist and “worker” binaries as described within the README.txt file within the audio_player pattern listing:

After that, you’ll be able to see employee binary ‘MP3DEC’, ‘WAVDEC’ in listing sdk/modules/audio/dsp.
Retailer employee binary, playlist and play contents within the path specified by choice.
– Default path
employee binary : /mnt/sd0/BIN
play listing : /mnt/sd0/PLAYLIST
contents : /mnt/sd0/AUDIO

As a pattern of Playlist, there’s TRACK_DB.CSV within the PLAYLIST folder. Additionally, as a pattern of contents, there’s Sound.mp Three within the AUDIO folder. Sound.mp3 is a sampling frequency of 48000, bit size 16, codec MP3 file.

I used to be initially confused concerning the wording of the directions at first, however ultimately figured it, and copied the information to a 4GB micro SD card formatted with FAT32:

Now insert the microSD card into Spresense board, and join some audio system, earlier than launching the app in NuttShell.

Spresense Audio PlayerClick on to Enlarge

All the things seems to work as anticipated, besides I couldn’t hear any audio…I verify the audio jack connection in case of dangerous contact, my audio system’ energy and quantity degree, however nonetheless nothing. Then I assumed perhaps there’s a nasty contact between Spresense principal board and the extension board, so I pressed on the highest of the board and… success !!! I might lastly hear the beep sound from Sound.mp3 file. Fascinating that the micro SD card did work, however not the audio.

GNSS Pattern

Let’s transfer on to the GNSS pattern:

By the best way keep in mind to all the time exit minicom earlier than operating flash.sh, otherwise you’ll find yourself with the next error:

One other website notice is you can run the config.py with an choice that brings menuconfig to setup choices:

Spresense SDK menuconfigClick on to Enlarge

Again to GPS testing. I attempted to put the board near the window, however the constructing design is just not actually appropriate to get a correct GPS sign, and after 1h30, I solely obtained the UTC time. So I moved outdoor, restarted the board, and every little thing labored fairly properly. I received the UTC time after simply 24 seconds:

and positioning knowledge after one minute 40 seconds:

and no, I don’t stay in Coffeyville ?

The code for the samples is just too lengthy to enter particulars on this evaluate, however you’ll discover the supply within the examples listing, and Spresense SDK documentation seems to be clearly structured, fairly detailed and thorough.

Just lately, I’ve been having troubles with hardware evaluations, and there was additionally typically that went wron, however I’ve to confess every thing went relatively easily with Spresense board, samples simply work, and developer documentation seems to be nice.

For many venture you’ll doubtless want add-ons board, as there should not be many purposes that require GNSS and audio with none sort of wi-fi or wired connectivity.

Sony Spresense most important board goes for $65 on Framos US, the place you’ll additionally discover the extension board for $45, and shortly the 5MP digital camera board that may turn out to be out there later his month. In case you are based in Europe, it’s also possible to purchase from RS Elements or Vido as an alternative. The Spresense digital camera is 29 Euros ex. VAT on the latter. The sensors and Bluetooth add-ons board are made by ROHM and might be bought individually, however solely in Japan for now.  Hopefully, they’ll work out a neater ordering technique, perhaps with a full improvement package within the close to future.