Prof. J. Walter - Informationstechnik, Mikrocomputertechnik, Digitale Medien Quellcode
Hochschule Karlsruhe Logo Informationstechnik
CM-IoT-Parameter
Sommersemester 2020
Daniel Autenrieth
Markus Kittel

Quellcode

#pragma once

/*
Name: Configuration.h
Created: 06.10.2019 13:02:27
Modified: 28.05.2020
Author: Daniel Autenrieth & Markus Kittel
Content: Beinhaltet alle Definitionen für:
- Pinbelegung
- Servoendstellungen
- EEPROM-Size
- I2C-Adressen
*/

#define SERIAL_DEBUG // activate Debug Messages sent by Serial UART
// comment/uncomment to deactivate/activate Serial Debugging Messages

//#define SEND_USER_INFO // activate Transmission of User Infos to HMI-ESP32

// Cocktailsize
#define COCKTAIL_SIZE 220

// Toricelli-Parameter
// Stock Bottles for Ingredients
// Big size 3L Bottles
#define BOTTLE_3L0_AREA 8850.0 // horizontal Area of cylindrical part in [mm^2]
#define BOTTLE_3L0_BASEHEIGHT 720.0 // Height between end of tube and bottom of cylinder in [mm]
// Mid size 1,5L Bottles
#define BOTTLE_1L5_AREA 5800.0 // horizontal Area of cylindrical part in [mm^2]
#define BOTTLE_1L5_BASEHEIGHT 690.0 // Height between end of tube and bottom of cylinder in [mm]
// Small size 0,7L Bottles
#define BOTTLE_0L7_AREA 3848.0 // horizontal Area of cylindrical part in [mm^2]
#define BOTTLE_0L7_BASEHEIGHT 690.0 // Height between end of tube and bottom of cylinder in [mm]
// inner horizontal area of tubes
#define TUBE_AREA 33.18 // in [mm^2]
// flow coefficients µ
// µ for water: 0.415
#define FLOW_COEFFICIENT_GRENADINE 0.463
#define FLOW_COEFFICIENT_ZITRONE 0.646
#define FLOW_COEFFICIENT_VODKA 0.61
#define FLOW_COEFFICIENT_ORANGE 0.59
#define FLOW_COEFFICIENT_MARACUJA 0.61
#define FLOW_COEFFICIENT_MALIBU 0.61
#define FLOW_COEFFICIENT_BANANE 0.5176
#define FLOW_COEFFICIENT_ANANAS 0.4855
// loss in height due to friction in fluids in [mm]
// h_v for water: 0.0 (measured by Prof. Walter: 400.0, measured by us: 540.0)
#define FRICTION_HEIGHT_GRENADINE -54.0
#define FRICTION_HEIGHT_ZITRONE 397.0
#define FRICTION_HEIGHT_VODKA 327.0
#define FRICTION_HEIGHT_ORANGE 360.8
#define FRICTION_HEIGHT_MARACUJA -163.0
#define FRICTION_HEIGHT_MALIBU 327.0
#define FRICTION_HEIGHT_BANANE 289.5
#define FRICTION_HEIGHT_ANANAS 344.0
// valve time offset during valve opening in [ms]
#define VALVE_TIME_OFFSET 130


// Squeezevalves:
#define PinSX1509Valve_0 0 //Links unten
#define PinSX1509Valve_1 7 //Links oben
#define PinSX1509Valve_2 6 //Links unten 2. Ventil
#define PinSX1509Valve_3 1 //Links oben 2. Ventil...
#define PinSX1509Valve_4 5
#define PinSX1509Valve_5 2
#define PinSX1509Valve_6 4
#define PinSX1509Valve_7 3

#define SX1509_ADDRESS 0x3E // Address of Valves Driver

// Drainer Servomotor:
#define PinServoPWM 32 // define Servo Signal Pin
#define ServoPosOpen 0 // define Open pos
#define ServoPosClosed 180 // define close pos
#define ServoDriveDelay 1000 // time to wait for Servo to complete movement

// Glass Scale
#define ScaleCalibrationFactor 213.41 // Calibration factor for unit [grams]
#define ScaleZeroOffset 110954 // Zero Offset: no weight on scale
#define AVG_WEIGHT_SIZE 4 // Number of Measurements for moving Average
#define ScaleReadAvgDelay 10 // in milliseconds
//#define ScaleEmptyTara 0.0 // in grams
#define ScaleTolerance 30.0 // in grams
#define EmptyGlassWeight 306.0 // in grams

// Wlan Communication
// Userinfos:
#define USER_INFO_ERROR 0
#define USER_INFO_SUCCESS 1
#define USER_INFO_IN_PROGRESS 2
#define USER_INFO_READY 3

  Mit Unterstützung von Prof. J. Walter Sommersemester 2020