Can Bus Adaptor
STDCan Bus Adaptor
License
:GPL 3.0
Description
I am a begineer when it comes to programming and can bus and having done this project I realise that with better programming skills there are simplier methods to acheive the same result, however this unit does work as intended.
The cars current can bus signal for illumination off is ID 635 DLC3 00 00 00 (Data 1 sets illumination off and button brightness, data 3 sets LCD screen brightness, on the Golf MK5 tis is 00 when the illumination is off, HEX00 = decimal 0 and minimum brightness.
The unit uses two STM32 black pills (STM32F401CCU6) and two MCP2515 modules, I had some issue with the most recent MCP2515 modules that I purchased from Aliexpress, though earlier ones had worked the latter ones did not, the new modules still worked with an Arduino UNO and Nano but not the STM32, to fix this I had to replace the TJA1050 transceiver with an earlier one, as the STM32 does not talk direclty to the TJA1050 I am not sure on the exact reason for this. I am also aware the STM32 can support can bus natively with an addition of a transceiver but I do not have the ability to implement this.
The receive side of this project is based on a project by Aaron Christophel and I strongly recomend that you watch his Youtube videos and review his project before starting this one - https://www.youtube.com/watch?v=fj8ZLTubeko
https://github.com/atc1441/CustomCanDecoderBox
The can bus librarys required for this project can be downloaded from the link above.
The first STM32 recieves the can bus signals and will make a pin high, this pin is connected to the the second STM32, this will then send what ever can bus message you require based on the pin state.
The PWB is my 6th version, I have not actually had this one manufactured so please scrutinise the design before you proceed, please let me know if you see an issue and I will amend the design.
This adaptor can also be used to run a unit designed for an MQB car on the PQ platform, MQB can bus ID's are included in the code.
I will be happy to answer questions but please do your own research and fault finding first.
The project does include a case that can be 3D printed, this was quickly made using Tinkercad but does the job.
If you make any improvements to the code or completely re-write it to work more efficiently I would appreciate if you could share this work.
Comment