Welcome to the North American Subaru Impreza Owners Club Wednesday May 29, 2024
Home Forums Images WikiNASIOC Products Store Modifications Upgrade Garage
Texas Impreza Club
Go Back   NASIOC > NASIOC Chapters > Texas Impreza Club Forum -- TXIC

Welcome to NASIOC - The world's largest online community for Subaru enthusiasts!
Welcome to the NASIOC.com Subaru forum.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, free of charge, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!

If you have any problems with the registration process or your account login, please contact us.







* As an Amazon Associate I earn from qualifying purchases. 
* Registered users of the site do not see these ads. 
Reply
 
Thread Tools Display Modes
Old 03-23-2004, 11:09 PM   #1
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default Anyone know much about electronics?

First of all, I'm a computer guy. I'm not an electrical engineer and I don't know what I'm talking about with electronics.

I'm considering working on a little project to monitor the duty cycle of an injector, the ambient temperature, and the temperature of charged air at the throttlebody. I have been considering my options and I think this project would need more than a few comparators, op amps, and a 555. I think this project needs a PIC. For a $20 entry fee we can compile C code to do order-n lagrange polynomial integration on analog signals from the devices mentioned above.

The problem is that I have little experience with PICs. I can program pretty well and have a ton of experience with assembly, and I'm pretty good at math. In addition, I have a ton of ideas on how to make this thing work out well. If anyone out there has some experience with PICs maybe we can start work on a little project.

I've already briefly discussed this with MouserWRX and gjhsu. I don't think we need to log data anymore because I've already found a bunch of answers to my original questions.

If you are still reading this, the project goal should already be clear: Determine when to spray water on an intercooler.
* Registered users of the site do not see these ads.
Aegon is offline   Reply With Quote
Sponsored Links
* Registered users of the site do not see these ads.
Old 03-23-2004, 11:13 PM   #2
gjhsu
Scooby Guru
 
Member#: 12329
Join Date: Nov 2001
Chapter/Region: TXIC
Location: Austin, TX
Vehicle:
2o15 WRX
Ice Silver

Default

I learn nothing in school.
gjhsu is offline   Reply With Quote
Old 03-23-2004, 11:23 PM   #3
mouserWRX
Scooby Specialist
 
Member#: 48960
Join Date: Nov 2003
Location: Austin
Vehicle:
2006 TL
Anthracite

Default

Sounds like fun, and water on the IC can't hurt even if you screw it up hehehe
mouserWRX is offline   Reply With Quote
Old 03-24-2004, 12:18 AM   #4
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

I'm more excited than ever! Yet nobody else seems to be.

I can't tell if George is serious or not. I bet they have all sorts of PIC stuff setup in the UT labs.
Aegon is offline   Reply With Quote
Old 03-24-2004, 12:21 AM   #5
gjhsu
Scooby Guru
 
Member#: 12329
Join Date: Nov 2001
Chapter/Region: TXIC
Location: Austin, TX
Vehicle:
2o15 WRX
Ice Silver

Default

No, I'm serious. They don't teach us anything practical (yet, if at all). I'm not very happy at the moment with the way things are being conducted in some classes, and am aiming to get a person fired.

Not in a good mood right now.
gjhsu is offline   Reply With Quote
Old 03-24-2004, 01:15 AM   #6
LiquidIQ
Scooby Guru
 
Member#: 6408
Join Date: May 2001
Chapter/Region: TXIC
Location: Austin, TX
Vehicle:
2013 Porsche Carrera
White

Default

I can have a friend of mine take a look at this thread at work, he's working on a wrist-based sky diving computer
LiquidIQ is offline   Reply With Quote
Old 03-24-2004, 01:20 AM   #7
ATX25RS
Scooby Guru
 
Member#: 4597
Join Date: Mar 2001
Chapter/Region: TXIC
Location: Laredo, Texas
Vehicle:
2011 Mitsu Outlander
Sport (Ex-Suby owner X3)

Default

Quote:
Originally posted by gjhsu
I learn nothing in school.
ATX25RS is offline   Reply With Quote
Old 03-24-2004, 01:41 AM   #8
HonduHunter
Scooby Guru
 
Member#: 28408
Join Date: Oct 2002
Chapter/Region: TXIC
Location: San Antonio, Tx
Vehicle:
2002 vf48ed WRX
OBP

Default

Quote:
Originally posted by gjhsu
I learn nothing in school.
i feel the same way
HonduHunter is offline   Reply With Quote
Old 03-24-2004, 08:21 AM   #9
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

I'm not exactly a PIC expert but I am an EE and I have done several projects, both hardware and software, with the PIC. I can tell you that trying to do complex math with the PIC is a waste of time, but I don't really see the need for it with this project. Some basic averaging (over power of 2 samples) should be more than adequate.

As far as the other electronics you listed, none should be needed. You should use the ADC in the PIC to accquire your sigals and make all decisions in software, you shouldn't need comparators. The 555 timer shouldn't be needed either. You will need some basic microprocessor support devices, input protection, and an output driver for your sprayer.

BTW, I have a friend who is working on a more complex version of the same thing, similar to the SECS system, with sprayer control, there's a thread about it in the forrester forum.

Later,
Dustin
D_REX is offline   Reply With Quote
Old 03-24-2004, 08:50 AM   #10
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Here is what I'm thinking:

We need to monitor 2 main factors
(1) Aggressive Driving
(2) Temperature Differences

To determine if we are driving aggressively, we need to keep a log of the duty cycle at the last X timeslices. Each timeslice can represent 2 seconds or so. Depending on the capabilities of the PIC, I think 64 data points is a good place to start. Between these points we can keep running tabs on the duty cycle of an injector, but we don't need to save all of this data, just summarize it when the slice is up. Since duty cycle is exponentially proportional to a chosen rev range, it should be pretty easy to determine when we've exceeded our threshhold for aggressive driving. It should be even easier with the WRX since a lot of the time when you want to drive aggressively you floor the pedal, which would make the duty cycle go way up proportionally to acceleration. For the same reason that we run rich a lot of the time we can easily tell when things are getting aggressive.

Once we've convinced the computer that we are driving aggressivly we need to compare the difference between ambient temps and the temp at the throttlebody. If the difference is 10-20 degrees or higher then the temp sensors can approve a spray.

So now we begin a cycle of spraying that should happen in very short order. First, we spray a baseline amount of time, possibly 1 second. At this point we begin rapid checks of the temp delta between ambient air and the air at the TB. In cool weather we should have sprayed plenty of water and the temps will already be dropping. In warm weather we will see that second order derivative of dTemp/dt is lower than expected and we will need another squirt. So long as the sequenced squirts are having a positive effect on the 2nd order temp results (we will need to determine a threshold), keep spraying short bursts.

When this is done we need to start a timer to prevent any spraying over the next X seconds. This would adjust based on ambient temp and the aggressive driving score.

I think we could do this pretty easily with a single pot for sensitivity and an on/off switch. The whole idea is to be frugal with the spray but still get the most out of the sprayer system.
Aegon is offline   Reply With Quote
Old 03-24-2004, 08:58 AM   #11
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Quote:
Originally posted by D_REX
I'm not exactly a PIC expert but I am an EE and I have done several projects, both hardware and software, with the PIC. I can tell you that trying to do complex math with the PIC is a waste of time, but I don't really see the need for it with this project.
The best part about the math is that it isn't that complex. The derivation of a quadrature is pretty complex (not really complex, but not something people other than Gauss or Newton would think of), but I know enough to make it reality even if I had to use assembly or machine code.

Quote:
Originally posted by D_REX
As far as the other electronics you listed, none should be needed. You should use the ADC in the PIC to accquire your sigals and make all decisions in software, you shouldn't need comparators. The 555 timer shouldn't be needed either. You will need some basic microprocessor support devices, input protection, and an output driver for your sprayer.
I listed those electronics because I claimed I could make a circuit with only a couple op amps and a 555. This thread was created to say that I want more than just those when I can use something like a PIC. I have no intention of using a comparitor when I have AD converters C code.

Quote:
Originally posted by D_REX
BTW, I have a friend who is working on a more complex version of the same thing, similar to the SECS system, with sprayer control, there's a thread about it in the forrester forum.

Later,
Dustin
I'll check that thread out. Thanks for the input.
Aegon is offline   Reply With Quote
Old 03-24-2004, 08:59 AM   #12
Wheeler Bement
Scooby Specialist
 
Member#: 15652
Join Date: Feb 2002
Chapter/Region: TXIC
Location: sugar land, katy
Vehicle:
2002 2.5L WRX Wag.
160K club

Default

stay away from the 555 if you are using them as timers....they suck.
Wheeler Bement is offline   Reply With Quote
Old 03-24-2004, 09:11 AM   #13
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Quote:
Originally posted by Wheeler Bement
stay away from the 555 if you are using them as timers....they suck.
Oh boy. I have no intention of using a 555. When I say that this project needs more than 555s, I mean that I want to use something else.

And for my needs, I think a 555 would have been adequate for a simple project. Precision timing isn't very important in this application.
Aegon is offline   Reply With Quote
Old 03-24-2004, 09:14 AM   #14
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

You need to be proactive with the sprayer to be effective. If you wait until the temperature rise happens then you are really wasting your time with the other inputs. You want to predict the temperature rise and spray before it happens. One simple way to do this is with boost. You know if you are making boost beyond a certain point you are driving aggressively and temperatures are going to rise. You also want to prevent heat soak from idling, so monitoring intake temps and post ic temps would be helpful for that.
D_REX is offline   Reply With Quote
Old 03-24-2004, 09:16 AM   #15
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

Quote:
Originally posted by Wheeler Bement
stay away from the 555 if you are using them as timers....they suck.
The 555 is pretty much just as accurate as your RC time constant. unfortunately capacitors have pretty bad precision, unless you buy something specifically targeted for precision applications. Most caps are +/-20%.
D_REX is offline   Reply With Quote
Old 03-24-2004, 09:18 AM   #16
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Quote:
Originally posted by D_REX
You need to be proactive with the sprayer to be effective.
I am not using temperature rise to trigger spray. I am using aggressive driving to trigger spray.

The temperature test will only veto a move to spray when there is no need for it.
Aegon is offline   Reply With Quote
Old 03-24-2004, 09:23 AM   #17
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

Quote:
Originally posted by Aegon
The best part about the math is that it isn't that complex. The derivation of a quadrature is pretty complex (not really complex, but not something people other than Gauss or Newton would think of), but I know enough to make it reality even if I had to use assembly or machine code.

Multiplication and division are complex math in the PIC. Just as an example a 32 bit divide can take more than 1000 cycles and a 32 bit multiply nearly 900. 16 bit operations aren't as bad but still ~250 cycles. You can see where it doesn't take much of an algorithm before you eat up a lot of time.
D_REX is offline   Reply With Quote
Old 03-24-2004, 09:23 AM   #18
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Also, monitoring boost is not a good idea for this situation. By the time we are boosting we are too late. Think of how often and for how long you actually drive in boost.

This part of the discussion has been beat to death in other articles. My first reaction was to look at boost too, but I'm convinced that the injector duty cycle is the key.
Aegon is offline   Reply With Quote
Old 03-24-2004, 09:25 AM   #19
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

Quote:
Originally posted by Aegon
The temperature test will only veto a move to spray when there is no need for it.
So you're saying that if there is no temperature rise but there is aggressive driving, you won't spray?
D_REX is offline   Reply With Quote
Old 03-24-2004, 09:26 AM   #20
Wheeler Bement
Scooby Specialist
 
Member#: 15652
Join Date: Feb 2002
Chapter/Region: TXIC
Location: sugar land, katy
Vehicle:
2002 2.5L WRX Wag.
160K club

Default

Quote:
Originally posted by D_REX
The 555 is pretty much just as accurate as your RC time constant. unfortunately capacitors have pretty bad precision, unless you buy something specifically targeted for precision applications. Most caps are +/-20%.
i have built and rebuilt many 555 timers....just to have them quit working after a couple of cycles....but maybe i was doing it wrong...just a thought though.
Wheeler Bement is offline   Reply With Quote
Old 03-24-2004, 09:28 AM   #21
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Quote:
Originally posted by D_REX
Multiplication and division are complex math in the PIC. Just as an example a 32 bit divide can take more than 1000 cycles and a 32 bit multiply nearly 900. 16 bit operations aren't as bad but still ~250 cycles. You can see where it doesn't take much of an algorithm before you eat up a lot of time.
Cool, thanks for the info. Like I said, I don't know much about PICs. The last time I did processor design was on a CISC chip for IBM (Z900), which could do damn near anything in one cycle. Come to think of it, I remember looking at the VHDL for the multiply instruction and I was completely baffled by its operation, which is to say that I shouldn't expect a PIC to do it very well.
Aegon is offline   Reply With Quote
Old 03-24-2004, 09:29 AM   #22
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

Quote:
Originally posted by Aegon
By the time we are boosting we are too late.
I'm not convinced of this at all. Boost is what creates the heat. Heat is a product of the inneficient compression. The intercooler will have some thermal mass and won't gain temperature for some delta-t after the onset of boost. In addition water spray is only really effective if it evaporates from the intercooler.

Really how far apart can the exponential increase in injector duty cycle and the onset of boost be?
D_REX is offline   Reply With Quote
Old 03-24-2004, 09:31 AM   #23
D_REX
Scooby Specialist
 
Member#: 8945
Join Date: Aug 2001
Chapter/Region: TXIC
Location: Houston, TX
Vehicle:
MY02 WRX
Blue

Default

Quote:
Originally posted by Wheeler Bement
i have built and rebuilt many 555 timers....just to have them quit working after a couple of cycles....but maybe i was doing it wrong...just a thought though.
It's really a mute point, a timer is not needed if you have a microcontroller.
D_REX is offline   Reply With Quote
Old 03-24-2004, 09:31 AM   #24
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Quote:
Originally posted by D_REX
So you're saying that if there is no temperature rise but there is aggressive driving, you won't spray?
No, I'm saying that if you drive aggresively in the middle of winter and the I/C is doing one heck of a job getting charged air close to ambient temperature, I won't spray.

I'm not looking at temperature rise over time, I'm looking at temperature difference between ambient air and air at the TB.
Aegon is offline   Reply With Quote
Old 03-24-2004, 09:33 AM   #25
Aegon
Scooby Specialist
 
Member#: 42435
Join Date: Aug 2003
Location: Livermore, CA
Default

Quote:
Originally posted by D_REX
I'm not convinced of this at all. Boost is what creates the heat.
Check this out:
http://www.autospeed.com/cms/article.html?&A=0527
Then check this out:
http://forums.nasioc.com/forums/show...hreadid=173605
Aegon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not 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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone know much about RX7 Cata Vancouver Impreza Club Forum -- VIC 20 05-29-2006 01:31 AM
Does anyone know much about www.jdmenginescorp.com? eddie1982 Vendor Reviews 2 05-17-2006 04:22 AM
Anyone know much about the new coupe? LinusRebar News & Rumors 36 07-20-2004 06:53 PM
Anyone know much about Bowie, MD? MidnightScooby Mid Atlantic Impreza Club -- MAIC 7 06-13-2002 07:07 AM
Anyone know much about the jdm AVCS? iceweazel Factory 2.0L Turbo Powertrain (EJ Series Factory 2.0L Turbo) 4 07-02-2001 02:02 PM

All times are GMT -4. The time now is 04:51 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Copyright ©1999 - 2019, North American Subaru Impreza Owners Club, Inc.

As an Amazon Associate I earn from qualifying purchases.

When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission
Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.