HowTo build a low cost DIY CAN-Emulator (at least for Renault Scenic II dashes)
Register
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Default HowTo: Build a low cost DIY CAN-Emulator (at least for Renault Scenic II dashes)

    While repairing my Scenic II dashboard back then, I didn't had a CAN bus emulator at hand, but this is necessary to power up the display when it's on the desk. While searching the forum, I found a post from https://www.digital-kaos.co.uk/forum...14-chipinvader who shared two CAN commands to turn the display on and off. Whereupon I posted a first version, but it could only turn on the Scenic Display. https://www.digital-kaos.co.uk/forum...=1#post3602052

    Recently I found a new post (https://www.digital-kaos.co.uk/forum...=1#post3843736 again from Chipinvader - many thanks for that!) where he published a complete test sequence.
    That was the base for the project presented here:


    A lowcost DIY CAN emulator for the Scenic II dash.
    Enhanced Version




    inUse.jpginUse2.jpg

    What you need:


    Hardware

    hw1-11.jpg click the picture to zoom in and see wiring details.

    On the MCP2515 board there is a jumper which is labeled J1. To function properly make sure it is closed so the CAN-Bus termination is enabled.

    Wireing
    PIN on Arduino PIN on MCP2515 CAN Bus Breakout Board
    D2 INT
    D10 CS
    D11 SI
    D12 SO
    D13 SCK
    5V VCC
    GND GND

    mcp2515-arduino.jpg

    PIN (grey connector on dash)
    1 +12V
    2 GND
    29 CAN LOW
    30 CAN HI


    Software:

    The arduino project is attached to this post and can be compiled and uploaded via the Arduino IDE.
    The code which runs on the arduino is based on https://github.com/coryjfowler/MCP_CAN_lib
    A copy of this library (and the full source code for the emulator) can be found within the provided zip file. Just put the can-library into the library folder of the Arduino IDE.

    The Message-Sequence can be extended or modified by patching for the the following within the dash.ino file:
    Code:
    ...
    
    struct msg messages[] = {
       {0x354, 8, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00}}  //0
      ,{0x35d, 8, { 0x10, 0x03, 0x20, 0x00, 0x00, 0x00, 0x50, 0x00}}  //1 dash on
      ,{0x374, 3, { 0x28, 0x02, 0x3B}}                                //2
      ,{0x743, 8, { 0x02, 0x10, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00}}  //3
      ,{0x743, 8, { 0x04, 0x30, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00}}  //4 full small vfd 
      ,{0x743, 8, { 0x02, 0x10, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00}}  //5
      ,{0x743, 8, { 0x04, 0x30, 0x04, 0x20, 0x0a, 0x00, 0x00, 0x00}}  //6
      ,{0x743, 8, { 0x04, 0x30, 0x04, 0x20, 0x0b, 0x00, 0x00, 0x00}}  //7 speed
      ,{0x743, 8, { 0x04, 0x30, 0x05, 0x20, 0x46, 0x00, 0x00, 0x00}}  //8
      ,{0x743, 8, { 0x04, 0x30, 0x05, 0x20, 0x44, 0x00, 0x00, 0x00}}  //9 tacho full
      ,{0x743, 8, { 0x04, 0x30, 0x01, 0x20, 0x09, 0x00, 0x00, 0x00}}  //10 tl
      ,{0x743, 8, { 0x04, 0x30, 0x01, 0x20, 0x0c, 0x00, 0x00, 0x00}}  //11 tr
      ,{0x60d, 8, { 0x00, 0x10, 0x00, 0x00, 0x27, 0x73, 0x21, 0x71}}  //12 buzzer
    };
    
    ...
    
    for(int i=0; i<=12; i++){
          DEBUG_PRINT(i);
          if (CAN_OK != CAN.sendMsgBuf(messages[i].id, 0, messages[i].dlc, messages[i].data)){
            DEBUG_PRINT("error sending message");
          }    
          delay(3000);
        }
    ...


    If you make your own enhancements, or you have additional CAN-Messages please post them here so everyone can benefit.

    Cheers, Dirk
    Attached Files Attached Files
    Last edited by dirksan12; 22nd March, 2021 at 02:50 PM. Reason: spelling

  2. The Following 12 Users Say Thank You to dirksan12 For This Useful Post:

    Alfik (16th April, 2021), conan981 (23rd September, 2021), florin_leo (21st March, 2021), fuzz1 (25th April, 2021), hbalazs (15th February, 2021), Johnner (27th June, 2021), Mario Rufo (18th May, 2022), morrisgauge (28th April, 2021), okm (5th December, 2023), smayer (15th January, 2022), tszabo57 (23rd May, 2022), weddingnails (18th March, 2022)

  3. #2
    Top Poster crackintosh's Avatar
    Join Date
    Jul 2009
    Location
    Chisinau
    Posts
    114
    Thanks Thanks Given 
    11
    Thanks Thanks Received 
    2
    Thanked in
    2 Posts

    Default

    Some messages have higher period:
    Message10Id=743
    Message10DLC=8
    Message10Data=04 30 01 20 09 00 00 00
    Message10Period=1200
    Message10Comment=TL
    Message10Mode=off
    Message10TriggerId=
    your software ignore this.

  4. #3
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Default

    Quote Originally Posted by crackintosh View Post
    Some messages have higher period:


    your software ignore this.

    Hi crackintosh,

    as far as I understood the canhack trace file syntax the period statement just defines how long to wait before the next statement is send.
    I have ignored this behaviour for the approach above. Instead I've set this to fix value (see the delay-statement within the for-loop).

    If i'm wrong please let me know.
    At the first post I have added a video now where you can see the project "in action" ;-)

    Thanks,
    Dirk
    Last edited by dirksan12; 27th March, 2021 at 04:14 PM.

  5. #4
    DK Veteran
    Join Date
    Dec 2009
    Posts
    480
    Thanks Thanks Given 
    91
    Thanks Thanks Received 
    43
    Thanked in
    23 Posts

    Default

    I AM INTERESTED IN DOING ONE FOR ALOT MORE CLUSTERS IF ANYONE CAN POINT ME IN THE RIGHT DIRECTION

  6. #5
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Default

    Quote Originally Posted by rastus86 View Post
    I AM INTERESTED IN DOING ONE FOR ALOT MORE CLUSTERS IF ANYONE CAN POINT ME IN THE RIGHT DIRECTION
    If you have tracelogs for those cluster at hand (smth. like this https://www.digital-kaos.co.uk/forum...=1#post3843736) this would not be a big problem.

    I could imagine to read the trace-file(s) from a sd-card directly to the arduino...
    What do you mean with "POINT ME IN THE RIGHT DIRECTION"?
    Please tell me what kind of help you would need? Please explain.
    Last edited by dirksan12; 16th February, 2021 at 04:10 PM.

  7. #6
    Top Poster
    Join Date
    Nov 2009
    Posts
    136
    Thanks Thanks Given 
    194
    Thanks Thanks Received 
    15
    Thanked in
    9 Posts

    Default

    Do you know any Can message for showing kilometers state?

  8. #7
    Top Poster
    Join Date
    Nov 2009
    Posts
    136
    Thanks Thanks Given 
    194
    Thanks Thanks Received 
    15
    Thanked in
    9 Posts

    Default

    Quote Originally Posted by Alfik View Post
    Do you know any Can message for showing kilometers state?
    I solved it :-). {0x60d, 8, { 0x08, 0x10, 0x00, 0x00, 0x32, 0xFF, 0x2f, 0x10}}

  9. The Following User Says Thank You to Alfik For This Useful Post:

    dirksan12 (18th April, 2021)

  10. #8
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Default

    Hi Alfik,

    what a nice find! Thank you very much.
    How do you got that can-message? Do you have any more?

    Cheers, Dirk

  11. #9
    Junior Member

    Join Date
    Aug 2016
    Location
    Bulgaria
    Posts
    20
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    13
    Thanked in
    5 Posts

    Default

    Hi dirk,
    My emulator is the same Arduino + MCP2515. I didn't know that there's such topic. I did my own research for the messages.
    I really like what you have made. I have tracelogs from my car, and other during indication tests.
    When I have time I will upload them.

  12. The Following User Says Thank You to kalki85 For This Useful Post:

    dirksan12 (22nd April, 2021)

  13. #10
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Default

    Quote Originally Posted by kalki85 View Post
    Hi dirk,
    My emulator is the same Arduino + MCP2515. I didn't know that there's such topic. I did my own research for the messages.
    I really like what you have made. I have tracelogs from my car, and other during indication tests.
    When I have time I will upload them.
    Hi kalki85,

    that would be awesome. I think everybody (at least those with this renault-dash that is prone to breakage) would benefit from that.

    Cheers, Dirk

  14. #11
    DK Veteran
    fuzz1's Avatar
    Join Date
    Jul 2019
    Posts
    2,964
    Thanks Thanks Given 
    1,631
    Thanks Thanks Received 
    694
    Thanked in
    460 Posts

    Default

    Makes me want to find a Renault dash and try the proposed solution. Thanks for sharing. Anyone tried for some other dash?

  15. #12
    Junior Member

    Join Date
    Aug 2016
    Location
    Bulgaria
    Posts
    20
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    13
    Thanked in
    5 Posts

    Default

    Hi,
    I attach some files
    IMG_20210428_090310.jpg
    Attached Files Attached Files

  16. The Following 4 Users Say Thank You to kalki85 For This Useful Post:

    camonei (29th April, 2021), danielif (6th January, 2022), dirksan12 (29th April, 2021), klingos (23rd December, 2022)

  17. #13
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Exclamation I've moved the development of the emulator code to GitHub!

    Hi there,

    for easier maintenance and further development of the DIY-CAN emulator, I have moved it to a GitHub project:

    https://github.com/dirksan28/Scenic2DashCanEmu

    The first release there contains extensive enhancements
    that have been made possible through the cooperation and contribution of

    https://www.digital-kaos.co.uk/forum...479207-kalki85 and https://www.digital-kaos.co.uk/forum...hp/98483-Alfik
    Many thanks!!!

    There is now a very large test sequence and the current mileage is also displayed when starting up.
    The best thing to do is to take a look at the current video:



    If you are in a hurry - here's the direct download link:
    https://github.com/dirksan28/Scenic2...heads/main.zip

    I would be happy if you would use the GitHub project to submit further development but also forks of the code (e.g. to support other dashes) . On the other hand we could leave discussion etc. here in this thread.

    Please contibute ;-)

    Cheers, Dirk
    Last edited by dirksan12; 27th June, 2021 at 01:10 PM.

  18. The Following 8 Users Say Thank You to dirksan12 For This Useful Post:

    fuzz1 (24th July, 2021), GameTheoryOptimal (18th March, 2022), Jardel (4th November, 2022), Johnner (27th June, 2021), junmab (6th January, 2022), kalki85 (15th January, 2022), klingos (23rd December, 2022), tomaszcz (22nd January, 2022)

  19. #14
    Member
    dirksan12's Avatar
    Join Date
    May 2019
    Location
    Germany
    Posts
    67
    Thanks Thanks Given 
    20
    Thanks Thanks Received 
    63
    Thanked in
    28 Posts

    Lightbulb ESP32 now also supported.

    There is now also a fork that works with an ESP32 and the SN65HVD230 CAN transceiver: https://github.com/douardda/Scenic2DashCanEmu

  20. The Following User Says Thank You to dirksan12 For This Useful Post:

    fuzz1 (6th January, 2022)

  21. #15
    Junior Member

    Join Date
    Aug 2016
    Location
    Bulgaria
    Posts
    20
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    13
    Thanked in
    5 Posts

    Default

    Great work Dirk. I'm so happy that you had time to implement my work. Thank you.
    Another task left. To light all the pixels on big display simultaneously. I think this should be available on dash versions 6 and up.
    Last edited by kalki85; 15th January, 2022 at 08:13 PM.

 

 
Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.