(Image: Header Graphic)

Friday, May 29, 2020

Doug's Domain

Doug Vetter, ATP/CFI

dvatp.com has been updated!

June 22, 2016: Donations to dvatp.com are now processed via Stripe. Like this site? It's easier than ever to show your appreciation.

E36 BMW OBC Project

(Image: DVOBC 3D Profile View)
Inspired by the OpenOBC Project I've decided to fund an R&D
project to replace the main logic board in the 18 button OBC
provided as an option on E36 BMW automobiles built from 1992-1998.

The DVOBC project picks up where the OpenOBC project left off, and aims to provide a replacement for the main logic board in the factory 18 button OBC of E36 BMWs (1992-1999).

Project Goals

(Image: Solidworks render of top of X1071 connector)

  1. Provide functionality equivalent to the factory 18 button OBC logic board.

  2. Create a modular architecture that allows the design to be flexible and expandable over time to support everything from diagnostics to data acquisition.

Product Variants

  1. A fully assembled logic board option to satisfy a niche market need for this board to replace the factory 18 button OBC logic board.

    Availablility: This product variant will be produced if a sufficient number of pre-orders occur.

  2. A turn-key product that will utilize the same logic board as in the first variant, mated to a daughtercard unique to this variant that will host a sunlight readable, high resolution color TFT display with capacitive touchscreen interface, all housed in a custom case that will replace the factory OBC in its entirety.

    Availability: This product variant is not currently slated for production but may be approved at a later date based on a variety of factors, including the success of the assembled logic board variant.

Hardware Features

Developer Information

The hardware design will remain proprietary to prevent unauthorized duplication, at least until I achieve a return on my considerable investment in the project. However, specifications and documentation will be provided to registered developers as required to facilitate expansion module hardware development and related software development.

Access to a software load supporting the assembled logic board product variant will be provided via an open source model, but support for this software will be limited to registered developers.

More information about the developer program will be released when appropriate.

FAQ:

(Image: Solidworks render of top of X1071 connector)

  1. Will your project provide backward compatibility with the OpenOBC project board? In other words, if I have already wired up stuff to the OpenOBC, will I be able to simply swap the OpenOBC board with your board?

    Simple answer: No. My design is completely different. However, I see my project not only meeting the original design goal of the OpenOBC project, which was to replace the functionality of the factory OBC logic board, but also providing additional functionality through the expansion module interfaces, so it's likely that whatever functionality you are utilizing could be provided via an expansion module.

  2. Why did you not simply take the OpenOBC gerbers and produce PCBs from that existing design?

    Several components were no longer available, and replacements were not pin-compatible, hence the PCB footprints had to change. That dictated a re-spin of the PCB.

  3. Why did you not simply copy the basic design of the OpenOBC and generate a new board with new footprints for the obsoleted components?

    First, my technical analysis of the OpenOBC project revealed several deviations from what I consider acceptable design practices so my design aims to correct these deviations. Second, I needed to improve the modularity and functionality of the board to expand the target market for the design as required to improve my return on investment, not only in terms of monetary value but the technology I develop for this board that I can leverage in future designs, thus reducing development costs on those projects. Finally, I did not want to imply any compatibility with or support for the OpenOBC boards that may be in the field.

  4. Do you plan to sell bare PCBs that can be assembled by the end user?

    No, primarily because the complexity of the design and the space constraints dictated by the dimensions of the original factory OBC logic board have required the use of some package types that are challenging to reliably assemble.

    This option would also necessitate revealing the bill of materials and put my IP at risk.

  5. Why are you producing the LCD option?

    While market research has clearly indicated a demand for the assembled logic board variant, I believe the market for a turn-key solution is far larger and so the overall success of the product is more dependent on that option. As a result, I expect to develop a prototype that demonstrates the basic functionality of both variants before the logic board option is manufactured to ensure the same logic board can be used for both variants.

  6. How can I buy or reserve one?

    Once the prototype is complete my intention is to announce a preorder program for the boards that will remain open for a limited period of time, similar in concept to a Kickstarter campaign. If I obtain sufficient sales within that timeframe I will proceed with manufacturing and notify you of an estimated shipping date. If insufficient orders are realized I will abandon manufacturing efforts and refund the purchase price.

Project Status: ACTIVE

May 26, 2020

