Timechg
20+ Year Contributor
- 229
- 4
- Oct 7, 2004
-
Iowa City,
Iowa
I opened the thread http://www.dsmtuners.com/forums/tuning-engine-management/452394-using-wideband-without-gauge.html
Being a broke @$$ grad student (the majority of the time) on a meager research salary doesn't help with owning a DSM. I am currently taking a class (took it last semester as well) titled 'Intro to Robotics'. It's really an art class for sculpture majors...but my prof wanted me to learn about microcontrollers to develop a mechanical soft tissue testing device for the lab. Here is a great tutorial site that the class uses to introduce the microcontroller: Arduino Tutorial - Learn electronics and microcontrollers using Arduino! I feel like anyone could pick this up (because the art majors do as well with no prior knowledge in programming or circuits). There is a huge wealth of knowledge on the web for anyone interested in using microcontrollers for a specific application.
The idea is to use Arduinos or other open source microcontrollers to build/do random crap/stuff that we want on our DSM's. Using the microcontroller you could log additional analog outputs like an EGT temperature, coolant temperature, boost pressure (with a pressure sensor) or whatever you can think of to use. You could also control boost with a solenoid using the arduino etc.
DSMTuners is an open forum with ideas circulating about DSM's, it would be nice to start a thread with microcontrollers being utilized, sharing code and for troubleshooting ideas.
Relating to the original post I opened:
If this works I could just use the Arduino mini board (~$16 bucks) or an Arduino Uno (~$35) and a bosch wideband O2 sensor (~$60), Illuminated LCD Screen (~$20) to log AFR's for a fraction of the cost. The LCD screen could also display values of other analog signals in real time as well (you wouldn't be limited to one input which is desirable). The only problem I can think of is how the LC-1 translates the digital signal so that ECMLinkcan read it.
From the LC-1 website:
Wideband
Voltage: 0 to 5V
Lambda: 0.5 to 1.5
AFR: 7.35 to 22.39
Arduino values reads 0 to 5V as values ranging from 0 to 1023.
Converting the O2 Voltage to volts instead of what arduino microcontoller sees:
Voltage = Arduino_vals * (1023/5)
Converting Voltage to Lambda:
Lambda = Voltage * (1.5/5)
Converting Voltage to AFR:
AFR = Voltage * (22.39/5)
One step conversions:
Lambda = (Arduino_vals * (1023/5)) * (1.5/5);
AFR = (Arduino_vals * (1023/5)) * (22.39/5);
---------------------------------------------------------------------------------------------------------------------------------------
Here is a picture of the board that I would use. The mini arduino board (and maybe add an LCD or LED screen to display values):
---------------------------------------------------------------------------------------------------------------------------------------
Actual Coding Part, very simple....maybe. Questions that I will have to test is the digital signal. The LC-1 controller is an analog to digital converter. The arduino can do this as well, but utilizes digital pulse width modulations (0 to 255, or 0 to 5 Volts...so another conversion may be necessary between lambda and PWM values). I will have to test this with the O2 sensor hooked up but not installed.
//analog read values for 5.0V is 0 - 1023
float Lambda = 0;
float AFR = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
float val0 = analogRead(A0); //read analog value pin0
float val1 = analogRead(A1); //read analog value pin1
Lambda = (val0 * (1023/5)) * (1.5/5); //Conversion to Lambda from analog input signal
AFR = (val1 * (1023/5)) * (22.39/5); //Conversion to AFR fom analog input signal
analogwrite(2, Lambda); //write data on pin 2
//Serial.println(val0); not needed just to see values of analog on a serial monitor
//Serial.println(val1);
//If there is an LCD screen hooked up then you can input AFR values:
//Serial.println(AFR);
}
---------------------------------------------------------------------------------------------------------------------------------------
If it doesn't work then it doesn't work, but I think I can get it figure out.
Being a broke @$$ grad student (the majority of the time) on a meager research salary doesn't help with owning a DSM. I am currently taking a class (took it last semester as well) titled 'Intro to Robotics'. It's really an art class for sculpture majors...but my prof wanted me to learn about microcontrollers to develop a mechanical soft tissue testing device for the lab. Here is a great tutorial site that the class uses to introduce the microcontroller: Arduino Tutorial - Learn electronics and microcontrollers using Arduino! I feel like anyone could pick this up (because the art majors do as well with no prior knowledge in programming or circuits). There is a huge wealth of knowledge on the web for anyone interested in using microcontrollers for a specific application.
The idea is to use Arduinos or other open source microcontrollers to build/do random crap/stuff that we want on our DSM's. Using the microcontroller you could log additional analog outputs like an EGT temperature, coolant temperature, boost pressure (with a pressure sensor) or whatever you can think of to use. You could also control boost with a solenoid using the arduino etc.
DSMTuners is an open forum with ideas circulating about DSM's, it would be nice to start a thread with microcontrollers being utilized, sharing code and for troubleshooting ideas.
Relating to the original post I opened:
If this works I could just use the Arduino mini board (~$16 bucks) or an Arduino Uno (~$35) and a bosch wideband O2 sensor (~$60), Illuminated LCD Screen (~$20) to log AFR's for a fraction of the cost. The LCD screen could also display values of other analog signals in real time as well (you wouldn't be limited to one input which is desirable). The only problem I can think of is how the LC-1 translates the digital signal so that ECMLinkcan read it.
From the LC-1 website:
Wideband
Voltage: 0 to 5V
Lambda: 0.5 to 1.5
AFR: 7.35 to 22.39
Arduino values reads 0 to 5V as values ranging from 0 to 1023.
Converting the O2 Voltage to volts instead of what arduino microcontoller sees:
Voltage = Arduino_vals * (1023/5)
Converting Voltage to Lambda:
Lambda = Voltage * (1.5/5)
Converting Voltage to AFR:
AFR = Voltage * (22.39/5)
One step conversions:
Lambda = (Arduino_vals * (1023/5)) * (1.5/5);
AFR = (Arduino_vals * (1023/5)) * (22.39/5);
---------------------------------------------------------------------------------------------------------------------------------------
Here is a picture of the board that I would use. The mini arduino board (and maybe add an LCD or LED screen to display values):
You must be logged in to view this image or video.
---------------------------------------------------------------------------------------------------------------------------------------
Actual Coding Part, very simple....maybe. Questions that I will have to test is the digital signal. The LC-1 controller is an analog to digital converter. The arduino can do this as well, but utilizes digital pulse width modulations (0 to 255, or 0 to 5 Volts...so another conversion may be necessary between lambda and PWM values). I will have to test this with the O2 sensor hooked up but not installed.
//analog read values for 5.0V is 0 - 1023
float Lambda = 0;
float AFR = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
float val0 = analogRead(A0); //read analog value pin0
float val1 = analogRead(A1); //read analog value pin1
Lambda = (val0 * (1023/5)) * (1.5/5); //Conversion to Lambda from analog input signal
AFR = (val1 * (1023/5)) * (22.39/5); //Conversion to AFR fom analog input signal
analogwrite(2, Lambda); //write data on pin 2
//Serial.println(val0); not needed just to see values of analog on a serial monitor
//Serial.println(val1);
//If there is an LCD screen hooked up then you can input AFR values:
//Serial.println(AFR);
}
---------------------------------------------------------------------------------------------------------------------------------------
If it doesn't work then it doesn't work, but I think I can get it figure out.
Attachments
You must be registered for see attachments list
