Computer Talk Discussions here pertain to mods, troubleshooting, and PC/console gaming

Let's build a black box for a 1986 22RE truck

Thread Tools
 
Search this Thread
 
Old 09-19-2018, 09:56 AM
  #1  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
Let's build a black box for a 1986 22RE truck

Mods, feel free to move this if you don't think it belongs here...

Okay I've got issues with brevity so I'm gonna jump right into it. I've seen a whole bunch of people posting about diagnostic connectors in other threads and I've bumped a few other threads about data from the 22RE and hope to consolidate them here.

I have an ultimate goal of building a black box for my 1986 toyota motorhome. It's just a 4runner or pickup or whatever on the front end, we can talk about what it is specifically if it becomes important/necessary, but the point is that I don't have the square diagnostic link connector under the hood and I don't have the round DLC2 under the dash near the wheel. I'm not just talking about being able to log and read engine codes, though that would certainly be something this black box should be able to handle once it's done.

The goal is to log data as quickly as I can get it, up to say 10-12 times per second if possible (otherwise, just whatever is possible), save it somewhere if I run into issues, look at it later, whatever. Also my dash is really old so I want to display the data live with a little screen. Think Prius dashboard or something. This means grabbing speed rpm all the usual suspects in addition to the nitty gritty fuel/air mix stuff. I'll also have external sensors; I want to monitor gravity, as well as some other simple stuff like gps altitude etc.

The question is not whether I can do this, it's how? I'm starting from scratch. I plan to do this using a Raspberry Pi, a 7~9" screen or two in the dash, and whatever other hardware is necessary to build the interface. I'm fairly car-stupid but I know how to write software and I know how to wire things to eachother. That's my starting point.

My initial thought is that I'll get one of those patch braids that are like extension cables for the ECU and tie wires into the patch so I don't mess with my OEM wiring, then run my wires over to the pi, translate/record/display data.

There are also a few people that think I might still be able to find the data that comes over the TE2 pin on the DLC somewhere in my truck, just....not where I think it is. I'd be willing to entertain that.

If the software ends up working out well we can all share it amongst ourselves and improve our own pickups or try it out......if anyone wants to, that is. I'll probably publish the code online.

Last edited by UGR; 09-19-2018 at 10:09 AM.
Old 09-19-2018, 10:26 AM
  #2  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
Gotta get myself back to work but yeah wrong section, common mistake, computer talk is "off topic personal computer" type stuff.
Old 09-19-2018, 10:38 AM
  #3  
Registered User
 
old87yota's Avatar
 
Join Date: Jun 2013
Location: Portland, Oregon, USA
Posts: 3,083
Received 570 Likes on 449 Posts
Originally Posted by Co_94_PU
Gotta get myself back to work but yeah wrong section, common mistake, computer talk is "off topic personal computer" type stuff.
Meh, it kind of fits here, given the use of a Raspberry Pi. This thread could actually fit into a few sub-forum categories.

If you do want the thread moved, have a moderator move it so threads are not duplicated.

Old 09-19-2018, 10:57 AM
  #4  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
Ooh. Yeah I saw all the ECU talk here and figured this was the right place

Well, I'm also building a home automation system into the RV so maybe that will fit here instead (once the time comes, that is)
Old 09-19-2018, 07:14 PM
  #5  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
No reason to stall the conversation where ever this ends up

What are the expectations?

There isn't alot going on with these engines sensor wise. And most of it is straight voltage readings from a voltage divider circuit.

For under 1k you can just plug in a mega squirt and feed it's data to a pi, much less than 1k if you want to solder up your own.

Here is the ECU layout.


I see about ten channels here worth monitoring.

Injectors, STArt, IDL, THG, OX, KNK, VTA, NE, VS, THA, and SPD. Guess that is eleven..

The only real tricky bits are monitoring the RPM(Ne), knock (KNK, it's low voltage AC waves), and injector pulse widths without interfering with the triggers and protecting the pi.



Last edited by Co_94_PU; 09-19-2018 at 07:19 PM.
Old 09-19-2018, 09:02 PM
  #6  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
So here's a question since I can't get at my ECU right now (RV screws, need to go get a squaredriver)

Is this from the '88 FSM, because the 1985 FSM doesn't list nearly so many outputs on the ECU braid? Or are they just unmarked because they're "unused" as in "these aren't useful......yet"?

I am willing to monitor any of the data as often as it comes in. my expectation is to be able to completely replace my dash -- including speedo and odo -- with the final product. the black box will always be logging data and give me live feedback when/how ever I want it. I need to know how you want me to expand on my middle paragraph in the OP starting with "the goal" - all the stuff you mentioned I consider worthwhile. I'm not coming at this from a "I want to enhance performance by messing with the data" standpoint, I'm coming at this from a "if there is data, I want to have it" standpoint. That's also why I didn't consider megasquirt (way too expensive!) because I can get a pi for 20 bucks, a nice metal case for 15 bucks, and build something with some optos for, I dunno, another 20-30 bucks? voltages sound great because I can just use the pi as a glorified multimeter, right? seems like a waste to do anything more than that especially on my budget.
Old 09-20-2018, 04:19 AM
  #7  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
The pin out is probably Darin's taken from an 87-88. Its the most complete version notice there is only a single pin not listed with an output. (Pretty sure that turns into te2 on second gen TCCS computers, but I'm not going to go dig out that diagram) The pins don't move to the best of my recollection, but regardless it's a good starting point.

So you are looking at roughly 26 signals, once grounds and automatic stuff is taken out) half of which are digital (on/off) and the other 13 are voltage swing. (Actually some of those "digital" pins have ramp time that is important..)

You need a good voltage follower on Vcc and Batt, otherwise the numbers will skew and fluctuate.

A few high-speed signals here for injectors and ignition, which need to be kept in mind while sourcing parts, setting software interupts and laying out software flow control.. 4*5000 / 60 ~= 333 samples per second, on at minimum two channels.

Are you thinking to build a one off, on perf board, etch your own, or have China do the circuit board
Old 09-20-2018, 08:18 AM
  #8  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
Some other things came.to mind on my drive into work

You won't be able to cheaply replace the cluster, it uses a mechanical speedo which then generates the electrical signal for the ECU. That means swapping to a new sender unless you just want to augment the display.. (Add-on/overlay)

To get a modern trip computer you'll need a pressure transducer on the fuel rail. Added expense of not only a transducer but mating with the Toyota style connectors (banjo fitings)
Old 09-20-2018, 10:44 PM
  #9  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
Originally Posted by Co_94_PU
Are you thinking to build a one off, on perf board, etch your own, or have China do the circuit board
Might do both. Prototype the thing and then make boards. if people want them anyway. The goal is to get the data to a pi so it might just be sold as a pi attachment (a la ribbon cable or something)

Originally Posted by Co_94_PU
You won't be able to cheaply replace the cluster, it uses a mechanical speedo which then generates the electrical signal for the ECU. That means swapping to a new sender unless you just want to augment the display.. (Add-on/overlay)
Goal is to completely replace the dash, but I could always just jam the screens into the dash cluster in front of the regular stuff. But wait a second, you're saying the ECU gets the speed FROM the speedo? it's not the other way around?

Originally Posted by Co_94_PU
To get a modern trip computer you'll need a pressure transducer on the fuel rail. Added expense of not only a transducer but mating with the Toyota style connectors (banjo fitings)
So like, I keep seeing stuff that says I can just use a hall sensor for mileage and speed. Is this not possible?
Old 09-21-2018, 03:50 AM
  #10  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
Originally Posted by UGR
Might do both. Prototype the thing and then make boards. if people want them anyway. The goal is to get the data to a pi so it might just be sold as a pi attachment (a la ribbon cable or something)
That was a multipart question but whatever =P

Is there a Pi rated for automotive use? Automotive electronics have a higher temperature and vibration threshold. It's been a while since I've looked at them for anything serious but I don't recall them being rated for auto cabin temperature.


Goal is to completely replace the dash, but I could always just jam the screens into the dash cluster in front of the regular stuff. But wait a second, you're saying the ECU gets the speed FROM the speedo? it's not the other way around?
Yes speedometer generated if its mechanical there is a cable located in the tail housing of the transmission. They didn't go to an electronic sender on the transmission untill the 90's. Even the digital dash in my 86 has a speedo cable.
So like, I keep seeing stuff that says I can just use a hall sensor for mileage and speed. Is this not possible?
A modern trip computer uses the injector pulse width to give a live mpg number, for this to be accurate it needs to know fuel pressure. The fuel pressure varies with engine load, based on vacuum supplied to the regulator. I guess depending on how accurately you want to calculate it you could fudge the numbers in.
Distance and speed are already available either from the factory pulse generator, which ever one it is, where else would you put a hall-effect pickup?
​​​​​
I would do the dash as an overlay. It will make DMV safety inspection so much less of an issue.
Old 09-27-2018, 01:26 PM
  #11  
Registered User
 
scope103's Avatar
 
Join Date: Sep 2007
Location: San Francisco East Bay
Posts: 8,254
Likes: 0
Received 822 Likes on 649 Posts
Originally Posted by Co_94_PU
... A modern trip computer uses the injector pulse width to give a live mpg number, for this to be accurate it needs to know fuel pressure. The fuel pressure varies with engine load, based on vacuum supplied to the regulator ....
Only half right (so mostly wrong).

The whole point of having an (adjustable) fuel pressure regulator is BECAUSE the air pressure (vacuum) in the intake varies with throttle position. The FPR changes the fuel pressure with throttle position so the pressure ACROSS the injector is always constant. The ECU doesn't need to know the fuel pressure or the manifold pressure; it just sets the open-time of the injector which directly controls the amount of fuel injected.

So to measure fuel consumption, all you need to know is the injector pulse width. As a bonus, the injectors open twice per crank revolution, so the frequency of that pulse train gives you tach.

But you don't need to re-invent the wheel. I have this unit http://mpguino.wiseman.ee/eng and it works great (I have a '94, but this unit reads the injector line and the VSS signal directly, without relying on the datastream). User JennyGirl also installed one and reported that here: https://www.yotatech.com/forums/f116...12/index3.html
Old 09-27-2018, 05:34 PM
  #12  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
Originally Posted by scope103
Only half right (so mostly wrong).

The whole point of having an (adjustable) fuel pressure regulator is BECAUSE the air pressure (vacuum) in the intake varies with throttle position. The FPR changes the fuel pressure with throttle position so the pressure ACROSS the injector is always constant. The ECU doesn't need to know the fuel pressure or the manifold pressure; it just sets the open-time of the injector which directly controls the amount of fuel injected.

So to measure fuel consumption, all you need to know is the injector pulse width. As a bonus, the injectors open twice per crank revolution, so the frequency of that pulse train gives you tach.

But you don't need to re-invent the wheel. I have this unit http://mpguino.wiseman.ee/eng and it works great (I have a '94, but this unit reads the injector line and the VSS signal directly, without relying on the datastream). User JennyGirl also installed one and reported that here: https://www.yotatech.com/forums/f116...12/index3.html

Good links scope, I forgot about that project!

But I'll argue..
Injector Pressure - Your car has a pressure regulator to manage your fuel manifold pressure, and it will regulate to it's setting. You could measure your pressure, but then you would have to know how that affects the fuel flow through the injector. We also do not know how the pressure changes over time and this can affect your fuel flow.
Let's assume I miss understand the regulator bias, quite likely. There is still the vsv control on the bias port. Which means it's not always the same pressure. Cheap to monitor that vsv switch's position atleast.
Old 09-27-2018, 09:21 PM
  #13  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
Yo, that mpguino is rad! It's clearly in the direction I want to go, just that I also want a graphical display instead of the little LCD. My test screen is on its way to me now. So, maybe I can depend on this thing for some of my data, and wire in all the other stuff like the idiot lights to another board... I'll also have a look at their code to see if I can pair the thing up nicely. Thanks for linking this!
Old 09-28-2018, 09:37 AM
  #14  
Registered User
 
scope103's Avatar
 
Join Date: Sep 2007
Location: San Francisco East Bay
Posts: 8,254
Likes: 0
Received 822 Likes on 649 Posts
Originally Posted by Co_94_PU
...But I'll argue..

Let's assume I miss understand the regulator bias, quite likely. There is still the vsv control on the bias port. Which means it's not always the same pressure. Cheap to monitor that vsv switch's position atleast.
Yes, monitoring the injectors alone will miss the few seconds (up to 2 minutes http://www.cygnusx1.net/Media/Supra/...taTech/h22.pdf) that the FPU system might operate. It will also miss the fuel used in the Cold Start Injector (which can only be on while cranking).

I can tell you what your instantaneous MPG is during CSI operation: zero. For me, I don't expect to get a lot of useful information during my first two minutes of driving, so if my instantaneous MPG is slightly high during hot-start conditions, I'm not too worried. It will affect your long-term cumulative MPG, but by how much? 0.0001%? Whatever error is introduced will be swamped by the inherent error in measuring injector open-time.

From a computational sense, monitoring the FPU VSV is just a single GPIO. But don't forget that you have to splice yet another wire at the ECU, in a harness that you really don't want to damage. Monitoring the CSI is also just one more GPIO, but that sense lead is NOT at the ECU, so you'll have to string more wire. Saying "I'll use an Arduino" is easy; running all the wires can get complicated.

Good luck!
Old 09-28-2018, 09:40 AM
  #15  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
related, this is a little off-topic, but I keep seeing that nobody has dumped the 22RE ECU PROM? or have they and nobody has cared to comb through it and see what the data is?
Old 09-28-2018, 10:02 AM
  #16  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
Little foggy on that subject. It's been done but not made public iirc there was a Michigan shop willing to supply custom/modified ECU for awhile.

You'll have to dig thru the celica forums probably. Actually a lot of knowledge there on these computers, as they are all similar to an extent.

Might be some links in my cruise control thread (?) About the computer chips.
Old 09-28-2018, 10:28 AM
  #17  
UGR
Registered User
Thread Starter
 
UGR's Avatar
 
Join Date: Sep 2018
Location: A Van Down By The River, USA
Posts: 25
Received 0 Likes on 0 Posts
ok. if there isn't, I would be willing to attempt a dump and disassemble. I'm not incredibly good at asm, and I don't think that would teach me anything that I could use (in terms of building the black box / trip computer, anyway) but you really never know.
Old 09-28-2018, 12:39 PM
  #18  
Registered User
iTrader: (-1)
 
Co_94_PU's Avatar
 
Join Date: Dec 2012
Location: Colorado
Posts: 5,433
Likes: 0
Received 554 Likes on 452 Posts
Find you a copy of this.. It'll give you plenty to work with.. Or the EWD book.
TCCS__TOYOTA_COMPUTER_CONTROLLED_SYSTEM_.pdf
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
2shots1beer
Pre 84 Trucks
5
12-31-2012 06:50 AM
MillerPKA
95.5-2004 Tacomas & 96-2002 4Runners
8
10-25-2009 07:37 PM
Jason B
95.5-2004 Tacomas & 96-2002 4Runners
27
06-04-2009 06:36 AM
slow_xc_star
95.5-2004 Tacomas & 96-2002 4Runners
133
01-11-2005 07:44 AM
durrettsyndrom
95.5-2004 Tacomas & 96-2002 4Runners
9
01-18-2004 10:22 AM



Quick Reply: Let's build a black box for a 1986 22RE truck



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