Hello. I don’t write in English, it’s not my language, I use a translator.
I chose Lambda Schield because it is a great platform and can be changed.
My project (experiment) involves the use of a lambda probe to measure the composition of smoke from a furnace.
I plan to use BELIMO LM230A for air regulation.
I would need 2 digital outputs for control
oxygen = <8% close (first digital outputs high)
oxygen => 7.5% open (second digital outputs high)
I don't know the Arduino code, so it's a good idea to try to write / modify it yourself
Can anyone help me solve my problem?
2 digital outputs
- Christian_Bylund
- Posts: 270
- Joined: 07 Mar 2015 18:09
Re: 2 digital outputs
Hello Franc,
Here is an example, to start you need to configure the pins for output in the setup function, also set the default value as open.
To regulate (using a 0.5% hysteresis) you put the control code after the conversion of oxygen content in the loop function:
Hope it helps!
When do you want the two pins high or low, and are you considering the 0.5% overlap as a hysteresis where the previous set value remains?
Here is an example, to start you need to configure the pins for output in the setup function, also set the default value as open.
Code: Select all
//Configure pins.
pinMode(8, OUTPUT); //First digital output.
pinMode(9, OUTPUT); //Second digital output.
//Open valve (default)
digitalWrite(8, LOW);
digitalWrite(9, HIGH)
Code: Select all
//Calculate Oxygen Content.
float OXYGEN_CONTENT = Lookup_Oxygen(adcValue_UA);
//If valve is open AND oxygen is 8.0% or more, close the valve. (Too much air).
if (digitalRead(9) && OXYGEN_CONTENT >= 8.0) {
//Close valve:
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
}
//If valve is closed AND oxygen is 7.5% or less, open the valve. (Need more air).
if (digitalRead(8) && OXYGEN_CONTENT <= 7.5) {
//Open valve:
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
}
Best Regards,
Christian Bylund
Bylund Automotive AB
Christian Bylund
Bylund Automotive AB
Re: 2 digital outputs
Hello
thanks for your help
I will check today what the response will be
Thank you again
greetings
Franc
thanks for your help
I will check today what the response will be
Thank you again
greetings
Franc
Re: 2 digital outputs
Hello
thanks again for your help
everything works as it should
greetings
franc
thanks again for your help
everything works as it should
greetings
franc
- Christian_Bylund
- Posts: 270
- Joined: 07 Mar 2015 18:09
Re: 2 digital outputs
Great Franc, it would be interesting to see the result!
Best Regards,
Christian Bylund
Bylund Automotive AB
Christian Bylund
Bylund Automotive AB