Announcement

Collapse
No announcement yet.

Arduino smart boost control project

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    42w here. Weller WTCPT.





    I've also never hit solder connections with compressed air after making a connection, either, and I've been soldering since I was about 14 (so about 22 years now). Just make sure you don't move the leads on the connection you are making and it will be fine.

    One thing comes to mind about a fast cool down like that; when I used to use my propane torch to try to make a bong out of a MGD bottle. No matter how I tried to cool it down I always ended up breaking it because of the cooling rate being too fast.


    Sent from my HTC One X using Tapatalk 2
    -60v6's 2nd Jon M.
    91 Black Lumina Z34-5 speed
    92 Black Lumina Z34 5 speed (getting there, slowly... follow the progress here)
    94 Red Ford Ranger 2WD-5 speed
    Originally posted by Jay Leno
    Tires are cheap clutches...

    Comment


    • #17
      Very similar to mine except it's adjustable

      1990 ASC/McLaren Turbo Grand Prix 3500 swap GT3076R turbo 40lb/hr injectors FMIC LX9 coils Megasquirt2 v3.0

      Comment


      • #18
        I don't need adjustability, it's a temperature controlled tip and keeps the temps steady. Luckily I didn't pay $180 for it, I only paid $70 on eBay.

        Sent from my HTC One X using Tapatalk 2
        -60v6's 2nd Jon M.
        91 Black Lumina Z34-5 speed
        92 Black Lumina Z34 5 speed (getting there, slowly... follow the progress here)
        94 Red Ford Ranger 2WD-5 speed
        Originally posted by Jay Leno
        Tires are cheap clutches...

        Comment


        • #19
          Adjustable temp is nice. Sometimes I need more heat for some thicker traces or wires, and less for the finer traces.

          I've had this one for about 7 years:

          Comment


          • #20
            40-50W is about right for hobby stuff. The one i have at home is 50W and works great. My only complaint is the PES51 pencil, i'm on my 3rd now... they just don't last.





            Here is what we use in the shop... 400W total

            Click image for larger version

