Chevy Volt engine control using cruise controls project

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

1 Like

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

1 Like

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

1 Like

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?

2 Likes

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

2 Likes

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ā€¦

1 Like

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.

2 Likes

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.

1 Like

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ā€¦

1 Like

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.

@CollinK, Amazing! Thanks! Iā€™ll give it a go when I get off work. Thanks again

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.