| Author |
Message |
leave.matrix Guest
Free account, no CAN development support
|
20-01-2013, 19:29 Subject: CAN alarm system |
Quote |
|
For study purposes, I wanted to build a CAN-based alarm system myself.
My vehicle is a VW T5 Transporter.
By reading here in the forum, I understand that there are 2, or even 3, CAN buses.
It is likely possible to receive body functions, such as opening or closing doors, and signals from the central locking remote control via the radio or the vehicle's onboard control unit.
Unfortunately, this information doesn't seem to be available through the OBD2 port, as it primarily transmits ECU data. Other data points either require a subscription or are not accessible at all.
My question is: Can I read this kind of data (door open/close and remote central locking on/off) from the OBD2 port? And can I generate/log a code overview using my laptop? Or do I need to connect the cables that are connected to the radio/navigation system (CAN High/Low) for that?
'When connecting cables, can I obtain an OBD2 socket and only connect those two cables to use my existing USB-to-OBD2 cable with my laptop for logging?'
Thank you very much!
|
|
| Back to top |
|
 |
CAN-Diagnose Administrator


Joined: 06/07/2011 Posts: 573 Karma: +29 / -0 Location: Ländle
|
21-01-2013, 12:40 Subject: CAN alarm system |
Quote |
|
Hello,
Without a diagnostic protocol, nothing will work when connected to the OBD2 port. The simplest approach would be to connect your comfort CAN bus to the gateway control unit.
Best regards, Rainer.
|
|
| Back to top |
Profile PM WWW |
 |
leave.matrix Guest
Free account, no CAN development support
|
21-01-2013, 14:33 Subject: CAN alarm system |
Quote |
|
Hello Rainer - thanks for the reply!
Would it work if I bought an empty OBD2 socket, connected the CAN H/L lines from the interior to pins x and y, and then plugged my diagnostic USB adapter into it? Which pins would be x and y  ?
My primary goal is to create logs with minimal effort, so that I can determine whether my project is even feasible.
Thank you very much.
|
|
| Back to top |
|
 |
Dieselfahrer CAN-Profi

Joined: 07/28/2011 Posts: 79 Karma: +6 / -0
CAN Support
|
21-01-2013, 16:26 Subject: CAN alarm system |
Quote |
|
Quote: | Would it work if I bought an empty OBD2 socket, connected the CAN H/L lines of the interior to pins x and y, and then plugged my diagnostic USB adapter into it? Which pins would be x and y ?
My primary goal is to create logs with minimal effort, so that I can understand whether my project is even feasible. |
I guess you really want to use an OBD port because then you can directly plug in your diagnostic adapter?
We may not be familiar with your diagnostic adapter, but often they are too "intelligent" (because a significant part of the OBD protocol is built into the adapter), and they don't have a mode that allows you to simply "listen in."
In addition, the OBD-CAN bus in your vehicle operates at high speed (500 kbit/s - like the engine-CAN), while the comfort/infotainment-CAN operates at low speed (100 kbit/s). For OBD devices, the gateway handles the communication between the comfort/infotainment-CAN and the high-speed OBD-CAN.
Best regards,
Ingo
|
|
| Back to top |
Profile PM |
 |
leave.matrix Guest
Free account, no CAN development support
|
21-01-2013, 16:33 Subject: CAN alarm system |
Quote |
|
Hello Ingo, thank you very much for your reply. You've been a great help.
Do you happen to know of any open-source projects that describe how to build an adapter for reading the infotainment system's CAN bus, either for connection to a serial or USB port?
I would then connect this to a laptop for logging and later to a microcontroller, such as the Teensy++ board (which has a wonderful number of I/O ports, both digital and analog).
Thanks again - it's really great that you're helping me!
|
|
| Back to top |
|
 |
CAN-Diagnose Administrator


