PCM Diagnostics & Tuning HP Tuners | Holley | Diablo

TPS for switch on off?

Thread Tools
 
Search this Thread
 
Old Apr 14, 2018 | 12:43 PM
  #1  
ElQueFør's Avatar
Thread Starter
TECH Enthusiast
10 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2011
Posts: 531
Likes: 5
Default TPS for switch on off?

I want to control a switch or relay with a certain TPS % threshold. Is this possible? A Hobbs switch for boost is my backup option but I'd really like to explore the possibility of of using TPS to switch a relay on or off instead.


I'm going to add a fluid pump to the T56 hybrid I finished a month or so ago and I'm playing with ideas on how to control it. I don't want a toggle, except for maybe a manual override, I'd rather automate the process. A Hobbs switch will do the trick. But is it possible to control switches/relays with TPS????

As some of you know, the vehicle is a mutt but here are the relevant details as I can think of them now.

90 GMT400, LQ4, S475, T56, 3 bar SD 411 PCM.
Old Apr 14, 2018 | 04:21 PM
  #2  
truckdoug's Avatar
9 Second Club
10 Year Member
Liked
Loved
Community Favorite
iTrader: (26)
 
Joined: Nov 2013
Posts: 6,389
Likes: 558
From: Portlandia
Default

If you're good with Arduino boards you could do it. Tps output is a .5 to 4.5 volt output.

Ms3pro or Holley dominator might have an output you could configure to do that. Hp tuners does not.

Or you rig a microswitch on the throttle cam itself.

Lots of ways to skin thatcatt
Old Apr 14, 2018 | 07:59 PM
  #3  
brandon6.0's Avatar
TECH Addict
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (32)
 
Joined: Dec 2009
Posts: 2,332
Likes: 29
From: Glennville, GA.
Default

Nitrous micro switch sounds like the best and easiest way. Just read the tps with your software and make bracket for trigger around tht tps%.
Old Apr 14, 2018 | 10:50 PM
  #4  
ElQueFør's Avatar
Thread Starter
TECH Enthusiast
10 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2011
Posts: 531
Likes: 5
Default

Right on, thanks guys.

Might need to revisit some of my arduino experience from the flow bench and see how involved controlling it that way will be.

I have no experience with these microswitches. Do they have to be for nitrous setups? I get a few electronics catalogs in the mail. All Electronics is one. They have all kinds of weird eccentric stuff. I wonder if there is something in there that might work.
Old Apr 16, 2018 | 08:48 AM
  #5  
truckdoug's Avatar
9 Second Club
10 Year Member
Liked
Loved
Community Favorite
iTrader: (26)
 
Joined: Nov 2013
Posts: 6,389
Likes: 558
From: Portlandia
Default

any of those little microswitches sold on sparkfun would work.

https://www.sparkfun.com/products/9506

i'm sure everyone from nitrous kit makers to pinball machine manufacturers buy from the same place
Old Apr 16, 2018 | 09:53 AM
  #6  
JoeNova's Avatar
Restricted User
 
Joined: Mar 2014
Posts: 7,192
Likes: 109
From: Ohio
Default

Would take ~5-6 lines to do it with an arduino.
Old Apr 16, 2018 | 07:23 PM
  #7  
ElQueFør's Avatar
Thread Starter
TECH Enthusiast
10 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2011
Posts: 531
Likes: 5
Default

My limited Arduino experience is just with that injector flow bench.


Joe, you're obviously good with Arduino, I saw your flow bench! Care to help with the code? I haven't even thought about it yet really.
Old Apr 16, 2018 | 07:29 PM
  #8  
pdxmotorhead's Avatar
TECH Addict
5 Year Member
 
Joined: Oct 2016
Posts: 2,513
Likes: 480
From: PDX-OR-USA
Default

If your running the pump just to cool the transmission, a contact temperature switch on the tranny would be an option.?

If your trying to turn the pump off when running hard, a RPM switch would work maybe?

Combination of the two?
LS1 Tech Stories

The Best V8 Stories One Small Block at Time

story-0

10 Reasons Daily Driving a Swap Project SUCKS! (& 1 Reason to Do It Anyway)

 Michael S. Palmer
story-1

6 Gifts Neither Your Dad Nor Grad Will Shove Into the 'Trinket Drawer'

 Brett Foote
story-2

Topdon ONE vs. Artidiag 800 BT2: Which is the Diagnostic Tablet For You?

 Pouria Savadkouei
story-3

Gas Monkey Built a 6-Wheel Ferrari Testarossa With a Corvette LT4 Engine

 Verdad Gallardo
story-4

7 Most Reliable High-Performance Engines GM Has Ever Built

 Verdad Gallardo
story-5

Amazing '71 Camaro Restomod Is Modern Muscle Car Under the Skin

 Verdad Gallardo
story-6

6 Common C5 Corvette Failures and What's Involved In Repairing Them

 Pouria Savadkouei
story-7

Retro Modern Bandit Pontiac Trans AM Comes With Burt Reynolds' Autograph

 Verdad Gallardo
story-8

Top 10 Greatest Cadillac V Series Performance Models Ever, Ranked

 Pouria Savadkouei
story-9

Top 10 Most Powerful Chevy Trucks Ever Made!

 
Old Apr 16, 2018 | 08:18 PM
  #9  
ElQueFør's Avatar
Thread Starter
TECH Enthusiast
10 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2011
Posts: 531
Likes: 5
Default

Hmmm I'm liking all the ideas that have been suggested. I have options on how to do this which I likey!!!!

Yeah main thought is on hard pulls I want it to start spraying lube at the headset gears since the oil rushes towards the back of the case for a split second.
Old Apr 17, 2018 | 12:30 AM
  #10  
NSFW's Avatar
TECH Fanatic
5 Year Member
Liked
Loved
Community Favorite
 
Joined: Jan 2018
Posts: 1,061
Likes: 200
Default

Sounds like you might also want an accelerometer to turn the pump on. And throttle, and a temp sensor... sense all the things! Maybe 50 lines of Arduino code?
​​
Old Apr 17, 2018 | 07:13 AM
  #11  
JoeNova's Avatar
Restricted User
 
Joined: Mar 2014
Posts: 7,192
Likes: 109
From: Ohio
Default

Originally Posted by ElQueFør
My limited Arduino experience is just with that injector flow bench.


Joe, you're obviously good with Arduino, I saw your flow bench! Care to help with the code? I haven't even thought about it yet really.
Should be easy.

Declare the analog input and digital output with variables.

Inside the loop, just do an IF analoginput > X, digitalWrite relay HIGH, else digitalWrite relay LOW. X will be somewhere between 0 and 1023 for the analog input.

4 lines of code.

Don't quote this because I don't have the IDE in front of me so I'm going off top of my head, and it depends on which board you're using)

Code:
Relay = D2;

void loop() {
TPS = analogRead(A1);
if (TPS > 950) {digitalWrite(relay, HIGH)} else {digitalWrite(relay,LOW)}
You'll have to experiment with the number. 0 to 1023 is 0V to 5V. TPS operates closer to .5V - 4.5V.

You can make the code more complicated and set mine/max TPS amounts and then convert to a TPS % from there, but it just creates extra lines that basically do nothing but make it easier for you to understand your own code.
Old Apr 17, 2018 | 07:16 AM
  #12  
JoeNova's Avatar
Restricted User
 
Joined: Mar 2014
Posts: 7,192
Likes: 109
From: Ohio
Default

and I forgot the } at the very end. I can't edit posts.

Also, you can skip the variables all together and just do.

[CODE]
void loop() {
if (analogread(A1) > 950) {digitalWrite(D2, HIGH)} else {digitalWrite(D2, LOW)}}

2 lines.
Old Apr 17, 2018 | 07:23 AM
  #13  
TrendSetter's Avatar
TECH Addict
20 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2004
Posts: 2,178
Likes: 627
From: Florida
Default

you're going to want some hysteresis in the code.
i have exactly what youre asking for, i use it to activate my boost controller and fuel pumps. i can post some code snippets tonight
Old Apr 17, 2018 | 07:35 AM
  #14  
JoeNova's Avatar
Restricted User
 
Joined: Mar 2014
Posts: 7,192
Likes: 109
From: Ohio
Default

Originally Posted by TrendSetter
you're going to want some hysteresis in the code.
i have exactly what youre asking for, i use it to activate my boost controller and fuel pumps. i can post some code snippets tonight
They'll help with a runaway relay in this situation, but not completely required.
Old Apr 17, 2018 | 09:42 AM
  #15  
TrendSetter's Avatar
TECH Addict
20 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2004
Posts: 2,178
Likes: 627
From: Florida
Default

its important for when you are part throttle and it keeps switching back and forth between the on and off state.
analog signals can be noisy so you want some form of filtering in there, or a hysteresis. i like it for when I pedal it a little it wont turn my pumps/boost control on and off, it keeps them on until i let off completely
Old Apr 17, 2018 | 12:32 PM
  #16  
JoeNova's Avatar
Restricted User
 
Joined: Mar 2014
Posts: 7,192
Likes: 109
From: Ohio
Default

I had problems with a runaway relay when using it for water/meth. When you crossed the threshold for the relay but stayed within a couple of KPA, the relay would just buzz. A full hysteresis isn't needed, just a simple gap between activation/deactivation thresholds. If TPS > 700, HIGH, if TPS < 650, LOW.
Old Apr 17, 2018 | 02:38 PM
  #17  
TrendSetter's Avatar
TECH Addict
20 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2004
Posts: 2,178
Likes: 627
From: Florida
Default

in this context, that's what hysteresis is, homey
Old Apr 17, 2018 | 04:52 PM
  #18  
TrendSetter's Avatar
TECH Addict
20 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2004
Posts: 2,178
Likes: 627
From: Florida
Default

i pulled this out of my fuel pump controller i use in my truck.

Code:
#define MAPTHRESH  325 // raw 0-1023 analog in
#define MAPHIST     150 //  1 bar = 328, 1.4 bar = 461

#define TPSTHRESH   450  // raw 0-1023
#define TPSHIST     150

#define MAIN_DELAY_FASTER	10
void loop() {
	//  100hz loop
	if ((millis() - lastMil10) >= MAIN_DELAY_FASTER) { //run this every 10 ms (100hz)   
        mapRaw = analogRead(A0);
        tpsRaw = analogRead(A1);
        
        //mapV = (5000/1023) * mapRaw;  //convert to mv
        //tpsV = (5000/1023) * tpsRaw;
        
        
        if ((mapRaw > MAPTHRESH) && (tpsRaw > TPSTHRESH)) {
            // fuel pump/bc not on, but the map and tps thresholds have been exceeded
            //Serial.println("fuel pump on");
            digitalWrite(FUELOUT, HIGH);
        }

        if ((mapRaw < MAPTHRESH - MAPHIST) || (tpsRaw < TPSTHRESH - TPSHIST)) {
            //Serial.println("fuel pump off");
            digitalWrite(FUELOUT, LOW);
            
        }
		lastMil10 = millis();
	}
}
Old Apr 17, 2018 | 08:14 PM
  #19  
ElQueFør's Avatar
Thread Starter
TECH Enthusiast
10 Year Member
Photogenic
Photoriffic
Shutterbug
 
Joined: Dec 2011
Posts: 531
Likes: 5
Default

You guys are awesome.

I just checked to make sure I have a few perf boards and all the rest of the goodies from my last arduino go round and I do.

Just ordered up another Arduino board for this project. I'm going to leave the other one dedicated to my flow bench.


Do you guys have a favorite enclosure for these? I'll need one for both of these Arduino projects. My flowbench Arduino board is still just pinned in to a temporary breadboard
Old Apr 17, 2018 | 09:12 PM
  #20  
truckdoug's Avatar
9 Second Club
10 Year Member
Liked
Loved
Community Favorite
iTrader: (26)
 
Joined: Nov 2013
Posts: 6,389
Likes: 558
From: Portlandia
Default

man i'm gonna have to get up on this arduino stuff. looks like i'm missing out on fun.



All times are GMT -5. The time now is 02:21 AM.

story-0
10 Reasons Daily Driving a Swap Project SUCKS! (& 1 Reason to Do It Anyway)

Slideshow: 10 reasons daily-driving a swap project might not be for you. Or is it?

By Michael S. Palmer | 2026-06-17 09:39:05


VIEW MORE
story-1
6 Gifts Neither Your Dad Nor Grad Will Shove Into the 'Trinket Drawer'

Don't get dad new socks or a grill brush this year.

By Brett Foote | 2026-06-09 14:55:56


VIEW MORE
story-2
Topdon ONE vs. Artidiag 800 BT2: Which is the Diagnostic Tablet For You?

Slideshow: We take a close look at the ONE and Artidiag 800BT2 diagnostic tools from Topdon and the reasons to buy one over the other.

By Pouria Savadkouei | 2026-06-18 10:26:23


VIEW MORE
story-3
Gas Monkey Built a 6-Wheel Ferrari Testarossa With a Corvette LT4 Engine

Slideshow: The controversial Ferrari F6 swaps its original flat-12 for a Corvette Z06-derived LT4 V8 and sends power to four rear wheels through a custom-built drivetrain.

By Verdad Gallardo | 2026-05-26 18:23:54


VIEW MORE
story-4
7 Most Reliable High-Performance Engines GM Has Ever Built

Slideshow:These GM engines didn't just make huge power, they survived abuse, boost, track days, and six-digit mileage with a reputation for refusing to quit.

By Verdad Gallardo | 2026-05-21 16:45:27


VIEW MORE
story-5
Amazing '71 Camaro Restomod Is Modern Muscle Car Under the Skin

Slideshow: This heavily modified 1971 Camaro mixes classic muscle car styling with a fifth-generation Camaro interior and modern LS3 power.

By Verdad Gallardo | 2026-05-12 18:06:42


VIEW MORE
story-6
6 Common C5 Corvette Failures and What's Involved In Repairing Them

Slideshow: From wobbling harmonic balancers to failed EBCMs, these are the issues that define long-term C5 ownership and what repairs typically involve.

By Pouria Savadkouei | 2026-05-07 18:44:57


VIEW MORE
story-7
Retro Modern Bandit Pontiac Trans AM Comes With Burt Reynolds' Autograph

Slideshow: A modern Camaro transformed into a retro icon, this limited-run "Bandit" build blends nostalgia with brute force in a way few revivals manage.

By Verdad Gallardo | 2026-04-21 13:57:02


VIEW MORE
story-8
Top 10 Greatest Cadillac V Series Performance Models Ever, Ranked

Slideshow: Cadillac didn't just crash the high-performance luxury vehicle party, it showed up loud, supercharged, and occasionally a little unhinged...

By Pouria Savadkouei | 2026-04-16 10:05:15


VIEW MORE
story-9
Top 10 Most Powerful Chevy Trucks Ever Made!

Slideshow: Top ten most powerful Chevy trucks ever made

By | 2026-03-25 09:22:26


VIEW MORE