This page explains how you can emit output trigger pulses (even complex multitooth patterns) with your GenBoard.
Note that your soundcard is more suitable to generate trigger output (variable amplitude, primary+secondary, etc...). See ElectronicDesign/TriggerSignalGenerator
An ECM normally needs an InputTrigger so it can drive the injectors and ignition drivers. GenBoard has a nice installer-friendly feature to emit output pulses like a simple (even-toothed) or a multitooth trigger wheel would.
This is most useful when doing
- self trigger of ECM: OnlineCourse/OffEngineTesting of GenBoard
- or perhaps testing another ECM
- connecting it to EDIS VR+ (to emulate a crankwheel), where EDIS's PIP output can be fed back to GenBoard
- or other ignition module
Note that output-trigger is just an output signal that can be used for anything. Even just for fun to drive LEDs. However, it is most useful for us when it is used as the inputtrigger of GenBoard (either the same board or another, thus first 2 bullets in above list). This outputtrigger => inputtrigger connection must be done in hardware, eg. with a wire or resistor:
Connect the stim-output signal to the InputTrigger with a resistor (1..10k recommended, but possibly a wire - since a wire is the same as a 0k resistor). See below for VR example.
connection example to emulate a 60-2 tooth VR signal
Useful for the
- onboard LM1815 based circuit (often used)
- or possibly the input of an EDIS module. EDIS VR- must be connected to GenBoard GND, so separate + supply for EDIS might be necessary
- act_wot_channel=36 (just an example: stepper A channel, see GenBoard/Manual/DigitalOut/Table)
- connect stepper A channel to primary trigger through a 1uF capacitor (so that trigger input signal goes below 0)
- mstba (mstB9 in the prerelease firmware)
- msp01 msq80 (just an example: possible to use other freq after this: eg. msp01 msq34 msp00) Commands are split with space for easy reading, don't type the space.
Read a bit further.
Where is the Stim-output signal?
- on v2: statusled (PORTA3), only hijacked when this function is switched on.
- on v3: a temporarily hijacked wot_actuator output (tmp hijacked means: for the time you enable stimout the stim-function will flip this output, not wot_output() -wot_output() is not active anyway unless WOT_OUTPUT_TPS_THRESHOLD is defined in my_make- ; it all goes back to normal behaviour after powerup or if stim is switched off: msq00msp00). Wot_actuator output is selectable though the config variale act_wot_channel. For details on setting up the output configuration see: GenBoard/Manual/DigitalOut
How do I enable?
The stim(output)trigger '''can be enabled from GenBoard/MenuSystem by msp.. , msq.. and mst.. commands.
This can emit
- coil-type (even)
- or multitooth signal for another board
commands:
- msp.. period of one tooth in 1024 usec units. Higher than 7e does not make sense! msp00 itself does not enable the triggering, first it needs to be set msp01..7e and than back to msp00 in that case.
- msq.. period of one tooth in 4 usec units. msq21 (or msq20?) is about 6500 RPM for EDIS, the max RPM EDIS can handle safely: issue this: msq21msp01msp00
- eg. the total tooth period consists of 4* (256 * PP + QQ). For a period of 1032 us one would enter the command sequence msp01msq02
- msp00, msq00 swithes the stim-output function off
- you need to set at least 01 for msp.. value to turn the stimout function on. After it is turned on, it can be set back to msp00 if msq.. is at least msq21.
- mst08 even type trigger (in this case repeated after 8 pulses. Actually any value from 08..3F would do the same, since it does not matter after how many evenly placed teeth we insert the 0 missing tooths)
- mst63 packed value: bits7:6 is the number of inserted missing teeth (range 0..3); Bits 5:0 is toothcount (range 0..63). Therefore EDIS 36-1 is 1*64 + 35 = 0x63
- mst00 swithes the stim-output function off
So mst63msp2a outputs a 36-1 triggerwheel pattern using (0x2a=42 decimal) 42*2048*36 usec crankwheel period (rather low freq. Note that board inputtrigger might not act on too low-freq signal (actual freq-threshold depending on configuration).
What is the overhead during outputtrigger is enabled?
For 2..4 events per virtual-crank rotation overhead is tiny, but with 36-1 or 60-2 events per virtual-crank rotation the overhead is noticable for several thousands RPM.
It can also be used to measure the average latency of event execution. Stimout feature was implemented with Eventqueue in about 20 lines in dispatcher, and 15 lines in menu.c (to allow setting the parameters at runtime), and takes no resources when the feature is switched off (except minor flash-area).
See also
- [Autronic signal generator] that runs on PC. Might be more versatile (dual trigger). RPM limits unknown.