CANhack.de CAN-Interface RKS+CAN
Diesel technology, engine technology, vehicle diagnostics, repair & maintenance.

Building a CAN Bus Controller

 
Go to page: 1, 2  Next
New Topic Reply 🔗 🖨 CANhack.de - Index » Microcontrollers and Electronics, Programming
Author Message
Strom_Flo



Joined: 12/21/2016
Posts: 6
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post21-12-2016, 8:53    Subject: Building a CAN Bus Controller Quote

Hello CANhack members.

I'm new and have absolutely no experience with CAN Bus systems, and I hope you can help me.

About me:
I am 25 years old, a qualified electrician by profession, and I have experience in programming, general electronics, and the manufacturing of circuit boards.

Regarding my issue:
I have an Opel Frontera B, manufactured in 2002. The vehicle's display shows me vehicle-related messages, such as "Rear left brake light defective" or "Coolant level too low."
These messages can be scrolled through and confirmed using a control panel on the radio.
Now, I want to install a different radio that is no longer connected to the CAN bus.
Okay, so I need a small rotary knob, along with a circuit board, etc., to control the car's menu system.

Does anyone have any ideas? Have you ever done something like that before?

Thank you in advance.
Hi Flo,
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 573
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post21-12-2016, 10:31    Subject: Building a CAN Bus Controller Quote

Hello Flo,

First, you should check whether the rotary knob is actually connected to the radio and the CAN bus.

If yes: Connect the CAN interface to the corresponding bus, select the "Message Changes" view in KCANMonitor, and turn the knob.
Then you can see which messages are being sent on the bus and recreate them.

Best regards, Rainer.
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface
Back to top Profile PM WWW
Strom_Flo



Joined: 12/21/2016
Posts: 6
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post21-12-2016, 14:15    Subject: Building a CAN Bus Controller Quote

Hello Rainer,
Thank you for the quick response.
"I have a CANBus-enabled OBD2 adapter. Would I just need the software, or does it only work with the set you suggested?"
If I know what data I need to send, how can I reproduce or recreate that data?
Hi Flo,
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 573
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post21-12-2016, 14:29    Subject: Building a CAN Bus Controller Quote

Strom_Flo wrote:
I have experience with programming, general electronics, and the manufacturing of printed circuit boards
.
Too bad, it seems not. icon_confused.gif
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface
Back to top Profile PM WWW
Strom_Flo



Joined: 12/21/2016
Posts: 6
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post21-12-2016, 19:23    Subject: Building a CAN Bus Controller Quote

Quote:
I am new and completely inexperienced when it comes to CAN Bus systems.

Unfortunately, my experience is limited to the industrial sector.
S7 and Profibus. I don't know how that relates to CANBus.
Best regards, Florian.
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 573
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post22-12-2016, 9:23    Subject: Building a CAN Bus Controller Translating...

[Translating...]

http://www.canhack.de/en/viewtopic.php?t=13
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface
Back to top Profile PM WWW
shavenne
CAN-Profi
CAN-Profi


Joined: 04/27/2015
Posts: 37
Karma: +6 / -0   Thank you, like it!
Location: Paderborn

CAN Support

Post22-12-2016, 11:13    Subject: Building a CAN Bus Controller Quote

What (original) radio and display are installed?


Last edited on 22-12-2016, 11:13, edited 1 time in total.
Back to top Profile PM
Strom_Flo



Joined: 12/21/2016
Posts: 6
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post24-12-2016, 18:55    Subject: Building a CAN Bus Controller Quote

Okay, the radio is a Siemens NDR 1100.
I don't know about the display. To do that, I would first need to expand on it.
Merry Christmas.
Hi Flo,
Back to top Profile PM
shavenne
CAN-Profi
CAN-Profi


Joined: 04/27/2015
Posts: 37
Karma: +6 / -0   Thank you, like it!
Location: Paderborn

CAN Support

Post24-12-2016, 20:56    Subject: Building a CAN Bus Controller Quote

Color display, so I guess it's a CID? So, if it's like in my Astra G (also with NCDR1100+CID), then the display won't even turn on without the radio, no matter what you try. That's a bit more complex, especially if it's your first project in this area. I have experience with this combination, as I want my Astra to also function without the original radio icon_wink.gif.



You are not permitted to view these file(s), please log in or register for extended rights or status updates.



Last edited on 24-12-2016, 21:02, edited 1 time in total.
Back to top Profile PM
Strom_Flo



Joined: 12/21/2016
Posts: 6
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post25-12-2016, 13:47    Subject: Building a CAN Bus Controller Quote

Hello shavenne,
Thank you for the response.
Yes, it looks like mine. I thought the display was connected to the Msg system, and the radio was just there for control purposes.
How did you manage to separate them?
What should I pay attention to?
Merry Christmas.
Hi Flo,
Back to top Profile PM
shavenne
CAN-Profi
CAN-Profi


Joined: 04/27/2015
Posts: 37
Karma: +6 / -0   Thank you, like it!
Location: Paderborn

CAN Support

CAN-Diagnose likes this.
Post07-01-2017, 0:45    Subject: Building a CAN Bus Controller Quote

It's better late than never, icon_biggrin.gif

Okay, I managed to get the display to turn on without the radio, but I'm probably sending a much stronger signal than necessary, which likely means I'm also transmitting a lot of unnecessary noise.
I can only tell you which IDs you need to listen to and transmit on, and those would be:

6A6 and 6A1: This originates from the display, and here you need to respond to various messages directed towards 6A1.
290: Then, the button presses from the radio are added. You will also need to trigger the power-on button press in that location.
348 and 759: You need to send a text message to activate the display; otherwise, it will just remain stuck on the Opel logo. When you initiate sending on 348, the text will actually be sent to 759. In the message on 759, in addition to the text itself, you will also find the message length (how many messages the text is divided into) and the character length. A certain byte (or multiple bytes?) is also used to specify the destination address of the text.
3D0: Here, a specific message is sent regularly. Think of it as a kind of 'keep-alive' mechanism.

Even though I had a similar starting point, it's not easy for beginners. I spent weeks, or even months, sitting in my Vectra C (with a newer CID) almost every day for hours with my laptop, feeding the display with my own data. I wouldn't say it's something you can just whip up in two days.


Last edited on 07-01-2017, 0:48, edited 1 time in total.
Back to top Profile PM
Strom_Flo



Joined: 12/21/2016
Posts: 6
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post07-01-2017, 13:00    Subject: Building a CAN Bus Controller Quote

Hello shavenne,
Happy New Year!
Thank you very much for the detailed information.
"My question might sound a bit silly, but what device do you use to send/receive these messages? I don't want to put a PC in my car." Did you build that controller yourself, or is there a ready-made solution for it?
Hi Flo,
Back to top Profile PM
shavenne
CAN-Profi
CAN-Profi


Joined: 04/27/2015
Posts: 37
Karma: +6 / -0   Thank you, like it!
Location: Paderborn

CAN Support

Post07-01-2017, 16:23    Subject: Building a CAN Bus Controller Quote

I'm using an Arduino with an MCP2515 CAN controller and an MCP2562 CAN transceiver. There are also pre-made shields available for this (e.g., the CANdiy Shield). That's where I also started icon_wink.gif.
Back to top Profile PM
timi257



Joined: 01/17/2017
Posts: 2
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post17-01-2017, 20:30    Subject: Building a CAN Bus Controller Quote

Hello everyone!

I also have a direct question about this topic:
I have several Arduinos and an MCP2515 CAN controller lying around. Now, I would like to read the steering wheel control commands from my Opel Astra H. In another post, I read that they are supposedly located on the Mid-Speed bus. Could someone please briefly explain to me how I can use the Arduino to "listen" to the signals? Do I have to program the timing, etc., myself? Is there perhaps someone who has already done something similar that I could build upon?

I am very grateful for any help!

Best regards and thank you very much in advance icon_smile.gif.
Back to top Profile PM
shavenne
CAN-Profi
CAN-Profi


Joined: 04/27/2015
Posts: 37
Karma: +6 / -0   Thank you, like it!
Location: Paderborn

CAN Support

Post17-01-2017, 20:38    Subject: Building a CAN Bus Controller Quote

Find one of the MCP2515 libraries on Google.
Possibly, you may need to modify them because they often can't handle the 95.2 kbps speed.

Here are the corresponding values you need to add the bitrate:
Code:
#define MCP_16MHz_95kBPS_CFG1 (0x03)
#define MCP_16MHz_95kBPS_CFG2 (0xBB)
#define MCP_16MHz_95kBPS_CFG3 (0x07)


Libraries usually also come with examples. These examples should allow you to quickly understand how to use most of the library's features. Mostly because if you let everything pass unfiltered, you might miss some messages because the Arduino can't process them quickly enough from the buffer.

You can receive LFB messages on ID 206 (HEX).
Back to top Profile PM
timi257



Joined: 01/17/2017
Posts: 2
Karma: +0 / -0   Thank you, like it!


Free account, no CAN development support

Post17-01-2017, 20:51    Subject: Building a CAN Bus Controller Quote

Hey,

Thank you very much for the super quick response!
Just realized, I actually have a module with a TJA1050 transceiver, but hopefully that will still work.
I'm going to try it out sometime in the next few days. Especially the tip about the 95.2 kbps is very helpful, thank you! icon_smile.gif

I have one more quick question: Do I really need to connect to pins 3 and 11 in the OBD port for the mid-speed communication? I also read about a different pin configuration somewhere. Thank you very much icon_smile.gif.
Edit: I also read that the Chinese clones often have an 8 MHz quartz crystal instead of a 16 MHz one. Are there any libraries that support this, or do I need to replace it somehow?


Last edited on 17-01-2017, 20:58, edited 1 time in total.
Back to top Profile PM
New Topic Reply 🔗 🖨 CANhack.de - Index » Microcontrollers and Electronics, Programming
Go to page: 1, 2  Next
Similar articles and topics
Topic Forum
No new posts Can Controller für DSG Getriebe Microcontrollers and Electronics, Programming
No new posts CAN Controller, Transeiver CAN Bus General
No new posts CAN to CAN Gateway - passende Controller? CAN Bus General
No new posts Eigenbau-CAN-Controller - Grundlegendes General
Jump to:  
You cannot post new topics in this forum.