Skip to content

Commit

Permalink
Improvements on boards/hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
oscgonfer committed Jan 30, 2025
1 parent 67b6235 commit 6032fb8
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 70 deletions.
32 changes: 15 additions & 17 deletions docs/hardware/boards/analog-sensor-board.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
internal:
writing: false
writing: true
proofread: false
links: false
images: false
Expand All @@ -12,37 +12,35 @@ The SmartCitizen Analog Sensor Board (_ASB_) is an expansion board for the Smart

<img style="max-height: 350px; width: 100%; object-fit: cover;" src="https://live.staticflickr.com/65535/53968621883_5c4f1ab625_k.jpg" alt="Analog-Sensor-Board-front-b"/>

We use it to measure low power sensors such as the Alphasense Ltd. electrochemical sensors, or SPEC sensors. You can use it in different configurations and the different headers:
We use it to measure analog voltages from low power sensors such as the [Alphasense Ltd.](https://www.alphasense.com/) [electrochemical](/docs/knowledge/air/chemical/Alphasense_Electrochemical/) sensors, or [SPEC](https://www.spec-sensors.com/) sensors. You can use it in different configurations and the different headers:

![](/assets/images/asb-socket-options.png)

Below you see a comparison:

=== "B-series sensors"
<img src="https://live.staticflickr.com/65535/53968621883_5819b0379c_h.jpg" alt="Analog-Sensor-Board-front-b"/>
<img src="https://live.staticflickr.com/65535/53968621883_5819b0379c_h.jpg" style="max-height: 350px; width: 100%; object-fit: cover;" alt="Analog-Sensor-Board-front-b"/>
=== "A-series sensors"
<img src="https://live.staticflickr.com/65535/53968379046_ab50fd93bd_h.jpg" alt="Analog-Sensor-Board-front-a"/>
<img src="https://live.staticflickr.com/65535/53968379046_ab50fd93bd_h.jpg" style="max-height: 350px; width: 100%; object-fit: cover;" alt="Analog-Sensor-Board-front-a"/>
=== "Empty"
<img src="https://live.staticflickr.com/65535/53968710279_06c66e72e6_h.jpg" alt="Analog-Sensor-Board-front-empty"/>
<img src="https://live.staticflickr.com/65535/53968710279_06c66e72e6_h.jpg" style="max-height: 350px; width: 100%; object-fit: cover;" alt="Analog-Sensor-Board-front-empty"/>

## Characteristics
## Features

![](/assets/images/asb-diagram.png){:style="width: 500px"}
The **Analog Sensor Board** features two [TI ADS1115](https://www.ti.com/product/ADS1115) 16bit 4-channel ADCs, and can read 8 analog channels in total. It has a potential to read up to 16 channels by daisy chainning two boards (by changing the address with the selectable jumper), or many more if you use a multiplexer.

### Operating voltage
!!! info "Previous version"
A previous version could interface 4 channels, daisy chainable up to 4 boards - with a total of 16 analog channels, by using [Adafruit ADS1115 Breakout board](https://www.adafruit.com/product/1085).

Natively operates at 3.3V, but can use also up to 5.5V in EXT-V, and with a selectable jumper. It integrates a level-shifter from the GROVE connector's voltage to EXT-V.
Below you have a functional diagram:

### Connectivity
![](/assets/images/asb-diagram.png){:style="width: 450px"}

I2C, from 3.3V up to 5.5V.
The **Analog Sensor Board** natively operates at 3.3V, but can work up to 5.5V with a selectable jumper through a step-up converter (RECOM 0309S), making the digital voltage consistent with the sensor measurement voltage. To make everything consistent, it integrates a level-shifter from the GROVE connector's voltage to the internal voltage. Digital communications, via the Grove port, is done via I2C, from 3.3V up to 5.5V.

### Inputs
## Design files

<img src="https://live.staticflickr.com/65535/50812573983_30bfb4b35f_k.jpg" width="2000" height="1334" alt="Smart Citizen Station rev3">
You can find all the design files for the different versions of the **Analog Sensor Board** in the [hardware repository](https://github.com/fablabbcn/smartcitizen-analog-sensor-board).

- 4 channels in the 4-channel version. Daisy chainable up to 4 boards - with a total of 16 analog channels!
- 8 channels in the 8-channel version.

<a class="github-button" data-size="large" href="https://github.com/fablabbcn/smartcitizen-analog-sensor-board" aria-label="Check the source code">Check the source</a>
<a class="github-button" data-size="large" href="https://github.com/fablabbcn/smartcitizen-analog-sensor-board" aria-label="Check the design files">Check the design files</a>

68 changes: 26 additions & 42 deletions docs/hardware/boards/data-board.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
internal:
writing: false
writing: true
proofread: false
links: false
images: false
---

# Data Board

The Data Board is a data-logger at the core of the sensors architecture supporting the Smart Citizen Kit and the Smart Citizen Station. This module is powered by an ARM M0+ 32-bits 48Mhz **SAMD21** running the [Smart Citizen Firmware](/docs/hardware/firmware/), combining the low power consumption of the ARM M0 family with the power of a 32-bits processor with 32KB of RAM and 256KB of FLASH memory. This solution offers enough program storage and memory space to support multiple auxiliary sensors. This chip is used by the Arduino Zero and MKR boards, therefore benefiting from the open community built around these boards in particular and the Arduino project in general.
The **Data Board** is the core of the SCK architecture supporting the data-logging tasks. It's designed to perform the heavylifting and interface with sensors, the user, the SD card, take care of communications, and power management. All SCK2.X versions are practically the same, building upon the SCK2.1 design with minor modifications.

=== "SCK2.3"
<img style="max-height: 325px; width: 100%; object-fit: cover;" src="https://live.staticflickr.com/65535/54281911435_c1ae473a74_o.jpg" alt="SCK2.3 Data Board"/>
Expand All @@ -19,77 +19,61 @@ The Data Board is a data-logger at the core of the sensors architecture supporti

<a class="github-button" data-size="large" href="{{ config.extra.urls.ghhardware.link }}" aria-label="Check the design files">Check the design files</a>

The Data Board also includes a Wi-Fi module, a micro SD card slot, an internal Flash and a battery management solution. In addition, it includes 4MB of extra Flash Memory for offline data storage, in case of network brownouts. The Wi-Fi Module is the well-known [Espressif ESP8266](https://www.espressif.com/en/products/hardware/esp8266ex/overview) IEEE 802.11 b/g/n Wi-Fi with 4MB Internal Flash for web content storage:

## Microcontrollers

![](/assets/images/data-board-mcus.png){:style="width: 500px"}

The Data Board connects to the sensor board providing power, analog and digital communications (12 bits ADC, GPIO, I2C, I2S, VCC). The Data Board also includes a Seeed Studio standard Grove connector where off-the-shelf modules from the same manufacturer can be connected. The connector supports an independent I2C bus by default, but by software it can be configured to support other uses (GPIO, I2C and UART). It can supply power up to 750mA, and it can be enabled or disabled by software to save power.
The **Data Board** is powered by an ARM M0+ 32-bits 48Mhz **SAMD21** running the [Smart Citizen Firmware](/docs/hardware/firmware/), combining the low power consumption of the ARM M0 family with the power of a 32-bits processor with 32KB of RAM and 256KB of FLASH memory. This solution offers enough program storage and memory space to support multiple auxiliary sensors. This chip is used by the Arduino Zero and MKR boards, therefore benefiting from the open community built around these boards in particular and the Arduino project in general.

![](/assets/images/data-board-connectors.png){:style="width: 500px"}
![](/assets/images/data-board-mcus.png){:style="width: 500px;"}

The board includes a power unit, with a battery management system, capable of handling a variety of Lithium polymer cells. The batteries are connected to a standard JST-2 pin battery connector. The Smart Citizen Kit by default uses a 2000mAh battery, but larger capacities can be used. Under normal conditions, and depending on the sensors enabled, a 2000mAh battery can last between 24 hours (with all sensors enabled, and a 1-minute recording frequency) to more than a week. The board also features a _sleep mode_, through which drastically lower average consumption are achieved.
The **Data Board** also includes a Wi-Fi module, a micro SD card slot, an internal Flash and a battery management solution. In addition, it includes 4MB of extra Flash Memory for offline data storage, in case of network brownouts. The Wi-Fi Module is the well-known [**Espressif ESP8266**](https://www.espressif.com/en/products/hardware/esp8266ex/overview) IEEE 802.11 b/g/n Wi-Fi with 4MB Internal Flash for web content storage.

The controller allows the batteries to be easily charged using the boards micro USB connector using any standard USB power adapter like the ones used on Smartphones. On remote areas, it can also be powered using a selection of PV Panels like [Voltaics Systems](https://www.voltaicsystems.com/) 6W panel.
## Connectors

![](/assets/images/data-board-connectors-power.png){:style="width: 500px"}
The **Data Board** connects to the [Urban board](/hardware/boards/urban-board/) providing power, analog and digital communications (12 bits ADC, GPIO, I2C, I2S, VCC). The Data Board also includes a Seeed Studio standard Grove connector where off-the-shelf modules from the same manufacturer can be connected. The connector supports an independent I2C bus by default, but by software it can be configured to support other uses (GPIO, I2C and UART). It can supply power up to 750mA, and it can be enabled or disabled by software to save power.

TODO - Leds, buttons...
![](/assets/images/data-board-connectors.png){:style="width: 500px;"}

## Firmware
The board includes a power unit, with a battery management system, capable of handling a variety of Lithium polymer cells. The batteries are connected to a standard JST-2 pin battery connector. The Smart Citizen Kit by default uses a 2000mAh battery, but larger capacities can be used.

The Smart Citizen Kit firmware is made out of two parts:
![](/assets/images/data-board-connectors-power.png){:style="width: 500px;"}

1. the primary processing tasks are done by the SAMD21 microcontroller firmware;
2. the tasks related to network communication are run through the ESP8266.
The controller allows the batteries to be easily charged using the boards micro USB connector using any standard USB power adapter like the ones used on Smartphones. It can also be powered via the micro USB connector using a [Solar Panel](/hardware/addons/solar-panel/).

The SAMD21 is built on top of the Arduino Zero with a custom variant for the Data Board main MCU. The ESP8266 is also built using the Arduino ESP Core. Both firmwares are built and managed with Platform IO, an open-source IDE for embedded development. Platform IO features built-in dependency management and allows you to compile and upload both processors with a single command. Using the SWD ARM connector you can change the MCU bootloader and debug the firmware using Open Source tools.
## User interfaces

!!! info
The **Data board** features feedback LEDs, which behaviour is described on the [features](/hardware/kit/features/#user-interfaces) page.

Learn more about the software running inside the Data Board on the [Firmware section](/hardware/firmware/).
![](/assets/images/data-board-leds.png){:style="width: 500px;"}

!!! tips "Software guides"
Check the firmware guides and learn how to update and even modify the software:
It also supports input via the button (both the [ON/OFF button](/hardware/kit/features/#the-onoff-button) and the [reset button](/hardware/kit/features/#the-reset-button)):

* [Edit the Firmware](/guides/firmware/edit-the-firmware/).
* [Uppgrade the Firmware](/guides/firmware/upgrading-the-firmware/).
* [Debug the Firmware (advanced)](/guides/firmware/debug-the-firmware/).
![](/assets/images/data-board-buttons.png){:style="width: 500px;"}

## Buses

### Sensor Boards connector
Below you have a pinout of the **Data Board** buses:

The Kit features a modular architecture where sensors can be updated independently by replacing any individual Sensor Board. The Sensor Boards features GPIO, ADC, I2C, UART and I2S connections at 3.3V. Currently, we only offer the Urban Sensor Board, but more boards are on the way, and you can even design and build a custom one.
![](/assets/images/data-board-pinout.png){:style="width: 500px;"}

Here there is a pinout of the Data Board connector:
### Sensor Board connector

![](/assets/images/data-board-pinout.png){:style="width: 500px"}
The **Data Board** features a modular architecture where sensors can be updated independently by replacing any individual Sensor Board. The Sensor Boards features GPIO, ADC, I2C, UART and I2S connections at 3.3V. Currently, we only offer the Urban Sensor Board, but more boards are on the way, and you can even design and build a custom one.

### Auxiliary connector

The Data Board features and independent configurable auxiliary bus at 3.3V with a SEEED Studio Grove connector. The Bus has native support for I2C, but it can also be setup on firmware as a GPIO or UART port. It can supply power up to 750mA, and it can be enabled or disabled by software.
The **Data Board** features and independent configurable auxiliary bus at 3.3V with a SEEED Studio Grove connector. The Bus has native support for I2C, but it can also be setup on firmware as a GPIO or UART port. It can supply power up to 750mA, and it can be enabled or disabled by software.

## Power management

The Smart Smart Citizen Kit gives us the possibility of running directly from a USB power source with or without lithium battery, using the [BQ24259 USB Charger](/assets/datasheets/components/bq24259.pdf). The charger manages external power regulation, battery fast charging (up to 2Ah) and USB OTG that allow us powering other devices from the SCK (currently not implemented).

Normaly the SCK uses a 2000 mAh [Lithium polymer battery](https://en.wikipedia.org/wiki/Lithium_polymer_battery) but it is possible to take advantage of larger batteries. The charging current is regulated with a manual imposed limit that can be configured, and also auto adjusts to the connected USB charger capacity. It is also possible to use solar panel (5v) to charge the SCK.

The power consumption of the kit depends on which sensors are enabled and how often they are read/published. Between readings the kit goes to _sleep mode_ turning off almost all the subsystems and reducing the power consumption.

In previous versions of the kit (V2.0 and before), the most power-hungry sensors were the SGX MICS gas sensors (NO~2~ and CO) which need an always-on heater with a permanent consumption of around 50 mAh (35 hours per charge). In V2.0 and V2.1, the PM sensor needs a fan with a consumption of 35 mAh (50 hours per charge). To improve the power consumption, the PM Sensor works on _one-shot mode_ which turns the sensor off for 3/4ths of the time, and only taking a reading after the sensor has stabilised.
The **Data Board** features the possibility of running directly from a USB power source with or without lithium battery (only for SCK2.1; SCK2.2 and SCK2.3 require a battery), using the [BQ24259 USB Charger](/assets/datasheets/components/bq24259.pdf). The charger manages external power regulation, battery fast charging (up to 2Ah) and USB OTG that allow us powering other devices from the **Data Board** (although this is currently not implemented).

The **kit normal operation cycle** on battery is: read sensors, post, and then go to sleep. Until the battery charge is below 3%. When that threshold is passed it will enter an emergency sleep mode and interrupt all the normal functions until the charge goes over 5%.

### Power consumption

The base power consumption of the device is 16mA (no sensors or wifi connection). While posting data online, the consumption can go up to 75mA accounting for the ESP8266, with an additional 90mA if all the sensors are to be working at the same time (Urban Sensor Board + PM sensor).
Normally the SCK uses a 2000 mAh [Lithium polymer battery](https://en.wikipedia.org/wiki/Lithium_polymer_battery) but it is possible to take advantage of larger batteries. The charging current is regulated with a manually coded limit that can be configured, and also auto adjusted to the connected USB charger capacity.

## Design files

You can find all the design files for the different versions of the Urban Boards in the [hardware repository]({{ extra.urls.ghhardware.link }}).
You can find all the design files for the different versions of the **Data Board** in the [hardware repository]({{ extra.urls.ghhardware.link }}).

<a class="github-button" data-size="large" href="{{ config.extra.urls.ghhardware.link }}" aria-label="Check the design files">Check the design files</a>

!!!info "Previous versions"
Previous versions of the SCK, are in their respective repositories:
Expand Down
15 changes: 13 additions & 2 deletions docs/hardware/boards/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
internal:
writing: true
proofread: false
links: false
images: false
---

# Boards

The core of the system is the [Data Board](/hardware/boards/data-board), a data logger with Wi-Fi connectivity, a micro SD-card, micro USB and battery connectors. Different components can be connected to the board: customized sensor boards, or a wide range of digital and analog sensors. The idea is to make it very easy to get started, no matter if you want to collect air quality or noise data, working on educational settings, or on more _advanced_ scientific research. The type of sensors that we normally work with can take [air](/knowledge/air), [water](/knowledge/water) or [soil](/knowledge/soil) measurements.
Expand All @@ -16,10 +24,13 @@ The most popular one of these boards are the [Urban Boards](/hardware/boards/urb

These boards are used to interface with sensors that the _data board_ can't interface with directly:

* [Analog Sensors Board](/hardware/boards/analog-sensor-board/): An auxiliary board using two high-resolution Analog to Digital Converters (ADCs) capable of reading 8 analog channels at 16 bit resolution. It is used in the [Smart Citizen Stations](/hardware/stations/) for the interfacing with sensors such as [electrochemical cells](/knwoledge/sensors/air/chemical/Alphasense_Electrochemical/) or [PIDs](/knwoledge/sensors/air/chemical/Alphasense_PID/).
* [**Analog Sensors Board**](/hardware/boards/analog-sensor-board/): An auxiliary board using two high-resolution Analog to Digital Converters (ADCs) capable of reading 8 analog channels at 16 bit resolution. It is used in the [Smart Citizen Stations](/hardware/stations/) for the interfacing with sensors such as [electrochemical cells](/knwoledge/sensors/air/chemical/Alphasense_Electrochemical/) or [PIDs](/knwoledge/sensors/air/chemical/Alphasense_PID/).

<img style="max-height: 350px; width: 100%; object-fit: cover;" src="https://live.staticflickr.com/65535/53968621883_5c4f1ab625_k.jpg" alt="Analog-Sensor-Board-front-b"/>

* The [PM Sensors Board](/hardware/boards/pm-board/): An auxiliary board capable of driving two [PMS5003 Particulate Matter sensors](/hardware/sensors/air/OPCs/) as well as other auxiliary sensors required for specific deployments. It is generally used in the big [Smart Citizen Stations](/hardware/stations/).
* [**PM Sensor Board**](/hardware/boards/pm-board/): An auxiliary board capable of driving two [PMS5003 Particulate Matter sensors](/hardware/sensors/air/OPCs/) as well as other auxiliary sensors required for specific deployments. It is generally used in the big [Smart Citizen Stations](/hardware/stations/).

<img src="https://live.staticflickr.com/65535/47950953122_788b43618a_k.jpg" alt="SCK 2.1 PM Board"/>

!!! info "Commercial availability"
All interface boards are currently not available for purchases, except from Fab Lab Barcelona directly. Email us at [{{config.extra.urls.info.name}}]({{config.extra.urls.info.mail}}) in case you are interested.
Loading

0 comments on commit 6032fb8

Please sign in to comment.