Author Topic: VAN bus interfacing (to read car speed and engine RPM Peugeot 206 1.4 HDI 2002)  (Read 63884 times)

0 Members and 1 Guest are viewing this topic.

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
Hello,
I'd like to read car speed and engine RPM  Peugeot 206 1.4 HDI 2002 and other if possible in similar fashion.
Maybe someone knows or have some hints how to do it with a little help of MPU in custom PCB?
Is it possible using eg. such simple VAN bus interface described there:  http://graham.auld.me.uk/projects/vanbus/van-pc.html connect to AVR MPU in this way

 based on Microchip MCP2551 CAN Transceiver connect to car bus?

For the moment, only connecting to car bus is the most important thing, since I wonder where I could plug such VAN/CAN connector to my car vehicle electronics network?  :-\
They mentioned on VAN bus interface to usb page linked above that:
Quote
The software in the PIC was hacked together by observing the output from a Peugeot head unit and reading the Atmel TSS461F VAN Datalink controller datasheet. I would have liked to use one of the Atmel VAN controllers but I was not able to purchase one easily.
This looks like they successfully connected to Peugeot car somewhere, but I have no idea where to connect it in car to be able monitor car VAN in real time?
Inside Peugeot BSI unit -probably it is MUX version in my car, whatever it means  :-//
I read somewhere that such Peugeot external radio connectors like this is interface between black oryginal radio v8 connector in this Peugeot 206 car (or similar?):
Quote
Pin nr. 1 – free
Pin nr. 2 – 9004 Van Data
Pin nr. 3 – 9005 Van Data Bar
Pin nr. 4 – XE24 + Van
Pin nr. 5 – 8409 antenna amplifier
Pin nr. 6 – CE18 + ignition
Pin nr.7 – BE11 + BSI
Pin nr. 8 – MC30 GND car
We have pins: 2 ,3 , 4 for VAN (I guess) and pin 8 as GND on VAN plug side in schematics above?

This what I wanted to do for the moment is basicly find place where to connect to car VAN and using fast optocoupler monitor car VAN network, so it looks like MCP2551 in read mode could be fine, but I'm a little bit overhelmed by amount of infrmation needed and lack of easy available car detailed datasheets howto interface this Peugeot 206 1.4 HDI 2002 year production VAN/CAN/MUX - what ever it has (probably MUX BSI version) to try sniff and detect vehicle speed and engine RPM  :palm:

I'm looking for some hints to speed up learning curve in this new very interesting topic.
I've found also another CAN/VAN bus interface manuals  8)

Vehicle Bus Analyzer Operator's Manual
http://cdn.teledynelecroy.com/files/manuals/vba_om_reva.pdf

CAN BUS Analyzer User's Guide
http://ww1.microchip.com/downloads/en/DeviceDoc/51848B.pdf

Protocols_for_Wired_and_wireless_networks_in_vehicle_systems
http://graham.auld.me.uk/projects/vanbus/datasheets/vehicle_networks_mammhud_s1.pdf

A CAN Physical Layer Discussion
http://ww1.microchip.com/downloads/en/AppNotes/00228a.pdf

An introduction to the CAN protocol that discusses the basics and key features
Controller Area Network (CAN) Basics
http://ww1.microchip.com/downloads/en/AppNotes/00713a.pdf

MCP2551 High-Speed CAN Transceiver (receiver)
http://ww1.microchip.com/downloads/en/DeviceDoc/21667f.pdf

Anyway this CAN IC is available in my favourite store at ~$1 price, so... I should have it in hands soon  >:D
http://www.tme.eu/en/details/mcp2551-e_sn/can-integrated-circuits/microchip-technology/

Update: In this  VAN Interface IC MTC-30521 hopefully Data and DataB pins are explained
http://nicozone.free.fr/206/VAN/MTC-30521.pdf
Quote
Data - positive interface pin
DataB - negative interface pin

It is time to make teardown and see how non factory car radio was connected in car service a few years ago  :-/O



« Last Edit: June 24, 2015, 01:54:09 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 5974
  • Country: us
Drain the swamp.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
Yep, @zapta I've already found those nice pages and PIC ASM code to log VAN  https://van-bus.googlecode.com/svn/trunk/auldy_interface/VAN-USB/pic_code/main_3_1.asm after conversion to Atmel AVR code might be helpfull to fit into their formats than use other scripts on PC to investigate what is going on when driving a car  :-+
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline discomike

  • Contributor
  • Posts: 17
  • Country: se
