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
2021-08-12
Canbus module link is not working anymore. Is it a MCP2515 module?
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);
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
@Grabbs Racing. anymore updates on your work?
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.
If you are trying to get this to work, you're pulling out your hair, stumbled into this well done video, it confirms everything you were doing, but yours still won't work for some reason … try power cycling your MS3. Nice video. There are some all in one CAN boards out there now for cheap, smaller form factor: https://www.digikey.com/en/products/detail/seeed-technology-co-ltd/102991321/11201147
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.
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
This is awesome, thank you. Is there a writeup anywhere?
youtube shud b havin ur content recomended
Great work! Thank you! I ran out of I/o on my ms3 gold box. Is the code anywhere online I could download?
Do you have any updates on this set up .
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).
Thank you for mentioning the 8MHz option! That was a very helpful little nugget of info! 🙂
Love what your doing just stumbled across your channel and deffinetly like the content
Thanks for the info. Could you do a follow up on including the extra I/O in the loop, thanks
share the code please
also can megasquirt take a 12 bit adc signal or can the canbus only receive 8bit signals..
do you have a link to the code
Really cool
Nice!!! I like the approach. Very ingenious. Look forward to seeing it running
Not all heroes wear capes.
Dude that is badass! I’ve been wanting to pickup a microsquirt for a extra I/O and this would save so much money.