Hallo Vince,
Complimenten voor hetgeen je toe nu toe heb uitgedacht en gemaakt. En het ook nog eens wil delen hier op het forum.
Het zou zo maar kunnen dat dit het begin van veel leuke dingen wordt.
Je noemt het "houtkachel monitor systeem", maar ik denk dat het veel meer kan dan monitoren alleen.
Denk o.a. aan sturen, en in het geval van Holtere het bepalen van rendement van de warmtewisselaar.
Met het bepalen van rendement van de warmtewisselaar ben ik een tijd geleden ook bezig geweest. Ik heb er zelfs een Arduino voor aangeschaft, maar deze daar niet voor gebruikt. Ik ben eigenlijk nooit verder gekomen dat de paar schema's die bij de beginnerskit zaten.
Omdat ik al wel goed met Excel om kan gaan, heb ik daarvoor gekozen.
Om het rendement van de wisselaar te bepalen moet je metingen voor en na de wisselaar doen. Je hebt dus eigenlijk 2 Testo`s nodig, maar ik heb er maar 1.
Maar door een extra temp. meting te doen, en vervolgens alles in excel te zetten kon ik wel simuleren of je er met 2 meet.
Zo kon ik redelijk nauwkeurig het vermogen van de wisselaar bepalen.
Ik ben ondertussen al wel een boodschappenlijstje aan`t maken voor jouw schema. Maar twijfel nog om het te bestellen, omdat ik het dus niet meer nodig heb. Maar misschien voor de spelerij? Een hobby mag wel iets kosten.
Tot zover even de (oninteressante) inleiding......
Hier staat een document wat beschrijft hoe het e.e.a. berekent moet worden.
Ondanks mij ZEER gebrekkige kennis van de Arduino, wil ik toch een poging wagen.
Op basis van dat document heb ik een
poging ondernomen je Arduino eerst het CO2 % en vervolgens het toestelrendement te laten bepalen.
Ik ben benieuwd of het werkt? Het zou leuk zijn als je dat eens zou willen proberen.
Ik heb onderaan je sketch de berekeningen toegevoegd.
Voor de ruimte temp. heb ik voor het gemak maar even 20°C opgenomen, maar omdat er op je vochtigheids-meter ook een temp. sensor zit, zou je die later ook kunnen gaan gebruiken.
Code: Selecteer alles
/***************************************************
Proof of Concept (PoC) sketch (version 1.0)
Some of the following code and associated libraries were written by Limor Fried and Ladyada
for Adafruit. This code is used to obtain data from the Adafruit Amplifier Board (MAX31855).
The board is available from https://www.adafruit.com/products/269 - BSD license.
Other bits of the code were written by Nathan Seidle for SparkFun Electronics. His code (and libraries)
are used to obtain data from the Sprakfun HTU21D temperature & humidity sensor. The rest of the code was
cobbled together by Vincent Busch for the stovething.
***************************************************/
#include <Wire.h>
#include <SparkFunHTU21D.h>
#include <SPI.h>
#include "Adafruit_MAX31855.h"
/*-------TEMPERATURE & HUMIDITY SENSOR-------*/
//Create an instance for the temperature/humidity sensor
HTU21D myHumidity;
/* The POC version uses two thermocouples (software SPI on any four digital IO pins). The CLK (clock) and
CS (chip select) are shared; thermocouple 1 is assigned DO1 (data out) while thermocouple 2 uses DO 2. Pins and
thermocouples are defined below. */
/*-------DEFINE THERMOCOUPLES-------*/
#define DO1 10
#define DO2 11
#define CS 12
#define CLK 13
Adafruit_MAX31855 thermocouple1(CLK, CS, DO1);
Adafruit_MAX31855 thermocouple2(CLK, CS, DO2);
/*-------SETUP SECTION-------*/
void setup() {
Serial.begin(9600);
delay(1000);
// Start Sprakfun HTU21D temperature & humidity sensor
myHumidity.begin();
delay(1000);
}
/*-------LOOP SECTION-------*/
void loop() {
/*-------THERMOCOUPLE 1-------*/
/* The following code reads the on-board temperature module on the Adafruit MAX31855 for thermocouple 1 - it is not used here. Instead,
the temperature is derived from the SparkFun chip. */
// Serial.print("Internal Temp = ");
// Serial.println(thermocouple1.readInternal());
/* The code below reads the temperature from thermocouple 1, in Celsius. */
double c1 = thermocouple1.readCelsius();
/* If you prefer the temperature to be displayed in Fahrenheit, uncomment the code below (and comment out the code above). */
// double f1 = thermocouple1.readFahrenheit();
/* This sketch formats and outputs data for processing in MakerPlot. If you intend to use the Arduino serial monitor, you may wish to uncomment
the following (and comment out the MakerPlot section). Note: if you have changed the temperature setting to Fahrenheit, remember to adjust the
below code accordingly (to f1). */
// if (isnan(c1)) {
// Serial.println("T1 not working!");
// } else {
// Serial.print("T1 = ");
// Serial.println(c1);
// }
/*-------THERMOCOUPLE 2-------*/
/* The following code reads the on-board temperature module on the Adafruit MAX31855 for thermocouple 2 - it is not used here. */
// Serial.print("Internal Temp = ");
// Serial.println(thermocouple2.readInternal());
/* The code below reads the temperature from thermocouple 2, in Celsius. */
double c2 = thermocouple2.readCelsius();
/* If you prefer the temperature to be displayed in Fahrenheit, uncomment the code below (and comment out the code above). */
// double f2 = thermocouple2.readFahrenheit();
/* This sketch formats and outputs data for processing in MakerPlot. If you intend to use the Arduino serial monitor, you may wish to uncomment
the following (and comment out the MakerPlot section). Note: if you have changed the temperature setting to Fahrenheit, remember to adjust the
below code accordingly (to f2). */
// if (isnan(c2)) {
// Serial.println("T2 not working!");
// } else {
// Serial.print("T2 = ");
// Serial.println(c2);
// }
/*-------MAKERPLOT-------*/
{
// The code below outputs data in comma delimited form for inclusion in MakerPlot.
Serial.print(c1); // temperature reading thermocouple 1, displayed in Celsius.
// Serial.print(f1); // temperature reading thermocouple 1, displayed in Fahrenheit.
Serial.print(","); // comma delimiter.
Serial.print(c2); // temperature reading thermocouple 2, displayed in Celsius.
// Serial.print(f2); // temperature reading thermocouple 2, displayed in Fahrenheit.
Serial.print(","); // comma delimiter.
float temp = myHumidity.readTemperature();
Serial.print(temp, 1); // ambient temperature from SprakFun temperature & humidity sensor.
Serial.print(","); // comma delimiter
float humd = myHumidity.readHumidity();
Serial.print(humd, 1); //humidity reading from SprakFun temperature & humidity sensor.
Serial.print(","); // comma delimiter
/* The signal from the probe is sent to analog pin 0 (A0). The wideband sensor is programmed to outputs 0 volts at AFR 3.33 and 5 volts at AFR 52.41. The difference
is 49.08. These numbers are included in the formula below and should be changed if the sensor settings are changed/reprogrammed via LM Programmer. */
int sensorValue = analogRead(A0);
float voltageAFR = 3.33 + (sensorValue * (49.08 / 1023.0));
Serial.print(voltageAFR);
Serial.print(","); // comma delimiter
/* The sensor is programmed to show lambda 0.52 at 0 volts and lambda 8.19 at 5 volts. The difference is 7.67. These numbers are included in the formula below and
should be changed if the sensor settings are changed/reprogrammed via LM Programmer. */
float voltageLAM = 0.52 + (sensorValue * (7.67 / 1023.0));
Serial.print(voltageLAM);
Serial.print(","); // comma delimiter
/* The lambda can be used to calculate the oxygen percentage of the exhaust air. I obtained the requisite formula from wbo2.com - the number 4.765 is an interpolation
of the number K stipulated by Bosch in the following formula x02=3*(La-1)/(1+3*K*La), where x02 = oxygen percentage, La = lambda, and K is either 4.76 or 4.77. Outside
air contains a little under 21% oxygen. */
float oxygenPercent = 3 * (voltageLAM - 1) / (1 + 3 * 4.765 * voltageLAM) * 100 ;
if (oxygenPercent < 0)
{
Serial.print(0.00);
Serial.println();
}
else
{
Serial.print(oxygenPercent);
Serial.println();
}
// the delay below defines how often data is sent to MakerPlot (once a second = 1000).
delay(1000);
/////////////////BEGIN AANPASSING////////////////////////////////////
// CO2 berekening CO2 = CO2max * (21% - O2) / 21%
float co2Percent = 19.7 * (20.9 - oxygenPercent) / 20.9 ;
if (co2Percent = 0)
{
Serial.print(0.00);
Serial.println();
}
else
{
Serial.print(co2Percent);
Serial.println();
}
delay(1000);
/* toestelRendement berekening
* Given the temperature of and percentage of carbon dioxide (CO2) in the exiting flue gas, the, moderately accurate, Siegert's formula gives the efficiency from:
100 - ( (MeanFlueTemp ºC - MeanRoomTemp ºC) x (A1 / CO2%) )
(Where A1 is: Anthracite=0.683, Coke=0.290, Bituminous Coal=0.672, Lignite=1, Peat=0.7, Dry Wood=0.650) */
float toestelRendement = 100 - ( (thermocouple1.readCelsius() - 20) * (0.65 / co2Percent) ) ;
if (toestelRendement < 0)
{
Serial.print(0.00);
Serial.println();
}
else
{
Serial.print(toestelRendement);
Serial.println();
}
delay(1000);
/////////////////EINDE AANPASSING////////////////////////////////////
}}