Almabike Sensors User Manual¶
Welcome to the Almabike Project User Manual. This page includes all necessary information to get started with the sensor kit.
In addition, further information and graphic material is available in the Annexes of this manual.
The delivered sensor pack is comprised of these components:
The SCK and GPS are assembled with a 3D-printed Clip:
The enclosure is made out of a modified saddle bag. Find more details in enclosure:
All the software used in this (product/prototype/design), unless otherwise stated, is released under GNU GPL v3.0. Likewise, the hardware design files for the Smart Citizen Kit are released under CERN OHL v1.2. Please refer to the corresponding license for details regarding permissions, limitations, and conditions of use. This paragraph only applies to this section and the enclosure customization, and not to the rest of components such as the GPS or antenna.
The sensors are based on the Smart Citizen Kit, with the following components.
|Air temperature||ºC||Sensirion SHT-31|
|Relative Humidity||% REL||Sensirion SHT-31|
|Noise level||dBA||Invensense ICS-434342|
|Ambient light||Lux||Rohm BH1721FVC|
|Barometric pressure||Pa||NXP MPL3115A26|
|Equivalent Carbon Dioxide||ppm||AMS CCS811|
|Volatile Organic Compounds||ppb||AMS CCS811|
|Particulate Matter PM 1 / 2.5 / 10||µg/m3||Planttower PMS 5003|
The selected NEO-M8U GPS Breakout from Sparkfun is a high quality GPS board. The NEO-M8U takes advantage of u-blox's Untethered Dead Reckoning (UDR) technology. The NEO-M8U module is a 72-channel u-blox M8 engine GNSS receiver, meaning it can receive signals from the GPS, GLONASS, Galileo, and BeiDou constellations with ~2.5 meter accuracy. The module supports concurrent reception of three GNSS systems. The combination of GNSS and integrated 3D sensor measurements on the NEO-M8U provide accurate, real-time positioning rates of up to 30Hz.
Compared to other GPS modules, this breakout maximizes position accuracy in dense cities or covered areas. Even under poor signal conditions, continuous positioning is provided in urban environments and is also available during complete signal loss (e.g. short tunnels and parking garages). Lock time is further reduced with on-board rechargeable battery; there is a backup power enabling the GPS to get a hot lock within seconds.
The SparkFun NEO-M8U GPS Breakout1 is also equipped with an on-board rechargeable battery that provides power to the RTC on the NEO-M8U. This reduces the time-to-first fix from a cold start (~26s) to a hot start (~1.5s). The battery will maintain RTC and GNSS orbit data without being connected to power for plenty of time.
The GPS uses a ceramic patch antenna2 with the following features:
The U.FL antenna connector does not need to be unplugged from the board, specially never when the board is being powered in order to avoid damaging the circuitry:
The enclosure is made out of a modified generic Saddle Bag from Vaude - (Vaude Race Light L).
Enclosure images by Vaude
The enclosure was specifically chosen because:
- It is a widely available enclosure by a well stablished bike equipment manufacturer
- Size and materials
- Low weight and flexible outter fitting for low vibrations and transmissibility
The sensors are internally suspended by a polypropilene folding and the air intakes are made out of PLA in a 3D printer.
The sensors are enclosed in the saddle bag in order to avoid dirt and water spills. The measurement method in the enclosure ensures there is: 1. sufficient air flow parallel to the sensor's surface, 2. a limited gas speed across the sensors and minimum gas residence time to ensure sensitivity. The placement of the sensors was tested and compared with different options. Results are shown in the Test section. The images below show the measurement principle and a functional diagram for the sensor’s enclosure.
Please, ensure both intakes and exhaust are not covered and that air can flow freely between both.
This will be improved with new Firmware Features. Current battery duration is 1 day with 2-3 short bicycle trips of 30' each. This will improve with upcoming firmware updates.
The SCK comes with a 2000mAh LiPo battery to provide autonomy while measuring in the city. The battery is meant to be a complete power option for short-term measurements (approximatively 1-2 days). The battery duration is dependent on which sensors are enabled or disabled, and the amount of time the dynamic measurement interval is active.
You will note that the kit turns itself off while operating on battery. Actually, this is what we call
sleep-mode, an operation mode implemented to reduce consumption while on battery operation.
The SCK has a micro USB port and can be charged like any Smartphone or Tablet using a dedicated adapter or a computer USB port. A cable is provided and does not need to be disconnected from the device. The cable can be stored in the saddle’s bag back compartment.
The LED serves as an indication of the battery status. If the LED is flashing orange it indicates that the battery must be charged. The battery takes about 4 hours to fully charge. When the battery is fully charged, the LED will change from orange to green .
Remember that in addition to these colors you will have the state color of the kit: configuration, network and sd.
Find more details about power management under the data board section of the documentation
Data can be recorded offline or published online to the Smart Citizen Platform. The SCK owner needs to configure how the data is going to be stored in the Setup process, either in the SD card or via network connectivity (WiFi) to the platform.
When the SCK is configured in sdcard mode, it will store the data at the requested interval* in the SD card.
In the case of network connectivity, in normal conditions, the device will send data over to the Smart Citizen Platform via WiFi (WPA2 Personal or WEP). Additionally, when configured to send data over WiFi, if there is a SD card present, it will also store the data in it as a backup. Finally, in the special case of mobile sensors, where network connectivity is not always present, the data can be recorded offline on its internal dedicated flash memory of 8MB and later publish this over WiFi connectivity. Data is published using MQTT messages to the Smart Citizen Platform. NTP is used for syncing the built-in RTC.
In order to understand the reading and publication intervals, it is important to describe how the structure of the measurements is done:
- Overall reading interval: base period for the SCK to take a measurement
- Individual sensor reading interval: period for each sensor to take a measurement. It is defined as N times the Overall reading interval
- Publication interval: time for the SCK to publish to the Smart Citizen Platform, independent of the reading interval.
Each of the sensors can be configured independently, with a reading interval N times the overall reading interval. For the Almabike project, all the sensors are read every 60s if the sensors are static. When a GPS movement is detected, the reading interval goes down to 5s.
In the case of the Almabike project, the sensors store data internally in the Flash memory during the bicycle trips and publish it in batch when the configured WiFi network is visible. Data is also stored in the SD card for later use in CSV file format.
Accessing the data¶
Data from the sensors can be accessed in four ways:
- Using the SD card. Follow this guide to understand the data formats
- Downloading data from Smart Citizen Platform, following this guide
- Using the API calls, with information here
- Using Python to interact directly with the API. There is a python package available here and an example on how to do so here
Data from the sensors is timestamped in ISO8601 format with the following metrics:
|BATT||%||Device battery status|
|CCS811_VOCS||ppb||total Volatile Organics Compounds|
|GPS_DIL||n/a||GPS Horizontal Dilution of Position|
|GPS_FIX_QUALITY||n/a||GPS Fix Quality|
|GPS_SAT_N||n/a||GPS Number Tracked Satellites|
|GPS_SPEED||m/s||GPS Horizontal Speed|
|HUM||% RH||Urban board humidity|
|LIGHT||lux||Urban board ambient light|
|NOISE_A||dBA||Noise measurement in A scale|
|PM_1||ug/m3||PM 1 measurement from PMS5003|
|PM_25||ug/m3||PM 2.5 measurement from PMS5003|
|PM_10||ug/m3||PM 10 measurement from PMS5003|
|TEMP||degC||Urban board temperature|
Notes about data:
- Non valid data is shown in CSV as
- There is no correction in the data
- The minimum refresh interval for the PM sensor is 1s (it won't change faster than that)
The sensor comes mounted and almost ready to be used.
The first step is to connect the battery. The kit will light in red (configuration mode) and we will be able to configure it by following the instructions at start.smartcitizen.me.
After the configuration process, data will be available on the SmartCitizen platform. You can explore the data there or download it using the
CSV Download option (guide here)
Make sure data is recorded
For the Almabike project, it is important to follow the steps below in order to select the correct kit blueprint while registering the sensor:
Click the 🛠️ icon in the bottom right corner
Choose the blueprint of the device you want to setup, in this case:
#32 SCK 2.1 GPS
Click save and continue the process as usually
Due to privacy concerns, all geolocated data for the Almabike project will remain private unless the user choses to release it. When you set up your user profile, please, contact "firstname.lastname@example.org" to request your if your user can be upgraded from
This will allow to visit any of your devices and select the option "Make private" under the "Open Data" settings:
Before going on a trip¶
Before starting to pedal, make sure that this checklist is all fine:
- The kit is either in SD card or network mode
- The kit has enough battery (check the status of the LED)
- The GPS is being powered. The GPS might take some time to retrieve a valid location. This can be assessed by checking that the GPS Blue LED is blinking. If you want to make sure the complete trip is recorded, make sure the GPS can receive a clear view of the sky
- The kit is well placed inside the enclosure and the cable does not obstruct the exhaust
What is the GPS fix?
The GPS fix is the term used for describing whether or not the GPS has successfully received a valid location
Below, there is a list of known issues with the
0.9.8 version of the Firmware. These will be fixed soon.
Currently, the SCK does not report errors permanently and only during 10s. This is shown as a fast led blinking ().
Under certain conditions, the dynamic interval is not instantly recovered after a quick stop, and it might take 1' to restart
Under certain sky visibility conditions, the GPS does not report a valid fix. It is normally fixed with a clear sky view. For this, follow the instructions in Before going on a trip
Updating the firmware
Once there is a firmware release with these updates, refer to this guide for instructions on how to update it in your kit
Additional graphic material¶
The purpose of these tests is to assess the best solution for measuring particulate matter and environmental conditions with two different enclosures and hence exposure methods. The tests performed are:
- Indoor particulate tests
- Outdoor dynamic vs. static comparison
- Outdoor dynamic comparison
Indoor particulate tests¶
These tests were conducted indoor using a Marlin Smoke Machine in order to assess the difference between each enclosure.
Free air comparison
An initial comparison between both sensors in open air is done in order to assess the difference between each sensor measuring in open air with smoke injection up to 4000ug/m3. In the figure, two distinct phases need to be highlighted:
In the figure, two distinct phases need to be highlighted: injection (when there is smoke being injected in the room), and dispersion, when the injected smoke is being dispersed with a fan.
Both sensors correlate well in the injection phase and dispersion phases, but they do have an offset in the dispersion phase that is not identified, and that could be simply due to the sensor's position, although they are less than 10cm apart. This maximum offset is 700-1000ug/m3 in an evironment of very large particle concentration numbers 3000ug/m3.
Temperature and humidity offsets in this case are found to be less than 0.5degC in temperature and negligible for relative humidity.
The purpose of this comparison is to determine which measurement principle of the following is the best:
- Directly exposing the sensors to the air flow by the bicycle's movement
- Expose them inside a "chamber" in which air flow is contained and briefly slowed down
The following graph shows the comparison of both enclosures mounted on the bike, and a rider on the bike.
The comparison shows that the direct sensor exposure (ORTLIEB in the graph) is not as sensitive to particulate in the air as the chamber exposure is (VAUDE in the graph). This offset is not justified by the offset seen in dispersion phase in the free air test as it is also reduced in the injection phase. On the other hand, the chamber exposure shows a longer tail in the dispersion phase, as the particles can remain in the chamber and not be fully evacuated, although reactivity to larger quantities remains as seen in the graph below.
It also shows that the VAUDE enclosure evacuates better heat generated by the electronics, as the temperature offset between both enclosures is reduced. As seen in the following tests, the offset of each enclosure with respect to real temperature is between 1 to 3degC and it could be compensated by software a posteriori, but it can't be avoided as the sensors are confined in the enclosure. This factor is not critical for the exposure assessment and decision, as the material of the enclosure differ, and it's less traspirant in the ORTLIEB option.
Chamber vs. Reference test
The comparison of the best-so-far enclosure is shown below, with respect to the reference sensor in free air. This comparison shows how the enclosure effectively slows down the air flow charged with particles, and still correlates properly with the free air sensor in the injection phase, although not in the dispersion phase. This indicates that the accumulation and evacuation process of the particles within the chamber is not fully controlled in this enclosure. Nevertheless, the levels of particles in this setup are not comparable to any actual particulate levels found in actual urban environments.
The offset in temperature and humidity is of approximatively 3degC at the end of the test, and follows a normal heat up curve with logarithmic trend, equally for humidity with 7%rh.
Direct exposure vs. Reference test
The direct exposure vs reference comparison shows an inferior sensitivity, already seen in the enclosure comparison, of the direct exposure option versus the actual concentration. The measurements also show less reactivity in some instances, smoothing out some peaks in particle concentrations. Temperature trace shows an offset of 3degC at the end of the test, similarly to that of the other enclosure, with an humidity difference of 4-5%rh.
These tests are aimed at comparing outdoor measurements with sensor trips. These measurements use the same sensor as the ones mounted on the bicycle. A script is used to post-process the data based on location and derive a comparison between both measurements.
Comparison bike front vs. bike back
This comparison shows the difference between the different metrics when measuring gas using the same enclosure in the front (black) and in the back (green):
After a short stabilisation period, this test shows that PM2.5 measurements are equally correlated between both positions. In the case of the temperature sensor, a difference of up to 2ºC was seen (higher in the saddle’s position), with better sensitivity in the case of the front-sensor, due to a lower confinement and larger surface area:
Due to project guidelines, the saddle position of the sensor is considered sufficient for the purpose of monitoring air quality. However, it’s worth mentioning that this sensor location requires attention for the sensors to never be covered by the rider’s clothing. Furthermore, the front position shows a better response for the sensor temperature representativity and sensitivity as seen above, with a potential better GPS fix quality. This latter issue is compensated with the usage of an active patch antenna with higher gain.
Further tests are currently being conducted in order to assess the performance of the sensors when compared to static ones.
GPS NEO-M8U Specification: https://cdn.sparkfun.com/assets/6/d/7/c/6/NEO-M8U_DataSheet__UBX-15015679_.pdf ↩
Ceramic Patch Antenna Specification: https://www.molex.com/pdm_docs/as/2066400001-AS.pdf ↩