Joined: 06/07/2011 Posts: 573 Karma: +29 / -0 Location: Ländle
|
21-01-2013, 19:08 Subject: CAN alarm system |
Quote |
|
Hello,
It would work if you have an older T5 model, as these still use the K-Line for diagnostics.
Then you could place CAN on pins 6 and 14, see:
http://community.dieselschrauber.de/viewtopic.php?t=3089&highlight=diagnoseadapter
I still wouldn't recommend doing it this way, especially if you're taking the car to the workshop for maintenance, because that would prevent any vehicle diagnostics via the CAN bus. So, you can disable CAN on the diagnostic system (if possible; it's possible with VCDS).
It would therefore trigger unnecessary troubleshooting because no one is familiar with your modifications.
If you have a newer T5 (model year 2010 or later), the tinkering is usually unnecessary because the CAN pins are already assigned and used.
Consider using a Sub-D 9-pin connector or an additional OBD2 socket to connect your CAN adapter.
Best regards, Rainer.
Last edited on 21-01-2013, 19:10, edited 1 time in total.
|
|
| Back to top |
Profile PM WWW |
 |
leave.matrix Guest
Free account, no CAN development support
|
21-01-2013, 21:00 Subject: CAN alarm system |
Quote |
|
Hello Rainer!
I would definitely have gotten an extra socket – I didn't want to connect it to the existing socket, even though I have a 2005 T5.
Since the speed and potentially other protocols on the infotainment CAN bus may not correspond to the OBD2 port, I'm wondering if there's a project that allows reading this bus via a serial interface on a PC. The probability that my universal, low-cost CAN to USB adapter will work with it seems low, and I need the serial connection in the long term to be able to read the CAN bus even without a PC.
Later, after successfully identifying the codes for door lock open/close and window open/close, as well as ignition on, I could reuse this circuit for my microcontroller – ideally one with serial I/O.
I could imagine using the interface circuit with an MCP2515 ( http://ww1.microchip.com/downloads/en/DeviceDoc/21801e.pdf ) - unfortunately, it doesn't have a serial interface but an SPI bus, and I have no experience with that.
My favorite processor board is a Teensy++, which can be programmed via USB and also emulates a serial port in software.
Andi.
Last edited on 21-01-2013, 21:01, edited 2 times in total.
|
|
| Back to top |
|
 |
Dieselfahrer CAN-Profi

Joined: 07/28/2011 Posts: 79 Karma: +6 / -0
CAN Support
|
22-01-2013, 0:02 Subject: CAN alarm system |
Quote |
|
Quote: | | I could imagine using the interface circuit with an MCP2515 ( | ), but unfortunately, it doesn't have a serial interface; it uses an SPI bus, which I have no experience with.
My favorite processor board is a Teensy++, which can be programmed via USB and also emulates a serial port in software.http://ww1.microchip.com/downloads/en/DeviceDoc/21801e.pdf
I wouldn't even start working with a standalone CAN controller anymore.
I still use the SJA1000 for work, but almost all the limitations I encountered with it simply don't arise with a microcontroller that has CAN built-in.
For personal use, I use the AT90CAN128 (on my own custom boards) with a JTAGICE MKII.
The initial costs are naturally a bit higher, but there are certainly also ready-made boards that come with an interface for downloading programs.
For logging, I use a CAN-USB adapter from peak. You can sometimes find them at a very affordable price on online marketplaces. With a little more effort, you can program an AT90CAN in such a way that it simply outputs everything to the serial port – even at 100kbit/s, this should still work with PC-compatible baud rates.
Best regards,
Ingo
|
|
| Back to top |
Profile PM |
 |
leave.matrix Guest
Free account, no CAN development support
|
22-01-2013, 1:33 Subject: CAN alarm system |
Quote |
|
Hello - wow, thank you! I'll go ahead and start looking at some datasheets right away! Best regards!
|
|
| Back to top |
|
 |
leave.matrix Guest
Free account, no CAN development support
|
22-01-2013, 3:48 Subject: CAN alarm system |
Quote |
|
Hello Ingo.
I found this board.
http://shop.embedded-projects.net/index.php?module=artikel&action=artikel&id=18
There's also a book about it from the Franzis Verlag – that could be a great way to get started! Thank you again!
Andi.
|
|
| Back to top |
|
 |
|