2013 haltech AC fix DIY - Page 2 - Hyundai Genesis Forum
 12Likes
Reply
 
LinkBack Thread Tools
post #21 of 72 Old 08-31-2015 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

go crazy a do a testing harness lol

i had my first harness so i cut it in half and did some testing with it lol...not neccessary for only one



glue everything in the case..or use some tape and make sure no part will touch




now time to program the chip

download arduino software here

https://www.arduino.cc/en/Main/Software

install it

download library for the board download the zip file

https://github.com/reeedstudio/CAN_BUS_Shield

extract and insert into the arduino library folder

document/arduino/librairies and
document/arduino/arduino/librairies

you only need one but i gorgot wich one ...doh


in tools select
board:arduino leonardo
com: select the right one
and com


here is the program

/************************************************** *************************
Sebastien Moreau at [email protected]

used

Hobbytronics Leonardo CAN-BUS board

Receive Test Data and set filters on ID
Send output data via serial port

Leonardo CAN BUS product page Leonardo CAN BUS board | L-CANBUS | HobbyTronics

Hobbytronics.co.uk

For mcp_can use this library https://github.com/reeedstudio/CAN_BUS_Shield
download the ZIP at the right of the screen
and insert what IN the zip folder into the library
rebbot arduino software
************************************************** **************************/
#include <mcp_can.h>
#include <mcp_can_dfs.h>
#include <SPI.h>

unsigned int rxId;
unsigned char rxLen = 0;
unsigned char rxBuf[8];
volatile unsigned char canData = 0;
int AcReq = LOW;
int AcInputValue = LOW;
int Pulse=0;
int AcMem = LOW;
long CommCheck1 = 0; //check if communication is working if not do a reset
long CommCheck2 = 0;
MCP_CAN CAN0(17); // Set CS to pin 17



