View Single Post
Old 05-18-2017, 07:06 PM   #124 (permalink)
skybolt
deviant
 
Join Date: Oct 2016
Location: Seattle, WA
Posts: 69

s2k - '02 Honda s2000
Thanks: 12
Thanked 47 Times in 35 Posts
fDevelopment back on track. I've managed to duplicate an MPGuino using a 3.3v board, which is necessary to transmit data to the pi without a voltage converter like this one.

I kept frying Arduino Pro Minis -- or so I thought. I gave up on that particular board but I suspect the on-board voltage regulator was overheating. When I switched development to a tinycirctuits tinyduino, the results were much different. In short, it worked as expected.

The first piece of the puzzle is a car-to-board interface. I used a blank prototype board and based the circuit on meelis' 3 resistor design:



Then I soldered the necessary pins to the tinyduino prototype board, letting me quickly connect and disconnect the board using the 28-pin connector. This makes updates super simple.



Since this is still a prototype (I still need to perfect the interface board), I bundled the two pieces (now connected) to a raspberry pi. I used this particular case for the pi as there are few opportunities for a short circuit.

I put the entire thing behind the stereo head unit:
and then sealed it all up (well, I pushed the stereo unit back into position):


Very clean, very professional looking, no more wires sticking out of the side off the dash. The two small looms you see allow me to connect to the Adafruit LCD shield for tank resets and any other housekeeping. I also wired up the Adafruit's reset button, which forces the tinyduino to reset the LCD, which doesn't work well if it's connected to an already-running arduino. (The adafruit buttons can't be used to reset the backlight, as they seem to need to be provisioned or addressed at boot time. (I think this has to do with the i2c bus).

My next order of business is: Leverage the program's internal timer to vary the JSON output every couple of seconds. For example, every two seconds the 'subtitle' on the bottom graph could cycle between displaying drag race data, tank/trip data; or primary and extended drag race data. I see a number of timers scattered throughout the code, so I'll use them as a template. This will address a primary limitation of the JSON/Pi approach, limited screen real-estate.



I've taken my own functions (a copy of the doOutputJSON function, plus a blink function) and I can drop them into newer code revisions as I continue development. This should keep me far from the dreaded code fork.

Last edited by skybolt; 05-19-2017 at 11:11 AM.. Reason: trying to fix lame dropbox permissions issue
  Reply With Quote
The Following 2 Users Say Thank You to skybolt For This Useful Post:
josemapiro (06-17-2017), t vago (10-15-2017)