Build a Digital City Tour Guide

Circuit Cellar
Embedded Electronics
8 min readApr 29, 2022

Using Sony’s Spresense Module

CityGuide is a digital tour guide application that allows people to sight see throughout a city at their own pace without the need of a large group or tour guide. Based on Sony’s Spresense embedded board, Andrei’s application consists of a device that locally tracks the location of the user, without sharing it externally. Whenever the user is close to a landmark, the device will play back a recording talking about the landmark.

I personally miss going on holidays — a feeling that’s probably mutual for everyone. I think we’ve all trained ourselves to stay away from crowded places. The reality is that the virus is not going to disappear overnight and I personally cannot live the next 10 years locked up at home.

At some point during the year, when restrictions loosen, I will find myself abroad, visiting some place. Typically, I would get a tour wherever I go to cover the main landmarks in the area. But now, I’m afraid that this would expose me to a large group of people. On top of that, to be honest, I find myself to be a rather impatient person. I really don’t care about every statue in the city center, nor am I very fond of finding out where famous people used to live. But if you go on a typical group tour, you will end up seeing things you really don’t care about.

Then you have the tour itself. Maybe the tour guide is too quiet, or perhaps the group is moving so slow that you end up spending half the day going from one place to another. Honestly, I would prefer to get the tour over and done with and then have dinner somewhere.

THE CITY GUIDE PROJECT
CityGuide has been my response to this problem. CityGuide is a small and pocketable device that acts as a digital, hands-free guide to the city (Figure 1). The device tracks the location of the tourist locally, without sharing it externally. Whenever a landmark is in viewing distance from the tourist, the device will play back an audio file talking about the landmark the tourist is looking at.

CityGuide is geared toward empowering tourism agencies with digital services that can be offered to tourists interested in experiencing the city at their own pace. The agency can offer a map or app highlighting all the landmarks in the city. The tourist can then go out around town and visit only the landmarks that interest them, be it by walking or cycling (Figure 2).

FIGURE 2 — CityGuide being held by a tourist while a tram is passing by

The device has been created with ease in mind. All tourism agencies have to do is record the audio files for each landmark and then add them to an SD card and then input it into the device together with the geolocation of the landmark. This allows for easy setup across tens of devices, allowing the agency to focus on gaining clients.

CityGuide enables a new kind of sightseeing adapted to our busy and dynamic lives. The application empowers the tourist to create their own tour around the city at their own pace, they can stop by a café or go into a museum and then resume the tour when they come back. The tourist can focus on the landmarks they want to see instead of being dragged around the city.

Most importantly, CityGuide helps tourism flourish through creating a safe way to organize sightseeing. Instead of congregating in large groups moving across the city, CityGuide allows individuals to maintain their social distance while enjoying a tour of the city. CityGuide is an application that paves the way to a sightseeing tour provided by agencies, where the tourist is given the flexibility to visit whatever landmarks they wish — at whatever pace they desire.

PROJECT IN-DEPTH
This section we will delve into the way the project works. This project has the Sony Spresense device as its brains, the board is highlighted in Figure 3. Honestly, I think it’s one of the best development boards there is out there due to the way complex features such as audio decoding, geolocation and other options are handled by the device without much coding.

FIGURE 3 — The Sony Spresense device

All features are accessible via Arduino libraries, this allows the device to be programmable through the Arduino IDE. The Spresense board has a motherboard and an expansion board, which adds ports such as a headphone jack and a microSD card reader.

The best part about it is that all the features needed for this project are built into the device. This means that there is very little wiring to be done. The device’s built-in SD-card reader is used to interface with the SD-card loaded with the audio files played back and the headphone jack is used to output the audio to the user via earphones.

Setup Process: Figure 4 depicts the process through which the device goes on start-up. The device can be kept offline when not in use and then turned back on when a tourist wants to use it. When the device turns on, it will first lock its GPS co-ordinates and get a precise geolocation.

FIGURE 4 — Setup process diagram

