1995 NA8 Miata - MicroRusEFI PnP

Your chance to introduce yourself and your vehicle
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

Just recieved my NA 48 pin PnP board with microRusEFI today. I connected it to the laptop and was able to get it connected to tuner studio. However when I got it connected to the car, it wouldn't show up as a USB Serial device either without the ignition turned on, or when plugging into it with the ignition already on.

I gather from the instructions that I should be able to connect using the mini usb cable on the microRusEFI after powering on the device with the key (without starting the car). Has anyone else had issues with this? Is it a power supply issue? If it is relevant, I am using the same cable when connected to the car and when disconnected from the car, so that should not be the issue.

Below I have included the relevant lines from linux's dmesg to show that the device is recognized, but the computer can't connect to it successfully. I have had this type of issue before when a microcontroller has a power issue.

Code: Select all

[ 1350.205711] usb 1-1: device descriptor read/64, error -71
[ 1350.435662] usb 1-1: device descriptor read/64, error -71
[ 1350.665703] usb 1-1: new full-speed USB device number 26 using xhci_hcd
[ 1350.792329] usb 1-1: device descriptor read/64, error -71
[ 1351.025690] usb 1-1: device descriptor read/64, error -71
[ 1351.132447] usb usb1-port1: attempt power cycle
[ 1351.775650] usb 1-1: new full-speed USB device number 27 using xhci_hcd
[ 1351.775913] usb 1-1: Device not responding to setup address.
[ 1351.985960] usb 1-1: Device not responding to setup address.
[ 1352.192257] usb 1-1: device not accepting address 27, error -71
[ 1352.315667] usb 1-1: new full-speed USB device number 28 using xhci_hcd
[ 1352.315962] usb 1-1: Device not responding to setup address.
[ 1352.522628] usb 1-1: Device not responding to setup address.
[ 1352.729019] usb 1-1: device not accepting address 28, error -71
[ 1352.729155] usb usb1-port1: unable to enumerate USB device
I also have a couple of side questions:

Where can I find a pin mapping from the pins that show for analog sensors in TunerStudio (eg AN volt 9) and the pins on microRusEFI (eg AV9) I assume this is the correct mapping, but I would like to know for sure.

Finally where can I find the mapping from the 48 pin connector harness to the microRusEFI. I am trying to use the stock MAF for the time being since I don't have a vacuum hose routed at the moment. If I understand correctly I should just have to change it out of Speed Density into MAF mode, and set up the MAF sensor to the correct pin. I believe it might be

Code: Select all

2O -> AV9 -> AN volt 9
. Thanks in advance.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

I think I may be at fault here. Looking at the picture of your rusEFI I took before sending it out, it appears that I forgot to remove some jumpers (the little black rectangles close to the main connector). Sorry!

EDIT: Let me get this right. Ignore what I posted before.

I should have removed Jumpers: jp23 and jp24
You can remove them with a soldering iron, or a hot air re-work station.

Alternatively you can remove the following contacts from the plug: 1T and 1S

I will post images and instructions in a bit.
Last edited by stefanst on Tue Sep 29, 2020 2:36 pm, edited 2 times in total.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

Edit: I screwed this up too it seems.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

No worries. I'll remove the jumpers and report back here.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

Jumpers_To_Remove.png
Jumpers_To_Remove.png (2.32 MiB) Viewed 18276 times
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

I removed the jumpers and now I can connect the the ECU via usb both with the ignition on and off! Thanks!

I was able to calibrate my TPS, and even got the engine to briefly start up, however it would die right away. Taking a look at the MAF transfer table, it seems that may be the issue, since the sensor reads 0v when there is no air, but the transfer table is backwards suggesting that 0v is max airflow.

I am completely new to this, so I really don't know what I'm doing, but I did find this thread on miata forumns: https://forum.miata.net/vb/showthread.php?t=485932&goto=nextoldest, which has some numbers for the curve. I feel like this is still incorrect, or at least incomplete (too few entries, starts at 1.3v which seems too high). So I will keep looking.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

The new MAF curve didn't fix it. Maybe I have the wrong pin. I will check that tonight. I took a log which shows that the MAF never registered any airflow, and that the injectors came on during startup, but promptly turned off immediately after the engine rpm rose.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

The MAF transfer function was derived and verified from an NA6 car. To the best of my knowledge, the two curves are identical between NA6 and NA8. I think it's even the same box.
Your assumption that the wrong pin is set is likely correct. It's probably set to Pin 27 (AN Volt 1) which is a remnant from an earlier revision. It should be pin 20 (AN Volt 5) instead.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

Hi stefanst, i'll try changing the pin. AFAIK that is the same pin as the MAP sensor though, so do I have to disconnect that somehow to keep it from interfering?
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

OK. Let me give this another shot. My brain is addled with too many different PnP boards and too many different versions.

On *your* board MAF is "AN Volt 9" which is pin 40. The MAP Sensor is "AN Volt 5" which is pin 27.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

I have updated the pin to "AN Volt 9" which is what I had set it to originally, and I'm still seeing 0v. I buzzed it out from the connector to the AFM all the way to the ecu pin, and it all seems correct (connects to pin 2O as expected). On the asumption that this is correct, I have put in the MAF table that ramps the other way (higher voltages equal higher airflow) but I still can't get the engine to get out of the cranking phase.

Looking at a log there is a very small voltage coming from the MAF (range 0 - 0.08v during cranking), but this is totally out of the expected range (1.2 - 4.5v) from what I have read online for this sensor. I will try measuring the voltage on this wire while the engine is idling with the stock ECU. Maybe we are not providing a voltage reference that is supposed to be provided by the ECU.

I have attached a datalog (just rename to .mlg) in case anyone is curious.
Attachments
data-log.txt
data log showing cranking and immediately dying
(43.55 KiB) Downloaded 336 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

mapaul wrote:
Fri Oct 02, 2020 6:56 am
Maybe we are not providing a voltage reference that is supposed to be provided by the ECU.
NB MAFs definitely need a pull-down, NA MAFs look pretty similar to NB MAF you might be on something here!
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

We may have screwed that up. If the 94/95 MAF is indeed a hot-wire MAF and not flapper-style, it may require different treatment than the NA6 VAF.
I am a bit surprised though that it would read 0V. It should show full-scale (5V) in absence of the 1k pull-down.
@AndreyB do you have a log of your NB2, showing MAF voltage when you tried to run without the pulldown?
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

95 engine bay
95 engine bay
image.png (1.91 MiB) Viewed 18174 times
I just googled 95 Miata engine bay and the engine indeed seems to have a hot-wire MAF.
Still weird that it would show 0V though.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

I measured the voltages on the connector with the key in the accessory position, but engine off, since I couldn't figure out how to measure the voltage without disconnecting the connector.

With the Stock ECU:

12v 0v 5v 0v 0v

With rusEFI

12v 3v 5v 0v 0v

The wire colors are in the same order as the MAF diagram on page 9 of the wiring diagram: https://www.miataforumz.com/1990-200-Miata-Wiring/95sys.pdf

WHT/RED, RED/WHT, RED/BLK, BLK/BLU, BLK/LT GRN
PXL_20201003_045450820.jpg
PXL_20201003_045450820.jpg (1.19 MiB) Viewed 18166 times
You can actually see where these pins should connect on this photo of the 94/95 wiring harness.
Image

Of these pins, I buzzed out

RED/WHT -> 2O // MAF signal
RED/BLK -> 2P // IAT signal

To be honest this doesn't make sense to me, since if I am reading 0v from this pin when it is connected, the MAF must be acting as a pretty hard short to ground, and I don't see a reason why setting it to 0 volts (as the OEM ECU does) would improve the situation. Does this make sense to any of you?
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

I'm pretty sure I found the reason for the 0V reading. This last batch of MRE boards has R30 populated. This means that AV9 is configured as an OUTPUT, not an input.
image.png
image.png (342.43 KiB) Viewed 18151 times
image.png
image.png (1.07 MiB) Viewed 18151 times
Easiest fix would be to remove R30. Alternatively, you could jumper 2O on the main board to another analog voltage input that is not configured as output.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