If you just want engine RPM or speed I would recommend using the OBD-II port. I have a 206 RC project car and I know that those standard PIDs are supported - or did the diesel not get OBD-II until later? In the connector you should have pure CAN, or K-line or that PWM thingy, and not this VAN stuff.

Another way to easily decode everything is to get some 3rd party service software such as peugeot planet and then examine the bus when sending various commands/responses.
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2229
  • Country: de
Unfortunately the 2002 1.4HDi doesn't have OBDII as far as I know, it only got introduced on the 2003 model.
VAN is a knightmare to work with on a hobby level due to the lack of documentation. Easiest route is to try and get a copy of Peugeots DIAG2000 software and the appropriate cable.

McBryce.
 

Offline LukeW

  • Frequent Contributor
  • **
  • Posts: 677
At the physical layer it is essentially the same as CAN, right?
So yes, you can use the MCP2551.

You might want to think about a termination resistor on the bus, or EMC suppression components such as common-mode choke pair etc.

http://www.ti.com/lit/an/slla271/slla271.pdf
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2229
  • Country: de
Electrically yes, but the Protocol isn't encoded like CAN, it's a PSA proprietary protocol.

McBryce.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
Thank you guys for any hints to crack this  :-BROKE

Electrically yes, but the Protocol isn't encoded like CAN, it's a PSA proprietary protocol.
So, sick  |O
Anyway, since we have CAN, what shortcut MUX exactly means? Some Peugeot 206 BSI (Body System Interface) is with MUX (2002+ HDI probably is), but non MUX versions Peugeot 206 also exist?
PSA is protocol, but MUX?  I have no idea where MUX is it in OSI model... :-//

I've made photos of my Peugeot 206 1.4HDI (2002) BSI to figure out, howto recognize MUX versions, but no clues ;)

VIN numbers and manufacture years determine this?

Trying also to find meaning of the pins in this car BSI service connector, so marked 4 black pins, and 3 green pins below:

Maybe those 4 black pins are CAN/VAN  bus interface pins?

