Bavarian Soundwerks
Page 29 of 79 FirstFirst ... 419202122232425262728293031323334353637383954 ... LastLast
Results 701 to 725 of 1959

Thread: Feeler: Open Source OBC Firmware

  1. #701
    Join Date
    Oct 2010
    Location
    De Pere Wisconsin
    Posts
    105
    My Cars
    1995 BMW 325i
    So is any of this going to be different for those of us who have pre-OBDII (aka 1995 or earlier) cars?

  2. #702
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by alancop View Post
    So is any of this going to be different for those of us who have pre-OBDII (aka 1995 or earlier) cars?
    No, except for the ability to read and reset the check engine light on obdii cars; there should still be a bunch of data on the D-bus even for obdi cars.

    The sensors and other directly connected items should be the same as long as you have the wiring in place for the 18-button OBC.
    Last edited by m2pc; 03-03-2011 at 10:07 PM.

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  3. #703
    Join Date
    Feb 2006
    Location
    UK
    Posts
    1,699
    My Cars
    1998 328 convertible

  4. #704
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Please try again -- fixed!

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  5. #705
    Join Date
    Dec 2004
    Location
    NJ
    Posts
    1,209
    My Cars
    03 540i M Sport/95 525iT
    m2pc, I have been researching ADCs and came up with an interesting part from Maxim. It is the MAX197, 8 channel ADC with software settable input range that can accomodate 0-5 VDC automotive sensors. URL is:

    http://www.maxim-ic.com/datasheet/index.mvp/id/1042

    The down side is that this requires 8 discrete inputs because it has a parallel bus interface instead of a serial, SPI, or CAN interface to the microprocessor. I am guessing this won't work with your intended MBED plan because you need those discrete inputs for other purposes. Am I correct? This might lead me back to the AVR for a micro to control the ADC and interface to the MBED. Or to continue looking for a more suitable ADC. I ordered a couple of free samples anyway to experiment with the MAX197 and MBED.

  6. #706
    Join Date
    May 2009
    Location
    DK
    Posts
    40
    My Cars
    325i
    Quote Originally Posted by m2pc View Post
    If we need a mic, there's always this OEM piece with integrated mic (for cellular phone option):
    Exactly the one I meant.

    Quote Originally Posted by m2pc View Post
    The only new wiring we'd need to run is for:
    - Oil pressure sensor
    - Oil temperature sensor
    - Coolant temperature sensor (if not getting this from the vehicle's D-bus)
    - Boost/vacuum pressure sensor
    I suggest a basic version that could be a "plug'n'play" replacement for the original obc. It should not require any additional wiring - just a swap.

  7. #707
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by Mark185 View Post
    m2pc, I have been researching ADCs and came up with an interesting part from Maxim. It is the MAX197, 8 channel ADC with software settable input range that can accomodate 0-5 VDC automotive sensors. URL is:

    http://www.maxim-ic.com/datasheet/index.mvp/id/1042

    The down side is that this requires 8 discrete inputs because it has a parallel bus interface instead of a serial, SPI, or CAN interface to the microprocessor. I am guessing this won't work with your intended MBED plan because you need those discrete inputs for other purposes. Am I correct? This might lead me back to the AVR for a micro to control the ADC and interface to the MBED. Or to continue looking for a more suitable ADC. I ordered a couple of free samples anyway to experiment with the MAX197 and MBED.

    Wow, those are expensive ($35 qty 1)... that's more than the bare MCU!
    I already plan to use an I2C I/O expander to get the digital I/O count needed for this project:
    http://ww1.microchip.com/downloads/e...Doc/21952b.pdf

    I say it's a fair trade-off to be able to use such an open product as the mbed. Being I2C, we can cascase multiple of these and not use any more I/O pins on the mbed itself.

    Going with something like the MAX197, we could use some of the expanded I/O to drive the device, or use something like a 74HC165 to take the 8-bit interface and make it SPI.

    What about this one from Analog Devices:
    http://www.analog.com/static/importe...ets/AD7329.pdf

    8 Channel, 1MSPS, 12-bit, ±10 V, ±5 V, ±2.5 V, 0 V to +10 V software-selectable ranges.
    SPI and I2C interface!

    $10 each in qty 1: http://search.digikey.com/scripts/Dk...=AD7329BRUZ-ND

    But with a 0-5V sensor signal, we'd lose quite a few bits with the +/-5V range. (6 bits effectively)

    Here's a better part with Parallel or Serial interface, 0-5V range, 12-bit, 8 channel, and the cost is lower ($27):
    http://www.analog.com/static/importe...ets/AD7891.pdf
    http://search.digikey.com/scripts/Dk...AD7891BSZ-2-ND

    Quote Originally Posted by bvli View Post
    I suggest a basic version that could be a "plug'n'play" replacement for the original obc. It should not require any additional wiring - just a swap.
    My thoughts exactly. If we bring the Ethernet, USB, SPI, I2C and other pins out on an expansion connector, we can easily expand the functionality later. My goal is to get 100% coverage of the original OBC working first (plus some additional sensors) then expand from there to GPS, voice control, data logging, etc.

    Another note: I found a really nice 8-channel relay driver IC that talks over the SPI bus:
    http://www.infineon.com/dgdl/TLE7232...12b4267a803959

    It's under $5 for qty 1 and they can be cascaded for easy expansion.
    Last edited by m2pc; 03-04-2011 at 02:40 PM. Reason: Automerged Doublepost

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  8. #708
    Join Date
    Dec 2004
    Location
    NJ
    Posts
    1,209
    My Cars
    03 540i M Sport/95 525iT
    I did not like the Analog Devices parts mainly because it is hard to get samples and the evaluation board. Cost is also a factor just like the MAXIM chip. I think I found a couple of good candidates from TI. They are inexpensive and designed with automotive applications in mind. URLs:

    http://focus.ti.com/lit/ds/symlink/tlc2543-q1.pdf

    http://focus.ti.com/lit/ds/symlink/tlv2553-q1.pdf

    I have just skimmed the data sheets and I am not really sure what the difference is between them yet. Need to slow down and study them in more detail now. I did notice that TI recommends using opamp buffers and anti-aliasing filters in front of the inputs. That is the way I was taught to do condition the inputs years ago but I have seen more than a few designs that don't do this including the engine control system on the Blackhawk and Seahawk helicopters designed back in the early 1990's.. I am sure it was a cost/benefit decision. I would like to use buffers and filters but I know it drives the cost up. On the plus side, these TI chips are cheap enough to offset the cost of opamps and passive components for the filters.

    BTW, I realize this capability is not in your first set of priorities and I appreciate the fact that you provide comments and suggestions anyway.

    Quote Originally Posted by bvli View Post
    Exactly the one I meant.


    I suggest a basic version that could be a "plug'n'play" replacement for the original obc. It should not require any additional wiring - just a swap.
    bvli, I assume your comment was based on the questions I am asking. I was already working on a project to acquire data from external sensors and thought there was good synergy with m2pc's Open OBC efforts. I am working on a parallel path but like bouncing ideas off of m2pc and would like to make sure anything I do is compatible with Open OBC.

    Like you, I am primarily interested in a plug'n'play replacement for my 328iC but when I eventually have the funds to build an E36 track car, the expanded Open OBC would be very useful. In the meantime, I am very interested in data acquisition that is affordable for my 92 All Trac Turbo (GT4 in the rest of the world).
    Last edited by Mark185; 03-06-2011 at 07:48 PM. Reason: Automerged Doublepost

  9. #709
    Join Date
    Feb 2011
    Location
    USA
    Posts
    38
    My Cars
    no
    I find it interesting that the keyboard matrix consumes 15 pins which leaves only 3 pins free on the 18 pin black connector, however one pin has no wire so that actually leaves 2 wires, while the white connector only has 8 wires. I have noticed that the 2nd to last pin on the 11 pin ribbon cable for the LCD has no trace, so the LCD really only uses 10 wires connections. With only 8 wires on the white connector, apparently on the OEM board routes 2 wires from the LCD to the black connector which means it is not a connector exclusive to keypad operation, just as an FYI to anyone toying with this. Unplugging the black connector will disrupt 2 pins which are part of the LCD connectivity.

    In short, I was curious have you identified which particular pins are absolutely necessary for LCD operation? Are all 10 necessary?
    Last edited by catatung; 03-06-2011 at 09:25 PM.

  10. #710
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by Mark185 View Post
    I did not like the Analog Devices parts mainly because it is hard to get samples and the evaluation board. Cost is also a factor just like the MAXIM chip. I think I found a couple of good candidates from TI. They are inexpensive and designed with automotive applications in mind. URLs:

    http://focus.ti.com/lit/ds/symlink/tlc2543-q1.pdf

    http://focus.ti.com/lit/ds/symlink/tlv2553-q1.pdf

    I have just skimmed the data sheets and I am not really sure what the difference is between them yet. Need to slow down and study them in more detail now. I did notice that TI recommends using opamp buffers and anti-aliasing filters in front of the inputs. That is the way I was taught to do condition the inputs years ago but I have seen more than a few designs that don't do this including the engine control system on the Blackhawk and Seahawk helicopters designed back in the early 1990's.. I am sure it was a cost/benefit decision. I would like to use buffers and filters but I know it drives the cost up. On the plus side, these TI chips are cheap enough to offset the cost of opamps and passive components for the filters.

    BTW, I realize this capability is not in your first set of priorities and I appreciate the fact that you provide comments and suggestions anyway.
    Those TI parts look promising; the 2553 seems like the better IC to go with; it samples at over 3x the rate of the 2543 (200K vs 66K). It's also cheaper ($10 vs. $13).

    I have no problem with some simple op-amp buffering on the input side, in fact I prefer it and regret not adding this in my original design (I used simple resistor dividers and some diode clamps to limit transients). If anyone has done this before (I have not) I would greatly appreciate a circuit for this to incorporate into the reference design. I'm thinking either:

    a) A multi-channel op-amp solution (reducing part count)
    -or-
    b) Buffer several inputs (say 6) and leave the rest unbuffered and route them to the expansion board for buffering there, if more A/D inputs are needed.

    Can you post a decent analog front-end for this?

    Quote Originally Posted by catatung View Post
    I find it interesting that the keyboard matrix consumes 15 pins which leaves only 3 pins free on the 18 pin black connector, however one pin has no wire so that actually leaves 2 wires, while the white connector only has 8 wires. I have noticed that the 2nd to last pin on the 11 pin ribbon cable for the LCD has no trace, so the LCD really only uses 10 wires connections. With only 8 wires on the white connector, apparently on the OEM board routes 2 wires from the LCD to the black connector which means it is not a connector exclusive to keypad operation, just as an FYI to anyone toying with this. Unplugging the black connector will disrupt 2 pins which are part of the LCD connectivity.

    In short, I was curious have you identified which particular pins are absolutely necessary for LCD operation? Are all 10 necessary?
    The keyboard matrix is 4x5 (9 pins) plus there are the CODE/LIMIT/TIMER LEDS (3 pins + 1 common), and 2 pins for the backlight, yielding 15 pins total.
    The black/white connectors protruding from the OBC (X1070/1071) do not connect directly to the display or keyboard; these are simply for power, signal, and other connections to the vehicle's electrical system.

    Yes, I have all 10 LCD pins identified and they all serve a purpose. The LCD is actually an SPI device, but the rest of the pins control routing of the data to the different sections within the display.
    There's one controller for the icon data, and another for the character data. Then there's an input (pin 11) that the LCD uses as a master refresh clock for drawing all the pixels. This is a 100KHz square wave signal.
    Last edited by m2pc; 03-07-2011 at 12:06 AM. Reason: Automerged Doublepost

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  11. #711
    Join Date
    Dec 2004
    Location
    NJ
    Posts
    1,209
    My Cars
    03 540i M Sport/95 525iT
    Quote Originally Posted by m2pc View Post
    Can you post a decent analog front-end for this?
    Working on it. The issue I am trying to resolve is whether to go for some sort of analog differential input using instrumentation amps or a more generic low cost approach using quad opamps. I don't know how modern automotive designers do this. My background, from 15 years ago, is aircraft engine test cell instrumentation and we always used instrumentation amps with differential inputs to reduce common mode noise. TI and AD both make small footprint individual instrumentation amps. AD has one promising model that is only $2.35 each in large quantities. If I am building this for my own use, I lean towards instrumentation amps to get best possible signal quality from the sensors. When cost is factored in, I haven't done a trade study to see how a cheaper approach compares. One consideration is that the instrumentation amps might result in fewer passive components to have a combined buffer and low pass filter. The other issue is that using the smallest available parts for the analog front end results in a lot of surface mount soldering. How does this impact cost of having boards built? Going with common dual inline pin chips makes home enthusiast fabrication easier but results in a much larger board.

  12. #712
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by Mark185 View Post
    Working on it. The issue I am trying to resolve is whether to go for some sort of analog differential input using instrumentation amps or a more generic low cost approach using quad opamps. I don't know how modern automotive designers do this. My background, from 15 years ago, is aircraft engine test cell instrumentation and we always used instrumentation amps with differential inputs to reduce common mode noise. TI and AD both make small footprint individual instrumentation amps. AD has one promising model that is only $2.35 each in large quantities. If I am building this for my own use, I lean towards instrumentation amps to get best possible signal quality from the sensors. When cost is factored in, I haven't done a trade study to see how a cheaper approach compares. One consideration is that the instrumentation amps might result in fewer passive components to have a combined buffer and low pass filter. The other issue is that using the smallest available parts for the analog front end results in a lot of surface mount soldering. How does this impact cost of having boards built? Going with common dual inline pin chips makes home enthusiast fabrication easier but results in a much larger board.
    So you are saying it's better to use a differential input even though the signal we are dealing with (in most cases) is 0-5V single-ended? Do you shift the single-ended signal into the negative range so the middle is at 0V? I'm just curious how this works as I have ZERO experience with this sort of thing.

    Also, regarding surface mount, I believe there's no real way around it. At first I really wanted everything 100% through-hole, but after doing some SMD work at my job, I realized the benefits (board real-estate, more parts available in SMD) outweighed the costs (easier to assemble by beginners).

    That being said, I'd like to avoid ending up with a design like the original OBC with hundreds of discrete components all over both sides of the board; if we can roll up as much as possible into ICs, the better.

    How about a simple buffering scheme to the existing mbed ADC inputs (assuming we have enough pins free for this)?



    This should yield 3.3V full scale with 5.0V input. Using a 196K 1% resistor in place of the 200K part will bring it even closer.
    LMP7704 is a quad op-amp with rail-rail operation.
    Last edited by m2pc; 03-08-2011 at 12:48 PM. Reason: Automerged Doublepost

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  13. #713
    Join Date
    Dec 2004
    Location
    NJ
    Posts
    1,209
    My Cars
    03 540i M Sport/95 525iT
    You can have a single ended 0-5V signal coming in to a differential input without shifting it into the negative range. All you want from the differential input is cancelation of noise that is on both the + and - lines. Most decent car stereo amplifiers use this principle on their input circuits. If you have a choice, board space, and the budget, it is always better to use a differential input. Automobiles are a notoriously noisy environment with all kinds of noise spikes coming from the charging system as the loads on the alternator change over time. BMWs are worst than most because the battery is rear mounted and this means charging currents are flowing through the chassis at all times. That sets up electromagnetic fields that change over time all over the car. The strength of the field is proportional to the current flowing through that part of the chassis. This is in addition to EM fields around current carrying conductors. This is why putting aftermarket audio equipment in bimmers can be challenging from a noise standpoint.

    Having said all that, a simple buffering scheme may work if a low pass filter is incorporated. It could be as simple as a bypass capacitor between the + input and ground. That would give a 6 dB per octave roll off which may work depending on the frequency content and amplitude of the environmental noise. That is where I lack automotive design expertise to make a judgment call. I don't know the frequency make up of electrical noise in our cars and I don't know exactly how it changes with different charging currents. I have a scope and a spectrum analyzer so this is something I could investigate. In the test cell instrumentation world, we just assumed worst case and overdesigned with robust differential inputs that could handle really bad environments.

    The problem I am most concerned with avoiding, is introducing noise into the microprocessor. Sensor accuracy will probably be sufficient even with some noise on the signal. The question is what happens if alternator frequencies and harmonics are introduced into the processor via the A/D converter lines?

    A mid range solution which goes a step beyond your simple buffer, is a two opamp input which incorporates a Sallen Key second order filter as part of the buffer. I have experience with analog filter design and could give you a circuit with relative ease.

    I need to dig a little deeper to come up with best bang for the buck solution. I have not done analog design work in a few years and right now, I am studying multiple application notes, text books, and spec sheets to try to come up with best answer. I am also going to take a look at what the Megasquirt designers did with their sensor inputs if I can find a schematic. That is supposed to be open source.
    Last edited by Mark185; 03-08-2011 at 04:02 PM.

  14. #714
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by Mark185 View Post
    You can have a single ended 0-5V signal coming in to a differential input without shifting it into the negative range. All you want from the differential input is cancelation of noise that is on both the + and - lines. Most decent car stereo amplifiers use this principle on their input circuits. If you have a choice, board space, and the budget, it is always better to use a differential input. Automobiles are a notoriously noisy environment with all kinds of noise spikes coming from the charging system as the loads on the alternator change over time. BMWs are worst than most because the battery is rear mounted and this means charging currents are flowing through the chassis at all times. That sets up electromagnetic fields that change over time all over the car. The strength of the field is proportional to the current flowing through that part of the chassis. This is in addition to EM fields around current carrying conductors. This is why putting aftermarket audio equipment in bimmers can be challenging from a noise standpoint.

    Having said all that, a simple buffering scheme may work if a low pass filter is incorporated. It could be as simple as a bypass capacitor between the + input and ground. That would give a 6 dB per octave roll off which may work depending on the frequency content and amplitude of the environmental noise. That is where I lack automotive design expertise to make a judgment call. I don't know the frequency make up of electrical noise in our cars and I don't know exactly how it changes with different charging currents. I have a scope and a spectrum analyzer so this is something I could investigate. In the test cell instrumentation world, we just assumed worst case and overdesigned with robust differential inputs that could handle really bad environments.

    The problem I am most concerned with avoiding, is introducing noise into the microprocessor. Sensor accuracy will probably be sufficient even with some noise on the signal. The question is what happens if alternator frequencies and harmonics are introduced into the processor via the A/D converter lines?

    A mid range solution which goes a step beyond your simple buffer, is a two opamp input which incorporates a Sallen Key second order filter as part of the buffer. I have experience with analog filter design and could give you a circuit with relative ease.

    I need to dig a little deeper to come up with best bang for the buck solution. I have not done analog design work in a few years and right now, I am studying multiple application notes, text books, and spec sheets to try to come up with best answer. I am also going to take a look at what the Megasquirt designers did with their sensor inputs if I can find a schematic. That is supposed to be open source.
    My concern is with a relatively low resolution ADC (12 bits) by using a differential +/-5V front end, at best, we lose 1 bit for a sign, and at worse, we lose half our bits (6 bits for -5V to 0V and 6 bits for 0V to +5V) depending on how the ADC converts the analog signal to binary.

    Also, how does a differential input work with a sensor that outputs a range of 0V to +5V? Do you ground the negative input and use the positive input to sample the sensor?

    Regarding filtering and sample rate, most of these sensors are very low speed devices. I'd imagine a sample rate as low as 1Hz would be fine for sensors like oil & coolant temperature, since these are slow-changing signals. Even a signal like boost/vacuum pressure or air/fuel mix shouldn't need more than a couple hundred Hz sample rate.

    That being said, we could put a lot of filtering on these inputs and not give up much, since we won't be doing high-speed conversions. There's also the issue of oversampling; in software I can do a fair amount of filtering just by taking multiple samples and doing mean/average filtering on the data, reducing the noise floor.

    I found the ADC filtering section of the Megasquirt v3 board:


    It looks like they're using some simple RC filtering before the signal goes directly into the ADC line of their MCU. I'd prefer at least an op-amp between the mbed and the outside world for sensitive analog signals.

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  15. #715
    Join Date
    Dec 2004
    Location
    NJ
    Posts
    1,209
    My Cars
    03 540i M Sport/95 525iT
    Quote Originally Posted by m2pc View Post
    Also, how does a differential input work with a sensor that outputs a range of 0V to +5V? Do you ground the negative input and use the positive input to sample the sensor?

    That being said, we could put a lot of filtering on these inputs and not give up much, since we won't be doing high-speed conversions. There's also the issue of oversampling; in software I can do a fair amount of filtering just by taking multiple samples and doing mean/average filtering on the data, reducing the noise floor.
    The differential input with a single sided power supply floats both inputs of the opamp relative to ground and the output is single ended. It does this by using fairly large value resistors between the inverting and non-inverting inputs and ground. The large value resistors could actually add noise to the signal if not sized appropriately. I actually do not know how effective it is without building it and experimenting. There are also single supply instrumentation amplifiers that do the same thing but are optimized for that application.

    It might not be necessary given how simple the Megasquirt input is. I looked it up. It looks like they are just using a current limiting resistor and bypass caps for the 0-5 VDC sensors. That also has a 6 dB roll off but don't know the corner frequency without knowing the input impedance of the MCU. I suppose the key to their design is that the caps protect the MCU inputs from large spikes and possible power supply ripple. The pulse inputs have more elaborate input circuits and I need to look at them in more detail.

    Like you, I like the idea of a buffer at the input even if it is simple. I also agree with your ideas about sampling rates. The only one that might benefit from a higher sample rate is air/fuel ratio. I think some of the newer aftermarket A/F ratio sensors are much faster than the first couple of generations. Need to look into this. Boost pressure is a signal I would want to sample at a higher rate but that is a subject for future expansion. Also agree with your idea about software filtering being effective if needed. There are some ADC chips on the market that do this on chip logic gates that implement FIR filters. I don't even want to think about how expensive they are.
    Last edited by Mark185; 03-08-2011 at 09:00 PM.

  16. #716
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by Mark185 View Post
    The differential input with a single sided power supply floats both inputs of the opamp relative to ground and the output is single ended. It does this by using fairly large value resistors between the inverting and non-inverting inputs and ground. The large value resistors could actually add noise to the signal if not sized appropriately. I actually do not know how effective it is without building it and experimenting. There are also single supply instrumentation amplifiers that do the same thing but are optimized for that application.

    It might not be necessary given how simple the Megasquirt input is. I looked it up. It looks like they are just using a current limiting resistor and bypass caps for the 0-5 VDC sensors. That also has a 6 dB roll off but don't know the corner frequency without knowing the input impedance of the MCU. I suppose the key to their design is that the caps protect the MCU inputs from large spikes and possible power supply ripple. The pulse inputs have more elaborate input circuits and I need to look at them in more detail.

    Like you, I like the idea of a buffer at the input even if it is simple. I also agree with your ideas about sampling rates. The only one that might benefit from a higher sample rate is air/fuel ratio. I think some of the newer aftermarket A/F ratio sensors are much faster than the first couple of generations. Need to look into this. Boost pressure is a signal I would want to sample at a higher rate but that is a subject for future expansion. Also agree with your idea about software filtering being effective if needed. There are some ADC chips on the market that do this on chip logic gates that implement FIR filters. I don't even want to think about how expensive they are.
    All good ideas, and I'd love to dial this in as close as possible to a noise-free system. I think for now, as an experiment, I'll try a simple voltage divider to scale the 0-5V sensor into the 0-3.3V full-scale range, with some bypass capacitance, followed by an op-amp configured as a unity-gain amplifier (1:1). The op-amp I listed above is nice in that it has true rail-rail output, vs. the typical LM741/324 style that is 0.7<vIn<Vcc-0.7. IMHO that _should_ provide enough noise immunity and transient suppression to make this work comfortably without increasing the cost/board real-estate too much.

    Keep in mind that the original OBC had a simple 10K pullup to +12V and 100K series resistor directly to the MCU pins for many of the digital inputs. Most of the signal wiring in the E36 is direct and bundled well, so I'm not too concerned with spikes/noise on those lines.

    I'm about 75% done with the mbed-based OBC schematic; I'll post the full design here once I'm satisfied with it to get feedback before I route & order boards.

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  17. #717
    Join Date
    Feb 2011
    Location
    USA
    Posts
    38
    My Cars
    no
    The keyboard matrix is 4x5 (9 pins) plus there are the CODE/LIMIT/TIMER LEDS (3 pins + 1 common), and 2 pins for the backlight, yielding 15 pins total. The black/white connectors protruding from the OBC (X1070/1071) do not connect directly to the display or keyboard; these are simply for power, signal, and other connections to the vehicle's electrical system.

    Yes, I have all 10 LCD pins identified and they all serve a purpose. The LCD is actually an SPI device, but the rest of the pins control routing of the data to the different sections within the display.There's one controller for the icon data, and another for the character data. Then there's an input (pin 11) that the LCD uses as a master refresh clock for drawing all the pixels. This is a 100KHz square wave signal.

    Ah that's interesting, thanks for the confirmation on that information. I was aware of the keypad matrix and LED wiring as I have that working so far. In case you haven't measured and would like to know, I've noted that the LED's for CODE, LIMIT and TIMER each draw 105ma and won't turn on until they see 2.5v. The surface mount LEDS for the button backlight seem to turn on at 7.5v also and only draw 30ma, a huge improvement compared to the 105ma of the individual button LEDs.

    Do you have any suggestions on how to interface to the LCD with an Arduino? Is it enough to wire a max232 chip to a digital pin on the Arduino, write the serial data there and then trigger the refresh somehow?

  18. #718
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by catatung View Post
    Ah that's interesting, thanks for the confirmation on that information. I was aware of the keypad matrix and LED wiring as I have that working so far. In case you haven't measured and would like to know, I've noted that the LED's for CODE, LIMIT and TIMER each draw 105ma and won't turn on until they see 2.5v. The surface mount LEDS for the button backlight seem to turn on at 7.5v also and only draw 30ma, a huge improvement compared to the 105ma of the individual button LEDs.

    Do you have any suggestions on how to interface to the LCD with an Arduino? Is it enough to wire a max232 chip to a digital pin on the Arduino, write the serial data there and then trigger the refresh somehow?
    I ran the CODE/LIMIT/TIMER LEDs through a 220 Ohm resistor to a 3.3V source. This sets their current at 15mA which should be plenty for these. 105mA is way too much current, and the LEDs will probably burn out in short order if allowed to consume that amount.

    The surface mount LEDs for the backlight are 4 in series, so they drop about 9.6V total. The OEM OBC powers these through a diode and a 120 Ohm resistor, limiting their current to around 25mA each (0.1A / 4 = 25mA)

    As for the LCD interface, all you need is an SPI port, configured for Mode 3 @ 750KHz clock speed, and several control lines to clock in the text and icon data. The refresh is a fixed 100KHz square wave. You can either divide a clock oscillator down (as the OEM board does) or use a PWM output set to 20us period, 10us pulse width, 50% duty cycle. That's how I'm driving it from the mbed.

    Good luck and please post any progress here! I'm about 99% done with the v2 schematic using the mbed, which will be posted here for review tomorrow or Monday.

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  19. #719
    Join Date
    Jul 2007
    Location
    North Delaware
    Posts
    3,013
    My Cars
    BMWs
    After reading a bit... I think I'm ordering an mbed monday. I may even switch my LCD in the gauge cluster to running on an mbed. Plus, with you already having figured out the LCD for the mbed... thats always a plus

  20. #720
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by Dricebrug View Post
    After reading a bit... I think I'm ordering an mbed monday. I may even switch my LCD in the gauge cluster to running on an mbed. Plus, with you already having figured out the LCD for the mbed... thats always a plus
    Excellent! After completing several successful projects using the mbed, I highly recommend it to anyone wishing to do embedded programming. IMHO it has the perfect mix of power, open-ness, and price.

    That being said, I have a release candidate for the v3.0 prototype using mbed:
    http://www.openobc.org/docs/openOBC_Prototype_Rev3.pdf

    Highlights:

    - mbed-based (socket for standard 40-pin module)
    - Ethernet and USB sockets
    - Four (4) 0-5V analog inputs
    - Battery voltage monitor (jumper-selectable to expansion port for ADC multiplexing)
    - 11 CMOS GPIO pins
    - CAN Bus
    - I2C bus
    - RS-232 port
    - Low-side driver expansion pins
    - USB host pins brought out to external connector and expansion port
    - All 10 unused pins on X1070/X1071 brought to expansion port, eliminating the need for any extra connectors for digital/analog I/O. Simply add pins to the female side of the X107x connectors in the vehicle.

    I am starting the board design NOW!
    Last edited by m2pc; 03-11-2011 at 07:11 PM.

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  21. #721
    Join Date
    Mar 2006
    Location
    NJ
    Posts
    339
    My Cars
    1998 328is, 2006 330ci ZHP
    mp2c, I know you may have mentioned this earlier in the thread, but I'm curious -- what schematic and layout tools are you using? Are they free / low cost?

  22. #722
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by dwvcfii View Post
    mp2c, I know you may have mentioned this earlier in the thread, but I'm curious -- what schematic and layout tools are you using? Are they free / low cost?
    xpressPCB -- freeware.

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  23. #723
    Join Date
    Feb 2011
    Location
    USA
    Posts
    38
    My Cars
    no
    I ran the CODE/LIMIT/TIMER LEDs through a 220 Ohm resistor to a 3.3V source. This sets their current at 15mA which should be plenty for these. 105mA is way too much current, and the LEDs will probably burn out in short order if allowed to consume that amount.

    The surface mount LEDs for the backlight are 4 in series, so they drop about 9.6V total. The OEM OBC powers these through a diode and a 120 Ohm resistor, limiting their current to around 25mA each (0.1A / 4 = 25mA)

    As for the LCD interface, all you need is an SPI port, configured for Mode 3 @ 750KHz clock speed, and several control lines to clock in the text and icon data. The refresh is a fixed 100KHz square wave. You can either divide a clock oscillator down (as the OEM board does) or use a PWM output set to 20us period, 10us pulse width, 50% duty cycle. That's how I'm driving it from the mbed.

    Good luck and please post any progress here! I'm about 99% done with the v2 schematic using the mbed, which will be posted here for review tomorrow or Monday.
    Thanks for clarifying that, by the time I had thought to check how the OEM board was feeding the LEDs, I had already desoldered all of the components off of the board. SPI is a new concept for me, so I guess this is as good as any time to learn! I thought SPI was serial data written to an input, so I am not clear at the moment on how you need multiple control lines to input the text/icon data, I assumed this data is written in serial form to a single input, but if you don't have the time to give a quick explanation I'm sure I will be able to find it with some internet research.

    I'll let you know if I find out anything else interesting. Thanks for you input so far!

  24. #724
    Join Date
    Apr 2007
    Location
    Yorba Linda, CA
    Posts
    3,781
    My Cars
    1999 TiAg M3, 2003 E46M3
    Quote Originally Posted by catatung View Post
    Thanks for clarifying that, by the time I had thought to check how the OEM board was feeding the LEDs, I had already desoldered all of the components off of the board. SPI is a new concept for me, so I guess this is as good as any time to learn! I thought SPI was serial data written to an input, so I am not clear at the moment on how you need multiple control lines to input the text/icon data, I assumed this data is written in serial form to a single input, but if you don't have the time to give a quick explanation I'm sure I will be able to find it with some internet research.

    I'll let you know if I find out anything else interesting. Thanks for you input so far!
    More info on the SPI bus: [ame]http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus[/ame]

    1999 ///M3 TiAg | Heated Power Vaders | DDM Projector36 5000K 55W HIDs | DDM 3000K 35W HID Fogs
    DDM Smoked Corners | DDM Weighted Shift Knob | K&N CAI | Mishimoto AL Rad w/Zionsville AL Shroud
    Stewart HiPo Water Pump | Samco Hose Kit | 16" SPAL Puller Fan | Viper 5701LE Security
    E36 OBC is now open! Join the effort: BF.C Thread | openOBC Wiki

  25. #725
    Join Date
    Feb 2011
    Location
    USA
    Posts
    38
    My Cars
    no
    More info on the SPI bus: Serial_Peripheral_Interface_Bus
    Thanks for the link. Can you confirm your findings on the pinout? From a previous post of yours I copied this:

    1 +5V
    2 gnd
    3 LCD bias (+6, works with +5)
    4 fix at 1
    5 config strobe
    6 data strobe
    7 clock
    8 data
    9 final strobe
    10 enable
    11 LCD clk
    Was this the final pinout you came up with or were there any changes after this mention?

    Also I was thinking for your project you mentioned to populate the unused cavities on the white connector with pins so as to use them for future expansion. How about some type of SPI-RS232 adapter included on your board so that people using this in their CarPC's could have a way to easily control the LCD from a serial port? There could be a jumper to enable this, and the serial rx lines could be tied into a couple of the "spare" pins on the white connector. Perhaps something like this coiuld be used: http://www.gedanken.demon.co.uk/rs23...rters/spi.html

    I'm looking into using something like that myself, because my side project uses an Arduino and I'm running out of inputs and outputs! I'm hoping with an SPI-RS232 converter I can just write serial data with 2 pins and have the LCD receive it and display it. Any thoughts?

Page 29 of 79 FirstFirst ... 419202122232425262728293031323334353637383954 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •