PDA

View Full Version : Communication question



Christopher4187
- 27th August 2012, 16:38
I don't understand enough about the serial communication of a PIC yet to determine if it's capable of communicating with my car on the KWP bus. This is a description of the physical connection:


Signal and communication specifications
Note: On those vehicles fitted with a diagnostic connector with ground and Battery Supply pins
(e.g. ISO 15031-3 / SAE J1962 connector), all measurements should be referenced to the pins of
that connector. On other vehicles, without ground and supply pins in the diagnostic connector, the
battery posts should be used as reference.
5.1 Signal
For proper operation of the serial communication, both ECU and diagnostic tester shall
correctly determine each logic state as follows (Values for 24 volt systems appear in
parenthesis):
-a logic "0" is equivalent to a voltage level on the line of less than 20 % of VB for
transmitter, 30 % of VB for receiver;
-a logic "1" is equivalent to a voltage level on the line of greater than 80 % of VB
for transmitter , 70 % of VB for receiver.
In addition, the slope times shall be less than 10 % (15 %) of the bit time. The slope
times are defined as the time taken for the voltage to change from 20 % to 80 % of VB,
and from 80 % to 20 % of VB for transmitters.
Voltage levels between 30 % and 70 % of VB may be detected as either logic "0" or
logic "1".
NRZ coding shall be used. The bit time is defined as half the time between the 50 % VB
levels of successive rising or falling edges of alternating "1" and "0" bits.
Figure 2 illustrates the worst case on signal levels. For electrical specifications of
diagnostic testers see 6.2, and for ECUs see 7.2

Figure 2- Signal voltage levels , worst case values.
Keyword Protocol 2000 - Part 1 - Physical Layer, Swedish Implementation Standard
SSF 14230-1 Issue 3 9 of 12
5.2 Communication specification
5.2.1 The configuration is shown schematically in Figure 3
VB
CECU COBW CTE
“1”
or
“0”
“1”
or
“0”
I
ECU
Reading Line K
Vehicle (see section 7) Diagnostic Tester (see section 6)
Ground
Figure 3- Communication schematic
5.2.2 The capacitance contribution of the diagnostic tester and associated cables are
termed CTE The capacitance contribution of the on-board wiring is termed COBW. The
sum of the input capacitance of all the ECUs on the bus is defined thus:
n
CECU = S CECU where n is the number of ECUs on the bus.
i = 1 i
Values for CECU and COBW must be selected such that
CECU +COBW £ 7.2 nF and CTE as specified in 6.2.6
(CECU +COBW £ 5.0 nF and CTE as specified in 6.2.6)
(First values are for vehicles with nominal 12 V supply, values in parentheses are for
24 V vehicle battery voltage systems.)
These values are derived from the circuit resistance and baud rate tolerances (sections
6 and 7), allowed slope times and switching thresholds (section 5.1) and a
communication speed of 10,4 kbaud.If I understood the document correctly, it's a 12V signal so I know I'd have to get it to 5V. I think I can do that with a simple transistor, yes? As far as the other things, I'm not sure. Is this something you use with hyperterminal? With a PIC, do you just use the serout/serin commands?

martintorres
- 27th August 2012, 19:18
Hello, you have to decouple the circuit with a optotransistor.
Also, take into account that the speed of PBP, is not compatible with CAN, therefore, will have to implement an interpreter (a bridge) that just as I can not remember the name of that integrated circuit ...
Similarly, if you want to experience putting together a portable scanner with PBP, you could do some work on the protocol KOEO / KOER ... is the easiest thing to do, but not all cars come with this system ...
Basically, this system does is send pulses and with the purchase of these, tells you a given fault ... Then, you could implement a table and compare to print after a DTC or display the error message that is having the vehicle.
Some mechanics implemented the multimeter or lamp and count how many switches there.
Look, to coax you more or less what you mentioned, have a look at this page: http://www.corral.net/tech/maintenance/eecivtest-koeokoer.html


Hola, tenes que desacoplar el circuito con un optotransistor.
Igualmente, tene en cuenta que la velocidad de PBP, no es compatible con CAN, por lo tanto, tendras que implementar un interprete ( una especie de puente) que justo ahora no me acuerdo como se llama ese circuito integrado...
Igualmente, si quieres experimentar armando un scaner portatil con PBP, podrias hacer alguno que funcione bajo el protocolo koeo / koer ... es lo mas sencillo de hacer, pero no todos los vehiculos vienen con este sistema...
Basicamente, este sistema lo que hace es enviar pulsos y segun la cantidad de estos, te indica un fallo determinado... Luego, podrias implementar una tabla y comparar para imprimir despues en un display el dtc o bien, el mensaje de error que esta teniendo el vehiculo.
algunos mecanicos implementan el multimetro o una lampara y cuentan cuantas conmutaciones hay.
mirá, para que te guies mas o menos lo que te menciono, dale una mirada a esta pagina: http://www.corral.net/tech/maintenance/eecivtest-koeokoer.html

martintorres
- 31st August 2012, 07:02
I knew I had it somewhere ... See if you are interested in this module (such as the size was not compatible with the forum, I got into my googledocs - If you have trouble viewing, Notify):

https://docs.google.com/open?id=0B8pEVhUo2Z20WUdITTBZMUNpMWs
https://docs.google.com/open?id=0B8pEVhUo2Z20SS1ZVk12dlp1cVE

also, a couple of years ago, I saw a similar module in a forum where they shared the hex and circuit diagram to build it ... you would have uqe implement google, maybe you'll get lucky and arm ...



ESP= Yo sabia que en algun lado lo tenia... fijate si te interesa este modulo (como el tamaño no era compatible con el foro, lo subi a mi googledocs - si tenes problemas para visualizarlos, comentame):
https://docs.google.com/open?id=0B8pEVhUo2Z20WUdITTBZMUNpMWs
https://docs.google.com/open?id=0B8pEVhUo2Z20SS1ZVk12dlp1cVE
igualmente, hace un par de años, vi un modulo similar en un foro donde compartian el hex y el diagrama de circuito para armarlo... tendrias uqe implementar google, quizas tengas suerte y armarlo...