10-15-2010 10:15 AM
I'm working on a DAQ system for our single-cylinder Diesel and most of it seems to be going pretty well (but slow). Anyways, one issue I'm concerned about is how to find a reference location using the speed sensor for the engine. What we want to do is index in-cylinder pressure measurements against crankshaft location. We're going to tap into the speed sensor used by the ECU (don't worry, engine management is handled by another program, we're just reading in some temps and pressures, etc.). It uses a 60-2 tooth wheel meaning that there will be 60 pulses and then two missing teeth. Is there an easy way to consistently find a reference location? It doesn't matter what location it is since I can add an offset to make sure that it matches up with TDC. I just need to realiably pinpoint one location on the wheel.
Thanks!
10-18-2010 03:14 PM
what DAQ card are you planning on using, and what is your transducer that you will use to read the missing tooth? Are these the questions that you are asking? Or do you want a more low level answer?
10-18-2010 03:40 PM
I did a job for Honeywell where I have to do something similiar and came up with a missing pulse detector concept.
Here is some example code that you might be able to use as a starting point.
Good Luck.
11-02-2010 04:59 PM
Ok so I've decided to change how I determine crank angle since I think this new method may be much easier. Instead of using the crankshaft sensor, I'm using the camshaft sensor which provides a single pulse for each revolution of the camshaft (two crankshaft revs). I realize that this won't tell me if I'm on the intake/compression or expansion/exhaust stroke but I'll be able to take care of this.
Anyways, my biggest problem now is trying to figure out how to get the DAQ to start with the rising edge of the sensor. It seems to operate at around -10V when the tooth is not near the sensor and at 0V when the tooth is at the sensor. I want the DAQ to start, wait for a tooth to come around, and then start the second it senses the tooth. I know DAQmx has a trigger function I can use but I'm not sure that I can do it with the USB-6218. Can I use an analog input from the sensor and get the DAQ to start when it senses the rising edge?
Also, similar question. Can I somehow use a counter with the analog input so that I can determine the rotational speed of the engine?
Thanks!
11-03-2010 01:02 PM
The USB-6218 only has a digital trigger, which means that the straight signal from the transducer won't work, but you could create an external circuit that will output a digital signal when an analog signal reaches a certain voltage and use that digital input to trigger the acquisition.
11-03-2010 04:58 PM
I'll have to look into it but when I was reading in the voltages from the sensor it was pretty clear where the jump was (-10, -10, -10, 0) and this is sampling at something like 50k samples/second. What will happen if I wire up the analog signal to the digital counter?
11-04-2010 12:23 PM
I guess what I'm trying to say is that, while the signal is analog, at the speeds i'm reading I don't see anything other than off (-10 V) and on (0 V). While wiring the analog signal into the digital counter wouldn't exactly be correct, since I'm really only seeing an on/off signal, I don't see how this would cause a problem. If I was seeing a true analog signal (i.e. -10 V, -10 V, -10 V, -3 V, 0 V, 0 V, -3 V, -10 V, -10 V, -10 V) then an analog/digital converter would probably be useful.
11-04-2010 12:33 PM
The digital counter can only accept signals from 0 to +5 V. Anything outside that range like your 0 to -10 V signal will likely damage the counter device and certainly will not count correctly. You would need to add a comparator circuit to detect the changes and produce a 5 V output.
Even though you have not seen voltages other than 0 or -10 V, they are still there. Logic circuits often do not work correctly if the transition times are longer than a few nanoseconds. If the transitions take tens or hundreds of microseconds (as may occur with the tooth detector), the logic circuit might interpret that as many transitions rather than one.
Lynn