It seams (but I'm not sure) that this connector

mentioned in Peugeot Planet System Guide looks like could fit into this BSI service connector or I'm wrong?

I've found some hints howto connect CAN-BUS module to car based on this manual for alarm module, where almost all cars are shown, but unfortunatelly there is no Peugeot 206, but 207+ and Citroen, so still have no idea where to fit into this car CAR bus-into BSI service connector shown above, for testing purposes, but while driving to log live CAN/VAN data bits?
(Alarm) CAN-BUS module MCB-01/02
http://www.jablotron.com/files/canbus/mcb-02_en.pdf
From manual above, it looks like for pernament additional CAN module it should be wired somewhere else close to BSI?   :popcorn:

I will have to visit car service soon and they will connect diagnostics software, so I will have a chance to look closer what kind of software is it, but it could be nice... log during this visit some CAN/VAN bits patterns >:D
Than compare with those http://code.google.com/p/van-bus/source/browse/#svn%2Ftrunk%2Fbus_captures%2Fgraham , but if it is PSA proprietary protocol, does it make any sense?
Anyway, is it any chance that this http://code.google.com/p/van-bus/wiki/VanParser  could decode PSA frames?
« Last Edit: June 24, 2015, 09:39:44 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
I will have to visit car service soon and they will connect diagnostics software, so I will have a chance to look closer what kind of software is it, but it could be nice... log during this visit some CAN/VAN bits patterns >:D
Nope, I've found that this is like OBD-2 connector in BSI in my Peugeot 206 1.4HDi, but for diagnostics is used different protol than CAN (probably KWP FAST), since based on this http://www.obdtester.com/obd2_protocols
Quote
The most modern protocol, mandatory for all 2008+ vehicles sold in the US. Uses pins 6 and 14 (referenced to signal gound), communication is differential.

Than, here Peugeot OBD II diagnostic connector pinout in  Peugeot OBD-2 compatibility list we can confirm that:
Quote
CAN become become most available OBD standard for vehicles produced after 2007 yrs.
and for sure there is no CAN pins 6 and 14 in my OBD-2 BSI connector, so no chance use it for any CAN bus communication and sniffing diagnostics software doesn't make any sense  :(


Unfortunately the 2002 1.4HDi doesn't have OBDII as far as I know, it only got introduced on the 2003 model.
Update: This my connector in 2002 model is similar to OBD-2, but... maybe there is no chance to put into my BSI connector, since in the middle there is no empty space, so maybe it isn't OBD-2-I do not know  :-// Anyway, probably  there is no CAN bus pins in this connector, so lets forget about it  |O

That is interesting on Peugeot OBD-2 (connector I've marked pins from my car BSI) compatibility list we haven't got models made in 2002 and first 1.4 HDi is from 2003 with KWP FAST protocol , so will have double check purchase VAT document but it has 2002 register date in national documents  and it is 1.4HDi ::)
 
Quote
Peugeot 206:
        1.4 HDi, Diesel (70HP)  2003    KWP FAST
        1.4 HDi, Diesel (70HP)  2008    CAN 11bit (500kb)

OBD-2 pin 7 (B2 pin on my photo) is engine and transsmision diagnostics
OBD-2 pin 11 (G6) some other modules diags
OBD-2 pin 12 (G5) ABS disgnostics
OBD-2 pin 16 (G1) +12 Accumulator
and 2 GND pins .

Conclusion is - for CAN this BSI OBD-2 in this car is useless, but that is fine-it coudn't be good place to connect custom CAN bus module ;)
I need to find better place, so will make teardown how external radio is connected to car electric wires  :popcorn:
« Last Edit: June 24, 2015, 11:22:16 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2229
  • Country: de
Sorry, I may have confused you with abreviations. So here's a summary:

PSA stands for "Peugeot Société Anonyme", the official name of the Peugeot Citroën group. It's not the name of the protocol.
MUX stands for Multiplexed. You won't see any differences in the physical layer (wiring / connectors) on a MUX / Non-MUX vehicle, it's just the protocol that changed (again).

The connector that you've shown is just called the OBD (On Board Diagnostics) Connector. OBD2 connectors are physically identical, just the signals it offers changed between version one and two, so usually more pin will be populated on an ODB2 connection.

McBryce.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
MUX stands for Multiplexed. You won't see any differences in the physical layer (wiring / connectors) on a MUX / Non-MUX vehicle, it's just the protocol that changed (again).
Thank you for demistyfing this MUX issues.
It looks like starting from october 2001 MUX is used and using my BSI photos and default fuses values in this box described there -of course in EU car version BSI is on 206 1.4HDi 2002 driver side, not passenger like in UK I guess ;)
Fuses in MUX
http://www.206info.co.uk/Forums/viewtopic/t=108.html
I've double checked that I've MUX version for sure  8)

Here are also some car electric schematics for MUX version which might be helpfull:
Electric system Multi-plex built from October 2001
http://www.206info.co.uk/Forums/viewtopic/p=639224.html

I'll try look around builtin factory clock display while it is probably multi-function display (MFD) with CAN bus connections  PPT40 = Multiplexed, so there must be CAN bus wiring somewhere here and If I had working CAN bus sniffer (reader) maybe I could try to crack this display communication, by openning the doors, adjusting time and date, etc., while it could be nice feature to be able write custom messages there based on car speed , its engine RPM and external GPS module, etc  ;)
I'm not sure how difficult could be to control this car display, but talking to CAN bus could be next step, now I'd like to concentrate on read mode on custom PCB galvanic insulated from PC or tablet device.

 
« Last Edit: June 25, 2015, 10:46:53 am by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2229
  • Country: de
The links you've posted only go to a login page.

McBryce.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
I thought, that those wiring diagrams and fuses descriptions are public available-linked below PDFs versions  in attachments for someone intersted-VAN bus and CAN bus are visible in MUX wiring diagrams of Peugeot 206 ;)
PDF: Fuses in MUX
Update: Nope, one of PDFs with wiring diagrams is too big too attach, so will try later if someone interested or could help demistify those VAN bus and CAN bus networks in this car  :popcorn:

Anyway, @Addaz from http://www.206info.co.uk said that:
Quote
The interior of the vehicle runs van, the only can network is between the abs, engine ecu and bsi
This means, that probbaly I will find VAN bus interface in car display LCD connector close to radio and for CAN bus I'd rather have to look somewhere around BSI module itself like in this Peugeot Boxer from 2006 year, where CAN bus pins can be found in blue connector shown below:


So, if it is true my plan is read only CAN bus and transmit (make it galvanic insulated from CAN bus to ensure no interference with critical BSI subsystems) VAN bus messages to car LCD display module, but need to make its taerdown first and find CAN bus connector in this car  :-/O

