Well without a scope, I did my best to turn the Arduino ADC into a scope and I have some results. What I suspected appears to be true; that at low engine RPM (i.e. when cranking to start the engine) the signal from the cam/crank VR sensors is near 1V. Further, it looks pretty far from a square wave, although the resolution of the Arduino ADC is nothing to get excited about.
Here are some of the important excerpts from some Arduino code I wrote for the acquisition...
ISR(ADC_vect) { // Analog->Digital Conversion Complete
static unsigned int cnt = 5000;
byte result = ADCH;
if (result > 15) {
myDataLogger.Store(result, TCNT4);
cnt--;
}
if (!cnt)
{
ADCSRA = B00001000; // ADC disable, trigger off, ADC interrupt enable, prescaler = 2
}
};
void loop() {
...........
else if (strcmp(SerialCmd, "StartADCLog") == 0) {
mySerial.println("ADCLOGSTART>");
myDataLogger.Enable();
lcd.cursorTo(0,0);
lcd.printIn("ADC log ON... ");
// setup ADC
ADMUX = B01100111; // default to AVCC VRef, ADC Left Adjust, and ADC channel 7
ADCSRB = B00000000; // Analog Input bank 1, Free Running Mode
ADCSRA = B11101000; // ADC enable, ADC start, ADC interrupt enable, prescaler = 2
}
.................
if (myDataLogger.IsEnabled()) {
myDataLogger.TransmitADC(500); // transmit max 500 messages at a time
}
}
Notes: myDataLogger is a class I wrote that sets up a 2 kilobyte ring buffer and dumps the data out over serialport. This was a solution for getting lots of data for short periods of time off-chip (effectively avoiding buffer over-run by using a bigger buffer).
The output of the data logging can be seen in this excel file...
http://www3.sympatico.ca/mikehoughton/cam%20crank%20ADC%20signals.xls
Note that I'm extracting only ADCH -> 8-bit conversion, but I see that while cranking the output of the VR sensors registers at ADCH = 50. Aref is set at Vcc so this represents about 1V.
Another note, if you're looking at the excel data, there was an unmeasured time delay between the cranking and the 3kRPM data while I saved the data and restarted the log (re-issued "StartADCLog").
[Edit: Another-other note, of course this ADC is only capturing +ive voltages. Any negative voltage swings register as 0, and even still I'm dropping every ADCH value below 15 anyway to try and minimize buffer over-run. Getting data off-chip fast enough for this app is a real problem.]
I think I'll need to find a scope to get a cleaner picture of what's going on.
Thanks for the words of encouragement CB. I appreciate others sharing too. I guess I'll let this turn into some form of a diary while I work through this issue.