TPS for switch on off?
#1
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.
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.
#2
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
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
#4
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.
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.
#5
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
https://www.sparkfun.com/products/9506
i'm sure everyone from nitrous kit makers to pinball machine manufacturers buy from the same place
#7
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.
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.
Trending Topics
#8
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?
If your trying to turn the pump off when running hard, a RPM switch would work maybe?
Combination of the two?
#9
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.
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.
#11
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 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.
#12
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.
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.
#14
#15
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
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
#16
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.
#18
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(); } }
#19
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
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