ECU / Electronics / Upgrades / Mods
I've made some more progress on the aircraft instruments. Here we go:
Illumination
I was able to source a 32ft 12v/ 6000k led strip that's 3mm wide with a height of 3mm. I initially placed a strip around the internal circumference of the instrument itself but there were issues. For one I'm only provided with about 70% flat surface so there were sections where the strip was just suspended without anywhere to get adhesion with the 3m strip. Also there were two sections on the instrument by way of design that allowed for direct eye contact with an led depending on the angle you were viewing the instrument. This isn't something I can deal with as I don't need any opportunity for being blinded at night. Being this close also gave me extremely bright segments where you could clearly see where each led was placed. I went to bed frustrated because there was no easy way to get a the wiring through the rear of the instrument and the lighting wasn't what I expected it to be.
Fast forward to early this morning I pulled the case off and inspected the housing again. Inside the housing is a metal sleeve that slides in. This sleeve contains the plexi housing and the face plate with the calibration screws. This sleeve does not travel the entire length of the housing so upon measuring I decided the best place to insert this strip was as far back as I could to where the internal housing butted up against the outer housing. The gap height difference between the sleeve and the housing is about 2.5mm so the strip only protrudes .5mm out the entire circumference of the inner housing. From there I decided to measure and drill for a spot to exit the casing so I could run the wiring out without having to drill through the rear assembly and the internal housing was able to slide in place and the mounting screws that secure both together firmly. Powered the led strip and voila. Uniform light pattern and no piecing led projections from the two open corners of the instrument.
Just to be safe I've conducted some temperature tests to see where I am with temps.
- Light on and the instrument receiving 0v from Arduino I am averaging between 82-90 degrees around the circumference and the actuators around 80)
- Light on and the instrument receiving 2.5v from Arduino I jump about 5 degrees across the board.
- Light on and the instrument receiving 5v from Arduino I am varying between 95 - 110 around the external circumference and the actuators are hovering between 99-105 degrees.
2103929463135448489.jpgHere is a picture with the first attempt of mounting the led strip.6739325007255018246.jpgAnd this is with the strip pushed back and attached to the actual housing.
Face Plates + Arduino
I had originally expected to be in a situation where I would be using these instruments with their not so perfect and mismatched faces but they came off without issue. Curious if I could get faces made to match my Rallye cluster I sent an email to Dave Barton who responded with yes so I proceeded to sketch out how I think I'd like these faces to look. I also happens that in speaking with Innovate about wideband controller options that I can configure both analog outputs for 0-v volts and that 0-5v output coincides with Lambda values of .50 to 1.52. With that in mind I sketched out my new Lambda face plate. I also altered the Arduino code I was using including a Potentiometer that simulated 0-5v output to analog in (A0) on my Arduino. I set PWM pins 9/10 as output and tossed in a 1k resistor on each. Sure enough I get the entire range of the instrument based on that 0-5v input.
The oil temp / air temp instrument however has been a challenge. I can control the instrument but not with any of the pinouts on the back. In order for me to gain control I have to remove the housing and tap in directly to the actuators with alligator clips. Only then can I get movement on both needles (movement as in expected and purposeful movement). Also upon removal of the housing I noticed that I cannot remove the inner sleeve it's lodged in place. Since I cannot remove the sleeve I cannot remove the plexi and clean so I just happened onto another instrument that was for a different purpose and appears to be controlled differently than the temp instrument. It should arrive today so my hope is that I can both control it and that the housing is free. The faceplate is exactly the same so there is no issue there and since I control the output with Arduino I don't care about its original purpose.
Also here is are the sketches I made as well as my current Arduino code:
Code:
//Volvo 142 Lambda Instrument Test Code
const int analogInPin = A0; // Analog input pin A0 connected to Potentiometer and/or Wideband Controller (0v-5v)
const int analogOutPin9 = 9; // Analog output pin 09 (Digital PWM)
const int analogOutPin10 = 10; // Analog output pin 10 (Digital PWM)
int sensorValue = 0; // value read as provided by Potentiometer and/or Wideband Controller output (0v-5v)
int outputValue1 = 0; // value output to the PWM pin 09 (analog out)- Lambda Left
int outputValue2 = 0; // value output to the PWM pin 10 (analog out)- Lambda Right
int val = 0;
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
val = 160; //Startup Sequence Value
analogWrite(analogOutPin9, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(0);
val = 160; //Startup Sequence Value
analogWrite(analogOutPin10, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(2500);
val = 0; //Startup Sequence Value
analogWrite(analogOutPin9, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(2000);
val = 0; //Startup Sequence Value
analogWrite(analogOutPin10, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(2500);
val = 80; //Startup Sequence Value
analogWrite(analogOutPin9, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(0);
val = 80; //Startup Sequence Value
analogWrite(analogOutPin10, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(2500);
val = 0; //Startup Sequence Value
analogWrite(analogOutPin9, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(0);
val = 0; //Startup Sequence Value
analogWrite(analogOutPin10, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
delay(2500);
}
void loop() {
// read the analog in value for pin 09:
sensorValue = analogRead(analogInPin);
// map it to the range of the analog out for pin 9:
outputValue1 = map(sensorValue, 0, 1023, 0, 40);
// change the analog out value (PWM Duty Cycle 40):
analogWrite(analogOutPin9, outputValue1);
// read the analog in value for pin 10:
sensorValue = analogRead(analogInPin);
// map it to the range of the analog out for pin 10:
outputValue2 = map(sensorValue, 0, 1023, 0, 40);
// change the analog out value (PWM Duty Cycle 40):
analogWrite(analogOutPin10, outputValue2);
// print the results to the Serial Monitor:
Serial.print("Potentiometer ");
Serial.println(sensorValue);
Serial.print("Lambda1 ");
Serial.println(outputValue1);
Serial.print("Lambda2 ");
Serial.println(outputValue2);
// wait 250 milliseconds before the next loop for the analog-to-digital
// converter to settle after the last reading:
delay(300);
}
IMG_20180604_111159990.jpgHere is a sketch of the Lambda face plate.IMG_20180604_111204731.jpgHere is a sketch of the Oil / Air temp face plate.
Megasquirt
At this point I am simply looking at what options are available to me for my wideband configuration. It appears the wideband controller provides the analog output and not MS...MS simply takes that data and uses it. I had originally thought I could pass out 02 data like I could engine temp, oil pressure, etc but I don't think I can? It's def not in the documentation which is lacking. If I can then I will only need a single wideband controller (Innovate DLG-1) however if MS cannot them I have to run 2 controllers (Innovate LC-2).
I suppose that is it for now. As if all this wasn't winded enough! 