BTW: Bloody Pebble Watch cleared my post, while watching this Dave video on YT, sohad to write it again   :-DD
« Last Edit: June 25, 2015, 01:43:02 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
OK, after deeper analysis of Peugeot MUX version wiring diagram it looks like maybe there is no need to touch CAN 9000/9001 lines between BSI and ECU, since BSI is connected with VAN 9004/9005 to something called instrument cluster- in practice this is dashboard main display with speedometer, tachometer and other contols-than instrument cluster is connected to car MFD display using VAN 9004A/9005A   :phew:


Unfortunatelly can not attach more detailed PDF version in attachement of this page, since there is 1MB limit on EEVBlog forum...

Now, it is time to identify those connectors in BSI, Instrument cluster and MFD display  ::)
Not sure if those connectors  are marked somehow-there are some strange 10Nr, 40Ba, 40Nr, 188a, 88a numbers, but maybe car MFD display teardown with VAN 9004A/9005A between MFD pins 17/4 and Instrument cluster pins 5/10 will reveal what is going on there  :-/O

I'm not sure without teardown (maybe someone can better read this wiring diagram) if VANs between BSI and Instrument cluster are electrically connected to this VAN between Instrument cluster and MFD display module   :-//
It doesn't change too much, but it have to be determined where to find best place for VAN bus interfaces....
« Last Edit: June 25, 2015, 03:02:08 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
I've made teardown of central panel in my car


and recognized those VAN bus 9004/9005 pins as expected from widing diagram attached and based on wire numbers marking 9004/9005 in black 7 pin audio connector


So, all I need is modify or exchange this existing gray radio connector where VAN bus pins were skipped, to provide additional plug for VAN bus  8)


Additionally, I've verified that those VAN bus pins are electrically the same with those identified in display panel MFD (PP T40  multiplexed) connector


Now, the only thing is -are those VAN bus numbers 9004/9005 somehow related to bus high /low pins?
I mean, which of those two pins connect to Microchip MCP2551 CAN IC  pins CANH/CANL?
Howto recognize those H/L between those two VAN bus wires?  :-//

Maybe based on voltage levels or scope waveforms when differentially probing voltage between CANL to CANH ?
Pin 8 in this connector (green-yellow wire is car GND-do I have to connect MCP2551 GND/CANH/CANL (3 wires) or only CANH/CANL (2 wires)?

This is last step to start cracking this VAN bus in my Peugeot 206 1.4HDi 2002 MUX car  :-/O

Update: I've now in this audio black connector:
4V between 9004 VAN pin 2 and car GND pin8,
1V between 9005 VAN pin 3 and car GND pin8
.
while car battery voltage available at pin7 is 13.53V, since floating battery voltage charger is connected to keep care of battery.

So, differencial is 3V between VAN bus 9004/9005 when car is turned off for a long time, only doors were open, so maybe BSI woke up.... lets try wait sometime inside on locked doors  ::)
« Last Edit: June 30, 2015, 11:49:34 am by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
OK. According to connection of MCP2551 CAN  IC, never mind it, I've found it in simple CAN sniffer power supply stage where threre are 4 pins +12V car voltage with GND and CANH/CANL pins, so this is the way I'll connect this IC, since I'd like have galvanic insulated by optocouplers from my stuff connected to this CAN/VAN bus:

Of course I'll use higher voltage rated voltage regulator there instead of LM7805.
For CAN bus sniffing using Microchip MCP2515 CAN controller easy available in local electronics store can be usefull too-not sure if it could be used for VAN bus sniffing, especially in this Peugeot car where proprietary protocols might be used?


Anyway, as mentioned post earlier, my concern is howto easy distinguish this car VAN bus 9004/9005 high/low pins without any measurements-based on those wires numbers 9004/9005?  :-//
« Last Edit: June 30, 2015, 11:30:56 am by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline morcibacsi

  • Regular Contributor
  • *
  • Posts: 67
  • Country: hu
Hi!

I hope you're still investigating. I'm interested in interfacing the VAN bus too. I found this on youtube:

In the description there are the schemantics and an Arduino source to monitor the VAN bus. I built the circuit, now trying to figure out how to connect to the bus. I think the best place for connecting is on the radio. My idea is to test things outside the car with the radio and the display. However I need to build a harness like this to test:



Unfortunately I'm better at programming than with circuits so there is a long way to go...

I hope you keep us updated. If I have something useful I'll do the same.

Would you be so kind and mark me on this image which is the 1st pin? I can't figure it out which corner should i pick.

« Last Edit: November 23, 2015, 07:59:27 pm by morcibacsi »
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
In this teardown in my 206 1.4 HDI
VAN bus interfacing (to read car speed and engine RPM  Peugeot 206 1.4 HDI 2002)  - iso connectors
I've made photo of this MFD (PP T40  multiplexed) connector and when you look closer (magnify glass my help) it looks like there are some pin numbers (1,10,18).

However, I decided rather to use this gray iso connector where those VAN pins are also available.

I've in my hands MCP2551 in SMD version, but no plans to use FTDI chips anymore  :-- , so considering different options.
It looks like nothing fancy on this video, they just used this circuit to log via USB output from MCP2551 CAN interface using FT232RL at ~500k baund rate using 10MHz MPU.
http://graham.auld.me.uk/projects/vanbus/van-pc.html

Maybe, it could be done without MPU between CAN interface and USB interface hardware, just by using GPIOs of another Silicon Labs USB interface chips.

Unfortunatelly, this is PIC binary hex code http://graham.auld.me.uk/projects/vanbus/van-pc.hex , so It is moredifficult for me dissasemble this code-if it were AVR MPU binary, I could easy see its machine code and see what they do inside to output something usefull to USB from CAN interface MCP2551  :-\  >:D

Anyway, we have some clue what data rates are needed to log Peugeot VAN data, so maybe I will try something even more tricky-instead of using any USB interface chips I will put MPU there and implement USB interface in MPU with MCP2551 connected directly to this MPU.

Probably I will make such research this week, so I will update soon with some VAN log raw data from my car  ;)
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
Thanks to this article CAN Communication Problem I've made again voltage measurements in my ISO black audio connector inside the car and when we open the door or insert keys and turn one step to connect to battery, I have in this car ~4V on 9004 VAN, while ~1V on 9005 VAN.



