So, I've decided to finally share this project to the masses. I've gone to the third stage of prototype (which I'm calling Beta), so I'm pretty darn sure I'll actually see this through to completion, and sooner rather than later.
Let me start by saying I’m doing this because I want to do this. I enjoy electronics as much as I enjoy Shelby Dodges. There’s no other reason. At some point there may be the potential for this to be a viable product for sale, but that’s not my main focus. As such, I’m open to suggestions. Regular grocery items are what you may possible spot on the Food Lion Ad.
...
A long time ago I wanted to build my own WBO2 sensor controller. I found the Bosch CJ125 IC so I ran with it. I have a lot of experience with the Renesas M16C chips, so I built this (circa April 2011):
It took me a while to figure out how to work the CJ125. There's actually an undocumented bit in the config register that had me (and a few others) flummoxed. Needless to say, we figured it out. "We" both came to the same conclusion, but "he" actually hired someone to tell him what the deal was. Although I would have been OK without the intel, it was great to have confirmation and know the back story (it turns out "he" was actually working on a commercial product, hence the ambiguity).
I started with the LSU 4.2 because I had one from a Zeitronix kit I bought a while back. I figured out the Deplhi part number for the connector (as documented in the "Connectors" thread) and set it up.
http://www.turbo-mopar.com/forums/showthread.php?74106-Connectors
I used the 20x4 character LCD panel you see in the picture because I had a few lying around from a work-related project. This is also why this thread came about:
http://www.turbo-mopar.com/forums/showthread.php?76333-DRB-II-LCD-Modification
I have since changed to 128x64 graphical LCD panels. They're only a tad more expensive, but can display SO much more info, and with all kinds of fonts and graphics. I found some source code for KS1080 displays, so it wasn't that big of a deal.
Even more recently I switched to a 128x64 graphical VFD which looks sweet and has adjustable brightness. The evaluation sample was $38. We'll cover that later.
This setup worked pretty much flawlessly, as far as I could tell. Figuring out the PID loop to control the heater element was key, and fun. Having proof of concept tackled I moved on to the next stage.
...
This is about when I stumbled upon a thermocouple analog to digital (A2D) reference design kit:
http://www.digikey.com/product-detai...PL1-ND/2201994
It was only $35, so I bought one and tested it out. The kit included all the source code, so all I had to do was figure out I2C communication, which was also a fun challenge.
I added it to the WBO2 proof-of-concept box, with no issues.
Moving on, combining all the things I learned I listed up all the inputs I wanted the project to handle:
- WBO2 Sensor Controller
- EGT Input (for 1 or 4 cylinders)
- On-board MAP and BARO sensors
- Vehicle Voltage
- Coolant Temp
- Oil Temp and Pressure
- Fuel Pressure (at rail and pump output)
- Outside Air Temperature
- Engine RPM
- Distance Sensor
- Yadda yadda…
Here's a schematic of what I was going for:
I used FreePCB to generate the design for what I call the “UHM” or Under Hood Module. Autorouters are so crude. Nothing beats a hand-routed circuit board. FreePCB doesn’t do schematic capture, which was a bit of a drawback, but I had everything pretty much sketched up in my head. This was the “Alpha” version:
So, trying to cram in everything I could possibly think of, I wound up with the CJ125 controller IC working the WBO2 with a PWM channel and shunt resistor for the heater, 6 thermocouple inputs, the on-board MAP and BARO sensors, 8 A2D inputs, 4 pulse measurement inputs (pulse width or duration measurement), voltage measurment on the main power feed and a few outputs (configurable as switched or pulsed).
FreePCB generates the gerber files. I ordered the boards from BatchPCB for about $50.
Whatever components I didn’t have left over from my work projects I ordered from Mouser and Digi-key. I assembled the entire board by hand. Let me tell you, 0.5 mm pitch chips are not easy to work with. I have a good soldering iron though.
Having the board assembled I moved on to defining a CAN database to capture all the info I wanted this box to send to the instrument cluster module (yet to be built).
Having a CAN bus was ABSOLUTELY NECESSARY! I’ll get into why in a later post. I have the dbc file, I'm doubtful posting it would be useful. If you want it I can send it to you, though it's constantly changing as the project evolves.
Once the source code for the UHM was pretty much hashed out, I moved on to creating the “IC” module. This module is intended to go inside the car. I personally want to use the third gauge circle from the L-body cluster to house the display, to go for the “max stealth” look. The “proof of concept” was a repurposed board from my work project, with a 128x64 Noritake VFD (as I mentioned above) substituted for the 128x64 LCD.
...
Fast forward to spring of 2013, I have the whole setup installed. Most sensors were connected. It worked OK. There are some bugs I’ll need to work through.
I don't have many pics of the install. I will soon, but my car's covered in ice and I couldn't open it this morning.
...
A few lessons learned:
1. I2C is too slow to use in a DAQ environment. Most chips that support I2C will only go up to 400 kilobits per second. I couldn’t find any ADCs with internal reference (for thermocouple measurement) that support 1 Mbps. So, for Beta, I switched to SPI ADCs. Specifically I chose the ADS1118 from TI. It will support up to 10 Mbps over SPI and has a MUCH faster sampling rate. I use 3 of them to support the 6 thermocouple inputs. They have an internal temp sensor that can be used for cold-junction reference, so that does away with the 6 thermistors on-board. This actually represents a cost reduction as well, doing away with the precision cold junction reference thermistors and using 3 ADCs instead of 6. Also, I’m actually a tiny bit pissed because TI just announced the ADS1120 product line. Superior noise rejection, automotive qualified AND dedicated data-ready pins. Maybe I’ll fit it in on the next version.
2. The LSU 4.9 is a superior WBO2 sensor. I thought it was for diesels, turns out it’s just a better all-around sensor. I have updated the resistor values to accommodate it and have determined the proper connector (also mentioned in the connector thread).
3. The accelerometer and compass ICs belong on the IC board, not in the UHM. The Beta version has done away with these and the I2C bus altogether. The IC board design I am working on incorporates these.
4. Off-chip memory is a must, as you want to minimize writes to the micro’s on-board flash. I picked a chip that’s small and rides the same SPI bus as the CJ125 and the ADCs. There’s not much data to store, so 4K should be fine.
5. The 35 pin TE header was nice, but I wanted more pins and a smaller package, so I opted for JAE’s 39 position offering. Both the TE and the JAE are expensive, not much more to say there.
6. I wanted to employ wake-over-CAN. So, I switched to NXP’s TJA1043. I look forward to testing this out. I left in the circuitry to handle discrete wake, so no loss if it doesn’t work.
7. Also incorporated is a dual H-bridge setup, for turning a stepper motor. Intended use is a stepper motor driven boost controller. We’ll see if it works eventually. I won’t be heartbroken if it doesn’t work.
...
Latest design:
Unfortunately, BatchPCB isn’t around anymore. So, I used OSH Park. They were a bit more expensive ($80) and are PURPLE! I know, right!?!? At least it’s not an offensive shade. I can call it “Plum Crazy”. OSH Park is a great company. They have fast support and superior quality.
Here's the top and bottom gerbers rendered:
And the boards once ordered (OSH Park sends 3):
...
So, now I’m working on the IC module. I’ve switched to the Renesas RX product lineup. They’re cheaper chips and are more capable. I have recently “figured out” how to write source code for them, so I’m moving forward.
I will use one of the SPI lines to configure an interface to the SCI diagnostic link. This aspect will get priority development due to the ongoing thread over here:
http://www.turbo-mopar.com/forums/sh...-ECU-parameter
Also, thanks to the great and wise Rob, I have been introduced to some amazing info on how to interface to the CCD bus. I found one of the 20-SOIC chips in a ’97 Durango overhead console, so that’s going in too.
I’ve always had a thing for the CCD bus, even though right now I don’t own a vehicle with one. That can be fixed. A SBEC is slated for the GLHS (then a SBEC II)… eventually.
The Renesas RX IC I’ve chosen has on-board USB support, so data-logging to a USB drive, or interface to a laptop is possible. I’ve been messing around with USB host code, so that’s not too far off for me.
I have 3 different development boards for the RX62N micro, so I’ve already got a working proof of concept. It just needs a little code tweaking.
...
More to come...