Here is a sample project I have made.
My Macchina M2 commands the engine on or off at will. Cruise controls have been utilized to start/stop engine. Controls are also on the touch screen LCD it displays SOC, Fuel remaining, and RPM. Working on getting the RPM dial and correcting the RPM offset it is a bit off.
I plan on posting the framework INO on github soon. https://youtu.be/22PoknZjOPI
Nice work! Could you tell me more about how youāre accomplishing the remap of the steering wheel buttons? Did you physically interrupt wires and place the Macchina in the middle or are you just reading the switch while cruise control is off and the car isnāt normally paying attention to it anyway?
How the cruise control works on this vehicle is that it will only send messages on the single wire bus when the cruise control is armed if not the buttons do not generate a canbus message. I have the Machinna M2 connected to the OBD2 port no cutting or splicing.
YES! This is exactly the sort of project I love to see. You saw a feature you wanted your car to have, so you built it. Very well done.
@brianbri6 Thank you for sharing and showing this is possible! Please let us know if/when you post your code. I just bought a 2012 Volt on Monday and have had a Macchina on pre-order since I realized I was going to be buying a (my first) car.
I have to rewrite all the code since the M2 library has been updated and changed. none of my old code works on the newer libraryās so it going to take some time to relearn what has changed redo it and post the new code.
Brian, have you had a chance to update your code? Or is there a way to get your old code and try and do some work on it, Iād love to get a button like this working in my volt, I have the app but a button would be better. Thanks
as promised a bit late but here is the sketch for hold mode with lcd https://github.com/brianbri6/chevyvoltenginecontrol since the SWCAN library has been updated my code doesnt work.
Macchina M2 read from SW_CAN send to HSCAN Chevy Volt Hold Mode Mod Video
Well, except that you dummied out all the IDs and data bytes so that everything is all 0ās now. That doesnāt do anyone (except me) any good since they have no idea what the IDs should be or what the data bytes should be. I know what the ID and data bytes should be but nobody else is going to know that.
I can modify your sketch to make it work with the SWCAN library but Iām a little perplexed why youād release a sketch you have to know wouldnāt do most people any good?! Also, you donāt need SWCAN to control the engine anyway so Iām not sure what you needed it for? It appears in your code that you were checking something related to the wheel? Maybe whether it is moving or not? I can assure you, forcing the engine on/off works just fine whether you are driving or parked. So, I really donāt know whatās the reasoning for checking something related to wheels but Iād be interested to know.
Anyway, we can get your sketch running easily enough but unless you want to flesh it out with the proper actual data then it will be pretty pointless, wonāt it?
If you could supply the IDs and data that would be great. I believe the swcan wheel data referred to is the cruise control buttons on the steering wheel. The engine āholdā mode would be turned on and off with these. Probably only when cruise itself was off and thus the other buttons were essentially unused
You guys are all Saints! Iāll work on getting the IDās and data too, it may take awhile as Iām more a kW and VAR kind of guy, not so much 1ās and 0ās. haha
I just bought my M2 and, first step: just want the engine to turn on when I plug it into the obd2 port of my 2011 Volt. From there, Iām then planning a cheap 12v on/off switch on the dash to feed macchina so I will have a (hard wired) switch that turns engine on and off.! Slowly getting thereā¦
If I leave M2 plugged into obd2 port long term I believe it will drain the battery (had this happen with āOBDlink MXā), thus why leaving it plugged in and waiting for the wheel button commands wonāt work long term for me I donāt thinkā¦
Hey Collin, I told brian to put his code out there just so I could try and work on it a bit. Iām always up for a challenge. Especially as Iām not good at coding yet, but working on it! Thanks
Thatās cool. Tell you what, I probably am not at liberty to give everything away but the can ID for sending the engine hold command is one of the standard ECU addresses for UDS. If I remember correctly itās 0x7E1. And, the resulting frame to turn it on/off is UDS format too. Not that that helps you a whole lot but itās kind of a step in the right direction.
Sorry guys I will repopulate the data but I will not release the engine on or off data to the public since I have an app that I sell on the android store that uses that information specifically. I can point you guys in the right direction the ID is 7E1 07 AE XX XX 00 00 00 00 that you want to look for to turn the engine on or off easily. XX is the data you will need to figure out its all numeric and its value is between 0 and 40, thatās as much info I can give before giving it all away. Itās not exactly rocket science finding it you just need to know where to look. Good luck guys.
Thanks a lot @brianbri6, @CollinK:
I was able to find find the data to turn engine āonā and then ākeep aliveā using saavy can and am SO close I think, but my program wonāt start the engine when I plug M2 into the OBD2.
The program compiles and uploads to M2 fine but nothing happens when I plug it in my voltā¦ I xād out the data to put on this thread. I wonāt undercut your app Brian. I believe the data in my actual code is right though as it started the engine when sent from the saavy can program on a loop.
Any comments where I went wrong in the code would be awesome. Again my program is just to start the engine (and ākeep aliveā) as soon as M2 is plugged in the OBD2 port and let the engine die when the M2 is pulled out of the port.
Maybe I have a libarary commented out at the top that should actually should be included? Not real sure what lines 35-42 are doing if I even need them in my code.
Code is here:
Please go easy on me, my programming skills are still struggling but Iām learning. Itās been 6 years since my C++ classā¦
RTR should be zero, not one. One means to make it an RTR frame which, by definition, has no data bytes. That will mess you up. But, yeah, the AE message is ādevice controlā for GMLAN and then the two bytes afterward tell it whether to turn on the engine. Everything after those two bytes shouldnāt matter. Some people set the unused bytes to 0ās, some to 0xAA, some to 0xFF. It shouldnāt matter as they arenāt used.
Ok, I realized I had some arduino IDE problems that I solved by basically redoing the M2 setup steps and now I upload my .ino to M2 and plug it in the volt and it responds at least, so I know M2 is sending data. When I plug in M2 with my program now the dash says to service traction system soonā¦ If I unplug and replug M2 a few times it messes up the car where itās not driveable so I have to unhook and rehook battery cable to get it back to normal. Not good, but at least the car is responding now. Iāll work on it some more soon. Happy New Year!
That sounds like it isnāt getting set to the proper CAN speed for some reason. I see youāre setting it to 500k which ought to be the proper speed. So, not sure whatās going on there but your results are a classic sign that the CAN settings arenāt correct. Iāve used an M2 with a Volt so I know it can work.
send me a pm with the CAN message you are using.