One of the downsides to reverse engineering an existing product is that it is easy to become myopic with respect to design improvements. Much of the design work (and redesign work) I have done on this project has been the result of stepping back from the project and looking at it with a more objective eye. In the early days of my design effort the foray into expansion slots was one such example. More recently, I've researched AEC compliance and the development of suitable I/O interface protection to ensure the design is resilient in a challenging electrical environment.

About a month ago, as I found myself wrapping up and doing more cleanup than new design work I realized that the design would benefit significantly from further modularization. The result is in the form of a MCU daughtercard that mates with the baseboard. The MCU daughtercard is now host to the "brains" of the product, including MCU and its supporting components, JTAG chain, USB debug interfaces and expansion slots. The baseboard remains host to the "dumb" portion of the design, including the IO protection circuitry, power supplies, high resolution ADC, and factory OBC keypad and LCD display interfaces.

This change has produced several positive impacts:

This work set me back about a month but I think the end result is worth it.

April 23, 2020

One man's stay-at-home order is another man's gold mine of time free from distractions. Over the past month I completed design and preliminary placement of two expansion modules -- what I'm calling the Data Acquisition (DA) board and the GPS/Wifi/Accelerometer/Bluetooth (GWAB) board, made a variety of significant changes to the baseboard design to accommodate these modules and resolved a major sticking point with respect to the support of analog sensor interfaces.

(Image: Data acquisition expansion module on 23 Apr 2020)

Each board presented its own design challenges. First, I had originally expected to sell a separate expansion board to support CAN bus but recent comments on the bimmerforums OBC thread regarding the reliability of the K-bus transceivers convinced me to put them back on an expansion module. I couldn't justify a module with only a couple K-bus transceivers on it so I decided to combine them with a couple CAN bus interfaces. Of course, once I pushed all the components to the PCB design space it became painfully obvious the board was too small to accept the components required by two CAN bus interfaces so I was forced to eliminate one of the interfaces. Considering that CAN bus is capable of supporting 50+ devices on a single network I figured this would not be a serious limitation. Doing this also freed two additional GPIOs on the microcontroller.

Normally, CAN bus requires a form of termination at both ends of the bus. This is because CAN bus leverages driver transistors configured as open-drain (or open-collector) and the termination resistors pull down the bus to a recessive state once the drivers de-assert. Devices placed between the two endpoints do not require and must not enable any termination. The problem is that because I am not designing the network I cannot know ahead of time whether the OBC will be at the end of the bus or in the middle of it, and hence whether termination should be enabled or disabled. For this reason I have implemented selective termination to be controlled via software. Termination will be disabled by default as that is the least-intrusive option should the OBC be connected to an existing (and, by necessity, properly terminated) network.

For those wondering whether I intend to provide access to an analog interface or access to ADCs in support of sensors, the answer is no, simply because of the inherent complexities in designing and protecting analog interfaces. To do this properly, all elements of the sensor output, length and type of the cable to the sensor, and other details must be known ahead of time, and this is simply not possible or practical in this application. Fortunately the market is host to many sensors that natively support CAN bus and those can be added to an existing CAN bus network easily and effectively without any additional wiring. To support sensors that only provide analog outputs the market offers many existing CAN bus conversion devices that perform the analog to digital conversion. And for those sensors that cannot be accommodated by such conversion devices, a custom external conversion device can be created and tested independently of the OBC.

(Image: GPS expansion module on 23 Apr 2020)

While integrating the GPS module with the GWAB board I realized that while the GPS could be configured to write its configuration to non-volatile memory and thus the GPS did not technically require a backup power supply, further research revealed that software must initiate the process; it does not happen automatically. While it is technically possible to save the configuration during initialization, this would not save the ephemeris data which is naturally acquired during normal operation, which ultimately means this data would be lost during a power disruption. Following the event the GPS would start up "cold" and take extra time to lock. As a result I decided to implement a small backup power supply that serves only the GPS.

The perk of the GPS module design is that it completely disconnects the backup power source when the module is powered via the primary bus, and since the OBC will be powered continuously (though in a low power "sleep" mode when the vehicle ignition is off) the life of the backup power supply will be limited only by its self-discharge characteristics. Incidentally, the particular GPS module I selected is automotive rated and supports SBAS differential corrections (in the US via the WAAS geostationary transponders developed for the aviation industry to allow high accuracy approaches). This combined with a preamplified antenna mounted outside the OBC case should provide outstanding position accuracy and a 10 Hz update rate.

The MachXO2 FPGA I first implemented as a reset controller on the baseboard has found a home on each expansion module in the form of glue logic. These units will manage enable and reset lines for various components on the board and multiplex interrupt signals to minimize the need for multiple interrupt lines in the baseboard-module interface. I'm planning to use the FPGA's integrated I2C slave interface (which does not require consumption of programmable logic resources) as the primary means of communications. Speed is not really a factor here (the GPS module, for example, updates its position merely ten times a second) so I2C should get the job done. A high speed UART with hardware flow control enabled will be used to communicate with the Bluetooth module, however, as this interface will be used to transfer considerable amounts of data at high speed.

One perk that resulted from the use of I2C on the Data Acquisition module is that the SPI interface for that particular slot was unused so I decided to relocate it to drive the factory OBC display. While it is is possible to bit-bang that interface much as the OpenOBC did, it's always more practical and consistent to drive it with purpose-built hardware, as that will offload this processing to hardware and thus reduce CPU utilization. The irony of this change has not escaped me. With the elimination of one of the "standard" interfaces and the addition of the K and L lines on the associated expansion module slot I have in effect created a custom interface that can serve no other board and hence recreated the supplemental module concept. Such is the nature of design.

March 26, 2020

The last few weeks have seen significant progress on the project to the point that the baseboard placement is largely complete. Of course I reached a similar milestone some time ago and wound up ripping up significant portions of the schematics, but unless the requirements change significantly I expect this to closely resemble the final product -- to the point that I updated the picture at the top of the article.

Some of the significant changes:

Research has started on an optional GPS/Wifi/Accelerometer/Bluetooth (GWAB) module. Once that is complete the LCD daughtercard will be developed. I'll post another update once the GWAB module is complete.

March 8, 2020

After a lot of hair pulling, insurmountable mechanical issues have forced me to eliminate what I called the supplemental module (SM) and transfer its components to the baseboard. The problem is that I'm working with existing design constraints and have little flexibility if the baseboard is to fit into the existing case. Despite my best efforts, I was unable to put ten pounds of sand into a five pound bag.

The original justification for the SM was to make it easier to test, repair and replace certain components I deemed at high risk for failure in the vehicle. However, at the end of the day I was inclined to accept these consequences rather than restrict the user's ability to expand the system.

Elimination of one of the slots will give me a bit of breathing room, which I expect to use by centering the three expansion slots on the card and leveraging the newly-found space for the supercapacitor-based backup power supply and K-bus transceivers which will necessarily find a new home on the baseboard. The boot mode, run and power switches, as well as the 12V and USB jacks will also have to move. This in turn will cause the relocation of several other components. In other words, I have my work cut out for me.

I'll provide an update once placement of the new design is complete.

February 19, 2020

Schematics and preliminary placement of the baseboard and SM are complete, though the initial mating of the two boards in 3D has revealed some mechanical issues that need to be addressed though a substitution of components.

Research and testing revealed that the OpenOBC I/O interfaces were woefully inadequate for the automotive environment, and significant research has been put into the development of more robust and fault tolerant interfaces. While this has resulted in more complexity, a higher part count and some increase in BOM cost, I'm sure you'll agree that a slightly more expensive unit that works reliably is better than a cheaper one that fails when the bus voltage spikes due to those fancy HID ballasts you installed.

I have concluded that it will be necessary to add an OTA (over the air) firmware update capability through a bluetooth module connected to the primary microcontroller (MCU) through some logic, which may itself be implemented by a smaller MCU located on the expansion module (EM). This will allow the flash memory of the primary MCU to be programmed via bluetooth as compared to the more traditional wired methods which will necessitate removal of the unit from the dashboard for every update. Traditional wired programming methods will of course remain supported, as the bluetooth module will be sold separately.

The OTA capability will naturally require the development of an EM containing a bluetooth module before I wrap up the prototype design work by completing the LCD daughtercard. Space permitting I will likely add a GPS module and accelerometer to this EM as well. This will round out the basic featureset of the platform and finalize the EM mechanical and electrical interface standard that will be distributed to third party developers.

Questions / Comments

If you have any technical questions or comments about this project please contact me. However, please do not bother asking about the project status or when the prototype will be complete as this information will be posted above when appropriate.