
Everything posted by Me78569
-
Suprise guest to the BBQ
wow haha awesome guest, bet he didn't even bring beer.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
Alright here is what I have and it working pretty dang good for reading the boost and exhaust. It creates an array of reads from the sensors then replaces the oldest with the newest read to create a rolling average of boost and drive pressure. Readings are VERY stable now. int ReadBoostPressure(){ //Works good but seems to be slower. Bsttotal = Bsttotal - Bstreadings[Bstindex]; // subtract the last reading: Bstreadings[Bstindex] = analogRead(BoostPressurePin); // read from the sensor: Bsttotal= Bsttotal + Bstreadings[Bstindex]; // add the reading to the total: Bstindex = Bstindex + 1; // advance to the next position in the array: if (Bstindex >= BstnumReadings) // if we're at the end of the array... Bstindex = 0; // ...wrap around to the beginning: Bstaverage = Bsttotal / BstnumReadings; // calculate the average: return map( Bstaverage, 83, 920, 0, 100); // Last two values are the psi range of the chosen sensor delay(1); // delay in between reads for stability } int ReadExhaustPressure(){ //Works good but seems to be slower. Exttotal = Exttotal - Extreadings[Extindex]; // subtract the last reading: Extreadings[Extindex] = analogRead(ExhaustPressurePin); // read from the sensor: Exttotal = Exttotal + Extreadings[Extindex]; // add the reading to the total: Extindex = Extindex + 1; // advance to the next position in the array: if (Extindex >= ExtnumReadings) // if we're at the end of the array... Extindex = 0; // ...wrap around to the beginning: Extaverage = Exttotal / ExtnumReadings; // calculate the average: return map( Extaverage, 83, 920, 0, 100); // Last two values are the psi range of the chosen sensor delay(1); // delay in between reads for stability } There is some new stuff in the main and setup that you can see in the first post. It reads values a little slower and seems to be a little more slugglish, but I don't think it is enough to matter.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
I will throw that in and test along with the others I have written today haha. I also have one method written to add to an array and average on the fly. not sure what I will like better.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
5 in the same call. I took that code from a example and modded it some.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
Thanks for the insight. Well the array didn't seem to work too well haha. It set the exhaust to 114psi at idle. Dunno why, looking again.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
My sloppy attempt at creating an array and using it to average the exhaust reading. i'll test this in the am. It should work a little better.....I think haha. int ReadExhaustPressure(){ const int numReadings = 5; // number of reads to do. int readings[numReadings]; // the readings from the analog input int index = 0; // the index of the current reading int total = 0; // the running total int average = 0; // the average int BoostReference = constrain((BoostPressure + 1), 83, 920); for (int thisReading = 0; thisReading < numReadings; thisReading++) readings[thisReading] = 0; total= total - readings[index]; readings[index] = analogRead(constrain(ExhaustPressurePin, BoostReference, (BoostReference *3))); // read from the sensor: Constrains Value to between boost //value and boost value times 3 D:B should never be more than 3:1 total = total + readings[index]; // add the reading to the total: index = index + 1; // advance to the next position in the array: if (index >= numReadings) // if we're at the end of the array... index = 0; // ...wrap around to the beginning: // calculate the average: average = total / numReadings; delay(1); return map( average, 83, 920, 0, 100); // Last two values are the psi range of the chosen sensor }
-
Drop in injectors
I'll have to post up a picture of my new gauge setup for controlling the he351ve. Pretty nifty, and it sits perfectly in a "new" crack in my dash. Oh and it is %100 programmable
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
I am using 1ms as my analog delay. I am going to define a boostreference variable and have that = to boost constrain( 83, 920) yada yada yada. So then I can reference the boostrefrence as the lower constrant to the averaging of the analog read. driving around it works pretty dang good, couple of stray readings but not bad at all. I am a bit worried about the dpmanage function that will adjust vein position after 30 psi of boost. I dunno if the drive pressure will be stable enough to rely on. int ReadExhaustPressure(){ int BoostReference = constrain((BoostPressure + 5), 83, 920); int tmp = analogRead( ExhaustPressurePin ); tmp = constrain(tmp, BoostReference, 920); delay(analogDelay); int tmp1 = analogRead( ExhaustPressurePin ); tmp1 = constrain(tmp1, BoostReference, 920); delay(analogDelay); int tmp2 = analogRead( ExhaustPressurePin ); tmp2 = constrain(tmp2, BoostReference, 920); delay(analogDelay); int tmp3 = analogRead( ExhaustPressurePin ); tmp3 = constrain(tmp3, BoostReference, 920); delay(analogDelay); int tmp4 = analogRead( ExhaustPressurePin ); tmp4 = constrain(tmp3, BoostReference, 920); int ExhaustVal = ((tmp + tmp1 + tmp2 + tmp3 + tmp4) / 5); return map( ExhaustVal, 83, 920, 0, 100); // Last two values are the psi range of the chosen sensor } Is there any perk to using the tmp += vs assigning multiple variables? It is easier for me to read like I did it haha, My coding mind isn't that creative. I do have a question in regards to the constrain function, been trying to read up on it but I cannot find an answer. So I know constrain makes the variable at hand stay between a and b. However if a reading lower than a comes in does the code disregard it or simply assign it to a? IE if I have tmp1 = constrain(tmp1, 83, 920); and a value for tmp1 of 40 is read does it just bump that 40 value to 83 or does it disregard it?
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
After hak guy dude helped me on CF I am now reading the exhaust sensor 5 times and averaging. //Read Sensors //Define the sensor type and range. (Namefromabove, 0v, 5v, 0v=minpos,5v=maxposition) int ReadPotentiometer(){ int tmp = analogRead( PotentiometerPin ); delay(analogDelay); int PotVal = (tmp + analogRead( PotentiometerPin )) / 2; return map(PotVal, 0, 1023, 0, 970); // read the value from the sensor } int ReadBoostPressure(){ int tmp = analogRead( BoostPressurePin ); delay(analogDelay); int BoostVal = (tmp + analogRead( BoostPressurePin )) / 2; BoostVal = constrain(BoostVal, 83, 920); // read the value from the sensor return map( BoostVal, 83, 920, 0, 100); // Last two values are the psi range of the choosen sensor } int ReadExhaustPressure(){ int tmp = analogRead( ExhaustPressurePin ); tmp = constrain(tmp, BoostPressurePin, 920); delay(analogDelay); int tmp1 = analogRead( ExhaustPressurePin ); tmp1 = constrain(tmp1, BoostPressurePin, 920); delay(analogDelay); int tmp2 = analogRead( ExhaustPressurePin ); tmp2 = constrain(tmp2, BoostPressurePin, 920); delay(analogDelay); int tmp3 = analogRead( ExhaustPressurePin ); tmp3 = constrain(tmp3, BoostPressurePin, 920); delay(analogDelay); int tmp4 = analogRead( ExhaustPressurePin ); tmp4 = constrain(tmp3, BoostPressurePin, 920); int ExhaustVal = ((tmp + tmp1 + tmp2 + tmp3 + tmp4) / 5) + 1; return map( ExhaustVal, 83, 920, 0, 100); // Last two values are the psi range of the chosen sensor } int ReadThrottlePosition(){ int tmp = analogRead( ThrottlePositionPin ); delay(analogDelay); int ThrottleVal = (tmp + analogRead( ThrottlePositionPin )) / 2; return map ( ThrottleVal, 103, 920, 0, 100); // read the value from the sensor }
-
Drop in injectors
I once I get my code sorted I could tell you where the hx35 starts to choke for me. guessing looking at EGTS it is right around 34ish psi ( I live at 7000')
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
I am thinking that might be the case. Not sure if some sort of needle valve will help, or not. My concern is that the spikes in the drive pressure will cause the turbo to jump alot once boost goes over 30psi ( where the program is set to manage veins by drive not boost) Guess I could try and filter out readings that outside of the typical 2:1 ratio. since drive pressure can never been less than boost and should be no more than double boost, I should be able to contain the reading? Can I use a variable to constran the drive reading, rather than the typical 0-1023? int ReadBoostPressure(){ int BoostVal = analogRead( BoostPressurePin ); BoostVal = constrain(BoostVal, 83, 920); // read the value from the sensor return map( BoostVal, 83, 920, 0, 100); // Last two values are the psi range of the choosen sensor } int ReadExhaustPressure(){ int BtoDlimit = (BoostPressurePin * 3); int ExhaustVal = analogRead( ExhaustPressurePin ); // read the value from the sensor if (SwitchPosition != HIGH && ThrottlePosition < 30){ //If I am using the pot I want to see drive ExhaustVal = constrain(ExhaustVal, 83, 920); return map( ExhaustVal, 83, 920, 0, 100); // Last two values are the psi range of the choosen senso } else{ ExhaustVal = constrain(ExhaustVal, BoostPressurePin, BtoDlimit); return map( ExhaustVal, 83, 920, 0, 100); } } Thoughts?
-
Teardown and Rebuild
Wouldn't rotating them give you better tread life? Kidding of course.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
Well after a few days of driving with the sensors connected I can say that the boost sensor reads VERY steady, however the drive pressure bounces a lot. I am not sure if this is due to wiring, sensor, or maybe a leak in the exhaust copper line.
-
Teardown and Rebuild
whats the rotation method for pistons? Middle rotated to outside?
-
Drop in injectors
If you have a stock tranny don't add power. You needs a Valvebody and Torque converter at a min. Ditch the K&N, use a BHAF or any other none oiled filter.
-
Teardown and Rebuild
If you wanna borrow my vp44 we can do that.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
Alright first post is updated with current code. LCD refresh rate has been increased from 200 to 400 ( assuming millis) constrans have also been added to keep the boost and driver readings positive. Thinking about adding a MAX value to the drive and boost to show the max hit, but I am unsure if that is needed. I suppose it would be nice so I might mess with it some.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
Well I have gotten the arduino mounted in the cab with the sensors installed. Turbo is still on my bench waiting for the t3 to he351ve adapter. I am going to have to make some changes to the lcd display and only update the display every half second or so to try and keep the values readable.
-
HELLO FROM PA.
Nice to see your face man. Good to talk with you today.
-
Big R did it again, i'm broke
Only thing I was growing was sand. Ya know I am in Colorado, Green grass and high times? Wait no.
-
Big R did it again, i'm broke
Went to Big-R to get some chicken feed.......... I walked out with enough grass seed for a yard 5 times bigger than mine and a new garden tiller I will not fail at growing grass this year.
-
Stay away from doctors?
unless something has been cut off I don't see the doc. I haven't been in the last 7 years. ( they had to stitch my thumb back on lol ) and many years before. I like to beleive that my immune system is rivaled only by Genghis Khan's great army
-
HELLO FROM PA.
Humm I will revise. I'd still use a hosting services
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
Bad ground in my sensor connection harness.
-
He351ve stand alone Arduino controller code for 2nd Gen Cummins
got ya. I'll hopefully spend sometime tonight looking at it tonight and make sure my wiring is good.