:::RHMT::: Real Home Made Turbo

General Category => Forced Induction => Topic started by: nock on January 07, 2010, 07:19:58 PM

Title: holset he351 knows were its at
Post by: nock on January 07, 2010, 07:19:58 PM
since i ordered all the parts the other day, and i got nothing but time right now, i guess this is my project.

i started screwing around with this the other night. i was able to track and decode all 30 steps per rev. i had it printing position data, but serial.print takes way to long for it to keep track. so i just made it turn on a led at position (Z=0).

 (http://www.youtube.com/watch?v=TM3XJFpT79Q#normal)

the vgt takes about 9 motor revolutions from full closed to full open, the motor can decode 30 steps/rev (10 pole armature, multiplied by three halsensors) so that would be 270 steps. im guessing the whole control word in the original delphi controller is an 8-bit (256) integer.

i've got all the brushless motor driver crap coming from digikey, it should be here this week. now that i've have it positioning, most of the PIDservo code has been written by others. if nothing crazy happens (like me getting a job) it should come together pretty fast.

when its done i'll roll the code into a nice vgt library for the arduino. the library should make it even easier for others to create there own vgt control systems. for right now i plan on making it read PWM from the megasquirt boost controller.
Title: Re: holset he351 knows were its at
Post by: danz on January 07, 2010, 08:28:56 PM
you are smart?     .



hm ???
Title: Re: holset he351 knows were its at
Post by: Robb on January 07, 2010, 08:34:40 PM
you are smart?     .



hm ???

Didnt see that coming. 


However, it was cool until I saw "megasquirt"
Title: Re: holset he351 knows were its at
Post by: Joseph Davis on January 07, 2010, 11:01:17 PM
you are smart?     .



hm ???

Didnt see that coming. 


However, it was cool until I saw "megasquirt"

MS2 is supposed to be alright, but I know what you mean... overexcited MS fags can ruin anything.
Title: Re: holset he351 knows were its at
Post by: nock on January 08, 2010, 03:50:44 AM
MS2 is supposed to be alright, but I know what you mean... overexcited MS fags can ruin anything.

megasquirt big cheap-cheap smok-em-lota DB37 plug...

im using megasquirt because its what i know, its just easier. it has a boost controller with a PWM table. so tps vertically, rpm horizontally, and the table itself is filled with pwm%.

all the megasquirt is really doing is giving the turbo a signal that is tps vs engine rpm. this could be done by any ecu with that capability. its not even acting as a boost controller its just a way to tune how the turbo responds to the engine.

boost control itself could be handled by turbo shaft rpm. because compressor pressure ratio is a function of compressor rpm, regulating rpm should regulate the pressure, and keep the turbo from overspeed and exploding. so in the table you'll have tps vs rpm, the cells will represent turbo shaft rpm. so 100% is max rpm (boost) and 0% is no boost (basically whatever rpm that compressor p/p equals one). a nice benefit of doing things this way is that the vgt will seek the largest A/R possible to maintain the desired shaft rpm, this way you will always have the biggest turbine side possible. fuck yea  ;D

or you could just make it control vgt position in % and use an external waste gate. i think i'll try this first because its safer and you could play around with how it responds between shifts.

or you could have it control boost from a map sensor on the arduino board itself. this way is nice to because you can still play with shift points and it simple and cheap, no external waste gate, and you can adjust boost with nothing more than a setscrew.

or you could just hook it up to pwm on an ordinary boost controller. im not sure how this would work, and you would still need tps somewhere to make sure it dosnt try to boost at idle.

also, as if this broke dick ghetto turbo kit wasnt cheap enough already, since the boost controller table has TPS on it, you could tell it to go to max A/R when the TPS is below say 25% and run without a blow-off valve :o  i have no idea if this would actually work or not, it may end up being what some people consider an acceptable amount of surge, it may not work at all, i dont know. such a system would also require a compressed air tank and solenoid valve hooked to the tps, without this the driver would become disoriented by the lack of blow off sounds and probably crash. 

there is no reason it could not be made to work with any boost controller or ecu, so long as you could put two sensors in a table with PWM output, you could also go stand alone and write an interface that used its own TPS, MAP, and RPM sensors. or like i think will happen, because arduino is so easy to use, people will write there own control structures that work better then mine anyway.
Title: Re: holset he351 knows were its at
Post by: Gold DA9 on January 08, 2010, 10:17:58 PM
just wow. i wish i never changed my major from engineering
Title: Re: holset he351 knows were its at
Post by: SloS13 on January 09, 2010, 12:44:56 AM
I've got an arduino sitting right here next to me.  Gotta get off my ass and mess with it some more.  P.S. that video had me glued to my seat.  I was waiting for the exorcist girl to flash on the screen. 

A VGT library would be pimp. 

For non-standalone users, one could get the arduino to take in voltage from the MAP and some type of device that converts the RPM into a voltage (or maybe the arduino itself could read the RPM viaa signal from the ECU?) and you could hook up an LCD and some buttons and put some menus in there to set your values up or read them a .CSV from an SD card....or something.    That'd be cool....so get on that STAT.
Title: Re: holset he351 knows were its at
Post by: nock on January 10, 2010, 03:25:27 AM
i think it could be used stand alone with just a low RPM cutoff, say 3000rpm or something you know it wont choke at. a map would give you more control over how it reacts, but having something that just throws the VGT wide open below RPM (X) would work to. all you would really need then is a way to make a single curve for the TPS.

right now, i thinking of this thing like an engine with two throttle bodies, one has regular atmosphere on it, the other has boost on it. the TPS curve just tells the boosted throttle body (VGT) how to move in relation to what the driver wants.

got my digikey order in yesterday. im having some trouble making the interrupts work, i think the arduino interrupt handler itself may be eating up to many clock cycles. i was going to test this out but i thought my o-scope took a dump on me, turns out it was just a bad power cord  :P. i'll hook up the generator and o-scope and play around with timing more tomorrow.


since you have an arduino, if you want to play around with it here is the code i used it the video. i hope it dosnt show how much i think in assembler all the time.

Code: [Select]
   const int hallAPin = 2;
   const int hallBPin = 3;
   const int hallCPin = 4;
   const int LedPin = 13;
   
   int Z = 0; //posistion
   int N = 1; //hall word
   int lastN = 1; //last hall word
   int HallA = 0;
   int HallB = 0;
   int HallC = 0;

    void setup(){
        pinMode (hallAPin, INPUT);
        pinMode (hallBPin, INPUT);
        pinMode (hallCPin, INPUT);
        pinMode (LedPin, OUTPUT);
        Serial.begin (9600);   
 
    }
    void loop(){
     
      HallA = digitalRead(hallAPin); //read hall sensors A, B, and C
      HallB = digitalRead(hallBPin);
      HallC = digitalRead(hallCPin);
     
      if ((HallA == HIGH) && (HallB == LOW) && (HallC == HIGH)) {N = 1;} else {lastN = N;} //hall word = 1
          if ((lastN == 6) && (N == 1)) {Z = Z + 1;}
          if ((lastN == 2) && (N == 1)) {Z = Z - 1;}
 
      if ((HallA == HIGH) && (HallB == LOW) && (HallC == LOW)) {N = 2;} else {lastN = N;} //hall word = 2
          if ((lastN == 1) && (N == 2)) {Z = Z + 1;}
          if ((lastN == 3) && (N == 2)) {Z = Z - 1;}
 
      if ((HallA == HIGH) && (HallB == HIGH) && (HallC == LOW)) {N = 3;} else {lastN = N;} //hall word = 3
          if ((lastN == 2) && (N == 3)) {Z = Z + 1;}
          if ((lastN == 4) && (N == 3)) {Z = Z - 1;}
 
      if ((HallA == LOW) && (HallB == HIGH) && (HallC == LOW)) {N = 4;} else {lastN = N;} //hall word = 4
          if ((lastN == 3) && (N == 4)) {Z = Z + 1;}
          if ((lastN == 5) && (N == 4)) {Z = Z - 1;}
 
      if ((HallA == LOW) && (HallB == HIGH) && (HallC == HIGH)) {N = 5;} else {lastN = N;} //hall word = 5
          if ((lastN == 4) && (N == 5)) {Z = Z + 1;}
          if ((lastN == 6) && (N == 5)) {Z = Z - 1;}
 
      if ((HallA == LOW) && (HallB == LOW) && (HallC == HIGH)) {N = 6;} else {lastN = N;} //hall word = 6
          if ((lastN == 5) && (N == 6)) {Z = Z + 1;}
          if ((lastN == 1) && (N == 6)) {Z = Z - 1;}
 
     if (Z == 0) {digitalWrite (LedPin, HIGH);} else {digitalWrite (LedPin, LOW);} //turn on LedPin when Z = 0
       
        //Serial.println (Z); //uncomment for debug
        //Serial.println (N); //uncomment for debug
        //Serial.println (lastN); //uncomment for debug
    }

some time soon i should have the interrupt routine figured out and i can start working on something besides tracking position.
Title: Re: holset he351 knows were its at
Post by: HiProfile on January 10, 2010, 06:59:05 PM
MS2 is supposed to be alright, but I know what you mean... overexcited MS fags can ruin anything.
boost control itself could be handled by turbo shaft rpm.

Please don't take away fully from what you've done here and assume a gasoline engine can do that. Even with that large turbo on a D16, you will still get run-a-way boost with an >20cm housing fully open. And since it's a ~65 lb/min compressor designed with high boost in mind, it will make a lot more than you think. If you really want to assume that, at least put a 35mm on whatever you're doing.


Anyways, it would be nice to see if it could take a trigger input (switch to full 12v or ground) and open the VGT at a pre-determined rate. That would really open your market if you decide to sell them. A simple hobbs switch keeping it closed til half your boost would be tits for everyone else.
Title: Re: holset he351 knows were its at
Post by: nock on January 11, 2010, 04:49:29 PM
i have thought allot about how this would all work, the only thing i can come up with is, i dont know what the fuck im doing with regard to engine controls. thats why im using arduino so that anyone can change it to do what they need it to do. my main goal here is to make the hardware and software (a C library) that will alow anyone to move the VGT around and read turbo RPM. i would also like to write some control code that would alow anyone to install the thing and run it easily, what form that system would take is the big question here.

if you think about it as the WG opens the VGT will just close to compensate for the drop in turbo RPM. the WG would have to be set to a pressure that is above the max turbo RPM (TmaxRPM) if the VGT is not wide open before the WG opens, the whole system may oscillate.

im sure it can control boost on its own, how well is the question. the frist time its tested we will just watch the VGT, if its opens all the way, we'll know it needs a waste gate.
Title: Re: holset he351 knows were its at
Post by: onlyflash944 on January 11, 2010, 04:56:33 PM
all this shit is cool, and way over my head


how would you integrate something like what you are doing with crome or ectune?
Title: Re: holset he351 knows were its at
Post by: 92CXyD on January 11, 2010, 04:58:29 PM
all this shit is cool, and way over my head


how would you integrate something like what you are doing with crome or ectune?

+1 I'm interested in this. :yes:
Title: Re: holset he351 knows were its at
Post by: nock on January 11, 2010, 08:38:50 PM
any ecu that you can put tps and rpm in a table, with pwn output, i dont know if chrome or ecutune can do that. you could also just set a low rpm cutoff and tap into the tps. or just about anything else you want. the injector pulse width for example can be an indicator of how much air is going in the engine. but i think TPS and engine RPM are the two best. intent of the driver verses the engine speed, i think, is the best way to select the desired turbo RPM.

the arduino has USB on it  :yes: so hooking a laptop to make changes would be easy, i just have to write a setup program. the arduino itself has six 10-bit A/D inputs, so you can put any sensor you want on it, EGT, MAT, MAP, exhaust pressure, anything.

what im shooting for is to make an arduino add on board (i think they call them "arduino shields") that plugs into the arduino and has the brushless motor driver, turbo RPM interface, engine RPM interface, and a TPS follower circuit. and then make a nice single page setup utility that can run on any old laptop. at that point it could work with any ecu, im just using megasquirt because it happened to all ready have a tps vs rpm table in it.
Title: Re: holset he351 knows were its at
Post by: ratcityrex on January 11, 2010, 09:15:15 PM
chrome

didnt know google had a tuning system out.


(Just a heads up, its crome)
Title: Re: holset he351 knows were its at
Post by: Aero on January 11, 2010, 11:34:30 PM
I'm sure it can control boost on its own, how well is the question. the frist time its tested we will just watch the VGT, if its opens all the way, we'll know it needs a waste gate.

Cool project with potential.

It won't control boost though.   It will control how fast it spools, and effect backpressure greatly.  With the VGT opening fully by ~10 psi. on a 2.4L 4g63  boost passes 24psi by 4200 rpm at WOT.  If you look at the spool results of some H1C turbos on D16s on this forum in 21cm housings you can see that it won't work either.
Title: Re: holset he351 knows were its at
Post by: BoostedSchemes on January 12, 2010, 06:45:42 AM
I can tell you that with a 100% open holset you will be seeing 30psi well before redline so this CANNOT be used as a boost controller, but can help make a more effective powerband, this is very cool stuff.
Title: Re: holset he351 knows were its at
Post by: Joseph Davis on January 12, 2010, 12:10:33 PM
It won't control boost though.   It will control how fast it spools, and effect backpressure greatly.

Prepare to monitor drive pressure and correct vs rpm for correct fuel and ignition control, otherwise there are going to be huge swings in primarily desired fuel, and to a lesser extent ignition timing.  Bigger housings are more efficient, and will require a larger amount of fuel for a given intake manifold pressure.  It's really a system that screams MAF, or asks for a MAF correction.

For simplicity's sake I would start off by being able to dictate housing opening vs intake pressure so that the tune stays approximately consistent, and keep those things linked.  You can do the complex shit later down the line if anyone really cares - I frankly do not see a reason to do so.  If the system is less efficient at small housing openings, so what?  You turn up the boost and open the housing to suit, done.
Title: Re: holset he351 knows were its at
Post by: Aero on January 12, 2010, 12:24:26 PM
It won't control boost though.   It will control how fast it spools, and effect backpressure greatly.

Prepare to monitor drive pressure and correct vs rpm for correct fuel and ignition control, otherwise there are going to be huge swings in primarily desired fuel, and to a lesser extent ignition timing.  Bigger housings are more efficient, and will require a larger amount of fuel for a given intake manifold pressure.  It's really a system that screams MAF, or asks for a MAF correction.

For simplicity's sake I would start off by being able to dictate housing opening vs intake pressure so that the tune stays approximately consistent, and keep those things linked.  You can do the complex shit later down the line if anyone really cares - I frankly do not see a reason to do so.  If the system is less efficient at small housing openings, so what?  You turn up the boost and open the housing to suit, done.

That is another reason I have run it with the wastegate actuator control.  Should open approximately the same at a given manifold pressure and kind of work around that issue.  I've had it open early in the boost range to have the tuning error happen when things aren't on the edge also. Beyond ~10psi its fully open so the tune should be the same at all times.  I have asked around about a possible modification to a speed density ECU with some type of a backpressure sensor, somewhat similar to the baro compensation only extended of course.  I would like your input on it.
Title: Re: holset he351 knows were its at
Post by: nock on January 12, 2010, 05:36:43 PM
I'm sure it can control boost on its own, how well is the question. the frist time its tested we will just watch the VGT, if its opens all the way, we'll know it needs a waste gate.

Cool project with potential.

It won't control boost though.   It will control how fast it spools, and effect backpressure greatly.  With the VGT opening fully by ~10 psi. on a 2.4L 4g63  boost passes 24psi by 4200 rpm at WOT.  If you look at the spool results of some H1C turbos on D16s on this forum in 21cm housings you can see that it won't work either.


...the master speaks...


i read your thread on the talon, it seems that it will have to have a waste gate (damit) the ultimate go fast cheapness would have been so cool, i guess my cheap  :mexi: ass can afford a waste gate.

from what i have understood from talking to other people, these things will boost creep while cruising when a mechanical actuator is used. i think it has to be hooked to the TPS somewhere otherwise it will just seek the highest possible manifold pressure weather or not the throttle is open or closed. im sure the system will take off on its own if the turbo is not limited by the TPS.

the change in efficiency is something i hoped to take care of with TPS based fuel enrichment, so a %TPS = %fuel increase, but with the VGT being open all the way that would not work for the whole map. it may have to use something like map switching in order to work properly, like i said, i dont really know what im doing when it comes to controls here. what do you think about map switching?
Title: Re: holset he351 knows were its at
Post by: 98vtec on January 12, 2010, 11:40:13 PM
its been awhile since something has been completely over my head LOL.

anyone want to dumb this down a little for someone who didnt go to engineering school at the "tender" age of 15   :P
Title: Re: holset he351 knows were its at
Post by: Aero on January 12, 2010, 11:42:00 PM



...the master speaks...


i read your thread on the talon, it seems that it will have to have a waste gate (damit) the ultimate go fast cheapness would have been so cool, i guess my cheap  :mexi: ass can afford a waste gate.

from what i have understood from talking to other people, these things will boost creep while cruising when a mechanical actuator is used. i think it has to be hooked to the TPS somewhere otherwise it will just seek the highest possible manifold pressure weather or not the throttle is open or closed. im sure the system will take off on its own if the turbo is not limited by the TPS.

the change in efficiency is something i hoped to take care of with TPS based fuel enrichment, so a %TPS = %fuel increase, but with the VGT being open all the way that would not work for the whole map. it may have to use something like map switching in order to work properly, like i said, i dont really know what im doing when it comes to controls here. what do you think about map switching?

Is this TPS based enrichment the TPS enrichment that is already in MS?  Or are you talking about a modification to it?  The TPS based accel enrichment is only for transient fueling on quick changes to throttle position.  Now I think alpha-n is a TPS based fuelling, but IIRC it doesn't work in a boosted application since it doesn't take MAP into consideration.

Map switching would be useful if you had only two operating VGT rack positions, beyond that its sketchy.  Now if you made it where you had your actuator hold a fixed position at a given boost or rpm on one map.  Say, 4000 rpm and 20psi it is always at a 22cm size. 3000rpm and 20psi its at 9cm size.  It needs to be the same each time or you get the VE change that can't be easily tuned around without a mass air system like JD referred to, or some kind of backpressure sensor and compensation if running speed density.
Then switched maps for a fixed mostly open position for economy cruise then I could see that working.  
Title: Re: holset he351 knows were its at
Post by: nock on January 13, 2010, 04:59:47 AM
in the firmware you just delete the sec in volt/sec and thats it. v/s is really only used for one thing so i dont think it would be hard, you would have to fatten things up to compensate for not having any accel enrichment. that was what i came up with for the change in bsfc. but, it wont work if the vgt is wide open by 4000RPM.

i cant believe i never considered table switching. its so easy, just pick a big turbo size, say 20cm2, tune it up, then pick a small turbo, say 8cm, tune it up, then switch them when the small turbo starts to run out of hot side. its perfect, you could even use the vtec solenoid to trigger it.

as for the maf i agree, in fact i have read some patents that talk about using turbo RPM for a mass air meter. they are pretty vague, i cant see how it works because turbo RPM has more to do with pressure then flow, but apparently somebody figured it out, mabye turboRPM divided by pressure or something. another crazy idea i had early on was to use turboRPM to run the engine in a maf/map blend arrangement, fuckin weird.

i think just having two VGT positions and using table switching is good for now. i think you could make it progressive with engine RPM, having the A/R change constantly as you go up in RPM. that would at least make sure that each vertical row had the same A/R. i like the idea of having TPS hooked to it as the driver could just make the call on how much boost and when, but as you said, without some kind of maf it dosent look like it could work.

i think table switching would be easier to use, and easy to tune as well.

also, i guess i ordered the last mc33035 from digikey, fagots. this really pissed me off because the only reason i went with that chip was because they had over 2000 on hand. either somebody ordered the other 1998 right after me, or they liquidated them as soon as they sold one. fuck im pissed, the whole fucking mess just went back to the fucking drawing board. FUCK!!!
Title: Re: holset he351 knows were its at
Post by: Joseph Davis on January 13, 2010, 04:34:29 PM
It won't control boost though.   It will control how fast it spools, and effect backpressure greatly.

Prepare to monitor drive pressure and correct vs rpm for correct fuel and ignition control, otherwise there are going to be huge swings in primarily desired fuel, and to a lesser extent ignition timing.  Bigger housings are more efficient, and will require a larger amount of fuel for a given intake manifold pressure.  It's really a system that screams MAF, or asks for a MAF correction.

For simplicity's sake I would start off by being able to dictate housing opening vs intake pressure so that the tune stays approximately consistent, and keep those things linked.  You can do the complex shit later down the line if anyone really cares - I frankly do not see a reason to do so.  If the system is less efficient at small housing openings, so what?  You turn up the boost and open the housing to suit, done.

That is another reason I have run it with the wastegate actuator control.  Should open approximately the same at a given manifold pressure and kind of work around that issue.  I've had it open early in the boost range to have the tuning error happen when things aren't on the edge also. Beyond ~10psi its fully open so the tune should be the same at all times.  I have asked around about a possible modification to a speed density ECU with some type of a backpressure sensor, somewhat similar to the baro compensation only extended of course.  I would like your input on it.

I think someone has to build/live with the system in order to really shake any more functional insight out of it. 

nock's concept of table switching is not bad as long as interpolation takes place, look towards the K-series ECU structure with respect to cam angle for a good method of implementing this.

Title: Re: holset he351 knows were its at
Post by: bigdaddyvtec on January 13, 2010, 04:38:20 PM
its been awhile since something has been completely over my head LOL.

anyone want to dumb this down a little for someone who didnt go to engineering school at the "tender" age of 15   :P


NO NO NO.. The rebuttal was the NOT so tender age.... hahahah Seems your comprehension is lacking as well negro
Title: Re: holset he351 knows were its at
Post by: 98vtec on January 13, 2010, 04:56:08 PM
its been awhile since something has been completely over my head LOL.

anyone want to dumb this down a little for someone who didnt go to engineering school at the "tender" age of 15   :P


NO NO NO.. The rebuttal was the NOT so tender age.... hahahah Seems your comprehension is lacking as well negro

i wasnt talking about JD's age :evil:

Title: Re: holset he351 knows were its at
Post by: Joseph Davis on January 13, 2010, 04:59:13 PM
I'm from the trailerpark, nothing tender about me.
Title: Re: holset he351 knows were its at
Post by: nock on January 13, 2010, 06:31:18 PM
I'm from the trailerpark, nothing tender about me.


Trailerpark University of Applied Engineering (TPUAE)

tpuae alumni get 10% off at walmart
Title: Re: holset he351 knows were its at
Post by: 92CXyD on January 13, 2010, 06:35:31 PM
I'm from the trailerpark, nothing tender about me.


Trailerpark University of Applied Engineering (TPUAE)

tpuae alumni get 10% off at walmart

Where can I enroll?   ;D
Title: Re: holset he351 knows were its at
Post by: Joseph Davis on January 13, 2010, 07:07:34 PM
I'm from the trailerpark, nothing tender about me.


Trailerpark University of Applied Engineering (TPUAE)

tpuae alumni get 10% off at walmart

Where can I enroll?   ;D

Kick me your address.  As soon as Obama cuts me my first dirty white trash rebate check I'll mail off your Doctorate based on life achievement.
Title: Re: holset he351 knows were its at
Post by: bigdaddyvtec on January 13, 2010, 07:27:15 PM
What kind of life achievement award do you get for a blue dash???
Title: Re: holset he351 knows were its at
Post by: Joseph Davis on January 13, 2010, 07:29:23 PM
What kind of life achievement award do you get for a blue dash???

Ignominy.
Title: Re: holset he351 knows were its at
Post by: 92CXyD on January 13, 2010, 07:34:36 PM
I'm from the trailerpark, nothing tender about me.


Trailerpark University of Applied Engineering (TPUAE)

tpuae alumni get 10% off at walmart

Where can I enroll?   ;D

Kick me your address.  As soon as Obama cuts me my first dirty white trash rebate check I'll mail off your Doctorate based on life achievement.

Awesome  ;D
Title: Re: holset he351 knows were its at
Post by: nock on January 13, 2010, 09:38:12 PM
Kick me your address.  As soon as Obama cuts me my first dirty white trash rebate check I'll mail off your Doctorate based on life achievement.

they said i cant graduate until i figure out how to stop the soil erosion from washing the trailer park into the river, or install a hot tube in my neighbors driveway, or some other feat of civil engineering.



from the brochure:

tpuae University not only cares how much money you make after you graduate, we care about what you do with it. in todays world it not enough to work hard for yourself, a degree from tpuae will give you the knowledge and experience needed to use welfare and state run socialist programs to there maximum potential, and make sure the govenment works hard for you. as tpuae alumni you will prepared for the exciting world of socialism....

good luck.

we hope to see you on campus soon...
Title: Re: holset he351 knows were its at
Post by: nock on February 05, 2010, 12:11:33 AM
 :) :) :) updates :) :) :)

 (http://www.youtube.com/watch?v=jy_oOo1xCGQ#normal)

i've had it running for awhile, the other night i got the hall sensor noise problem figured out so now it can track position again. all i have to do now is write the control loop.




Title: Re: holset he351 knows were its at
Post by: onlyflash944 on February 09, 2010, 11:02:08 PM
i guess it's progress, but i'm too ignorant to know what kind or how much



i'll take your word for it
Title: Re: holset he351 knows were its at
Post by: HiProfile on February 14, 2010, 04:58:37 AM
Anyway to make it a 3-possition deal (closed, half, open), or have speed control? IIRC it would go from ~2cm to 26cm, which would be quite a big change.

Even if you can't, that's awsome work so far. I'm sure you could even market it to the people who still run vgt's on their trucks...
Title: Re: holset he351 knows were its at
Post by: hotrex on February 14, 2010, 09:02:49 AM
SOLID WORK COCKNOCKER.  if u were semi local id have u wire my volvo for msns
Title: Re: holset he351 knows were its at
Post by: marcj on February 14, 2010, 10:32:59 AM
if you get this working, you'll make a ton and VGT prices will multiply by at least 2.5
Title: Re: holset he351 knows were its at
Post by: crxvtec91 on February 14, 2010, 02:19:16 PM
Damn OP your a smart mother fucker; now I demand you dumb this down so a nog like me can understand it :noel:

Edit I just gave this a sticky now dumb it down :yes:
Title: Re: holset he351 knows were its at
Post by: glustic on February 14, 2010, 02:31:13 PM
Damn OP your a smart mother fucker; now I demand you dumb this down so a nog like me can understand it :noel:

Edit I just gave this a sticky now dumb it down :yes:

I would have to agree.  :yes:
Title: Re: holset he351 knows were its at
Post by: marcj on February 14, 2010, 02:41:23 PM
it's basic mechanical parts being regulated by an open source electronic engineering controller (arduino) and a hall switch. you nogs scratching your head should go read more tech  :P

I think the actuator method Aero came up with is a solid nignog way to use these turbos, but adjustment in real time based on ECU readings is fuckin tits.

btw, I was actually going to use that same micro controller (adruino) to make a digital gauge cluster about a year ago.. the support behind that controller is unbelievable!
Title: Re: holset he351 knows were its at
Post by: nock on February 15, 2010, 07:09:09 AM
thank for the sticky  ;D  ;D  ;D

i dont know if theres much of a way to dumb it down. im using an arduino to control a mc33033, thats about it. id like to ditch the mc33033 all together since there proving hard as fuck to get in small numbers, and that would simplify things quite a bit. but, i dont think the arduino is fast enough to handle the cycle by cycle current limiting thats needed to control this stuff, so right now im stuck developing something i dont want to  :'( .

once its all rolled into a library you can write code to set it up however you like. i think that using map switching/vtec output would be the simplest solution with the fewest problems, mabye not so easy to tune, your basically tuning an engine with two different turbos, but simple, and good for now.

i would think something like this could be done easily with the wg actuators that are controlling these turbos now, just setup some mechanical stops on the rack gear, hook the wg up to a solenoid valve that is controled by the vtec output, and thats it, rpm based vgt switching. if anyone has tryed this before id like to now how it turned out.

im writting the positioning loop now and im remembering how much i hate writing code, there pretty much cant be anything good on tv or i wont get anything done. i think it will end up with a control system that can control the vgt according to engine rpm alone. i really dont see another progressive control method thats any simpler then this. everything else i can think of would need to have its own corrections based on vgt position.
Title: Re: holset he351 knows were its at
Post by: nock on February 16, 2010, 03:11:16 PM
i guess i broke all the embeds, anyway this ones not as boring as all the others,,, i promise.

holset vgt pid controller (http://www.youtube.com/watch?v=USf44qa_9H8#normal)

if it seems a little tweaky, thats because it gets the position command from a trimpot and the metal screwdriver was making things kinda noisy.
Title: Re: holset he351 knows were its at
Post by: malichite on February 16, 2010, 03:47:53 PM
Fuck Yeah!!! Getting close  O0
Title: Re: holset he351 knows were its at
Post by: glustic on February 16, 2010, 06:56:36 PM
Fuckin tits dude, you will make alot of money off this shit!
Title: Re: holset he351 knows were its at
Post by: bigdaddyvtec on February 16, 2010, 07:14:08 PM
Probably not, but chickens have wishbones cause niggas got dreams.  O0
Title: Re: holset he351 knows were its at
Post by: nock on February 17, 2010, 01:38:33 AM
Probsably not, but chickens have wishbones cause niggas got dreams.  O0

quotable...  :yes:
Title: Re: holset he351 knows were its at
Post by: bigdaddyvtec on February 17, 2010, 01:47:41 AM
typo fixed for the lazy
Title: Re: holset he351 knows were its at
Post by: HiProfile on March 09, 2010, 06:29:07 AM
It's kidna self-regulationg in terms of the tune. If you tune it for a certain possition, say 1/2 open, more open will spool slower and more closed will have enough backpressure to create more reversion (richer and less scavenging). If you can control it consistently & predictably, then there won't be an issue.

If you were a real badass you'd have it controlled via backpressure & boost feedback. Have VGT closed for low backpressure until a certain boost is reached, then open at whatever rate or partial possitions works for whatever goals & motor you have.
Title: Re: holset he351 knows were its at
Post by: SgtB on April 12, 2010, 10:08:34 PM
You can throw a cap on your ADC line to smooth it out. Solid work. What speed does that arduino run at?
Title: Re: holset he351 knows were its at
Post by: sewell94 on May 09, 2010, 06:33:43 AM
i really like the idea of this.  This is could be used in conjunction with a boost per gear or boost per speed setups, allowing the end user to monitor back prsssure, adjusting the vgt to achieve max spool while maintaining proper backpressure and/or turbo shaft speeds once boost pressure rises.Create a target VGT position level for each boost level, gear, and/or speed. 
 
I think it would be possible to have the user create a target duty table then use back pressure and im pressures in conjunction with a compensation table,   ie when back pressure > IM the vgt will open in an attempt to keep a desired (1:1) pressure ratio.


Nock,

    if your thinking if building a few vgt controllers, i'd love to do some testing.
Title: Re: holset he351 knows were its at
Post by: Conceptz-X on May 11, 2010, 09:55:22 PM
Aero said his gate opens at 10lbs and he gets alot more through the rpm range.  There would not be boost by gear, only an accelerated response. 

If your concerned about creep during cruise, why not run a dual port actuator?  It will reduce response a little, but eliminate creep in cruise.


I have 2 of these sitting here, I thought about doing all the controls as electronic, however, what happens when you miss a stem or 10 due to carbon?, you will lose your reference point therefore losing control
Title: Re: holset he351 knows were its at
Post by: bigdaddyvtec on June 07, 2010, 05:05:11 PM
Bump
Title: Re: holset he351 knows were its at
Post by: nock on June 13, 2010, 06:10:54 PM
i've been pretty busy lately and have not got shit done with this lately. so i think the best thing to do is see if it will help others. this is pretty much the code thats running in the videos, i should have a schematic up soon but even thats not really complete because i havent build the current sensing stuff yet.


Code: [Select]
/ set hall pins
int  hallAPin = 4;
int  hallBPin = 5;
int  hallCPin = 6;
// set motor control pins
int  motordirPin = 12;
int  motorspeedPin = 11;

//ISR variables   
int HallA = 0;
int HallB = 0;
int HallC = 0;
volatile int N = 1;
volatile int Z = 0;
volatile int lastN = 1;
   
//correction = Kp * error + Kd * (error - prevError) + kI * (sum of errors)
//PID controller constants
float KP = 3; //position multiplier (gain)
float KI = 0.04; // Intergral multiplier (gain)
float KD = 13.5; // derivative multiplier (gain)
//track the previous error for the derivitive term, and the sum of the errors for the integral term
int lastError = 0;
int sumError = 0;
//Integral term min/max (random value and not yet tested/verified)
int iMax = 100;
int iMin = 0;
//set analog input
int potPin = 4;
int currentPin = 0;
//
void setup() {
  // set hall interrupt
  attachInterrupt(0, readHall, HIGH);
  // set hall pins to input
  pinMode (hallAPin, INPUT);
  pinMode (hallBPin, INPUT);
  pinMode (hallCPin, INPUT);
  // set current refence to 1.1volts
  analogReference (DEFAULT);
  // set pwm prescaler to 32khz                                         
  int prescalerVal = 0x07;     
  TCCR2B &= ~prescalerVal;
  prescalerVal = 1;             
  TCCR2B |= prescalerVal;
   // set motor pins to output
  pinMode (motordirPin, OUTPUT);
  pinMode (motorspeedPin, OUTPUT);
  Serial.begin(19200);
}

void loop() {
  int val = analogRead(potPin); // read the potentiometerv alue (0 - 1023)
  int T = map(val,0,1023,0,300);// set the target to seek to by mapping the potentiometer to the encoder max count
  delay(5); //dont change this unless you slow down the main loop somehow, this is a basic servo rate multiplyer and is nessisary because the hallsensor feed back is such low resolution
//also, i have located the delay here and not in the PID routeen because you may want to enter PID from different points in the main loop, some of them needing less delay then others
  pid (T);
  //Serial.println (analogRead(currentPin));
  Serial.println (Z);
 

/*
//this is the start of the homing routeen, it dosnt work yet. it uses one of the arduinos analog inputs to sens motor current.
//the idea is to move the servo until it binds up a and motorcurrent becomes greatter then currentmax, at that point it will move the motor the other way until it hits currentmax.
//then if the number of steps moved is =>300, the vgt is clear and the current poistion becomes zero and  the servo is able to move relative to the control data.

  for (int Homin = false; Homin = true; ){
    a = a++
    if (a=10) {a=0; T=T++}
    delay(5);
    pid (T);
    if (analogRead(currentpin) > currentmax) {if (Z>290) {homin=true;}}
    }
  */ 
   
   
}
 
 
 
 
void pid (int target){
  int error = Z - target; // find the error term of current position - target
  // generalized PID formula
  //correction = Kp * error + Kd * (error - prevError) + kI * (sum of errors)
  int ms = KP * error + KD * (error - lastError) +KI * (sumError);// calculate a motor speed for the current conditions
  // set the last and sumerrors for next loop iteration
  lastError = error;
  sumError += error;
  //scale the sum for the integral term
  if (sumError > iMax){sumError = iMax;} else if (sumError < iMin){sumError = iMin;}

  int Direction; //determine the direction to go in since the adafruit controller expects posotive values
  if(ms > 0){Direction = HIGH;}
  if(ms < 0){Direction = LOW; ms = -1 * ms;}

  // map the result to the max speed the controller will expect
  //(not sure if this is a good idea)
  if (ms > 50){ms = 50;}
  int Mspeed = map(ms,0,50,85,255);
  // output Mspeed and direction
  digitalWrite(motordirPin, Direction);
  analogWrite(motorspeedPin, Mspeed);
}
//ISR functions
    void readHall(){
     
      HallA = digitalRead(hallAPin);
      HallB = digitalRead(hallBPin);
      HallC = digitalRead(hallCPin);
     
      if ((HallA == HIGH) && (HallB == LOW) && (HallC == HIGH)) {N = 1;} else {lastN = N;}
          if ((lastN == 6) && (N == 1)) {Z = Z + 1;}
          if ((lastN == 2) && (N == 1)) {Z = Z - 1;}
      if ((HallA == HIGH) && (HallB == LOW) && (HallC == LOW)) {N = 2;} else {lastN = N;}
          if ((lastN == 1) && (N == 2)) {Z = Z + 1;}
          if ((lastN == 3) && (N == 2)) {Z = Z - 1;}
      if ((HallA == HIGH) && (HallB == HIGH) && (HallC == LOW)) {N = 3;} else {lastN = N;}
          if ((lastN == 2) && (N == 3)) {Z = Z + 1;}
          if ((lastN == 4) && (N == 3)) {Z = Z - 1;}
      if ((HallA == LOW) && (HallB == HIGH) && (HallC == LOW)) {N = 4;} else {lastN = N;}
          if ((lastN == 3) && (N == 4)) {Z = Z + 1;}
          if ((lastN == 5) && (N == 4)) {Z = Z - 1;}
      if ((HallA == LOW) && (HallB == HIGH) && (HallC == HIGH)) {N = 5;} else {lastN = N;}
          if ((lastN == 4) && (N == 5)) {Z = Z + 1;}
          if ((lastN == 6) && (N == 5)) {Z = Z - 1;}
      if ((HallA == LOW) && (HallB == LOW) && (HallC == HIGH)) {N = 6;} else {lastN = N;}
          if ((lastN == 5) && (N == 6)) {Z = Z + 1;}
          if ((lastN == 1) && (N == 6)) {Z = Z - 1;}
      if ((HallA == HIGH) && (HallB == LOW) && (HallC == HIGH)) {N = 1;} else {lastN = N;}
          if ((lastN == 6) && (N == 1)) {Z = Z + 1;}
          if ((lastN == 2) && (N == 1)) {Z = Z - 1;}
    }
Title: Re: holset he351 knows were its at
Post by: Joseph Davis on June 14, 2010, 01:14:59 PM
Do go on.
Title: Re: holset he351 knows were its at
Post by: TheMadScientist on June 14, 2010, 09:08:58 PM
Apparently fleece performance now has a standalone controller for VGT
Title: Re: holset he351 knows were its at
Post by: dvst8r on June 14, 2010, 11:12:25 PM
Apparently fleece performance now has a standalone controller for VGT

They have for ~ a year.
Title: Re: holset he351 knows were its at
Post by: 92CXyD on June 15, 2010, 07:35:24 AM
Apparently fleece performance now has a standalone controller for VGT

They have for ~ a year.

Yeah at $395 usd  :?: :-\  :o
Title: Re: holset he351 knows were its at
Post by: fe3tcourier on June 17, 2012, 05:44:51 PM
Excuse me if I missed this, but please post the code! http://github.com (http://github.com) FTW!

Also, for reference: http://forum.diyefi.org/viewtopic.php?f=15&t=199 (http://forum.diyefi.org/viewtopic.php?f=15&t=199)
Title: Re: holset he351 knows were its at
Post by: ratcityrex on July 10, 2012, 12:58:38 AM
I have always been wanting to make sorbet! I am glad that I found your post!



Lol, that shit is funny...
Title: Re: holset he351 knows were its at
Post by: Ntrain2k on December 08, 2012, 01:37:58 PM
Nock still alive?
Title: Re: holset he351 knows were its at
Post by: 92CXyD on December 17, 2012, 10:07:27 PM
Nock still alive?

He has post every other thread but here.  :?:


JD you still owe my PHd, where is it.  O0