rnd-ash / MBUX-Port

Custom Infotainment UI for older Mercedes vehicles (2000-2007), inspired loosely by the 2021 S Class MBUX UI
140 stars 30 forks source link

CAN crazy #4

Closed Pepepotero closed 4 years ago

Pepepotero commented 4 years ago

Hello again At the end yesteday i could connect the Arduino + CAN Bus shield to my Mercedes W203. As I have only one shield, I have made a bridge between pin 10 and pin 4 under the shield. Pin 10 is bended for no connect to Arduino UNO. Code change to: `#define CANB_CS 4

define CANC_CS 10`

CAN Bus wires connected to the connector shield (in correct order) Arduino+Shield connected to USB. Shield power red led is on. RX green led flashing softly. It seems that the CAN Bus is receiving data. App code compiled and install apk on my Android 8.1 audio car system. App crash. (Need permission to USB) Solved. Run App again. Run OK. TX and RX and power grenn led are fix on (no flashing). INT red led is fix on. No error to start app. Arduino is recognized. App no error. But not, all icons from stack are on, fan switch off, no light, no claxon, nothing work, stack screen says SRS Error... I disconnected the wires CAN Bus from the shield and all comeback to work again. (Breath) I review all Arduino-shield connections, welding, wire, continuity, etc, and it seems be OK, and reload the Arduino code but all is the same, CAN Bus crazy. Tested with other tablet (not connected to car) but Android 5.1. All the same (lights on) but the car CAN Bus is not crazy. But nothing happen. TR and TX text in app remaining 0. If chcek some of screen linght TX change to 0,1. Shield is CAN-BUS Shield V1.2 manufactured by Diymore and has 16MHz. As I can see in your video is the same but this board is in black color. CAN Bus wires are CANB_L & CANB_H which arrived to the old Mercerdes 20 Sound System in order to send messasjes to LCD stack (name of rardio station or track form CD-ROM)

That could be happening? Thank

rnd-ash commented 4 years ago

Which car are you testing in...?

Also, the shield you ran the wire to pin 4, did you cut pin 10, so it it doesn't get a CS connection through pin 10.

The SRS error is specific to If you mess up CANB, meaning it's something Todo with that shield....

Also, double check that you have CAN H and CAN L not swapped round

Pepepotero commented 4 years ago

Thank you very much for your quick answer. Car is Mercedes Benz class C year 2006 (W203) I think that is exactly as you car (I see in your videos) but my car is manual gear and the steering wheel is in spanish position. Yes, I have done a wire bridge between pin 4 and pin 10. Pin 10 is bended to avoid connection with Arduino. Yes, I checked several times, I have even changed the wires in case it was an identification error.

rnd-ash commented 4 years ago

hmmmm, this is very strange then....try connecting just the can B shield to the Arduino, and see what happens with canbus.

Pepepotero commented 4 years ago

Connecting Arduino + Shield to CAN B Bus without app, Led power fixed (red) and RX led (green is flashing softly, faint)

rnd-ash commented 4 years ago

that seems normal....is canbus OK with just the B shield or is it playing up?

Pepepotero commented 4 years ago

Sorry for my english, but I don't know wath is exactly your question. Only Arduino + CAN Bus shield + Android 8.1. App is unistalled.

Pepepotero commented 4 years ago

Checked shield with a multimeter: Arduino Pin | MPC2515 pin | Name 10 & 4 | 16 | CS 11 | 14 | MOSI 12 | 15 | MISO 13 | 13 | SCK 2 | 12 | INT RST | 17 | RST Vcc | 18 | Vcc

Pepepotero commented 4 years ago

Hello I have tested the uno_code.ino only with the shield and try to read messages at the Serial Com but nothing happens. I have tested the "read" examples from 2515 library and no read data in the Serial Com. I have tested the "read" examples from CAN_BUS_Shield-1.0.0 library and nothing happen. All these tests did it connectec to Audio CANB connector or CANB at X30/6 connection.

It seems that shield is reading the CAN B (RX led is blinks very faintly) but there is no communication at SPI. Voltaje measurement between CANB_H and CANB_L car wires have ~3 Volts.

It is very strange. Is it necessary another modification on the shield board? Is it necessary that share Arduino/shield GND with car GND? Perhaps Mercedes Class C 200 CDI manual gear Sport Edition 2006 has other CAN model and need different 2515 config? Perhaps shield doesn't work properly?

Thanks

Pepepotero commented 4 years ago

More tests (made with multimeter, i haven't osciloscope) Voltage without connection to shield: CAN_L:GND(car) = 4,60v CAN_H:GND(car) = 0,60v Voltage connected to shield and Arduino connected to USB: CANL: GND(car or shield) = 1,00v CAN_H:GND(car or shield) = 0,90v Voltage connected to shield and Arduino NOT connected to USB: CANL: GND(car or shield) = 0,98v CAN_H:GND(car or shield) = 0,89v

Voltage without connection (4,60v & 0,60v) are OK as the CAN bus specifications (4,65v & 0,65v), but I don't know if the other values are OK.

Pepepotero commented 4 years ago

Hello, I have received the other shield that I had ordered. The behavior in the car is the same. I have tested both shields connecting both, one as sender and other as receiver and showing the messages at the Serial monitor. Both seem work fine. Then, shields are not broken. Regarding to my previous questions: Is it necessary another modification on the shield board? PENDING Is it necessary that share Arduino/shield GND with car GND? ANSWERED: Tested and the behavior are the same. Perhaps Mercedes Class C 200 CDI manual gear Sport Edition 2006 has another CAN model and need different 2515 config? PENDING Perhaps shield doesn't work properly? ANSWERED: Not, shield is OK.

Pepepotero commented 4 years ago

Argggggggggggggggg! It is necessary to cut the track P1 to change the impedance. For this reason the green led flashed soflty. Now flash with intensity, and both shield and app work fine. Thank you