From b169795fe386eba9be8e440bc9d5b3bcbd73bbb1 Mon Sep 17 00:00:00 2001 From: FizzGiGG Date: Mon, 15 Jul 2019 08:41:52 -0500 Subject: [PATCH 1/4] formatting fixes formatting fixes --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8fe1494..58a702c 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ You assume all risk for using this. You are interfacing with the stability cont You will need a few items: -1.) An Arduino Uno -2.) A CAN-BUS Shield V2 https://www.amazon.com/seeed-studio-CAN-BUS-Shield-V2/dp/B076DSQFXH -3.) A way to access the CAN-CH bus. This is not the primary can bus. There are various places to access the CAN-CH bus (I'm using a connector in the trunk), but the most convenient place to access is is via pins 12 and 13 at the OBD port. If you've bought an OBD cable set for your Alfa, you will want to use the gray adapter cable. Additionally you will need an OBD->DB9 cable. I purchased this one: https://www.amazon.com/gp/product/B01ETRINYO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 -4.) Power - The canbus shield has an option for you to power the entire setup via the power provided by the OBD port. This seems to work fine for testing, but automotive voltage is a bit higher than optimum for the Arduino. Also, it's possible to drain your car's battery if you choose to power the arduino via OBD port. +1.) An Arduino Uno
+2.) A CAN-BUS Shield V2 https://www.amazon.com/seeed-studio-CAN-BUS-Shield-V2/dp/B076DSQFXH
+3.) A way to access the CAN-CH bus. This is not the primary can bus. There are various places to access the CAN-CH bus (I'm using a connector in the trunk), but the most convenient place to access is is via pins 12 and 13 at the OBD port. If you've bought an OBD cable set for your Alfa, you will want to use the gray adapter cable. Additionally you will need an OBD->DB9 cable. I purchased this one: https://www.amazon.com/gp/product/B01ETRINYO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
+4.) Power - The canbus shield has an option for you to power the entire setup via the power provided by the OBD port. This seems to work fine for testing, but automotive voltage is a bit higher than optimum for the Arduino. Also, it's possible to drain your car's battery if you choose to power the arduino via OBD port.
You'll need the CAN-BUS Shield Library. ***IMPORTANT*** There seems to be a bug in this library, or some implementation issue. As the library ships, setting masks and filters is very hit or miss. I've solved it by adding a small delay (100ms) after the controller switches into config mode via mcp2515_setCANCTRL_Mode(MODE_CONFIG) in both the init_Mask() and init_Filt() functions. If you do not make these two changes, the application is going to be working on a *lot* more packets than it needs to. It could cause the packets we want to be filtered out erroneously. From 3ca1ea6d7302a2d4d85b077056647df9b3629b26 Mon Sep 17 00:00:00 2001 From: FizzGiGG Date: Wed, 12 Oct 2022 09:46:10 -0500 Subject: [PATCH 2/4] Update README.md Tailored README to this fork related to 2.0 Giulia. --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 58a702c..c641710 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,23 @@ # giulia_ESCape +A fork of beaups/giulia_ESCape, but being tailored to the 2.0, non-Quadrifoglio, Giulia. + Traction Control enable/disable for the Alfa Romeo Giulia via Arduino + canbus module -This is a simple Arduino project that enables/disables traction control in any (R)DNA mode via pressing the left stalk button (LDW) for ~2 seconds. +Future enhancements may include the following: +- Disable AWD (unlock center diff/transfer case) to essentially make it RWD. +- Engine RPM output for aftermarket tach and/or shift light. + +This is an Arduino project that enables/disables traction control in any (R)DNA mode via ~~pressing the left stalk button (LDW) for ~2 seconds.~~ center console MENU button and steering wheel cruise control buttons “RES”/toggle. This is an evolving configuration, so may change as development progresses. -This has been tested on my 2018 Giulia Quadrifoglio (late 2017 built). It is untested on 2.0 Giulias. It is unteted on Stelvio. It is untested on vehicles with the Secure Gateway module. +This has been tested on Beaups 2018 Giulia Quadrifoglio (late 2017 built). It is (yet) untested on 2.0 Giulias. It is untested on Stelvio. It is (yet) untested on vehicles with the Secure Gateway module. -You assume all risk for using this. You are interfacing with the stability control systems on an $80,000 car with a $10 computer. It's very possible something could go very wrong...like loss of critical safety functions. Seriously, this code is provided for informational purposes only. You should not use it on an actual car. +You assume all risk for using this. You are interfacing with the stability control systems on a $50,000 car with a $50 computer. It's very possible something could go very wrong...like loss of critical safety functions. Seriously, this code is provided for informational purposes only. You should not use it on an actual car. You will need a few items: -1.) An Arduino Uno
-2.) A CAN-BUS Shield V2 https://www.amazon.com/seeed-studio-CAN-BUS-Shield-V2/dp/B076DSQFXH
-3.) A way to access the CAN-CH bus. This is not the primary can bus. There are various places to access the CAN-CH bus (I'm using a connector in the trunk), but the most convenient place to access is is via pins 12 and 13 at the OBD port. If you've bought an OBD cable set for your Alfa, you will want to use the gray adapter cable. Additionally you will need an OBD->DB9 cable. I purchased this one: https://www.amazon.com/gp/product/B01ETRINYO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
-4.) Power - The canbus shield has an option for you to power the entire setup via the power provided by the OBD port. This seems to work fine for testing, but automotive voltage is a bit higher than optimum for the Arduino. Also, it's possible to drain your car's battery if you choose to power the arduino via OBD port.
+1. An Arduino Uno +2. A CAN-BUS Shield V2 https://www.amazon.com/seeed-studio-CAN-BUS-Shield-V2/dp/B076DSQFXH +3. A way to access the CAN-CH bus. This is not the primary can bus. There are various places to access the CAN-CH bus (I'm using a connector in the trunk), but the most convenient place to access is is via pins 12 and 13 at the OBD port. If you've bought an OBD cable set for your Alfa, you will want to use the gray adapter cable. Additionally you will need an OBD->DB9 cable. I purchased this one: https://www.amazon.com/gp/product/B01ETRINYO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 +4. Power - The canbus shield has an option for you to power the entire setup via the power provided by the OBD port. This seems to work fine for testing, but automotive voltage is a bit higher than optimum for the Arduino. Also, it's possible to drain your car's battery if you choose to power the arduino via OBD port. You'll need the CAN-BUS Shield Library. ***IMPORTANT*** There seems to be a bug in this library, or some implementation issue. As the library ships, setting masks and filters is very hit or miss. I've solved it by adding a small delay (100ms) after the controller switches into config mode via mcp2515_setCANCTRL_Mode(MODE_CONFIG) in both the init_Mask() and init_Filt() functions. If you do not make these two changes, the application is going to be working on a *lot* more packets than it needs to. It could cause the packets we want to be filtered out erroneously. From db245d0678932c89cc95e2ff1c162b1693a87b00 Mon Sep 17 00:00:00 2001 From: Jesse B Date: Wed, 12 Oct 2022 10:57:52 -0500 Subject: [PATCH 3/4] added voltage regulator notes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c641710..571b0f1 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,6 @@ You will need a few items: 1. An Arduino Uno 2. A CAN-BUS Shield V2 https://www.amazon.com/seeed-studio-CAN-BUS-Shield-V2/dp/B076DSQFXH 3. A way to access the CAN-CH bus. This is not the primary can bus. There are various places to access the CAN-CH bus (I'm using a connector in the trunk), but the most convenient place to access is is via pins 12 and 13 at the OBD port. If you've bought an OBD cable set for your Alfa, you will want to use the gray adapter cable. Additionally you will need an OBD->DB9 cable. I purchased this one: https://www.amazon.com/gp/product/B01ETRINYO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 -4. Power - The canbus shield has an option for you to power the entire setup via the power provided by the OBD port. This seems to work fine for testing, but automotive voltage is a bit higher than optimum for the Arduino. Also, it's possible to drain your car's battery if you choose to power the arduino via OBD port. +4. Voltage regulator for a permanent installation - https://smile.amazon.com/gp/product/B07WQJ2GD6/ The canbus shield has an option for you to power the entire setup via the power provided by the OBD port. This seems to work fine for testing, but automotive voltage is a bit higher than optimum for the Arduino. Also, it's possible to drain your car's battery if you choose to power the arduino via OBD port. You'll need the CAN-BUS Shield Library. ***IMPORTANT*** There seems to be a bug in this library, or some implementation issue. As the library ships, setting masks and filters is very hit or miss. I've solved it by adding a small delay (100ms) after the controller switches into config mode via mcp2515_setCANCTRL_Mode(MODE_CONFIG) in both the init_Mask() and init_Filt() functions. If you do not make these two changes, the application is going to be working on a *lot* more packets than it needs to. It could cause the packets we want to be filtered out erroneously. From 4d9ad607c632ee86524add1618f3a7c09676c227 Mon Sep 17 00:00:00 2001 From: Jesse B Date: Thu, 13 Oct 2022 14:05:36 -0500 Subject: [PATCH 4/4] nice-iffied some of the var names --- ESCaped.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ESCaped.ino b/ESCaped.ino index 60b6514..6f0e1c5 100644 --- a/ESCaped.ino +++ b/ESCaped.ino @@ -16,8 +16,8 @@ //DNA Mode definitions #define DNA_RACE 0x31 #define DNA_DYNAMIC 0x9 -#define DNA_NEUTERED 0x1//might have swapped with A mode -#define DNA_AWFUL 0x11//might have swapped with N mode +#define DNA_NATURAL 0x1//might have swapped with A mode +#define DNA_ADVANCEDEFFICIENCY 0x11//might have swapped with N mode #define SPI_CS_CAN 9 @@ -60,7 +60,7 @@ void setup() } void handle_tcesc_control() { - if(tcesc_buf[1] != DNA_NEUTERED && tcesc_buf[1] != DNA_DYNAMIC && tcesc_buf[1] != DNA_AWFUL && tcesc_buf[1] != DNA_RACE) + if(tcesc_buf[1] != DNA_NATURAL && tcesc_buf[1] != DNA_DYNAMIC && tcesc_buf[1] != DNA_ADVANCEDEFFICIENCY && tcesc_buf[1] != DNA_RACE) return;//sanity check, don't want to send random shit to module if buffer corrupt/incorrect if(tc_disable && tcesc_buf[1] != DNA_RACE) tcesc_buf[1] = DNA_RACE;//TCESC disable from Giulia QV in race mode