View Single Post
Old 04-30-2017, 10:35 PM   #113 (permalink)
Join Date: Oct 2016
Location: Seattle, WA
Posts: 69

s2k - '02 Honda s2000
Thanks: 12
Thanked 47 Times in 35 Posts
Originally Posted by t vago View Post
Not sure how the Arduino digitalWrite functions will interact with the MPGuino code, but I do not think they'll be a problem.
I seem to have located a problem in the digital read functions. In a nutshell, it won't read from my fuel injector, which is a 13v ground-read. I will walk you through the specifics, but I believe D2 and 3 are soaking up the 5v signal.

Let me start by saying that I first ran into the problem on a hardware test bed, basically a long breadboard with a 7508, one electrolytic cap (330uf) and a ceramic cap (104, so .1uf) on the regulator. I think it should have been .01 but it has not been the source of the problem. (I also have 51k resistors and I can switch back and forth between 5.1 and 3.3v zeners. I like to use 3.3v arduinos and I don't know if 5.1 will fry a D pin).

I used a voltmeter to check the voltage at D2/3 and it was near zero. I unplugged the 4 car wires and check the resistance with a voltmeter, and it changed into capacitive mode and read .01 nf. I unplugged the board, and it read 51k, as it should have from the start.

I then checked the voltage at the D2/3 pins on my Meelis hardware, and it read 5v (it's a 5v board with 5.1v zeners, so that's what I'd expect). Then I bypassed the Meelis resistors and zeners, and used my breadboard to pass input to the Meelis pins. It works as expected, properly reading RPMs and fuel.

I then installed this code (attached) on the Meelis hardware, as configured, and it no longer reads fuel. I can only conclude it's in the code. I can continue to test any number of physical scenarios, but you know know my ISP board is a bit dodgy, so re-flashing the Meelis hardware isn't something I want to do a lot of, but if I hold the ISP shield just right, all the pins make contact and it will compile and load properly.

The code has a few changes, mostly parameters and I changed the string date to 2017-02-10 (it read 08 even though the code title is 10 and I wasn't sure if it was loading on the Meelis until I changed the boot string).
Attached Files
File Type: zip (84.5 KB, 6 views)
  Reply With Quote