Name:	Weller.jpg
Views:	1
Size:	26.1 KB
ID:	377592
            Past Builds;
            1991 Z24, 3500/5 Spd. 275WHP/259WTQ 13.07@108 MPH
            1989 Camaro RS, ITB-3500/700R4. 263WHP/263WTQ 13.52@99.2 MPH
            Current Project;
            1972 Nova 12.73@105.7 MPH

            Comment


            • #21
              Here is my extremely rough draft of the Arduino code. Not tested yet, still concept stage.




              int MAPvalue = 0; // Value read from MAP sensor pin
              int MAP = 0; // Manifold Pressure (psi)
              int MAPlevel = 0; // Desired Boost amount
              int MAPhigh = 0; // Overboost limit
              int MAPlow = 0; // Start of boost control
              int TPSvalue = 0; // Value read from TPS sensor pin
              int TPS = 0; // Throttle Position
              //--------PIN
              int MAPpin = A0; // Analog pin connecting MAP sensor
              int wgpin = 13; // Actuates the wg solenoid
              int TPSpin = A1; // Analog pin connecting TPS sensor
              //--------LED
              int LEDon = 12; // System powered on
              int LEDact = 11; // Blinks with solenoid actuation
              int LEDmax = 10; // Over boost warning light
              //--------TIME CONTROL
              int counter = 0; // Delays closing the solenoid slightly when open
              int startcount = 0; // Runs start up, light test long enough to read LED's
              int overcounter = 0;// Times the delay to shut off over boost red LED

              void setup(){
              pinMode(LEDon, OUTPUT);
              pinMode(LEDact, OUTPUT);
              pinMode(LEDmax, OUTPUT);
              pinMode(wgpin, OUTPUT);

              startcounter = 100;

              while(startcounter > 0){
              digitalWrite(LEDon,HIGH);
              digitalWrite(LEDact,HIGH);
              digitalWrite(LEDmax,HIGH);
              delay(startcounter);
              digitalWrite(LEDon,LOW);
              digitalWrite(LEDact,LOW);
              digitalWrite(LEDmax,LOW);
              delay(startcounter);
              startcounter--;}
              }

              void loop(){
              // READ SENSORS & CONFIGURE DATA------------------------
              // ----------------MAP
              MAPvalue = analogRead(MAPpin);
              MAP = map(MAPvalue, 10, 1000, -15, 15);
              // ----------------TPS
              TPSvalue = analogRead(TPSpin);
              TPS = map(TPSvalue, 0, 5, 0, 100);

              // BOOST LEVEL DETERMINATION ROUTINE--------------------
              MAPlevel = 6;
              MAPmax = 8;
              if(TPS > 89) && (TPS < 101){
              MAPlevel = 10;
              MAPmax = 12;}
              if(TPS > 79) && (TPS < 90){
              MAPlevel = 9;
              MAPmax = 11;}
              if(TPS > 69) && (TPS < 80){
              MAPlevel = 8;
              MAPmax = 10;}
              if(TPS > 59) && (TPS < 70){
              MAPlevel = 7;
              MAPmax = 9;}

              // OVER BOOST ROUTINE-----------------------------------
              if(MAP > MAPlevel){
              digitalWrite(wgpin,LOW); //-----------open wg solenoid
              digitalWrite(LEDact,HIGH); //-------Turn on action LED
              counter = 10;

              if(MAP > MAPmax){ //------------Warning LED activation
              digitalWrite(LEDmax,HIGH);
              overcounter = 1000;}}

              // UNDER BOOST ROUTINE----------------------------------
              if(MAP < MAPlevel) && (counter = 0){
              digitalWrite(wgpin,HIGH); //------closes wg solenoid
              digitalWrite(LEDact,LOW);} //----Turn off action LED

              // POST PROGRAM FLOW CLEAN UP
              if(overcounter = 0){ //---------Warning LED deactivation
              digitalWrite(LEDmax,LOW);}

              if(counter > 0){
              counter--;} //----------------------SOLENOID GAIN+ TIMER
              if(overcounter > 0){
              overcounter--;} //------------------------OVERBOOST TIMER

              delay(1);
              }
              Last edited by TGP37; 09-15-2013, 12:05 AM.
              1996 Grand Prix | 3100v6 L82 | T04E-50 Turbo | Getrag 282 w/ EP LSD | SPEC-3 Clutch

              Comment


              • #22
                This might get a bit confusing due to some of the nomenclature used in both automotive and Arduino. lol

                Your MAP value within the map syntax is giving an input range of 10V to 1000V, unless you are using the raw read values (0 to 1023) why have you chosen this? It should be values of 0 and 5, just like your TPS, or 0 to 1023, I don't recall off hand, and I can't seem to find the code where I used this to recall which way it was now, either way, both input pins will have the same range (0 to 1023 raw values).

                You're also going to have a hard time using a digitalWrite to control the wastegate, you will experience large spiking. digitalWrite makes the pin high and leaves it that way indefinitely until there is a digitalWrite low on the same pin, which depending on how your write the code and how long the code becomes, this could be a very long time before a check is done and sees that the input is too high and then changes the pin to low, after which there will be just as much delay before there is a check to see that the input is too low, and repeat. You will be better off using an analogWrite using a PWM pin to maintain a value somewhere between full on and full off. Remember that the GM boost control solenoid is set-up to allow all boost pressure through to the wastegate actuator to set minimum boost, and when fully closed (100%DC), there is no pressure passed through to the wastegate actuator, so boost will be as high as the turbo can achieve on that engine, which could cause some problems.

                I'm also puzzled by the 1ms delay of the loop at the end.
                Last edited by Guest; 09-15-2013, 10:55 AM.

                Comment


                • #23
                  The 1 ms delay is adjustable (when I code a variable resisting knob in) incase there is any issues that value can be tweeked or discarded entirely. in debug it can delay the flow long enough to read the output (also when coded in)

                  The language isn't confusing, I understand what you wrote. I did both either way and I'll figure which was correct. Either the 0-5v reading or the raw. Pending which was correct, the other would be written as. Due to a lack of hands on experience.

                  I create variables at zero is just a style. In the past I heard of creating a variable w/o a value retained the value that was already in the RAM from some other process. For programming today I believe that is no longer an issue.

                  The flow is simple by design. If the manifold pressure is higher then the desired boost the wgsolenoid pin stays low (vac line open 100%). If the boost goes below desired level it will close the solenoid. but not until 10ms has elapsed after the last "above psi" trigger event.

                  I considered PWM, still might take that route. Time will tell.


                  The program concept. It should run fast enough to work properly.


                  1-read sensors
                  2-Determine boost limits from sensor readings
                  3-Open solenoid if high
                  --a) turn on warning LED if past boost peak limit
                  --b) turn on action LED
                  4-Close solenoid if low
                  --a)disable action LED if no boost
                  --b)turn off action LED
                  5-cycle the counters


                  As it is written, the solenoid will remain open/closed until it crosses the desired boost level. Notice there is no delay opening the solenoid when boost goes high, but there is a delay closing it (which is going to be adjustable for performance reasons that may arise). i did that to prevent delaying the solenoid and seeing a massive boost spike. It will creep down in boost if the GAIN+ is too long. I also considered a GAIN- to delay to delay opening. But not until I get a better grip on the program.



                  screens and other additions are coming. Just want to debug the basics first.



                  I love the input.......anything you guys want to point out, feel free.



                  Still rough code. I would be shocked if it worked right off the bat.



                  I probably could have a high/low routine more then once in the code is time is an issue due to larger files. As in, do the checks-actions then run other calculations, insert another check-action, run more code, insert another check-action.

                  I don't think having 3 instances of toggling the wgpin too much. But we'll see.

                  I could probably write a while() condition if boost is above the desired limit and it will keep the solenoid open as long as the boost is above the limit. Same for low.
                  Last edited by TGP37; 09-15-2013, 11:10 AM.
                  1996 Grand Prix | 3100v6 L82 | T04E-50 Turbo | Getrag 282 w/ EP LSD | SPEC-3 Clutch

                  Comment


                  • #24
                    Repeating code only wastes time and space.

                    If you really wanted to have the same block of code repeated within a loop, take a look at using "functions". This is a block of code that is set up before loop and does everything you want done within that block of code, then all you have to do is call it within the loop.

                    As an example:

                    void setup(){

                    void ledShow(){ // set up led function
                    if (analogRead, inputVal*x > 75 ){ // if statement to determine when LED should be on
                    digitalWrite (led, HIGH); // digital write to control led pin
                    }
                    else { // what to do if false
                    digitalWrite (led, LOW); // digital write to control led pin
                    }
                    }
                    }
                    void loop(){

                    ledShow();

                    }

                    I've left out all of the other set up and functions I had in that program, just to show the function and how to call it. In this case the input on a pin was multiplied by x, which was a scaler to convert to the raw analog read from 0 to 1023 to a 1 to 100 value. If that value was above 75 (AKA 75%), the LED turned on. Alternatively map could likely be used instead of a scaler multiplier, but I didn't learn about map until after I wrote this program

                    I would just simply remove the delay. Delay is a blocking function that will pause your program at that point and wait until the timer runs out. 1ms isn't much, but add a bunch of them and they all add up, there will also be times where you would want more than a 1ms delay, which adds up even more. A better way to perform timed events is to use a time compare. Look up "Blink without delay". It took me a bit to understand it at first, but that's probably because I made it harder to understand than it really should have been. Once you get used to using it, it's a great way to have code still run while waiting to update something else. This is especially useful when using an LCD to display values, but you want the control of the application to be updated frequently. You can put a "delay" on the LCD write to make it easier to read for changing values, when they update too quickly they become hard to read, but update them slower and it's easier to see what is changing and by how much. It looks like you're on the track of using blink without delay, but you haven't set anything up to hold the last value as found in the example:



                    see the line:
                    previousmilliseonds = currentmilliseconds;

                    This puts the time stamp of the previous time through the loop into a memory location, to be used the next time through the loop.

                    I think the way you're using it, it will block the program running at that point, or just not work at all, might need to use a for loop at that point to decrement the counter.

                    I was just looking back through your code and noticed you'll get an error at line 27 (plus what ever lines you have above the code as pasted here).

                    startcounter=100;

                    You have not initialized a value of startcounter.

                    You have:

                    int startcount = 0;

                    You have then used startcounter other points in the code, so your easiest solution here is to change the:

                    int startcount = 0;

                    to

                    int startcounter = 0;

                    You may also be able to cut out line 27 by simply intializing as:

                    int startcounter = 100;

                    Try it both ways and see if there is a difference.

                    I try to write as few lines as I can, combining as many parts of the code as I can to keep the code size small. None of the programs I have written for Arduino/Teensy have come close to the maximum, but I know at some point I will and will need to make the programming code more efficient, so I just do it with every program.

                    I'm not an expert when it comes to programming in C, but I have taken a couple semesters on it, and was able to get through them, and remember that sometimes the code wasn't quite as intuitive as I thought it should have been.

                    There's something about that boost level determination block that just doesn't sit well, but I can't quite put my finger on it.

                    Comment


                    • #25
                      i'm not a fan of doing this with a digital pin..... the MAP would average the desired boost, but it would be a noticable sawtooth pattern getting there. doing it via PWM would be much smaller swings around the desired boost range.
                      1995 Monte Carlo LS 3100, 4T60E...for now, future plans include driving it until the wheels fall off!
                      Latest nAst1 files here!
                      Need a wiring diagram for any GM car or truck from 82-06(and 07-08 cars)? PM me!

                      Comment


                      • #26
                        Originally posted by robertisaar View Post
                        i'm not a fan of doing this with a digital pin..... the MAP would average the desired boost, but it would be a noticable sawtooth pattern getting there. doing it via PWM would be much smaller swings around the desired boost range.
                        Yes, exactly what I was thinking, just couldn't figure out how to word it.

                        Comment


                        • #27
                          I did think the original method would work, probably will. But I do believe you guys are correct and PWM is a better method.

                          I started to write a PWM version. I would like it to self adjust the PWM like a closed loop system and store the variable in EEPROM. I also figured in using the return; function to speed up calculations (preventing the rest of the code read once the current cycle has done its job). Placing boost reduction routines 1st. Even though I very much doubt the Arduino will have issues with speed of calculations.

                          I also am considering the use of an array to have a look up table that can reference optimal PWM 0-255 against MAP vs RPM. Of course, I would need a way to data log the PWM rate through the A/C pressure signal line. Probably map(0,255,0,5) to get a usable voltage reading.

                          SO many ideas........plus I decided it would be best to build a testing platform with compressed air and simulation of sensors. And a power cut to the Arduino in the cab.


                          I expected the project to grow in scope once I started putting the pieces together. Got everything I need except for the switching solenoid.

                          Solenoids, any suggestions, ones to avoid?



                          Also, I haven't ditched the servo actuated wg idea. I felt it would be best to get the PWM version running and debugged. Once that is good, importing to control a servo should be easier......but still not easy. I feel having a look up table for servo position (wg open/closed variance) will eliminate any sawtooth or similar patterns. Just need to keep the WG open just enough to produce the desired boost.

                          As fast and as strong as servos are today, I believe in it.
                          Last edited by TGP37; 09-16-2013, 10:02 AM.
                          1996 Grand Prix | 3100v6 L82 | T04E-50 Turbo | Getrag 282 w/ EP LSD | SPEC-3 Clutch

                          Comment


                          • #28
                            Why not use a GM solenoid? they have been proven to be reliable and work well.

                            DIYAutotune also sells a boost control solenoid that is is said to replace the GM solenoid and require less DC to maintain the same boost.

                            As far as direct actuation of a wastegate valve, which would really only work well on an internal gate, since an external gate would require quite a bit in the way of modification, I would look at using a PWM controlled device. A design similar to Ford IAC valves, where a higher DC holds the valve open, though on a boost control system I would likely reverse it, so that a higher DC is required to increase boost pressure as a fail safe system. If the control or the actuator fails, it defaults to low boost.
                            This safety system is why I still like the idea of using boost pressure and a control solenoid so that if the control fails, the default wastegate spring pressure is the boost point then.

                            You also have to keep in mind that the exhaust on the pre-turbine side is acting as a force trying to open the wastegate (in internal gates), and the actuator either needs to be able to hold this pressure back on its own, or be able to use control to hold it closed. Might end up with a push pull configuration to get full control.

                            Comment


                            • #29
                              Originally posted by The_Raven View Post
                              Why not use a GM solenoid? they have been proven to be reliable and work well.

                              DIYAutotune also sells a boost control solenoid that is is said to replace the GM solenoid and require less DC to maintain the same boost.

                              As far as direct actuation of a wastegate valve, which would really only work well on an internal gate, since an external gate would require quite a bit in the way of modification, I would look at using a PWM controlled device. A design similar to Ford IAC valves, where a higher DC holds the valve open, though on a boost control system I would likely reverse it, so that a higher DC is required to increase boost pressure as a fail safe system. If the control or the actuator fails, it defaults to low boost.
                              This safety system is why I still like the idea of using boost pressure and a control solenoid so that if the control fails, the default wastegate spring pressure is the boost point then.

                              You also have to keep in mind that the exhaust on the pre-turbine side is acting as a force trying to open the wastegate (in internal gates), and the actuator either needs to be able to hold this pressure back on its own, or be able to use control to hold it closed. Might end up with a push pull configuration to get full control.
                              A servo, a good one, should hold its position against force. If the servo can compress the wastegate spring, it can hold back the exhaust w/o a spring, ideally.

                              I do have an internal WG atm. I also have a spare external WG which could be used for the servo controlled setup. Me personally, I would test the crap out of it before I put that on my car.

                              PWM does have a good fail safe. The servo controlled method would probably need an addition spring valve that is held closed with power from the servo boost controller. If the BC fails, the solenoid opens and boost is greatly reduced if not prevented all together. or some kind of mechanical disconnect the servo from the wg valve once a certain intake psi is reached.


                              Thanks for the solenoid tip, sounds like the one I need.


                              edit: I was told by a retired aviation elec tech (served up to E-7) that servos were used often in aircraft and that there may be a good amount of knowledge to gain from non-classified manuals. The search is on.
                              Last edited by TGP37; 09-16-2013, 11:23 AM.
                              1996 Grand Prix | 3100v6 L82 | T04E-50 Turbo | Getrag 282 w/ EP LSD | SPEC-3 Clutch

                              Comment

                              Working...
                              X