After some time (when we close the doors and remove keys and wait sometime didn't checked how many minutes), it looks like XE24 VAN turns to 0V, while it has close to battery voltage and VAN 9004/9005 goes to ~0V too (BSI goes to sleep mode probably),so it looks like BSI goes to sleep mode and VAN lines are deactivated, etc  8)

It is consistent with this quote from linked article above:
Quote
CAN H will have a voltage range of 2.5 to 3.5 volts, where as CAN L will have a range of 2.5 to 1.5 volts

I've made measurements with simple multimeter, and we have something similar to those CAN scope readings from another car from linked article after some postprocessing to have CAN H yellow, CAN L blue:



Now, I feel convienient to connect my MCP2551 (with MPU and fast white led output catched VAN frames) to this ISO black audio connector in my car, since it can be made as simple adapter with another ISO black audio output if I wanted connect also some car radio, etc...

Lets design simple PCB with MCP2551 and ATTiny85 switched to 8Mhz or 16Mhz PLL clock, so lets power up those things at 5V to be able run our AVR MPU at higher clock and output some VAN 9004/9005 on simple white led or lets try to use another faster optocoupler to interface with PC/laptop USB GPIO, while I'd like to have galvanic insulation between car electric system and PC/laptop/tablet USB port, to ensure they do not interfere electrically with each other  and to avoid any damage of car eelctronics or PC/laptop/tablet when something goes wrong during testing :-/O
« Last Edit: November 24, 2015, 06:23:03 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline morcibacsi

  • Regular Contributor
  • *
  • Posts: 67
  • Country: hu
Some time ago I asked Graham for the source code, and he sent it to me, it is pure assembly code. The Arduino code from the youtube videos description is much more easy to understand (at least for me). I don't know if I'm allowed to put his code in here. But maybe I can send it to you, if you're interested in it.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
The Arduino code from the youtube videos description is much more easy to understand (at least for me).
For the moment I'd like to only log some VAN data or try preprocess on the fly in MPU, so since I do not need send anything using builtin car VAN no need to analyse this YT video Arduino, code  ;)

However, we might need DC-DC converter capable to work as step up/step down, so this schematics with MC34063A - Step-Up/Down/Inverting Switching Regulators  might be helpfull as  starting point, however it lacks inductors values, so we need design or find similar better schematics.



Update: In this schematics from linked YT earlierwe have  configured DC-DC for:
 Vcc= 1.25V*(R1+R2)/R1
so, while we have
R1=1.2k and R2=3.6k
Vcc=5V, however as I said I'd like rather use another stage LDO linear regulator with fixed 5V, while looking for cleaner (lower ripple) voltage on my MPU Vcc...


Hopefully, for my VAN logger project I do not need to much current to run MPU and output processed VAN frames or raw bits using LED/fast optocoupler, so another DC-DC SMPS to 6V-7V, than LDO linear regulator to 5V with 100mA output should be fine  :popcorn:
« Last Edit: November 24, 2015, 07:23:50 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline lovemb

  • Contributor
  • Posts: 19
  • Country: pt
I have not read the whole thread so not sure at what point you are. Probably what I'll write won't help at all.. :D

I have a project that consists in controlling multi-brand car instrument clusters. I have not messed with VAN yet, but eventually I will have to.
If I had your car as experiment:
-First I would get electric diagram to instrument cluster. Just checked and the connector has at least 18 pin positions.
--Pin 3 is GND;
--Pin 2 + 4 are the VAN lines going to BSI (G8+G10);
--Pin 1 (Vbat on Ignition) goes to BSI (plug G pin 6) which internally connects to fuse F15 (15A) which is switched by a relay still inside BSI when ignition is turned on.
-Now that I know VAN pins, Vbat and GND, I would just get a LDO, some caps and a MCP2551 connected to a logic analyzer and check if VAN documentation makes sense to what I see in my logging.
-Just after that, swap logic analyzer with a cheap clone of Arduino Nano that already includes LDO, atmega328p and ftdi. Start some more logging to pc.
-Eventually search if there is a VAN controller available to the public and buy a sample, or else, start reading VAN protocol documentation and writing proper code to handle the frames coming from MCP2551.
-After that it's all about filtering and figuring out which messages control what. In my case, my goal is to connect and control instrument cluster on bench, so I dump VAN frames for a bit of time while stopped+driving car, then re-send all these at bench and hopefully the instrument cluster will mimic exactly what happened when I started car and drove it. Then just start playing with the frames inside home, while sitting in my comfortable chair. :)


By the way, your car also has a CAN bus, between ECU, ABS and BSI. No idea what information flies on it.


I think someone suggested to use the diagnostic lines to question the ECU/BSI for the car speed, it's possible, but keep in mind that diagnostic interface should only be used for diagnostics. If you want to simply make a second digital display showing the car speed, you should NOT use the diagnostic interface for that.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
...
-Now that I know VAN pins, Vbat and GND, I would just get a LDO, some caps and a MCP2551 connected to a logic analyzer and check if VAN documentation makes sense to what I see in my logging.
...

Do you meant this Vans  > Van Specifications  > PEUGEOT 206 Specifications  > 1.4 HDi Van Specifications:-DD
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1411
  • Country: 00
We have designed PCB capable to try catch VAN/CAN  frames with a few lines of ATtiny code  ;)



Now, we need convert car VAN 12V available when BSI is not sleeping to 5Vcc and make analysis of those frames directly on MPU running at 16MHz, than output not every available frame, but skip already send, so I think we'll be able log some real VAN data at much lower speed, but when we randomly choose given frames in interest, we still should be able see some data to hack this VAN protocol used on 9004/9005 lines in Peugeot 206 1.4 HDI (2002)  >:D
« Last Edit: November 28, 2015, 06:37:32 pm by eneuro »
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline 406dany

  • Contributor
  • Posts: 17
  • Country: fr
Hi
I have a big interest of your work...

I have made an interface VAN/PC on my peugeot 406 full mux (2001)
(with the help of graham auldy's work)
I can log VAN frame on the VAN bus confort (i use the GPS connector)
My hope is to display other informations (turbo pressure, batterie volt,...) on the odb display
or on the dashboard vu-meter
Actually i can send frame for moving where i want the speed meter (or other meter)
but i have not yet the code for putting the dashboard in test mode ...
i have the OBD PP2000 which is a good help for decoding frames tests

my interface is about a PIC18F2620 (10MHZ*4) , MC2551,
and a usb/RS232 TTL (FTDI) aliasing at  500Kbauds

here is a frame of RPM/speed:
824 -W- 18F80000000044   28BA NoAck
0x18F8=6392/10=639,2 rpm
ans speed at 0 km/h

I continue the search ....

regards




 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf