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,331
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

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

 Verdad Gallardo
story-1

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

 Pouria Savadkouei
story-2

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

 Verdad Gallardo
story-3

Top 10 Greatest Cadillac V Series Performance Models Ever, Ranked

 Pouria Savadkouei
story-4

Top 10 Most Powerful Chevy Trucks Ever Made!

 
story-5

Hennessey's New Supercharged Silverado ZR2 Has 700 HP

 Verdad Gallardo
story-6

Coachbuilt N2A Anteros Is an LS2-Powered C6 Corvette In Italian Clothes

 Verdad Gallardo
story-7

Awesome K5 Blazer Restomod Comes With C7 Corvette Power

 Verdad Gallardo
story-8

10 Camaros You Should Never Buy

 
story-9

10 LS Engine Myths That Refuse to Die

 Verdad Gallardo
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,059
Likes: 198
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,177
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,177
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,177
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,177
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 03:03 PM.

story-0
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-1
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-2
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-3
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-4
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
story-5
Hennessey's New Supercharged Silverado ZR2 Has 700 HP

Slideshow: Hennessey has turned the Silverado ZR2 into a 700-hp off-road monster with supercharged V8 power and a limited production run.

By Verdad Gallardo | 2026-03-24 18:57:52


VIEW MORE
story-6
Coachbuilt N2A Anteros Is an LS2-Powered C6 Corvette In Italian Clothes

Slideshow: A one-off sports car that looks like a vintage Italian exotic-but hides a C6 Corvette underneath-just sold for the price of a new mid-engine Corvette.

By Verdad Gallardo | 2026-03-23 18:53:41


VIEW MORE
story-7
Awesome K5 Blazer Restomod Comes With C7 Corvette Power

Slideshow: A heavily reworked 1972 K5 Blazer swaps its off-road roots for a low-slung street-focused build with modern V8 power.

By Verdad Gallardo | 2026-03-09 18:08:45


VIEW MORE
story-8
10 Camaros You Should Never Buy

Slideshow: There are thousands of used Camaros on the market but we think you should avoid these 10

By | 2026-02-17 17:09:30


VIEW MORE
story-9
10 LS Engine Myths That Refuse to Die

Slideshows: Which one of these myths do you believe?

By Verdad Gallardo | 2026-01-28 18:10:11


VIEW MORE