Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Sound Card Engine Crank/Cam Sensor Simulator
You can use the Daqarta Generator to simulate the signal from the engine crankshaft or camshaft position sensor. This can be used for testing an Electronic Control Unit or Module (ECU or ECM) without an engine present.
The real sensor detects teeth on a gear, with one or two missing teeth to provide a Top Dead Center reference mark. To simulate this, the basic approach is to create an Arb wave file for the chosen tooth pattern... for example, a 25-tooth gear with one tooth missing (25-1) would be a train of 24 identical pulses plus a 25th zero-amplitude "pulse" of the same duration as a real pulse.
Creating Pulse-Train Arbs gives step-by-step instructions on creating such an Arb file. The example file is included with Daqarta as Crank25-1.DQA for you to experiment with.
Better yet, the Engine Crank / Cam Sensor Simulator mini-app is included with Daqarta to automate the creation of Arb files with different numbers of teeth, gap width or extra teeth, and waveform type. It provides easy control and visualization of tooth patterns, plus simple Arb saving and testing.
When you load the created file as an Arb waveform, one full cycle of the wave (25 pulse positions) represents one crank revolution. The main Tone Freq control sets the number of cycles per second (hertz). For RPM you need to remember that there are 60 seconds in a minute, so 10 Hz is 600 RPM and 100 Hz is 6000 RPM.
Daqarta allows you to modulate the frequency of a tone using FM or Sweep options, which is equivalent to changing the engine speed. The CrankFM.GEN Generator setup included with Daqarta automatically loads the above-mentioned Crank25-1.DQA Arb file and sets up the FM parameters to smoothly vary the engine speed back and forth between 600 and 6000 RPM.
The CrankFM.GEN speed control is a pure sinusoid. Change Main Freq (Tone Freq) to set the midrange RPM, where the sine is accelerating or decelerating fastest. The default is 55 Hz, which is 3300 RPM. The +/-Deviation control sets how far it will go above and below that; here, that's 45 Hz or 2700 RPM so that the full range will be 600 to 6000. The FM Modulation Frequency (Mod Freq) is set to 0.1 Hz, which means one test cycle will take 10 seconds.
Creating Pulse-Train Arbs mentions ways to create a second Arb file to control the RPM according to some predefined test schedule, such as via a text file that is loaded directly as an Arb, or first converted to .DAT, or by creating it using the Generator itself.
But you may prefer to have a more flexible test schedule than one that uses a fixed Arb controller. You can use the same Burst techniques discussed in Creating Complex Arb Waves, only don't create an Arb with them. Use Streams 0, 1, and 2 (as desired), and then select them as the FM Source in Stream 3.
The CrankRamp.GEN setup included with Daqarta uses Streams 0 and 1 to create linear ramps and holds that are summed together by setting the Stream 3 FM Source to Stream 0+1
The Burst Cycle is set for the total test cycle duration, not a fixed 8192 samples as for Arb creation. This example uses a 10 second test cycle. Starting from 600 RPM it takes 2 seconds to ramp up to 3300 RPM, holds that for 2 seconds, takes 1 second to ramp to 6000 RPM, holds that for 1 second, takes 2 seconds to ramp down to 600 RPM, then holds that for 2 more seconds before repeating the whole cycle again.
The overall cycle shape is obtained by summing two trapezoidal bursts with different heights and widths. To create these, the first step is setting the Wave to Sine, the Main Phase to 90 degrees, and the Tone Frequency to zero. The sine of 90 degrees is one, so without the Burst operation these "waves" would be constant levels.
The Burst Cycle is set to 10 seconds, and the Burst Shape is set to 0 to give linear Rise and Fall segments. (You may want use another Shape to get smoother transitions, especially if you opt for steep slopes.)
Each stream has its Level set to 50%, so where both High sections overlap, the total Level is 100%. You could, of course, use different proportions.
Stream 3 holds the Crank25-1.DQA Arb, just like the CrankFM.GEN setup. But there are some key differences: As mentioned, the FM Source is set to Stream 0+1, which adds those two streams together and uses the sum to control the frequency. However, note that the CrankRamp.GEN Burst shapes only run between 0 (when both bursts are off) and a total of 100% when they are both on. They don't go negative like the sinusoid used as the FM Source in CrankFM.GEN.
Thus, the +/-Deviation is really only positive, so the Main Freq values is set to the minimum desired frequency (10 Hz = 600 RPM) instead of the center. The Deviation value is 90 Hz instead of 45 Hz, to take the total frequency up to 100 Hz (6000 RPM).
You may want to experiment with different shapes and durations, as well as using Stream 2 (which is unused here). If you do use Stream 2, remember to set the Stream 3 FM Source to Stream 0+1+2.
Tip: When you are designing your test schedule, start out with Stream 3 set to Off, and its FM Source set to Sine. This will cause the remaining streams to be summed together directly so you can see the shape as actual ramps and levels.
But realistic test sequences are way too slow to get a good feel for the shape of the control ramps. So, do your design with much faster Burst parameters; use milliseconds instead of seconds or minutes, so the entire cycle is continually visible on the screen at one time.
For example, in CrankRamp.GEN the design prototype was created with msec instead of seconds, giving a total Burst Cycle of 10 msec, which easily fit on the screen. After all the details were worked out on this high speed version, it was a simple matter to replace 0.001 sec (1 msec) with 1.000, 0.002 with 2.000, and so forth.
See also Automotive Applications
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2013 by Interstellar Research
All rights reserved