Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
edward62740 committed Jul 16, 2023
1 parent afd6dd6 commit d04d7d5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
Binary file modified Code/co2sn/GNU ARM v10.2.1 - Default/co2sn.axf
Binary file not shown.
Binary file modified Code/co2sn/GNU ARM v10.2.1 - Default/co2sn.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion Code/co2sn/GNU ARM v10.2.1 - Default/co2sn.hex
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
:1018F000A4E70E4D2B78002B8AD001212046FFF75C
:1019000099FD2E7084E700BF34440020E75E00207C
:101910002445002000500650584400207844002000
:1019200000D0035000C0035020BF0200EC5E002036
:1019200000D0035000C0035040771B00EC5E002045
:1019300008B53CF05AFD054B186030B940F229114A
:10194000034B044A044831F07DFA08BD34440020BA
:1019500039E4040843E40408AEE304087FB50C4B03
Expand Down
2 changes: 1 addition & 1 deletion Code/co2sn/GNU ARM v10.2.1 - Default/co2sn.s37
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ S315080018E0F1E7A378002BB1D109484AF0C9FD207168
S315080018F0A4E70E4D2B78002B8AD001212046FFF74E
S3150800190099FD2E7084E700BF34440020E75E00206E
S3150800191024450020005006505844002078440020F2
S3150800192000D0035000C0035020BF0200EC5E002028
S3150800192000D0035000C0035040771B00EC5E002037
S3150800193008B53CF05AFD054B186030B940F229113C
S31508001940034B044A044831F07DFA08BD34440020AC
S3150800195039E4040843E40408AEE304087FB50C4BF5
Expand Down
2 changes: 1 addition & 1 deletion Code/co2sn/app_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LPC::SCD4X scd41(scd4x_wake_up, scd4x_power_down, scd4x_measure_single_shot,

constexpr static uint32_t SLEEPY_POLL_PERIOD_MS = 5 * 1000;
constexpr static uint32_t ALIVE_SLEEPTIMER_INTERVAL_MS = 60 * 1000;
constexpr static uint32_t MEASUREMENT_INTERVAL_MS = 180* 1000;
constexpr static uint32_t MEASUREMENT_INTERVAL_MS = 1800 * 1000;

/* application scd41 state variables */
/* isOn -> isDiscarded -> isMeas */
Expand Down
4 changes: 2 additions & 2 deletions Code/co2sn/app_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ inline bool efr32AllowSleepCallback(void)
*/
void setNetworkConfiguration(void)
{
static char aNetworkName[] = ";
static char aNetworkName[] = "";
otError error;
otOperationalDataset aDataset;

Expand All @@ -79,7 +79,7 @@ void setNetworkConfiguration(void)
aDataset.mComponents.mIsPanIdPresent = true;

/* Set Extended Pan ID to C0DE1AB5C0DE1AB5 */
uint8_t extPanId[OT_EXT_PAN_ID_SIZE] = { };
uint8_t extPanId[OT_EXT_PAN_ID_SIZE] = {};
memcpy(aDataset.mExtendedPanId.m8, extPanId, sizeof(aDataset.mExtendedPanId));
aDataset.mComponents.mIsExtendedPanIdPresent = true;

Expand Down
Binary file added Documentation/comms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The figures below depict the custom PCB and enclosure.

## Energy Harvesting and Power Management
In general, there are 3 power sources used: the PV cell array (SM141K05TF), supercapacitor (FC0H474ZF), and 2xAA (optional) backup.<br>
The primary assumption is that this sensor will receive only indirect sunlight and/or artificial lighting, hence a larger capacity from other storage technologies such as LIC/Li-ion may not be preferable if the capacity cannot be properly utilized, hence the use of a supercapacitor for the expected multiple discharges (including partial ones) per day.<br>
In the daytime, indoor lighting (approx. 100lux) is largely sufficient to indefinitely sustain a 1.5h sampling rate.
The primary assumption is that this sensor will receive only indirect sunlight and/or artificial lighting, hence a larger capacity from other storage technologies such as LIC/Li-ion may not be preferable if the capacity cannot be properly utilized, hence the use of a supercapacitor for the expected multiple discharges (including partial ones) per day. Furthermore, exposure to direct sunlight will introduce a non-trivial heating effect on the sensor elements; it is not known how the sensor readings would be affected. <br>
In the daytime, indoor lighting (approx. 350lux) is largely sufficient to indefinitely sustain a 1.5h sampling rate.
For completely non-battery backed operation, assuming a fully-charged supercapacitor with $1.551\text{C}$, can sustain maximally 10 cycles of CO2 measurements taking up $108\text{mC}$ each. In practice, self-discharge of the supercapacitor and quiescent currents are not negligible, and any sampling rate exceeding 1.5h should be backed up with the 2xAA for night-time operation.<br>

The sensor can also be configured to run completely off batteries.<br>
Expand All @@ -36,6 +36,7 @@ The quiescent power consumption (I<sub>Q</sub>) breakdown by design for all non-
| SCD41 | 0.5µA | PD |
| MAX9634 | 1.1µA | |

Initial designs where the sensors were segmented into seperate power domains and power gated did not yield good results, in some cases even increasing the total power due to cold start-up sequences.<br>
The supercapacitor (FC0H474ZF) maintains a charge current of <2µA after the initial absorption current. This will be assumed to be the leakage current I<sub>LEAK</sub> for all V<sub>cap</sub> > V<sub>hold</sub>. The self-discharge characteristic is given by an exponential, then a linear decay [[2]](#2).<br>

Based on empirical data (measured at the V<sub>BACK</sub> node, the average current of the system can be estimated (with the use of the [algorithm](#algorithm)):
Expand All @@ -55,6 +56,12 @@ The algorithm is designed to closely mirror the built-in algorithm.
![PCB](https://github.com/edward62740/ot-CO2SN/blob/master/Documentation/current_meas.png)<br>
*Figure 3: Current profile (SCD41 measuring)*

## Communication
Figure 4 denotes the typical communication sequence that the device performs to send measurements to the InfluxDB database.<br>
![Comms](https://github.com/edward62740/ot-CO2SN/blob/master/Documentation/comms.png)<br>
*Figure 4: Communication Sequence Diagram*

CoAP packets containing measurement data are sent aggressively (i.e. require ACK and repeated until received), while ordinary status or informational packets are fire-and-forget, in order not to waste a measurement.

[^1]: This sensor is optionally battery backed by 2xAA cells, to allow for higher sampling frequencies and redundancy.

Expand Down

0 comments on commit d04d7d5

Please sign in to comment.