See [VemsTune Help] on how to test analog inputs (or find/determine which is which, in case paper was lost).
Besides the 2 knock signals: max 16 analog inputs available in original v3.x design (v3.0 .. v3.9)
- 8 of them highly specialized (including VBATT), some available on request (eg. on flying loom EC10)
With the [analog input multiplexer] adds +6 (2+22 analog signals total)
- in recent (1.2.38) fw 3rd trigger and 2nd wheelspeed (digital inputs) can be used for shiftcut / launch / ALS activation, freeing some analog inputs. See GenBoard/UnderDevelopment/DigitalInputs
- [STM32F103/MCP2515] will be extended with 9 (or 10) analog inputs, 2nd RS232 (RX/TX) serial on v3 ECU is useful for that (request in order comment).
- ECU TX to send AIM data => STM32F103/MCP2515 => CanBus (eg. RPM and TPS data to dash)
- ECU RX to receive <= several analog inputs (practically upto 30..60, more than that not planned, "should be enough for everyone")
Analog inputs with pullup, or without
Note: mcp3208/ch 2,5,6,7 has pullup by default
- 0,1 have NO pullup by default, and 4,3 are usually used for EGT1 and EGT2 inputs
- request P*analin with pullup and N*analin without pullup (3*analin without pullup usually requested for [Electronic Throttle Control] )
- not explicite channels unless absolutely necessary (eg. requesting 0,1 with pullup and 2,5,6,7 without pullup means 6 deviating from standard, instead of just 2).
'''Protection added on mainboard v3.6 ; Originally some had no internal protection and relied on 0-5V signal, or external protection)
The rest is Historical:
proposal for extra ADC input channels
EC18 beware that these inputs are unbuffered and unfiltered, care must be taken to avoid damage to the MCP3208.
- EC18pin12 direct to MCP3208pin8 (ch7) (standard for secondary_trigger=HALL)
- EC18pin6 direct to MCP3208pin7 (ch6) (standard for internal MAP sensor)
- EC18pin16 direct to MCP3208pin6 (ch5)
DSUB9 male on endplate.
Unfortunately both genders are used: DSUB9 female used for RS232 and DSUB9 male used for LCD. When an ECM has DSUB9 male for both LCD and extra inputs, care is needed at hookup.
- DSUB9pin1 GND
- DSUB9pin2 OC3C Voltout - negative
- DSUB9pin3 MCP3208pin3 (ch2) - negative
- DSUB9pin4 MCP3208pin2 (ch1) - negative
- DSUB9pin5 MCP3208pin1 (ch0) - negative
- DSUB9pin6 OC3C Voltout - positive
- DSUB9pin7 MCP3208pin3 (ch2) + positive
- DSUB9pin8 MCP3208pin2 (ch1) + positive
- DSUB9pin9 MCP3208pin1 (ch0) + positive
The internal HW
The midopa provides 3 nice features:
- protection
- filtering
- differential inputs
- MPC3208pin1
- C42=220nF
- R100=R97=Rinput
- R66=R101=Rmid
- R67=R68=Rfb
- R150=Rout
Values for different amplification:
- buffering (*0.99, measured in one example case: 945mV output / 951mV input). Input range is appr 5V.
- Rinput=100k
- Rmid=1k
- Rfb=100k
- Rout=10k
- x17.5: input range is appr 285mV (this is the minimum recommended when used for extra K-type thermocouple EGT input, if the onboard 2 is not enough)
- Rinput=4k7
- Rmid=1k
- Rfb=100k
- Rout=10k
MCP3208 input load
When using v3.x in an industrial application ( stimulator and tester for a manufactured circuit), we applied external 10k and BAV99 diode protection (quite standard values) to protect the mcp3208 from voltages higher than 5V (or lower than 0). This is not needed when it can be guaranteed by other means that input will only get 0..5V: not an issue when used for pushbutton / switch, we use without extra protection than.
We found that 10nF caps are needed on the mcp3208 inputs for exact measurement when 10 kOhm protection is used: without cap, the internal sampling cap loads the input (likely towards GND) too heavily (impossible to measure with DVM as sampling takes _very_ short time !). With 2MHz SPI clock 4V input could only charge the sampling to 3.3V (this we measured; 500ns time constant is appr 50pF * 10kOhm; not sure if the mcp3208 datasheet specifies so high sampling cap, but PIC microcontrolles taught us in the the past that with microchip we must be careful with datasheet anyway). This could be handled in software with lower SPI clock, but the cap is a good idea in this case (makes the protection circuit 3 components, not 2).