I have an old Eberspacher D4L. This is a 24v diesel parking heater. It is a oldie with faulty control. Also nothing more of course available.
Now I want to take over the whole control with an Arduino.
I have an Uno, 2 fold relay Module high active, 1 fold 30A relay modulate for glower, transistor swich .
Update:
Have the boot process working. Now I'm sitting with the following problems.
A when the start is executed, the flame switch must be checked after the start.
If it is not created in by means the start procedure must start on new.
This is allowed 3x where after the program the fan has to keep on but completely block everything off and completely until the reset button 10sec Word is pressed. How do I get this in now?
Di is what I have now:
float pressLength_milliSeconds = 0;
// Define the minimum length of time, in milli-seconds, that the button must be pressed for a particular option to occur
int optionOne_milliSeconds = 100;
int optionTwo_milliSeconds = 2000;
//The Pin your button is attached to
int startstop = 6;
int reset = 7;
int vlamschakelaar = 8;
int tempschakelaar = 9;
//Pin your LEDs are attached to
int ventilator = 5;
int gloeispiraal = 4;
int luchtklep = 2;
int brandstofpomp = 3;
int volhalfvermogen = 10;
void setup(){
// Initialize the pushbutton pin as an input pullup
// Keep in mind, when pin 2 has ground voltage applied, we know the button is being pressed
pinMode(startstop, INPUT_PULLUP);
pinMode(reset, INPUT_PULLUP);
pinMode(vlamschakelaar, INPUT_PULLUP);
pinMode(tempschakelaar, INPUT_PULLUP);
//set the stuur pins as outputs
pinMode(ventilator, OUTPUT);
pinMode(gloeispiraal, OUTPUT);
pinMode(luchtklep, OUTPUT);
pinMode(brandstofpomp, OUTPUT);
pinMode(volhalfvermogen, OUTPUT);
//Start serial communication - for debugging purposes only
Serial.begin(9600);
} // close setup
void loop() {
//Record roughly the tenths of seconds the button in being held down
while (digitalRead(startstop) == LOW ){
delay(100); //if you want more resolution, lower this number
pressLength_milliSeconds = pressLength_milliSeconds + 100;
//display how long button is has been held
Serial.print("ms = ");
Serial.println(pressLength_milliSeconds);
}//close while
//Different if-else conditions are triggered based on the length of the button press
//Start with the longest time option first
//Option 2 - Execute the second option if the button is held for the correct amount of time
if (pressLength_milliSeconds >= optionTwo_milliSeconds){
digitalWrite(gloeispiraal, LOW);
Serial.print(gloeispiraal);
digitalWrite(brandstofpomp, LOW);
Serial.print(brandstofpomp);
digitalWrite(luchtklep, LOW);
Serial.print(luchtklep);
delay(120000);
digitalWrite(ventilator, LOW);
Serial.print(ventilator);
}
//option 1 - Execute the first option if the button is held for the correct amount of time
else if(pressLength_milliSeconds >= optionOne_milliSeconds){
digitalWrite(ventilator, HIGH);
Serial.print(ventilator);
delay(5000);
digitalWrite(gloeispiraal, HIGH);
Serial.print(gloeispiraal);
digitalWrite(luchtklep, HIGH);
Serial.print(luchtklep);
delay(16000);
digitalWrite(brandstofpomp, HIGH);
Serial.print(brandstofpomp);
delay(45000);
digitalWrite(gloeispiraal, LOW);
Serial.print(gloeispiraal);
}//close if options
//every time through the loop, we need to reset the pressLength_Seconds counter
pressLength_milliSeconds = 0;
} // close void loop