Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   EE's: help me with this TPS circuit (https://www.miataturbo.net/megasquirt-18/ees-help-me-tps-circuit-30308/)

JustinHoMi 01-14-2009 05:43 PM

EE's: help me with this TPS circuit
 
1 Attachment(s)
I'm stuck with the standard TPS switch on my 90-93 miata because of the class I race in. I'm trying to put together a circuit that makes more use of the TPS.

http://justinmitchell.net/gallery2/d/58403-1/tps.JPG

Explanation:

The miata has two TPS inputs.

1N:
0v when pedal released
5v when PARTIALLY applied

2L:
5v when released
0v when FULLY applied

The above circuit attempts to obtain the following:

0v when pedal released
3v when partially applied
5v when fully applied

So I used a voltage divider to bring 1N down to 3v. The NPN transistor is used as a switch to invert the signal on 2L. Maybe there is a better way? Is this circuit "safe"?

I have almost no idea what I'm doing... I just read a lot on wikipedia, and messed around with a circuit simulator for a LONG time until I found something that appeared to work :)

Note that I am using a custom firmware that can take advantage of this. Some people will never need anything like this... but I do.

I tested the following conditions in the simulator:

Code:

              1N  2L  MS
No throttle  0v  5v  0.02v
Partial      5v  5v  2.97v
Full          5v  0v  5v

However... I'm sure there's something I missed, so that's why I'm posting here :)

patsmx5 01-14-2009 05:54 PM

Circuit looks ok to me. I didn't break out the calculator and check it, but I think it's right. Only thing I question is when you're WOT and the R3 2k2 goes to ground, then current will go from vref>1N>D1>R4>R3>ground. That gives me a current of .001515151 amps. And a voltage drop across R4 of 1.515151 volts. So the voltage would be 5-1.5151= 3.48 when you go WOT.

EDIT: Disclaimer: I'm no EE. But I am doing E.E. Systems HW right now. But I'm going for ME, not EE.

EDIT2: Yeah, I can't read. My math's way off, ignore it. I think yours is right, I'll check it again in a sec.

Joe Perez 01-14-2009 06:23 PM

Looks good to me. Your predicted voltages check out, current through Q1 should be a max of 9ma when at half-throttle, no sneak paths that I can see... Looks like a winner.

JustinHoMi 01-14-2009 07:18 PM

Sweet, thanks for looking at it. I never expected it to work as-is!

So, if I want to build this circuit in the MS proto area, I could run the TPS through pins 4 and 5 on the connector, and that would bring them out to SPR2 and SPR3 on the board, right? Then I'd run the output to the backside of pin 22.

I know the TPS normally comes in through pin 22, but I'm not sure how I'd intercept the signal. It'd be nice not to waste a pin though.

JustinHoMi 01-14-2009 07:39 PM

Also... The MS came with some spare 2N3904FS-ND (similar to this: 2N3904 NPN Small Signal Transistor - RadioShack.com). Will that do the trick?

Or should I get something more like this: MPS2222A Transistor - RadioShack.com

I assume most diodes will work? I have a couple of 1N4001DICT-ND.

Is there any minimum wattage I should be looking at for the resistors?

cardriverx 01-14-2009 08:07 PM

you cant simply get a oem miata automatic tps? or is that out of the rules?

Joe Perez 01-14-2009 09:26 PM


Originally Posted by cardriverx (Post 353587)
you cant simply get a oem miata automatic tps? or is that out of the rules?

(...)


Originally Posted by JustinHoMi (Post 353518)
I'm stuck with the standard TPS switch on my 90-93 miata because of the class I race in.


Joe Perez 01-14-2009 09:30 PM


Originally Posted by JustinHoMi (Post 353577)
Also... The MS came with some spare 2N3904FS-ND (similar to this: 2N3904 NPN Small Signal Transistor - RadioShack.com). Will that do the trick?

Or should I get something more like this: MPS2222A Transistor - RadioShack.com

There are some trivial differences in the small-signals section of the specs page, and the rated collector current on the 2222 is about triple that of the 3904, but either one should work for this application.


I assume most diodes will work? I have a couple of 1N4001DICT-ND.
1n400x are fine here.


Is there any minimum wattage I should be looking at for the resistors?
No. You're dealing with microscopic amounts of current here. 1/8 watt parts would be fine.

Braineack 01-15-2009 09:25 AM


Originally Posted by JustinHoMi (Post 353570)

I know the TPS normally comes in through pin 22, but I'm not sure how I'd intercept the signal. It'd be nice not to waste a pin though.


or you'd solder the output directly to R9 since it's already on the board.

JustinHoMi 01-18-2009 12:18 AM

Welllll.....

I built the circuit, hooked it up to the car, and turned the key. After tapping the throttle, I realized that the MS LED's blink on when hitting the throttle, and turn off when letting up.

Scared that I fried my coils, I hooked up the oem ecu, and it sure enough, it runs terribly. So I tested each plug wire with my timing light and two aren't firing.

I take it my coil pack is toast?

::sob::

patsmx5 01-18-2009 12:23 AM

Probably. Post your msq or a screen shot of your ignition settings. Probably have something backwards and it's holding your coils 'high' all the time.

JustinHoMi 01-18-2009 12:38 AM

I would, but the power supply I've been using for my stim just decided to kick the bucket too.

But I don't think it's a setting. When I turned the key to ON, the MS LED's did not turn on. When I hit the throttle they turned on, and when I released the throttle they turned back off. I'm thinking that I must have shorted out the MS somehow, and that must have caused my coils to be held high or low or whatever.... I must have made an error when wiring up the circuit.

JustinHoMi 01-18-2009 12:45 AM

1 Attachment(s)
Well my packratedness paid off... I found another power supply. Here is my MSQ. Note that I'm using MAF mode (no MAP sensor), so my ve and spark tables may look off.

Braineack 01-18-2009 12:48 PM

I would go back over where I wired my stuff to...

JustinHoMi 01-18-2009 02:47 PM

1 Attachment(s)
I double-checked the circuit, and I don't see any obvious problems. The entire circuit is on the proto area of the MS.

1N -> Pin4 on DB37 -> SPR2
2L -> Pin5 on DB37 -> SPR3

I copied the exact layout of the circuit into a simulator, as you can see below. I added the pullups for each input through the +5v on the proto area, and the transistor is grounded to the proto GND. I didn't have any output. I just hooked up the multimeter, which was grounded to one of the grounds on the DB37.

I don't really know how to represent 1N and 2L in the simulator though. How do you represent a signal that needs a pullup?

JustinHoMi 01-20-2009 05:32 PM

Any ideas on how this might have shorted out my MS? I'm pretty much as a loss.

patsmx5 01-20-2009 05:45 PM

post a screen shot of your ignition settings that you are currently running on the MS.

JustinHoMi 01-20-2009 07:24 PM

2 Attachment(s)
Here ya go.

I connected the MS to the car with the above circuit hooked up, and wouldn't start, and LED's were OFF when the ignition was turned to ON. Then I disconnected the circuit and hooked it up, and the LED's were ON. The only difference was the circuit, no config changes.

jwx 01-21-2009 08:34 AM

Its sounds like your shorting the Vref to ground. When the Vref is grounded, it makes the MS shut down, or not start, depending upon how you look at it.

JasonC SBB 01-21-2009 10:07 AM

There's probably a much simpler circuit to be had. Sort of like an R-2R ladder D-A circuit.
I need to know what the TPS switches do (how they connect).

I take it the TPS switches are all pullup to 5V switches? (Your circuit sort of assumes that). If you get the pull up vs. pull down (to gnd) wrong, your circuit won't work right.

But I gotta ask, what is the "off,half,full" signals for? So the MS can tell when throttle is closed, WOT, and somewhere in between? I would recommend turning off TPS based accel because this circuit can't tell the MS the rate of change of throttle opening.


All times are GMT -4. The time now is 02:08 PM.


© 2024 MH Sub I, LLC dba Internet Brands