The next thing it will do is load the processes needed to decode MP3 files, it will then initialize the SD-card reader and wait until an SD card is present. When a card is present, the device will scan the contents of the card looking for an index file and MP3 files (more details in the Data Storage and File Formatting sub-section later in the article). The device will then parse the index file into a dictionary in its memory to be referenced when needed. The device will then start running the application.

Project architecture: While the device is online, it will repeat the same algorithm constantly. Figure 5 shows this process. The device will start off by getting its current location using GPS. This data will be stored locally until refreshed again.

FIGURE 5 — Project architecture diagram

The device will then cross reference the current location with the location of all landmarks stored in the dictionary. This is done to check if the current location is close to any of the landmarks. If this is the case, the device will check the index file for the audio file that corresponds with the landmark the tourist is at and start playing it.

The device will wait until the tourist is no longer in the range of the landmark and then repeat the process. If there are multiple landmarks close to one another, the device will play the audio corresponding to the first-most entry in the index file and then move on to the second one directly. The device will keep track of the landmarks the user visits. The device will not replay the same media file if the tourist already visited that specific landmark. This prevents playback errors from occurring.

Geolocation and data privacy: CityGuide is built to respect the user’s data. The device does not share the geolocation of the user with anyone, it is kept local to the device. The device stores this in its memory and all geolocation references are deleted when the device is restarted. The geolocation is received from an onboard GPS module, this reduces the ability to tamper with the module as it is not directly accessible. This adds a layer of certainty and security for users so they do not need to worry about their location data getting in the hands of wrong people.

Battery life: The device is designed to survive about 12 hours of use. I chose to power the device with a power bank as it allows the device to last longer. This is also a practical choice because the power bank could be disconnected from the device when it is not in use and charged with batteries from other devices. This increases the ease of operation and makes it easier to operate with large quantities of devices. I used a 2,200mAhour power bank.

PROJECT CONSTRUCTION
This section walks you through each of the steps needed to construct the CityGuide:

Step 1: Required apparatus: This project does not require a lot of components as most of the needed sensors and modules are built into the Spresense board, the list of materials is below. Figure 10 shows all components.

… Read more on PROJECT CONSTRUCTION, MicroSD FOR STORAGE, MARKET RESEARCH, THE TARGET USER at https://circuitcellar.com/research-design-hub/projects/build-a-digital-city-tour-guide/

REFLECTION
I built this project around the Sony Spresense device. I was quite excited about its launch a while back and tried to think of an interesting project in which to build it. I came up with CityGuide. I was inspired by other applications that provide digital tours, but I wanted to make a physical device that could be provided by tourism agencies.

One thing I loved was the documentation for the device. There are step-by-step tutorials provided by Sony online for setting everything up. There are even a lot of examples to help build the project. I was able to create the project is a relatively small amount of time. I hope you enjoyed the read!

References:
[1] GitHub repo https://github.com/Andrei-Florian/CityGuide
[2] Sony Spresense Board https://developer.sony.com/develop/spresense/buy-now
[3] https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/generic/package_spresense_index.json
[4] download the appropriate utility for your OS from the Sony Spresense website https://developer.sony.com/develop/spresense/developer-tools/get-started-using-arduino-ide/set-up-the-arduino-ide#_prerequisites
[5] https://developer.sony.com/develop/spresense/developer-tools/get-started-using-arduino-ide/developer-guide#bookmark-dsp-table
[6] https://clicklikethis.com/how-to-format-sd-card/#:~:text=Right%20click%20on%20your%20SD,up%20your%20photos%20and%20videos
Sony: Developer World | https://developer.sony.com

Originally Written by Andrei Florian

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • APRIL 2021 #369 — Get a PDF of the issue

--

--

Circuit Cellar
Embedded Electronics

INSPIRING THE EVOLUTION OF EMBEDDED DESIGN As a premier resource for engineers providing critical information on Embedded Systems #CircuitCellar #EmbeddedDesign