stefanst wrote:
Sat Oct 03, 2020 8:14 pm
I'm pretty sure I found the reason for the 0V reading. This last batch of MRE boards has R30 populated. This means that AV9 is configured as an OUTPUT, not an input.
the dream was for this to not matter, these jumpers were there just in case I believe. I could be wrong, I do not understand electricity :(
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

Can you explain what you mean by that, Andrey?

My (admittedly very limited) current understanding of the architecture of rusEFI is that the TLE8888 handles most of the IO and voltage shifting, while the stm32 is responsible for determining what to output, and how to respond to inputs. Given that architecture, I would assume that which pins are inputs and outputs would be a question of firmware, not of hardware. Are you saying that R30 is somehow setting the direction of AV9 in hardware? or are you saying that it is affecting the value being read somehow.

If you can explain the problem, I would be happy to contribute towards a more long-term fix if it's something I have the skills to do. I have an stlink, logic analyzer, oscilloscope, and decent soldering equipment, so I believe I have the tools that would be necessary, although I admit I'm pretty new with them, so I may not have the skill.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

I do not understand electricity is the most important part of the message, we need Jared @kb1gtt to clarify if hardware jumpers are in fact required to control input/output. I vaguely recall the hope that it would be the firmware deciding on this and the jumpers were left only as the last resort measure.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

An attempt at explanation:
In an attempt to maximize versatility, some of the pins on the Processor serve dual duty. We are talking about pins not connected to the TLE8888.
For example:

Traditionally [AN Volt9] on the 48 pin connector serves as an analog input without pullup for voltage measurement. This pin is connected to some conditioning circuitry that then connects to pin [PB1] on the MCU.
In the latest version of the MRE, pin [PB1] on the MCU can also serve as an output. It is connected to a MOSFET driver that also connects to [AN Volt9] on the 48 pin connector.
These two circuits exist in parallel.

The idea was that, depending on how the state of [PB1] was selected in the configuration, it could serve as input or output, simply by how it is initialized. I believe this idea to be mistaken. The MOSFET output stage over-drives any input signal one may chose to connect to [AN Volt9]. This is where R30 comes into play. R30 connects [PB1] to the MOSFET driver. Removing it will disable the driver and enable [AN Volt9] to become the input it is intended to be in your use case.

Unfortunately, since our initial assumption that your MAF is the same as the NA6 MAF seems mistaken, we are now missing information on how to use it. It may well be electrically identical to the NB Miata MAF. In this case it will require a 1kOhm pulldown resistor which can easily be installed on the main PCB. Or it may not. We also have no confirmed calibration for it.

How hard would it be for you to run a vacuum line from the intake to the ECU, so you can drive the car using the MAP sensor, which we know for sure how to do? In that case, we could use your MAP sensor data to calibrate the MAF.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

Thanks for the explanation! That makes a lot of sense now. I have purchased some vacuum line, but it may not be long enough. I do have a base calibration that I found on a forum, so I will start with that.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

mapaul wrote:
Sun Oct 04, 2020 3:59 pm
I do have a base calibration that I found on a forum, so I will start with that.
We are failing to properly document that miata base tunes are build into the ECU. Instead of random outdated files from the forum it's much wiser to use the "Popular Vehicles" button
image.png
image.png (30.61 KiB) Viewed 18109 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

Maybe we should add those buttons also for NA8.
Of course that would require, as of yet non-existent, tunes for NA8.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by AndreyB »

Ohhhh right, we do not have those for NA8 yet :(
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

I removed R30, and was able to see values in the expected range ~0.7v without the engine running. This might be a little low, based on the calibration curve, but MUCH better than before. I turned off ignition and fuel, and cranked the engine over to see what the MAF was reading with a little air, and it seemed to be changing in a reasonable way (possibly a bit low) so I attempted to start it. It was showing airflow, but I guess it was still not enough to keep the fueling high enough to run.

I have posted the log/tune here: https://rusefi.com/online/view.php?log=41
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

hmm, for some reason it didn't associate the tune with the log, here it is https://rusefi.com/online/view.php?msq=226.

I have now connected the pulldown, and I suspect it won't change anything, but I'll report back.
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by stefanst »

Well this certainly looks promising!

Yes, the values do appear reasonable. There is at least one thing that's still not right: Your VE table seems one set up for speed density (running off MAP sensor). So the values for small When using a MAF (mass airflow) algorithm, this table should start out at 100% everywhere. This should increase fuel in near-idle conditions substantially.

Speed-density and mass-airflow work fundamentally differently. So for MAF, the VE table serves as a tool for fine-tuning fueling- ideally it should be 100% everywhere. Most likely, your engine won't be ideal, but from my experience, this table should be well within 80%-120% everywhere if the transfer function for the MAF sensor is correct.

Scaling on your Y-Axis is likely wrong as well. Scaling for MAF mode should start at lower values. I'd say set the bottom to "0.1" and the top t "160" or so. Even steps in between and let's see where we land. In the meantime, I will dig through old data and see if I can find a proper table for you. But I'm in the middle of something else right now.
mapaul
Posts: 23
Joined: Sat Sep 12, 2020 5:10 am

Re: 1995 NA8 Miata - MicroRusEFI PnP

Post by mapaul »

The pulldown didn't hurt anything, but it also doesn't seem to have helped. So I have now removed it. I reset my VE table to 100% across the board, and also turned dynamic timing back on (I had this fixed at 10deg before) and I was able to achieve the following log https://rusefi.com/online/view.php?log=42

It still died, but it was able to regulate the engine speed for about a second before dying, which is definitely progress. Are there more tweaks to the VE table I should be doing?

I appreciate all the help.
Post Reply