Subpage of CanBus
[VEMS STM32 Aim to CAN] adapter pinouts:
DSUB9 male (pin9: +5V supply and pin2,pin3: RS232, pin5: GND similar to BT-RS232 adapter)
- DB9/pin2 PC-RX, ECU-TX
- DB9/pin3 PC-TX, ECU-RX
- DB9/pin5 GND
- DB9/pin9 +5V
Notes:
- DSUB9/pin5 GND (verify connectivity to other GND-s eg. EC36/26)
- DSUB9/pin9 +5V supply (verify with DVM DC voltage measurement)
- <50mA supply consumption.
- DSUB9M/TX : Data transmitted by adapter (male), connect to VEMS ECU RX (possibly DSUB9F/pin3)
- (verification: measures somewhat negative: -5.8V if not sending data, only slightly negative like -0.3V or so if sending data)
- normally DSUB9M/pin3 (so it mates straight with DB9F/3
- but measure if DSUB9M/pin2 is negative (=TX) for your device (2,3-3,2 cross needed with 5,9-5,9 straight for first few devices sentout before 2019-07-01)
- DSUB9M/TX is optional, not needed for AIM to CAN function
- (only useful for analog + wheelspeed + digital switchbutton input data for 10+ extra inputs, if ordered with that option, without "analog input multiplexer")
- DSUB9M/RX Data transmitted by VEMS ECU (female), received by adapter (male)
- verify: measures 0V (or 3..5V if pulled up with 1k to 5V)
- normally DSUB9M/pin2 (but pin3 in case of first few devices where appropriate wire to EC10/... , or DB9F-DB9M 2,3-3,2 cross needed with 5,9-5,9 straight) :
- connect to VEMS ECU 2nd RS232 TX (eg. DSUB9F/pin2 or on EC10pin/... )
Note that this
- pinout uses pin5=GND and pin2,3 like a PC RS232 port, but DSUB9/pin9 = +5V supply is needed (like BT-RS232)
- With only pin5,pin9 supply connected, verify which of pin2, pin3 measures negative (DSUB9M/TX) :
- connect that pin to PC USB/RS232 DSUB9/pin2 (with a small DB9F-DB9F adapter cable) to sniff 19200,8n1 at powerup to see firmware version (and continuous datastream if available, depending on fw version)
- See GenBoard/Manual/CommHardware
CAN cable
- CAN_H white
- CAN_L brown
- CAN cable shield not connected inside the device.
Notes:
- the wire colors (white is CAN_H) similar default as [v3 internal CAN] used for [BMWS65]
- please measure resistance with DVM between CAN_H and CAN_L (not connected to the bus):
- infinite (apply 120 Ohm if termination is needed), or simply connect to the CAN bus that is already terminated on both ends. (default unless requested otherwise)
- 120 Ohm : terminated (connect to one end of the bus)
- 240 Ohm : apply 240 Ohm if 120 Ohm termination is needed, or another 240 Ohm termination device (mostly used in BMW S65, otherwise uncommon)
In the end, if both ends of the CAN bus is terminated with 120 Ohm resistors (or devices with 120 Ohm resistor internally), DVM will measure 60 Ohm (devices on the CAN bus powered off).
DSUB15 male pinout (analog/digital inputs)
- 1 - Analog EA0
- 2 - Analog EA1
- 3 - Analog EA2
- 4 - Analog EA3
- 5 - Analog EA4
- 6 - NC
- 7 - Analog EA5
- 8 - Analog EA6 (activation)
- 9 - Analog EA7 (activation)
- 10 - Analog EA8 (activation, PB0)
- 11 - Wheelspeed4 in (PB11) 0-6500 Hz (0.1Hz resolution) 0/5V or 0/3.3V (or just open collector/open drain pull to GND. If in doubt, verify with scope that voltage of the input signal drops to 0.7V or lower; note: normally drops to 0.1 .. 0.4V)
- 12 - NC
- 13 - GND
- 14 - NC
- 15 - NFET out (PB15)
Resolution of analog inputs is 0.81mV (12 bits).
- Data sent (triggerframe, frametype 1F) since firmware version 0.0.2
- as a verification: DSUB9M/pin3: TX sniff 19200,8n1 (1900..1920 bytes/sec at max), save datastream (raw, or hex to txt file)
DSUB25 male pinout (analog/digital inputs)
DSUB 25 Number | Internal name | Pullup | V3 FW 1.2.38+ | V4 FW x.x.xx |
1 | Analog 20 (PC4) | Yes | ?? | ?? |
2 | RX) | - | - | - |
3 | Analog 21 (PC5) 200ma LSD | - | ?? | ?? |
4 | GND | - | - | - |
5 | +5V VCC In | - | - | - |
6 | Analog 23 (PC7) | No | ?? | ?? |
7 | Analog 0 (PA0) DIGITAL A | No | ?? | ?? |
8 | Analog 17 (PC1) | No | ?? | ?? |
9 | Analog 1 (PA1) DIGITAL B | No | ?? | ?? |
10 | Analog 2 (PA2) | No | ?? | ?? |
11 | Analog 3 (PA3) | No | ?? | ?? |
12 | Analog 4 (PA4) | No | ?? | ?? |
13 | Analog 5 (PA5) | No | ?? | ?? |
14 | TX | - | - | - |
15 | Analog 16 (PD2 | Yes | ?? | ?? |
16 | Analog 15 (PB7) | Yes | ?? | ?? |
17 | Analog 14 (PB64) +17v range | Yes | ?? | ?? |
18 | Analog 13 (PB5) | Yes | ?? | ?? |
19 | Analog 12 (PB4) | No | ?? | ?? |
20 | Analog 11 (PB3) | No | ?? | ?? |
21 | Analog 10 (PB4) | No | ?? | ?? |
22 | Analog 9 (PB1) | No | ?? | ?? |
23 | Analog 8 (PB0) | No | ?? | ?? |
24 | Analog 7 (PA7) | No | ?? | ?? |
25 | Analog 6 (PA6) | No | ?? | ?? |
NOTE:
- to send analog input data to v3 (2nd RS232 port) purchased before 2021-07-05, aim2can fw upgrade needed. (See: AimCanFirmwareUpgrade )
- (recent v3 firmware also needed, of course, so v3 uses these data)
- which pins can be used as interrupt / wheelspeed inputs ?
Configuration, See also:
Debugging:
If in doubt, verify that VEMS ECU is configured to send AIM data stream, 19200,8n1 every 5th byte is A3. Examples:
- (03EB=) 1003RPM - 01 A3 03 EB 92
- (07D6=) 2006RPM - 01 A3 07 D6 81
You can also send AIM compatible data stream/packets from
- PC RS232 DSUB9 male DSUB9M/pin3 (data transmitted by PC)
- to the adapter DSUB9F/pin2 (data received by the adapter)
- eg. data previously captured from VEMS ECU configured to send AIM stream data. The wheelspeed and tach (RPM) gauge data can be tested for compatibility (with given dash).
- "Vt(VemsTune) can receive AIM data on a secondary serial cable from the ECU", see [ vemstune help] (but of course if TerminalProgram does not see the bytes in the 19200,8n1 stream, with A3 being every 5th byte (again: that is good indication to start with - always include the result in any related report or request), VemsTune will NOT magically see the stream either