void setup() {
// put your setup code here, to run once:

delay (250); // wait a bit
Serial.begin(9600);
CAN0.begin(CAN_500KBPS); // init can bus : baudrate = 500k
attachInterrupt(4, can_receive, FALLING); // Pin D7 is Interrupt4 on Leonardo

pinMode(6, OUTPUT); // AC request status to send to haltech
pinMode(8, INPUT_PULLUP); // AC status input to read haltech AC confirmation
pinMode(9, OUTPUT); // Variable output for AC solenoid
analogWrite(9,0);// AC solenoid to 0V
pinMode(23, OUTPUT); // Led output activation mimic AC request


delay (250); //wait a bit
// ************************************************** *******
// Basic Filtering on ID
// ************************************************** *******
// Bytes 1 and 2 of mask/filter apply to ID
// So the Mask and filter below will only allow ID 0x350 through
// ---- ID -----
CAN0.init_Mask(0, 0, 0xFFFF); // 1111 1111 1111 1111
CAN0.init_Filt(0, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(1, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Mask(1, 0, 0xFFFF); // 1111 1111 1111 1111
CAN0.init_Filt(2, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(3, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(4, 0, 0x0350); // 0000 0011 0101 0000 - ACCEPT
CAN0.init_Filt(5, 0, 0x0001); // 0000 0000 0000 0001 - FAIL



}

void loop() {
// put your main code here, to run repeatedly:


//*****************Check if comm is operational if not do a reset***************************

++CommCheck1; //increase loop counter and check for comm fault if no comm then reset comm port

if (CommCheck1 == 200000) {
CommCheck1 = 0 ;

//if we didn't receive any message reset the port

if (CommCheck2 == 0) {
CAN0.begin(CAN_500KBPS); // reset comm port
attachInterrupt(4, can_receive, FALLING); // Pin D7 is Interrupt4 on Leonardo

// ************************************************** *******
// Basic Filtering on ID
// ************************************************** *******
// Bytes 1 and 2 of mask/filter apply to ID
// So the Mask and filter below will only allow ID 0x350 through
// ---- ID -----
CAN0.init_Mask(0, 0, 0xFFFF); // 1111 1111 1111 1111
CAN0.init_Filt(0, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(1, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Mask(1, 0, 0xFFFF); // 1111 1111 1111 1111
CAN0.init_Filt(2, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(3, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(4, 0, 0x0350); // 0000 0011 0101 0000 - ACCEPT
CAN0.init_Filt(5, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
Serial.println("Had to reset comm port, no communication!!");
}

//if we received to many message ...the filter didn't work...reset the port
else if (CommCheck2 > 1000) {

CAN0.begin(CAN_500KBPS); // reset comm port
attachInterrupt(4, can_receive, FALLING); // Pin D7 is Interrupt4 on Leonardo

// ************************************************** *******
// Basic Filtering on ID
// ************************************************** *******
// Bytes 1 and 2 of mask/filter apply to ID
// So the Mask and filter below will only allow ID 0x350 through
// ---- ID -----
CAN0.init_Mask(0, 0, 0xFFFF); // 1111 1111 1111 1111
CAN0.init_Filt(0, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(1, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Mask(1, 0, 0xFFFF); // 1111 1111 1111 1111
CAN0.init_Filt(2, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(3, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
CAN0.init_Filt(4, 0, 0x0350); // 0000 0011 0101 0000 - ACCEPT
CAN0.init_Filt(5, 0, 0x0001); // 0000 0000 0000 0001 - FAIL
Serial.print("Had to reset comm port, filter didn't work : ");Serial.println(CommCheck2);
CommCheck2 = 0 ;
}

//
else {
Serial.print("Comm port is OK received X amount of data: "); Serial.println(CommCheck2);
CommCheck2 = 0 ;
}
}
//*************************End of comm check*****************************************


//************************If data is received treat it********************************

if(canData)
{
canData=0;
++CommCheck2; // increase if data is receive
CAN0.readMsgBuf(&rxLen, rxBuf); // Read data: len = data length, buf = data byte(s)
rxId = CAN0.getCanId(); // Get message ID
/**
Serial.print("ID: ");
Serial.print(rxId, HEX);
Serial.print(" Data: ");
for(int i = 0; i < rxLen; i++) // Print each byte of the data
{
if(rxBuf[i] < 0x10) // If data byte is less than 0x10, add a leading zero
{
Serial.print("0");
}
Serial.print(rxBuf[i], HEX);
Serial.print(" ");
}
Serial.println();
**/
//Evaluate AC request status ON or OFF

switch (rxBuf[1]) {
case 0x10:
AcReq = LOW;
break;
case 0x18:
AcReq = LOW;
break;
case 0x58:
AcReq = LOW;
break;
case 0x1B:
AcReq = HIGH;
break;
case 0x5B:
AcReq = HIGH;
break;
}

if (AcReq != AcMem) {
AcMem = AcReq;
Serial.print("AC demand from car 0 NO, 1 YES: ");Serial.println(AcReq);
}
digitalWrite(6, AcReq);
digitalWrite(23, AcReq);

} // end if

//************************END of received data treatment***********************

//************* Read Haltech output and put AC ON or OFF accordingly************************
//*** max pulse is at 200 that give around 10V that is what i have seen on stock system***

if (AcInputValue != digitalRead(8)) {
AcInputValue = digitalRead(8);
Serial.print("AC confirmation from haltech 0 GO, 1 take a brake: ");Serial.println(AcInputValue);

if (AcInputValue == HIGH) {
for (Pulse=200 ; Pulse >=0; Pulse--){
analogWrite(9,Pulse);
delay (3);
}

}
else {
for (Pulse=0 ; Pulse <=200; Pulse++){
analogWrite(9,Pulse);
delay (10);
}
}
}

//************End of input and AC driving******************************************* ***


}

void can_receive()
{
// CAN Receive Interrupt
canData = 1;
}


upload it to the device...click the arrow saying upload


do a quick check

and open the serial monitor window

tool / serial monitor

you will only see that there is no comm and port is reset

this is a normal exemple when connected to car





uncheck factory a/c input and program DPI1 as follow



and programs DSO1 as follow

genspec13 is offline  
Sponsored Links
Advertisement
 
post #22 of 72 Old 08-31-2015 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

air con setting
i just used stock setting
some need pulsed output but i hated the idle so i remove it

genspec13 is offline  
post #23 of 72 Old 09-16-2015
Member
 
Join Date: Nov 2013
Posts: 95
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)

Great Stuff!!!
JDAMONSTA is offline  
 
post #24 of 72 Old 09-17-2015
Junior Member
 
Jonnmad's Avatar
 
Join Date: Jun 2014
Location: CR
Posts: 26
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 6 Post(s)

Genius!!!

2014 Genesis 2.0T MT
SFR Stage 1.5
ISIS O2 Housing
ISIS DOWNPIPE
Magnaflow 3" Catback
K&N Intake
Torque Solutios Throttle Spacer
HKS SSQV
AEM Methanol Kit
StopTech BBk 6p 14"
Amsoil Oil Engine
Redline Oil Gearbox
DiodeDinamics HID

296whp 340lb-tq without Meth

Comming soon: Rear Brembo brakes, Rad and oilcooler
Jonnmad is offline  
post #25 of 72 Old 09-18-2015
Senior Member
 
RedGen13's Avatar
 
Join Date: Jul 2012
Location: Minnesota
Posts: 989
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 147 Post(s)
Garage




Way to go, would it make more sense to put the code into a file and have it hosted somewhere too so you don't have to copy an past off of the thread? Appreciate all of the hard work on this and then giving it to the community for free!

'13 2.0T R-Spec
  • BTR Stage 3 GTX3076 @ 24psi
  • MXP exhaust manifold
  • 3" Custom turbo back
  • Synapse BOV
  • Injen Intake
  • BK1 Intake Manifold
  • 4.18 final drive w/ LSD
  • Snow Performance Stage 2 meth kit
  • Slotted and dimpled rotors
  • Prosport EVO (Boost, Wideband, Oil temp) gauges
  • Wing Badges
  • CF "functional" hood vents
  • Tablet install w/ custom LCD relocation

Made 319whp/356wtq on BTR Stage 2; (Not dyno'd with GTX3076 turbo yet)

'99 Eclipse Fully Built
RedGen13 is online now  
post #26 of 72 Old 09-18-2015 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

yeah tough of that too, just wasn't sure where to host it

and was thinking if it's in text...that will ensure that the program is not lost because of a broken link or something
genspec13 is offline  
post #27 of 72 Old 09-19-2015
Clutch Burner
 
huntken's Avatar
 
Join Date: Jul 2013
Location: Ohio
Posts: 766
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
Quoted: 187 Post(s)

Quote:
Originally Posted by genspec13 View Post
yeah tough of that too, just wasn't sure where to host it

and was thinking if it's in text...that will ensure that the program is not lost because of a broken link or something
Github
huntken is offline  
post #28 of 72 Old 11-07-2015 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

i just did a different version for a swap using the triples gages connector he just needed the AC demand signal








Youtube video

https://youtu.be/7NgsFnjnUFE
darkvader0 likes this.

Last edited by genspec13; 11-07-2015 at 06:11 PM.
genspec13 is offline  
post #29 of 72 Old 01-04-2016
Zac
Junior Member
 
Join Date: Feb 2014
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)

Where did you get the triple gauge connector?
Zac is offline  
post #30 of 72 Old 01-04-2016 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

mouser or element 14 i forgot

you also need the pin for it


i may still have the part number somewhere if you need it
genspec13 is offline  
post #31 of 72 Old 01-04-2016 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

i`m not 100% sure

look like these

1473793-1 TE Connectivity | Mouser

1376109-1 TE Connectivity / AMP | Mouser

i you need it for yourself i can recheck to confirm the number
genspec13 is offline  
post #32 of 72 Old 01-05-2016
Senior Member
 
Drakkcoil's Avatar
 
Join Date: May 2012
Location: Brantford, Ontario
Posts: 480
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)

Awesome work so far man. I've been dying without A/C...

2013 BB 2.0T Premium M6
PTE 6152 56-trim | PRW Cast T3 Top Mount Manifold | TiAL 38mm Wastegate | DeatschWerks 1000cc Injectors | DeatschWerks DW200 255lph FP | FabZilla SRI | FabZilla Custom Catless O2 Housing |
WeirTech CBE | Synapse BOV | FabZilla ICP | RTM 3x12x30" FMIC | Eibach Pro-Kit | AEM Digital Boost, WB AFR & Oil Pressure | ATQ Short Shifter | OEM LSD | Haltech Tuned by APH | AEM Electronic Boost Controller @ 30psi


425whp, 351tq
Drakkcoil is offline  
post #33 of 72 Old 01-05-2016 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

If i could find the AC compressor connector it would be way more easy

it would prevent from building the 40 pin extension
genspec13 is offline  
post #34 of 72 Old 01-05-2016
Zac
Junior Member
 
Join Date: Feb 2014
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)

Quote:
Originally Posted by genspec13 View Post
i`m not 100% sure

look like these

1473793-1 TE Connectivity | Mouser

1376109-1 TE Connectivity / AMP | Mouser

i you need it for yourself i can recheck to confirm the number
I need the correct part number this is for a slightly different project working with ac.
Zac is offline  
post #35 of 72 Old 01-05-2016 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

yep i verified, these are the right part to hook in the car side of the triple gage

what kind of project if i can ask ??
genspec13 is offline  
post #36 of 72 Old 01-05-2016
Zac
Junior Member
 
Join Date: Feb 2014
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)

Quote:
Originally Posted by genspec13 View Post
yep i verified, these are the right part to hook in the car side of the triple gage

what kind of project if i can ask ??
I'm doing a blue screen delete. I am using an aurdino to send the ac information to a tablet that I'm putting in place of the blue screen.

Do you know the connector the blue screen uses? I have been trying to find out but I haven't been having any luck
Zac is offline  
post #37 of 72 Old 01-05-2016
Zac
Junior Member
 
Join Date: Feb 2014
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)
Zac is offline  
post #38 of 72 Old 01-05-2016 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

why do you need the connector if you remove the gage ...

...

i just checked ... gage and blue screen are not on the same can bus ....probably why

it's a KET connector KET_090III_10F_W if i look into the gds

KET and AMP number seem to be equal 090 III for type and 10f for pin and gender

936092-1 TE Connectivity | Mouser

check the spec the initial image on the page is not good

936129-1 TE Connectivity | Mouser
genspec13 is offline  
post #39 of 72 Old 01-05-2016
Zac
Junior Member
 
Join Date: Feb 2014
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)

Quote:
Originally Posted by genspec13 View Post
why do you need the connector if you remove the gage ...

...

i just checked ... gage and blue screen are not on the same can bus ....probably why

it's a KET connector KET_090III_10F_W if i look into the gds

KET and AMP number seem to be equal 090 III for type and 10f for pin and gender

936092-1 TE Connectivity | Mouser

check the spec the initial image on the page is not good

936129-1 TE Connectivity | Mouser

I don't use the stock gauges and need the CAN L and CAN H hookup.

I have one of these:
https://canb.us/

I am taking some of the data from the low speed can bus and all of the data on the high speed can bus and sending it as an output on the third channel which I have one of those OBD2 Bluetooth devices listening on. The tablet communicates with the OBD2 Bluetooth device showing current AC Settings. I needed the other connector because it has the low speed can bus on it. Now that you have provided this information I can make it plug and play without cutting any wires

I'm not an expert at this but so far everything seems to work.
Zac is offline  
post #40 of 72 Old 01-05-2016 Thread Starter
Senior Member
 
Join Date: Sep 2012
Posts: 1,017
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 137 Post(s)
(Thread Starter)

Each time i check they are always out of stock lol

i was thinking of using this at first with the haltech...

cut the can to bus to AC and put the device in the middle...and just change the adress that need to be change to start ac....

maybe one day...
genspec13 is offline  
Sponsored Links
Advertisement
 
Reply

Related Threads
Thread Thread Starter Forum Replies Last Post
DIY: Fix Your Curb Rash CaptainSlow Suspension and Wheels 71 07-24-2016 09:51 PM
DIY: Rear deck rattle fix! tapan Interior 31 02-02-2016 11:40 AM
DIY permanent fix for sunroof rattle Havoc2011 Exterior 40 08-07-2012 05:49 AM
DIY TPMS light fix Hudnut Interior 2008-2012 14 12-14-2009 08:10 AM


Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the Hyundai Genesis Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome