Shop OBEX P1 Docs P2 Docs Learn Events
Vehicle N20 Control — Parallax Forums

Vehicle N20 Control

ArchiverArchiver Posts: 46,084
edited 2001-08-28 03:36 in General Discussion
Hi guys.

I'm in the process of needing to design a failsafe for one of my cars
running nitrous.

The nitrous system works like this. There is a arming button inside of the
vehicle. When the arm button is off, the system is shut down. With the arm
button on, the system is armed. The nitrous will only kick in when the
engine is at WOT (wide open throttle) and the system has been armed. It
knows its at WOT by measuring the TPS signal on the car (throttle position
sensor).

One of the major problems is that the stock computer in the car does a fuel
cut at redline (this case, 6250rpm). If by mistake I hit redline before
shifting, and the engine is at WOT, nitrous will still be flowing (but fuel
won't be), and there goes the engine.

Basically what I need to do is use the BS2 to cut the arming signal when the
engine reaches a safe 6150rpm or so. This will ensure that the N20 is no
longer flowing incase the fuel cut is hit.

The RPM signal can be read off of one of the lines going into the computer
on the car. The data I have for this is :

Engine speed output Signal: (V) 0-13, or more Note: Waveform

I assume the signal is the same as most modern EFI cars. I'm not sure how
to read this data into the BS2 however.

I think I can read the TPS sensor data in with a ADC, since its just a
normal 0-5V signal.

I also need to be able to cut the 12V signal from the arm switch to turn the
nitrous off assuming the TPS is at WOT, and the engine is above a
predetermined RPM.

I would also like to hook it up to a narrow band oxygen sensor to shut it
down if the mixture becomes too lean (this is a 0-1V signal. Not sure how
to get this info into the BS2. ADC again? What to use as a reference
voltage however?).

Any suggestions on the best way to go about doing this? Please let me know.

Thanks.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-08-25 20:11
    Looks like a simple job for pulsein. If you can monitor a direct RPM
    signal the duration will be 160 usec at 6250 RPM and 162.6 usec at 6150
    RPM. Looks like you need to drop the arm signal if pulsein sees a
    signal some where between these two ranges.

    Will this work? SOunds good, except I don't know the limits of pulse
    in, if not al's Pak 7 would also be something to check out probably work
    for you!


    http://www.al-williams.com/awce/pak7.htm


    regards

    Leroy

    Tarun Tuli wrote:
    >
    > Hi guys.
    >
    > I'm in the process of needing to design a failsafe for one of my cars
    > running nitrous.
    >
    > The nitrous system works like this. There is a arming button inside of the
    > vehicle. When the arm button is off, the system is shut down. With the arm
    > button on, the system is armed. The nitrous will only kick in when the
    > engine is at WOT (wide open throttle) and the system has been armed. It
    > knows its at WOT by measuring the TPS signal on the car (throttle position
    > sensor).
    >
    > One of the major problems is that the stock computer in the car does a fuel
    > cut at redline (this case, 6250rpm). If by mistake I hit redline before
    > shifting, and the engine is at WOT, nitrous will still be flowing (but fuel
    > won't be), and there goes the engine.
    >
    > Basically what I need to do is use the BS2 to cut the arming signal when the
    > engine reaches a safe 6150rpm or so. This will ensure that the N20 is no
    > longer flowing incase the fuel cut is hit.
    >
    > The RPM signal can be read off of one of the lines going into the computer
    > on the car. The data I have for this is :
    >
    > Engine speed output Signal: (V) 0-13, or more Note: Waveform
    >
    > I assume the signal is the same as most modern EFI cars. I'm not sure how
    > to read this data into the BS2 however.
    >
    > I think I can read the TPS sensor data in with a ADC, since its just a
    > normal 0-5V signal.
    >
    > I also need to be able to cut the 12V signal from the arm switch to turn the
    > nitrous off assuming the TPS is at WOT, and the engine is above a
    > predetermined RPM.
    >
    > I would also like to hook it up to a narrow band oxygen sensor to shut it
    > down if the mixture becomes too lean (this is a 0-1V signal. Not sure how
    > to get this info into the BS2. ADC again? What to use as a reference
    > voltage however?).
    >
    > Any suggestions on the best way to go about doing this? Please let me know.
    >
    > Thanks.
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

    --

    *******************************************************
    * Leroy Hall *
    * 317 Cherokee Drive *
    * Loveland, Ohio - USA 45140-2404 *
    *******************************************************
    * Phone: (513) 697-7539 *
    * Cell : (513) 300-8632 *
    * Email: leroy@f... *
    * Home page URL: http://home.fuse.net/leroy/ *
    * Resume URL: http://home.fuse.net/leroy/resume.htm *
    *******************************************************
    * Leroy Hall *
    * 317 Cherokee Drive *
    * Loveland, Ohio - USA 45140-2404 *
    *******************************************************
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-26 00:06
    How would I deal with the fact the signal is 0-13V (or more) and the
    stamp needs 5V? Whats the best way of doing this?

    Thanks.


    --- In basicstamps@y..., "Leroy Hall, Senior" <leroy@f...> wrote:
    > Looks like a simple job for pulsein. If you can monitor a direct
    RPM
    > signal the duration will be 160 usec at 6250 RPM and 162.6 usec at
    6150
    > RPM. Looks like you need to drop the arm signal if pulsein sees a
    > signal some where between these two ranges.
    >
    > Will this work? SOunds good, except I don't know the limits of
    pulse
    > in, if not al's Pak 7 would also be something to check out probably
    work
    > for you!
    >
    >
    > http://www.al-williams.com/awce/pak7.htm
    >
    >
    > regards
    >
    > Leroy
    >
    > Tarun Tuli wrote:
    > >
    > > Hi guys.
    > >
    > > I'm in the process of needing to design a failsafe for one of my
    cars
    > > running nitrous.
    > >
    > > The nitrous system works like this. There is a arming button
    inside of the
    > > vehicle. When the arm button is off, the system is shut down.
    With the arm
    > > button on, the system is armed. The nitrous will only kick in
    when the
    > > engine is at WOT (wide open throttle) and the system has been
    armed. It
    > > knows its at WOT by measuring the TPS signal on the car (throttle
    position
    > > sensor).
    > >
    > > One of the major problems is that the stock computer in the car
    does a fuel
    > > cut at redline (this case, 6250rpm). If by mistake I hit redline
    before
    > > shifting, and the engine is at WOT, nitrous will still be flowing
    (but fuel
    > > won't be), and there goes the engine.
    > >
    > > Basically what I need to do is use the BS2 to cut the arming
    signal when the
    > > engine reaches a safe 6150rpm or so. This will ensure that the
    N20 is no
    > > longer flowing incase the fuel cut is hit.
    > >
    > > The RPM signal can be read off of one of the lines going into the
    computer
    > > on the car. The data I have for this is :
    > >
    > > Engine speed output Signal: (V) 0-13, or more Note:
    Waveform
    > >
    > > I assume the signal is the same as most modern EFI cars. I'm not
    sure how
    > > to read this data into the BS2 however.
    > >
    > > I think I can read the TPS sensor data in with a ADC, since its
    just a
    > > normal 0-5V signal.
    > >
    > > I also need to be able to cut the 12V signal from the arm switch
    to turn the
    > > nitrous off assuming the TPS is at WOT, and the engine is above a
    > > predetermined RPM.
    > >
    > > I would also like to hook it up to a narrow band oxygen sensor to
    shut it
    > > down if the mixture becomes too lean (this is a 0-1V signal. Not
    sure how
    > > to get this info into the BS2. ADC again? What to use as a
    reference
    > > voltage however?).
    > >
    > > Any suggestions on the best way to go about doing this? Please
    let me know.
    > >
    > > Thanks.
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@y...
    > > from the same email address that you subscribed. Text in the
    Subject and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    >
    > --
    >
    > *******************************************************
    > * Leroy Hall *
    > * 317 Cherokee Drive *
    > * Loveland, Ohio - USA 45140-2404 *
    > *******************************************************
    > * Phone: (513) 697-7539 *
    > * Cell : (513) 300-8632 *
    > * Email: leroy@f... *
    > * Home page URL: http://home.fuse.net/leroy/ *
    > * Resume URL: http://home.fuse.net/leroy/resume.htm *
    > *******************************************************
    > * Leroy Hall *
    > * 317 Cherokee Drive *
    > * Loveland, Ohio - USA 45140-2404 *
    > *******************************************************
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-26 00:36
    >How would I deal with the fact the signal is 0-13V (or more) and the
    >stamp needs 5V? Whats the best way of doing this?

    It might be a good thing to use an OptoIsolator for this. I don't know a
    huge amount about motor cars EXCEPT that all the electronics in them have to
    be pretty much bomb proof [noparse]:)[/noparse] It might also be a good idea to make the
    system failsafe so that if there is no frequency at all then the N2O unit
    will not function. The 0 - 1 V signal can easily be boosted up (again an
    optoisolator would be useful here) in fact if you get an optoisolator with
    an opamp on the output stage then this voltage could probably go straight
    in. I don't know how N2O works but I was thinking that an additional
    failsafe could be added by fitting a microswitch to the top of the clutch
    pedal so that if the clutch was pushed out then the N2O would stop working
    (does this make sense ?).

    Justin "Can I fit this to my Deux Chevaux?" Pentecost

    Focus Puller and Basic stamp Idiot
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-26 18:05
    > Engine speed output Signal: (V) 0-13, or more Note: Waveform

    > I assume the signal is the same as most modern EFI cars. I'm not sure how
    > to read this data into the BS2 however.

    Scale the voltage with a divider and then put it into the ADC. See below.

    Vin (0-13V)
    |
    |
    R1
    |
    |
    ---- Vout (0-5V)
    |
    |
    R2
    |
    |
    GND

    Vout = Vin (R2/(R1+R2))

    Solve for Vin = 13V, Vout = 5V, and R2 = some value. You can make R1 and R2
    high values and limit the loading of the original signal, but most A/D
    converters need a low input impedance. If the signal is a DC signal you can
    add a capacitor from Vout to GND. If it needs fairly good response time (as
    you will likely need), then you might put an op-amp follower between Vout
    and the input to the A/D converter. If the original signal can stand lower
    resistances then you can set R1 + R2 to around 10K and it should be OK to
    just feed the Vout directly into the A/D converter.

    This is all assuming the 0V of the signal is the same 0V as the ADC.



    > I think I can read the TPS sensor data in with a ADC, since its just a
    > normal 0-5V signal.

    Just make sure your ADC can take 5V in ... some are set up to only take
    0-4.092V in ... if it needs the lower level, just put a divider on it as
    well.


    > I also need to be able to cut the 12V signal from the arm switch
    > to turn the
    > nitrous off assuming the TPS is at WOT, and the engine is above a
    > predetermined RPM.

    5V relay, use the contacts to break the wire when you want to. If you use a
    relay with a normally closed set of contacts, you can let the signal through
    normally and then kill it when your stamp says to. If you want a more
    "failsafe operation", use the normally open set of contacts and make the BS2
    "allow" the ARM signal to get though when it's ready. This way if there is
    trouble with your BS2, it is more likely to fail in the case where the ARM
    signal is not let through when it should be than when it shouldn't be [noparse]:)[/noparse] ...
    (of course, i'd have to look at what sorts of modes the BS2 might fail in,
    what it's pins go to in reset, etc... so one way may be better than the
    other depending on things I don't know).

    To drive the relay, use a 2n2222 transistor (or equivalent) to drive the
    coil. Hook the + side of the coil to 5V, the - side to the collector of
    transitor. Hook the emitter of transistor to ground. Hook the base to the
    BS2 through a limiting resistor. When the BS2 pin is low, then transistor is
    off and the coil is not energized. When the pin is high, there is current
    flowing into the base of transistor and it will energize the coil. When you
    turn the transitor off there needs to be a diode to catch the energy in the
    coil or it will destroy things, so add a 1N914 or 1N4148 diode around the
    coil. See below.

    ARM IN -> NC contact of Relay >>> COM contact of relay --- ARM OUT ->

    +5V
    |
    | |
    |
    Relay Coil / \
    | / \
    |
    | |
    |
    |C
    \
    \|B______ (100-1000) ohm resistor ____ BS2 pin
    /|
    /
    |E
    |
    GND

    The resistor value is more complicated than I want to go into .... but look
    at the Voh specs of the BS2. If it says 2.4V at 8mA, then make the resitor
    (2.4V-0.7V (transistor drop)/8mA). That should be close enough if your using
    a small signal relay.


    > I would also like to hook it up to a narrow band oxygen sensor to shut it
    > down if the mixture becomes too lean (this is a 0-1V signal. Not sure how
    > to get this info into the BS2. ADC again? What to use as a reference
    > voltage however?).

    Well, if you have enough resolution, you could just read it directly. If you
    want more resolution, put it though an amplifier ....


    GND---R1
    R2
    | |
    | | |
    --| - |
    | >
    OUT
    ---IN ---| +
    | (this is supposed to be an op-amp)


    OUT = ((R2+R1)/R1)*IN

    So, for a gain of 5, R1 = 1K, R2 = 4K ... or thereabouts.



    > Any suggestions on the best way to go about doing this? Please
    > let me know.
    >
    > Thanks.

    Your welcome [noparse]:)[/noparse] ... the things I do to get out of homework .... (just
    started grad school after many years working in industry .... durn DSP is a
    lot harder if you can't even rememeber how to multiply 2 sin waves together
    .... ) ...

    [noparse]:)[/noparse]
    John ... back to reading ...
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-27 17:46
    On Sat, 25 Aug 2001, Tarun Tuli wrote:

    > Hi guys.
    >
    > I'm in the process of needing to design a failsafe for one of my cars
    > running nitrous.
    >
    > The nitrous system works like this. There is a arming button inside of the
    > vehicle. When the arm button is off, the system is shut down. With the arm
    > button on, the system is armed. The nitrous will only kick in when the
    > engine is at WOT (wide open throttle) and the system has been armed. It
    > knows its at WOT by measuring the TPS signal on the car (throttle position
    > sensor).
    >
    > One of the major problems is that the stock computer in the car does a fuel
    > cut at redline (this case, 6250rpm). If by mistake I hit redline before
    > shifting, and the engine is at WOT, nitrous will still be flowing (but fuel
    > won't be), and there goes the engine.
    >
    > Basically what I need to do is use the BS2 to cut the arming signal when the
    > engine reaches a safe 6150rpm or so. This will ensure that the N20 is no
    > longer flowing incase the fuel cut is hit.
    >
    > The RPM signal can be read off of one of the lines going into the computer
    > on the car. The data I have for this is :
    >
    > Engine speed output Signal: (V) 0-13, or more Note: Waveform
    >
    > I assume the signal is the same as most modern EFI cars. I'm not sure how
    > to read this data into the BS2 however.
    >
    > I think I can read the TPS sensor data in with a ADC, since its just a
    > normal 0-5V signal.
    >
    > I also need to be able to cut the 12V signal from the arm switch to turn the
    > nitrous off assuming the TPS is at WOT, and the engine is above a
    > predetermined RPM.
    >
    > I would also like to hook it up to a narrow band oxygen sensor to shut it
    > down if the mixture becomes too lean (this is a 0-1V signal. Not sure how
    > to get this info into the BS2. ADC again? What to use as a reference
    > voltage however?).
    >
    > Any suggestions on the best way to go about doing this? Please let me know.
    >
    > Thanks.
    >
    >

    My .02,

    This is the been there, done that answer having both built nb/o2 data
    loggers and spray 600+hp worth of nos every pass (-:
    When it comes to engine longevity I always use the simplest and least
    failure prone means of protection. In this case I would use an MSD p/n 8950
    to shut down power to the solenoids. The bsII could be used to do this but
    you MUST make sure that your code is correct and when you design the
    hardware you make it rf and emi proof. The environment in an automotive
    setting is very harsh and if not taken into consideration will cause lock
    ups/ resets and hangs. Price wise they are about the same. As for the o2
    sensor sensing a lean condition and trying to correct it; consider
    this.... Once the lean condition can be detected in the exhaust, damage is
    already being done.
    As for detecting tps, a quality switch to turn on the system at the
    throttle body is best and least failure prone.
    Use the bsII to read tps via adc, read o2 with adc (I used 1.4 vref), rpm,
    and use pulse-in to read injector pulse and log all of your data.

    One other option would be to raise the rev limiter like I did on my EFI
    car to something you should never see ( 7900 for mine ) but this is not a
    good idea IMHO (-;

    Feel free to email me with any questions about the nos setup.

    Good Luck,



    Dale Harwood [noparse][[/noparse] N4VFF ]

    internet> dale@h...

    ax.25> n4vff@n4vff.#cha.tn.usa.noam

    #include <std_disclaimer.h>
  • ArchiverArchiver Posts: 46,084
    edited 2001-08-28 03:36
    Hi Dale.

    I took into consideration all the suggestions you made. I beleive the
    MSD8950 is not compatible with my car (direct iginition. From what I could
    find, it needs a feed off of a distributor?) Plus I need a two stage
    system, something where it can activate at a certain RPM, and deactivate at
    another.

    I guess my real goal is to have something similar to the Venom N20 kit, but
    at a much more resonable cost (they start at $1300!), plus its more fun to
    build something myself ;-)

    True, that once a lean condition is reached, damage is already done. Im
    hoping to catch it right before it runs dangerously lean and starts burning
    things up. The car actual has a wideband O2 sensor before the cats, and a
    narrowband after. Im baseing it on the narrowband sensor for now (I haven't
    figured out how a wideband sensor works. But im assuming thats its fairly
    complex, since meters for it cost several hundren to thousands of dollars).
    I have my EGT/AF meters to rely on, but just want one extra layer of
    protection incase im not paying attention (same reason for have the rev cut
    off).

    As for the TPS microswitch idea, once again I need a lower and upper
    threshold. The N20 system im using basis its activation off of the TPS
    signal as well (ZEX).

    You mentioned you had it hooked up as a datalogger? Im mainly concerned
    about getting the RPM signal to the BSII. Would you mind sharing some of
    your code/schematic? Was it tapped off of the ECU (im assuming my signal
    comes from a crank pickup sensor). Ive already received several great ideas
    from people already, im just not sure which will work the best. I guess my
    second goal is to not destroy the computer on the car. I dont have a spare!
    ;-)


    Thanks.




    My .02,

    This is the been there, done that answer having both built nb/o2 data
    loggers and spray 600+hp worth of nos every pass (-:
    When it comes to engine longevity I always use the simplest and least
    failure prone means of protection. In this case I would use an MSD p/n 8950
    to shut down power to the solenoids. The bsII could be used to do this but
    you MUST make sure that your code is correct and when you design the
    hardware you make it rf and emi proof. The environment in an automotive
    setting is very harsh and if not taken into consideration will cause lock
    ups/ resets and hangs. Price wise they are about the same. As for the o2
    sensor sensing a lean condition and trying to correct it; consider
    this.... Once the lean condition can be detected in the exhaust, damage is
    already being done.
    As for detecting tps, a quality switch to turn on the system at the
    throttle body is best and least failure prone.
    Use the bsII to read tps via adc, read o2 with adc (I used 1.4 vref), rpm,
    and use pulse-in to read injector pulse and log all of your data.

    One other option would be to raise the rev limiter like I did on my EFI
    car to something you should never see ( 7900 for mine ) but this is not a
    good idea IMHO (-;

    Feel free to email me with any questions about the nos setup.

    Good Luck,



    Dale Harwood [noparse][[/noparse] N4VFF ]

    internet> dale@h...

    ax.25> n4vff@n4vff.#cha.tn.usa.noam

    #include <std_disclaimer.h>






    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sign In or Register to comment.