Baconcreekmetal
Active member
- Joined
- Mar 18, 2023
- Messages
- 100
I also really the title of this thread.....
Any updates? Planning on dyno'ing this thing?
I have an access cab tundra with a TRD Blower on it that the cats and head unit were stolen from when it was stored in LA. Ins decided to total it out, so I bought it back, plan to pick up a 4 door tundra, probably 05/06 as a fam hauler that I will swap everything over too. Moved to AZ too, so I picked up some long tubes, curious on power numbers the setup will put down.
import board
import busio
import adafruit_mcp4728
import adafruit_ads1x15.ads1015 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
i2c = busio.I2C(board.SCL, board.SDA)
ads = ADS.ADS1015(i2c)
mcp4728 = adafruit_mcp4728.MCP4728(i2c, 0x60)
ads.gain = 2/3
aps1in = AnalogIn(ads, ADS.P0)
aps2in = AnalogIn(ads, ADS.P1)
tps1in = AnalogIn(ads, ADS.P2)
tps2in = AnalogIn(ads, ADS.P3)
aps1inmin = 0.78
aps1inmax = 4.35
aps2inmin = 1.59
aps2inmax = 4.99
aps1outmin = 0.6
aps1outmax = 4.0
aps2outmin = 2.25
aps2outmax = 4.9
tps1inmin = 0.870
tps1inmax = 4.54
tps2inmin = 1.69
tps2inmax = 4.46
tps1outmin = 0.829
tps1outmax = 4.278
tps2outmin = 2.6
tps2outmax = 5.07
while True:
aps1pct = (aps1in.voltage - aps1inmin) / (aps1inmax - aps1inmin)
aps2pct = (aps2in.voltage - aps2inmin) / (aps2inmax - aps2inmin)
tps1pct = (tps1in.voltage - tps1inmin) / (tps1inmax - tps1inmin)
tps2pct = (tps2in.voltage - tps2inmin) / (tps2inmax - tps2inmin)
aps1outv = (aps1pct * (aps1outmax - aps1outmin)) + aps1outmin
aps2outv = (aps2pct * (aps2outmax - aps2outmin)) + aps2outmin
tps1outv = (tps1pct * (tps1outmax - tps1outmin)) + tps1outmin
tps2outv = (tps2pct * (tps2outmax - tps2outmin)) + tps2outmin
aps1outdac = aps1outv * 65535 / 5
aps2outdac = aps2outv * 65535 / 5
tps1outdac = tps1outv * 65535 / 5
tps2outdac = tps2outv * 65535 / 5
mcp4728.channel_a.value = int(aps1outdac)
mcp4728.channel_a.vref = adafruit_mcp4728.Vref.VDD
mcp4728.channel_b.value = int(aps2outdac)
mcp4728.channel_b.vref = adafruit_mcp4728.Vref.VDD
mcp4728.channel_c.value = int(tps1outdac)
mcp4728.channel_c.vref = adafruit_mcp4728.Vref.VDD
mcp4728.channel_d.value = int(tps2outdac)
mcp4728.channel_d.vref = adafruit_mcp4728.Vref.VDD
# APPS and TPS Converter
import board
import busio
import adafruit_mcp4728
import adafruit_ads1x15.ads1015 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
i2c = busio.I2C(board.SCL, board.SDA)
ads = ADS.ADS1015(i2c)
mcp4728 = adafruit_mcp4728.MCP4728(i2c, 0x60)
ads.gain = 2/3
aps1in = AnalogIn(ads, ADS.P0)
aps2in = AnalogIn(ads, ADS.P1)
tps1in = AnalogIn(ads, ADS.P2)
tps2in = AnalogIn(ads, ADS.P3)
aps1inmin = 0.78
aps1inmax = 4.35
aps2inmin = 1.59
aps2inmax = 4.99
aps1outmin = 0.6
aps1outmax = 4.0
aps2outmin = 2.25
aps2outmax = 4.9
tps1inmin = 0.91
tps1inmax = 4.54
tps2inmin = 1.75
tps2inbreak = 3.5
tps2inmax = 4.65
tps1outmin = 0.829
tps1outmax = 4.25
tps2outmin = 2.60
tps2outmax = 5
while True:
aps1pct = (aps1in.voltage - aps1inmin) / (aps1inmax - aps1inmin)
aps2pct = (aps2in.voltage - aps2inmin) / (aps2inmax - aps2inmin)
tps1pct = (tps1in.voltage - tps1inmin) / (tps1inmax - tps1inmin)
tps2pct = (tps2in.voltage - tps2inmin) / (tps2inbreak - tps2inmin)
aps1outv = (aps1pct * (aps1outmax - aps1outmin)) + aps1outmin
aps2outv = (aps2pct * (aps2outmax - aps2outmin)) + aps2outmin
tps1outv = (tps1pct * (tps1outmax - tps1outmin)) + tps1outmin
tps2outv = (tps2pct * (tps2outmax - tps2outmin)) + tps2outmin
aps1outdac = aps1outv * 65535 / 5
aps2outdac = aps2outv * 65535 / 5
tps1outdac = tps1outv * 65535 / 5
if tps2outv > tps2outmax:
tps2outdac = 65535
else:
tps2outdac = tps2outv * 65535 / 5
mcp4728.channel_a.value = int(aps1outdac)
mcp4728.channel_a.vref = adafruit_mcp4728.Vref.VDD
mcp4728.channel_b.value = int(aps2outdac)
mcp4728.channel_b.vref = adafruit_mcp4728.Vref.VDD
mcp4728.channel_c.value = int(tps1outdac)
mcp4728.channel_c.vref = adafruit_mcp4728.Vref.VDD
mcp4728.channel_d.value = int(tps2outdac)
mcp4728.channel_d.vref = adafruit_mcp4728.Vref.VDD
Can't argue that point.Nerd
Man, I have that same problem just in general.I would like to help but I have no idea what you’re doing.
Less than a stock LS or 5.7 yota lol.What hp/tq are you looking to be at after all of this?