1-phase PV router
Loading...
Searching...
No Matches
config_system.h File Reference

Basic configuration values to be set by the end-user. More...

#include <Arduino.h>
#include "type_traits.hpp"
Include dependency graph for config_system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

constexpr uint8_t ANTI_CREEP_LIMIT { 5 }
 
constexpr conditional< DATALOG_PERIOD_IN_SECONDS *SUPPLY_FREQUENCY >=UINT8_MAX, uint16_t, uint8_t >::type DATALOG_PERIOD_IN_MAINS_CYCLES { DATALOG_PERIOD_IN_SECONDS * SUPPLY_FREQUENCY }
 
constexpr uint8_t DATALOG_PERIOD_IN_SECONDS { 5 }
 
constexpr uint16_t delayBeforeSerialStarts { 1000 }
 
constexpr float invDATALOG_PERIOD_IN_MAINS_CYCLES { 1.0f / DATALOG_PERIOD_IN_MAINS_CYCLES }
 
constexpr float invSUPPLY_FREQUENCY { 1.0f / SUPPLY_FREQUENCY }
 
constexpr uint32_t JOULES_PER_WATT_HOUR { 3600 }
 
constexpr uint32_t mainsCyclesPerHour { SUPPLY_FREQUENCY * SECONDS_PER_MINUTE * MINUTES_PER_HOUR }
 
constexpr uint16_t MINUTES_PER_HOUR { 60 }
 
constexpr uint8_t NO_OF_PHASES { 1 }
 
constexpr int16_t REQUIRED_EXPORT_IN_WATTS { 0 }
 
constexpr uint16_t SECONDS_PER_MINUTE { 60 }
 
constexpr uint16_t startUpPeriod { 3000 }
 
constexpr uint8_t SUPPLY_FREQUENCY { 50 }
 
constexpr uint32_t WORKING_ZONE_IN_JOULES { 360 }
 

Detailed Description

Basic configuration values to be set by the end-user.

Author
Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
Version
0.1
Date
2024-10-03

Definition in file config_system.h.

Variable Documentation

◆ ANTI_CREEP_LIMIT

uint8_t ANTI_CREEP_LIMIT { 5 }
inlineconstexpr

in Joules per mains cycle (has no effect when set to 0)

Definition at line 32 of file config_system.h.

Referenced by printConfiguration().

◆ DATALOG_PERIOD_IN_MAINS_CYCLES

conditional<DATALOG_PERIOD_IN_SECONDS*SUPPLY_FREQUENCY>=UINT8_MAX,uint16_t,uint8_t>::type DATALOG_PERIOD_IN_MAINS_CYCLES { DATALOG_PERIOD_IN_SECONDS * SUPPLY_FREQUENCY }
inlineconstexpr

Period of datalogging in cycles

Definition at line 39 of file config_system.h.

Referenced by processDataLogging().

◆ DATALOG_PERIOD_IN_SECONDS

uint8_t DATALOG_PERIOD_IN_SECONDS { 5 }
inlineconstexpr

Period of datalogging in seconds

Definition at line 36 of file config_system.h.

Referenced by processCalculationsForLogging().

◆ delayBeforeSerialStarts

uint16_t delayBeforeSerialStarts { 1000 }
inlineconstexpr

in milli-seconds, to allow Serial window to be opened

Definition at line 45 of file config_system.h.

Referenced by processStartUp(), and setup().

◆ invDATALOG_PERIOD_IN_MAINS_CYCLES

float invDATALOG_PERIOD_IN_MAINS_CYCLES { 1.0f / DATALOG_PERIOD_IN_MAINS_CYCLES }
inlineconstexpr

Definition at line 43 of file config_system.h.

◆ invSUPPLY_FREQUENCY

float invSUPPLY_FREQUENCY { 1.0f / SUPPLY_FREQUENCY }
inlineconstexpr

Definition at line 42 of file config_system.h.

Referenced by printForSerialText().

◆ JOULES_PER_WATT_HOUR

uint32_t JOULES_PER_WATT_HOUR { 3600 }
inlineconstexpr

(0.001 kWh = 3600 Joules)

Definition at line 24 of file config_system.h.

◆ mainsCyclesPerHour

uint32_t mainsCyclesPerHour { SUPPLY_FREQUENCY * SECONDS_PER_MINUTE * MINUTES_PER_HOUR }
inlineconstexpr

Definition at line 34 of file config_system.h.

◆ MINUTES_PER_HOUR

uint16_t MINUTES_PER_HOUR { 60 }
inlineconstexpr

Definition at line 23 of file config_system.h.

◆ NO_OF_PHASES

uint8_t NO_OF_PHASES { 1 }
inlineconstexpr

number of phases of the main supply.

Definition at line 19 of file config_system.h.

Referenced by calcBufferSize().

◆ REQUIRED_EXPORT_IN_WATTS

int16_t REQUIRED_EXPORT_IN_WATTS { 0 }
inlineconstexpr

when set to a negative value, this acts as a PV generator

Definition at line 29 of file config_system.h.

Referenced by printConfiguration().

◆ SECONDS_PER_MINUTE

uint16_t SECONDS_PER_MINUTE { 60 }
inlineconstexpr

Definition at line 22 of file config_system.h.

◆ startUpPeriod

uint16_t startUpPeriod { 3000 }
inlineconstexpr

in milli-seconds, to allow LP filter to settle

Definition at line 46 of file config_system.h.

Referenced by processStartUp().

◆ SUPPLY_FREQUENCY

uint8_t SUPPLY_FREQUENCY { 50 }
inlineconstexpr

Definition at line 27 of file config_system.h.

Referenced by loop(), and processLatestContribution().

◆ WORKING_ZONE_IN_JOULES

uint32_t WORKING_ZONE_IN_JOULES { 360 }
inlineconstexpr

0.1 Wh, reduced for faster start-up

Definition at line 28 of file config_system.h.