This is a kind of quick overview of using arduino to poll a 5v sensor and send the reading out over a cheap can bus module into megasquirt. We’re using this for cheap IO expansion. Links to stuff seen in video:
MS3 Kit: https://amzn.to/2N3Hogo
canbus module: https://amzn.to/2N1CAId
arduino mega: https://amzn.to/2lCf6Np
arduino uno: https://amzn.to/2IwYxvm
jumpers: https://amzn.to/2N3l8TC
breadboard and jumpers: https://amzn.to/2N4t7zP
weather pack kit: https://amzn.to/2IxeYYx

, https://i.ytimg.com/vi/itjks6okttM/hqdefault.jpg

source

23 Comments

  1. also… is adding more channels to it as simple as changing the byte number from 8 to say 16? and then simply adding more lines like this?

    unsigned char canbyte01[16] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};

    //Analog 1-6

    canbyte01[0] = highByte(Voltage1);

    canbyte01[1] = lowByte(Voltage1);

    canbyte01[2] = highByte(Voltage2);

    canbyte01[3] = lowByte(Voltage2);

    canbyte01[4] = highByte(Voltage3);

    canbyte01[5] = lowByte(Voltage3);

    canbyte01[6] = highByte(Voltage4);

    canbyte01[7] = lowByte(Voltage4);

    canbyte01[8] = highByte(Voltage5);

    canbyte01[9] = lowByte(Voltage5);

    canbyte01[10] = highByte(Voltage6);

    canbyte01[11] = lowByte(Voltage6);

    canbyte01[12] = highByte(0);

    canbyte01[13] = lowByte(0);

    canbyte01[14] = highByte(0);

    canbyte01[15] = lowByte(0);

    CAN.sendMsgBuf(0x000, 1, 16, canbyte01);

  2. which mcp can library did you use for this
    I am building a box to take some analog inputs to CAN and I want to use the same library since it appears to work well

  3. MS3 appears to have a different ability to take CAN BUS messages than MS2. MS2 uses the proprietary 29 bit CAN message. I wish someone could explain the different requirements in a more beginner style so that i could absorb it faster. its all new to me. but basically it wont take unless its requested. so after you setup the extension boards via can parameters. you have to also get the script right according to the MS2 CAN documentation. it would be awesome if there were more documentation on how to use some of the Libraries out there. as far as the unsigned char smtp there's a few more requirements to get MS2 to take it. the ID has to be specific not too bad. its in the documentation. but the rest of it i can't understand. everything has to refer to the correct table and offset. which i have no idea how to translate yet.

  4. How can I connect arduino to my relay and switch box so that I can send a signal to my digital dash when I flip a switch on or off?

    I do mean the code i mean how to literally connect the arduino to my relays or switches to detect when the switch is turned on or off.

  5. That is really neat. I built a MS3X for my car and I am out of 0-5V inputs. I don't think I could handle what you did here. I wish I could. What do you think my simplest solution would be to add some more? I just added a fuel pressure transducer and that was my last spare input. Keep in mind the MS3X build burnt most of my brain cells that I had left. LOL

  6. Great work! Thank you! I ran out of I/o on my ms3 gold box. Is the code anywhere online I could download?

  7. Hi, nice work! looks sooo easy with an MS3 ^^. Do you no if its possible with an MS2extra? I've been trying passing through the "ADC polling" in "CAN parameters" section but I can't get the megasquirt to read informations on the CAN. (on the other side the arduino perfectly recieve MS data when broadcasting).

  8. Thank you for mentioning the 8MHz option! That was a very helpful little nugget of info! 🙂

  9. Thanks for the info. Could you do a follow up on including the extra I/O in the loop, thanks

  10. Dude that is badass! I’ve been wanting to pickup a microsquirt for a extra I/O and this would save so much money.

Leave a Reply to Baba Sidd Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.