Page 6 of 40 FirstFirst 1234567891011121314151631 ... LastLast
Results 126 to 150 of 986

Thread: E46 Can bus project.

  1. #126
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by bimerok View Post
    That is wierd why I was not able to read it through OBDII scanner. I need to try to connect different/more advanced scanner to double check it again...

    What are you using to scan/read?

    I have always used tuning software (first I had AutoTap and LS1Edit, now I use HPTuners). With those I can read all kinds of things through the OBDII port.

    EVERY LSx based GM vehicle I have driven (F-bodies/Vettes/Trucks/SUVs/etc) all have an oil pressure gauge (with PSI...that moves) from the factory. If all they had was a pressure switch, there would have been nothing to drive the gauges.
    Chris

  2. #127
    Join Date
    Mar 2004
    Location
    USA
    Posts
    3,241
    My Cars
    96 328is 6.0L
    Originally I was using some scanner from Sears when scanning mine. Don't remember the model number, but looks like obviously it had limited live data support. I will try using the shop solus scanner. It has much more advanced live data support (and price of couple grand ). That scanner was used later on the LS2 project.

    I don't have any tuning software, since I don't tune.
    - 96 328is 6.0L. (LS1 to LS2 build thread: http://forums.bimmerforums.com/forum...ad.php?2098938)
    - 96 328is 5.7L. (LS1 build thread: http://forums.bimmerforums.com/forum....php?t=1289987)
    - 95 ///M3 6.0L. (LS2 build thread: http://forums.bimmerforums.com/forum....php?t=1619249)

    - 97 ///M3. (e46 Fender Flares/track car build thread: http://forums.bimmerforums.com/forum....php?t=1727098)
    - 96 328is (Dual Fuel Pump to Surge Tank thread: http://www.bimmerforums.com/forum/sh...ad.php?1964025)

  3. #128
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by bimerok View Post
    Originally I was using some scanner from Sears when scanning mine. Don't remember the model number, but looks like obviously it had limited live data support. I will try using the shop solus scanner. It has much more advanced live data support (and price of couple grand ). That scanner was used later on the LS2 project.

    I don't have any tuning software, since I don't tune.

    The el cheapo scanners (ie: from Sears/Autozone/etc) can't do much more than the basics. I'm sure something equivalent to a tech2 (never played with a solus) would see the oil pressure values.

    Even though it seems most BMWs don't have an actual "oil pressure gauge", I'd still like to see the pressure signal read out of the Class2 line so that we could set a threshold to trip the oil warning light (say 10psi or less = low oil light on). Depending on how sophisticated we wanted to get, it would be possible to even code pressure-vs-RPM and trip the light at different pressures depending on the engine RPM (ie: 10psi at idle, 20psi at 2K, 30psi at 3K, etc.). I personally don't like not having a pressure gauge, but an indicator light which reflects low oil pressure (with respect to RPM) could serve the same function (ie: 15psi at idle is fine....15psi at 6K RPM is a problem).
    Chris

  4. #129
    Join Date
    Mar 2004
    Location
    USA
    Posts
    3,241
    My Cars
    96 328is 6.0L
    So I tried 2 more different scanners; solus and snap-on, none of them read oil pressure through the OBDII.

    There is a Tan color wire on LS1 C220 connector (pin A). May be it goes directly to GM cluster and from there gets distributed by other means somehow to GM OBDII or one of the other OBDII pins on OEM GM set up, but nothing through GM C230 connector (Drk Green, Pin K).
    - 96 328is 6.0L. (LS1 to LS2 build thread: http://forums.bimmerforums.com/forum...ad.php?2098938)
    - 96 328is 5.7L. (LS1 build thread: http://forums.bimmerforums.com/forum....php?t=1289987)
    - 95 ///M3 6.0L. (LS2 build thread: http://forums.bimmerforums.com/forum....php?t=1619249)

    - 97 ///M3. (e46 Fender Flares/track car build thread: http://forums.bimmerforums.com/forum....php?t=1727098)
    - 96 328is (Dual Fuel Pump to Surge Tank thread: http://www.bimmerforums.com/forum/sh...ad.php?1964025)

  5. #130
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    Quote Originally Posted by V8Z4 View Post
    Looking at my GM service manual (01 Camaro and 04 Silverado/Tahoe), the gauge cluster shows oil pressure signal coming in over the class 2. The ECU is certainly aware of oil pressure since it connects to an oil pressure sensor on the back of the block and pressure can be read out of a scanner (ex: HPTuners).

    Ideas?
    ahh, I work on heavily on camaros and firebird and have done so for over 10 years.

    here is the schematic
    Attached Images Attached Images

  6. #131
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    Quote Originally Posted by bimerok View Post
    So I tried 2 more different scanners; solus and snap-on, none of them read oil pressure through the OBDII.

    There is a Tan color wire on LS1 C220 connector (pin A). May be it goes directly to GM cluster and from there gets distributed by other means somehow to GM OBDII or one of the other OBDII pins on OEM GM set up, but nothing through GM C230 connector (Drk Green, Pin K).
    the oil level indicator switch in the pan, goes to the pcm.

  7. #132
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by SeanCollins View Post
    ahh, I work on heavily on camaros and firebird and have done so for over 10 years.

    here is the schematic
    Okay, now I'm going to have to dig through the books when I get home. I know I have watched oil pressure on HPTuners (unless I'm going crazy).
    Chris

  8. #133
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    Quote Originally Posted by V8Z4 View Post
    Okay, now I'm going to have to dig through the books when I get home. I know I have watched oil pressure on HPTuners (unless I'm going crazy).
    I posted the schematic, some of the newer vehicles with CAN instead of GM class 2 have the oil pressure in the CAN bus data and it is capable of being polled.

  9. #134
    Join Date
    Mar 2004
    Location
    USA
    Posts
    3,241
    My Cars
    96 328is 6.0L
    Quote Originally Posted by SeanCollins View Post
    the oil level indicator switch in the pan, goes to the pcm.
    Yes, on 2002 LS1 it is on C1 (Blue) connector pin 70 (brn wire).

    I removed the level sender and put BMW oil temp for my euro e36 cluster instead.
    Last edited by bimerok; 02-07-2013 at 02:32 PM.
    - 96 328is 6.0L. (LS1 to LS2 build thread: http://forums.bimmerforums.com/forum...ad.php?2098938)
    - 96 328is 5.7L. (LS1 build thread: http://forums.bimmerforums.com/forum....php?t=1289987)
    - 95 ///M3 6.0L. (LS2 build thread: http://forums.bimmerforums.com/forum....php?t=1619249)

    - 97 ///M3. (e46 Fender Flares/track car build thread: http://forums.bimmerforums.com/forum....php?t=1727098)
    - 96 328is (Dual Fuel Pump to Surge Tank thread: http://www.bimmerforums.com/forum/sh...ad.php?1964025)

  10. #135
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by SeanCollins View Post
    thaniel, what parts of the gm class 2 message structure are you interested ?
    I need to know more on what physical interface I have to use to interface between th ls1 ECU and the arduino. And of course a bigger sample of real life data stream (have a small one from a post in a forum). I have the SAE docs on the data formatting which are fairly descriptive. It's all great in the technical papers but working with real life is always is a bit different.

    From the what I've read there should be a continuous data stream available. Some GM cars drive the cluster with class 2 data. Different from th OBDII pids. But then I've only read about it. So real life could be different.

    About 5 months I'll be back to my car. Then I can try some things. But there are only a few benefits over the solution already developed (mpg guage an dsc may be possible to keep functioning.)

    Oh and on the 2002 camaro (my engine). The ECU has no wire connection to oil pressure sensing. But maybe newer engines do? And for the e46 The oil light is just like e36. Same ways to hook it up can be used.

    Thaniel

    Quote Originally Posted by V8Z4 View Post
    Even though it seems most BMWs don't have an actual "oil pressure gauge", I'd still like to see the pressure signal read out of the Class2 line so that we could set a threshold to trip the oil warning light (say 10psi or less = low oil light on). Depending on how sophisticated we wanted to get, it would be possible to even code pressure-vs-RPM and trip the light at different pressures depending on the engine RPM (ie: 10psi at idle, 20psi at 2K, 30psi at 3K, etc.). I personally don't like not having a pressure gauge, but an indicator light which reflects low oil pressure (with respect to RPM) could serve the same function (ie: 15psi at idle is fine....15psi at 6K RPM is a problem).
    This could be done with the GM factory pressure sensor and an arduino (or other micro controller of your choice). Since the oil light warning light is not on the can bus it would be pretty straight forward.
    Last edited by Thaniel; 02-07-2013 at 05:21 PM. Reason: Automerged Doublepost

  11. #136
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    Quote Originally Posted by Thaniel View Post
    I need to know more on what physical interface I have to use to interface between th ls1 ECU and the arduino. And of course a bigger sample of real life data stream (have a small one from a post in a forum). I have the SAE docs on the data formatting which are fairly descriptive. It's all great in the technical papers but working with real life is always is a bit different.

    From the what I've read there should be a continuous data stream available. Some GM cars drive the cluster with class 2 data. Different from th OBDII pids. But then I've only read about it. So real life could be different.

    About 5 months I'll be back to my car. Then I can try some things. But there are only a few benefits over the solution already developed (mpg guage an dsc may be possible to keep functioning.)
    well, gm clas 2 is its own protocol.Personally, I think the jiuce isn't worth the squeeze. Thats a nice way of saying, by the time you make juice, the fruit will be rotten.

    The class 2 does spit continuos data, albiet slowly. I think the buad speed is right around 12kbs at best.Which is a slow, odd speed imho. Your best bet, is to program the audrino to take the factory GM signals, and shuttle them to the CAN bus in the bmw at the proper buad speed. Plus, it opens more engine options and perhaps other possiabilitys for after market systems as well.

    Bottom line, I wouldn't put much effort into GM class 2, the PCM puts out tach and speedo " if you use the factory VSS its a 0-5v sqaure wave " and the same goes for the tach. You also get other outputs.

    Now, what might be handy, is a CAN to CAN converter, for GM late model ecus. I might be able to help here to. Certainly no one is going to reprogram the GM CAN data output however. We would need the source code and lots of time. One of the things your audrino could do however, is device ID simulation to keep the GM PCMS and TCU happy.

    if you want a partner with information resources to help ya, drop me a PM. I don't want to put everything I have online, it could compromise my sources.

  12. #137
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by SeanCollins View Post
    well, gm clas 2 is its own protocol.Personally, I think the jiuce isn't worth the squeeze. Thats a nice way of saying, by the time you make juice, the fruit will be rotten.

    The class 2 does spit continuos data, albiet slowly. I think the buad speed is right around 12kbs at best.Which is a slow, odd speed imho.
    I hear ya. I read of one person, with a car using the factory Class 2 instrument cluster interface complaining, the Tach would lag.

    Quote Originally Posted by SeanCollins View Post
    Your best bet, is to program the audrino to take the factory GM signals, and shuttle them to the CAN bus in the bmw at the proper buad speed. Plus, it opens more engine options and perhaps other possiabilitys for after market systems as well.
    Already done for the Tach, Temp and Check engine lights. (oil pressure and charge are not Can Bus. At least not on the early E46 versions). To me this is a quite simple install. Throw the little box in there and volia.

    Quote Originally Posted by SeanCollins View Post
    Now, what might be handy, is a CAN to CAN converter, for GM late model ecus. I might be able to help here to. Certainly no one is going to reprogram the GM CAN data output however. We would need the source code and lots of time. One of the things your audrino could do however, is device ID simulation to keep the GM PCMS and TCU happy.

    if you want a partner with information resources to help ya, drop me a PM. I don't want to put everything I have online, it could compromise my sources.
    Yes a CAN to CAN setup seems like it wouldn't be very difficult. Just need the GM can codes and another can shield to catch those. All the translation will be done in programming. There might be hardware that is more suitied to this out there. I saw some for industrial applications. It might be able to do it as well. My engine is too old and doesn't use CAN but I don't mind assisting if it would help others.

  13. #138
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    Quote Originally Posted by Thaniel View Post
    I hear ya. I read of one person, with a car using the factory Class 2 instrument cluster interface complaining, the Tach would lag.
    ooh, standard gm data rate with a typicall polled set of pids, 3kbps maybe of a refresh rate of 24 frames a sec sometimes and with a large delay, hundred of milliseconds

    Already done for the Tach, Temp and Check engine lights. (oil pressure and charge are not Can Bus. At least not on the early E46 versions). To me this is a quite simple install. Throw the little box in there and volia.
    this is very handy to me, how much of the can bus have you discovered, and I bet I know what the value is that the ecu is sending to the mpg gauge, I bet its is fuel in something like grs/sec gallon/hr liter/hr kg/min etc. it is likely a full total fuel volume. It wouldn't make sense to send PW data, you'd have to reprogram every dash for varying injectors sizes and engine configurations, if you send fuel volume/wieght and vehicle speed, arriving at consumption is easy.


    Yes a CAN to CAN setup seems like it wouldn't be very difficult. Just need the GM can codes and another can shield to catch those. All the translation will be done in programming. There might be hardware that is more suitied to this out there. I saw some for industrial applications. It might be able to do it as well. My engine is too old and doesn't use CAN but I don't mind assisting if it would help others.

    i'll see what I can do

  14. #139
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by SeanCollins View Post
    ooh, standard gm data rate with a typicall polled set of pids, 3kbps maybe of a refresh rate of 24 frames a sec sometimes and with a large delay, hundred of milliseconds
    The can bus data stream I use does not utilize PID's. As yes using PID's will dramatically slow the data. The Listen program's I use just listen and to not interrogate the modules. Just captures the messages between the devices. I though the Class 2 Serial bus did the same. Guess won't know until I try.


    Quote Originally Posted by SeanCollins View Post
    this is very handy to me, how much of the can bus have you discovered, and I bet I know what the value is that the ecu is sending to the mpg gauge, I bet its is fuel in something like grs/sec gallon/hr liter/hr kg/min etc. it is likely a full total fuel volume. It wouldn't make sense to send PW data, you'd have to reprogram every dash for varying injectors sizes and engine configurations, if you send fuel volume/wieght and vehicle speed, arriving at consumption is easy.
    What it sends it not the hard part. It's how it sends it. The IKE recieves how much fuel is consumed. It knows the speed of the vehicle from the speed signal and does the calculation. The bad part is how the DME sends the fuel consumed data. This is a good a place as any to describe what I have seen. I need to retest it all to make sure I really know what I'm talking about but let me try to explan.

    The DME sends out how much fuel (in some kind of units, Doesn't matter really what they are) every so often. The interval is irregular. Probably due to traffic congestion on the bus or perhaps it only sends if a significant change has happened. So picture this if the fuel being consumed is constant 10 units/sec and the DME sends messages out like this

    second 1, 10 units consumed.
    After 2 seconds 20 units consumed.
    4 seconds 40 units consumed. and so on. Until
    9 seconds 90 units consumed
    10 seconds 00 units consumed.
    Counter flips and starts at zero. Except we are dealing in hex. This is just an example. The actual amount isn't important it's the amount since LAST message that is needed (everyon bored yet?)

    Simple right? Well yes if you can send the messages in regular intervals with a fixed increment. BUT how often should the messages be sent. My first impulse was as fast as possible. However doing that actually magnifies any errors. Error being by if the message was sent to slow or early. Bus traffic and the CPU being occupied doing other things can cause very small delays. Found that sending the messages slower actually caused less errors. What do I mean by error.

    Like in the example I send a regular incrementing fuel consumed amount at a fixed interval. Then put the IKE in dignostic mode and have it show the Instantaneous L/h amount. With a fixed interval and fixed increment the value should NOT change. SURPISE it did change. It would jump due to small delays in the times of the packets being sent. Through trial and error with the sending speeds I found the more frequent the messages were sent the greater the errors (bigger and more frequent jumps in the l/h figure). So slower was better. To a point. getting really slow the IKE would take VERY long to initalize the MPG gage. So there was a practical limit. At least for me sitting and waiting for the guage to move.

    To recap. I slowed and sped up the time between sending. For our example instead of 1 sec = 10, 2 sec = 20 ). I did 1 sec = 10, 4 sec =20. this would change the MPG calculation as in the first example it is 10 units/sec and second example 5 units/sec. Everyone following or did you quit reading already :-).

    This is why the MPG values are a pain as the program needs to be precise in the timing (or calculated with time as a factor but that didn't work out). And it's not 1 and 2 seconds but in the order of miliseconds. And bogging the send program will induce error. Much trickier to get right then say the RPM or Temp where it is just send a value and the IKE reads it. But it's very do able just have to calibrate it.

    My plan is to run the test again with the same sending speed and incrementing but then vary the speed and sample the MPG readings (actually l/km) and then back out the speed factor so the input can be isolated and described in a formula. Could then use the injector pulse width captured by the Ardunio to calculate a fuel consumption and send it using the formula. Volia.

    The sample output program I posted has the fixed incrementation at a fixed time interval in it already. Or in other words it'll make the MPG move if the car is in motion but will be a non sense reading. Which in this kind of car isn't a a MPG non sense anyway?

    Any questions......? Class dismissed.
    Last edited by Thaniel; 02-12-2013 at 04:51 PM.

  15. #140
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    yeah, thats peculiar, are you getting a scalar value at the front byte ? Do you have a log of the messgaes a stock dash recives from the pcm ? I'd like to stare at the data and see what pops out

  16. #141
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by SeanCollins View Post
    yeah, thats peculiar, are you getting a scalar value at the front byte ? Do you have a log of the messgaes a stock dash recives from the pcm ? I'd like to stare at the data and see what pops out
    Not sure what you mean Scalar value. The data consumes 2 data bytes.

    A reminder for me as much as anyone from page 1 of the tread. Maybe I need to edit some more too.
    "
    ARBID: 0x545 (DME4)
    __B0 Check engine light (binary 10), Cruise light (binary 1000), EML (binary 10000). combinations work to get multiple lights
    __B1,B2 Fuel consumption (B1 LSB, MSB B2). Values is the rate of change. Values just cycle from 0 to FFFF the jump to zero and start over.
    __B3 Overheat light (binary 1000, Hex 08)"

    So bit 1 and 2 are the ones for this value and they cycle from 0 to FFFF then flip to zero and go back to FFFF. Since it is a change in fuel that the guage looks at. So at a constat fuel consumption the values climb at a standard rate. The rate of climb is the values used in the guage calculation.

    I've attached a sample data run of ARBID 545. But trying to glean the data from that is more trouble than it's worth. I just need to re run my tests sending at a fixed time and steps with varing speeds. Then same thing with fixed speed and time and varing steps. Then should be an easy calculation. Can program the send program with just an adustment factor to make the guage do whatever we want relative to speed. Trying to take the speed out of the equation (to make it a different type of gage, say oil pressure) is not going to work well. The guage only reads when there is a speed input of over 3 mph or something like that.

    Also included a graph I had forgotten about. I varied the time between sending the MPG data but kept the step the same and speed input the same. I would have expected a linear plot of MPG output. But it was not the case. Fits more of an exponential formula. Perhaps this is done to allow for big values or better resolution. Doesn't matter as I plan to have the send time will be fixed. But I found it interesting.

    Maybe I'll take a min and run the tests....Sooner or later
    Thaniel
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Thaniel; 02-13-2013 at 07:12 AM.

  17. #142
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Added one more graph "L/100km" this one:

    Speed: constant (aprox 40mph)
    Time between can messages fixed.
    Amount of increase between can messages: Varied and recorded output as shown on IKE for l/100km (in digital display)

    As you see this type of information on IS linear and is what we need to make the gauge work. But I think I made some errors in data colection and need to re run the test and run it at a couple different MPH to make sure I have it all correct. But took things apart for thanksgiving and with the holidays and then went traveling for christmas (Kenya). Just haven't gotten back into it since then. I'll get back at it again I'm sure.

    Thaniel
    Attached Images Attached Images

  18. #143
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    I am gonna get some GM canbus data for you if I can.

  19. #144
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Finally took some time to rerun the MPG numbers. Learned some interesting things.

    In trying to come up with a calculation I put the inst cluster in test mode and switched it to mode 4.1 Momentary consumption values in l/h and 4.0 momentary consumtion values l/100km. Using 4.1 appeared to be the best as it would remove the speed portion of the formula. But during testing the values in 4.1 were often jumpy. Switching back and forth between values. Had this issue before and had tried to stablize it. Got the 4.0 values good but 4.1 still jumped. So plunged ahead and continued to take the values.

    Began to notice the 4.1 values were AWAYS multiples of 18. And as we checked more values a pattern started emerging. It appears what it does is if the value is suppose to be 19. It would display 18 for a long period of time. Say 3 seconds then display 36 for a short period. etc. Once we realized this watching the numbers flip back and fort was not so troubling. And we were able to come up with a best fit formula to the data. Formula is liters/hour = .07 * increment. The increment being the value the LSB is changed each time (in decimal) in the MPG can bus message. Get that? Sorry I don't know how to make it much simpler. But another way to say it is the z value in the program I posted converted to decimal is the "increment" value in the formula.

    l/h is nice but what we really want is MPG. The metric equivalent is l/100km. the 4.0 test mode shows l/100km and we collected those and best fit the values. l/100km also = l/h divided by Km/h *100. Guess I should mention the values displayed in the test mode 4.0 and 4.1 need to be divided by 10 (if it shows 109 it is 10.9). So the formula is l/100km = increment (in dec) * 7 / (speed in Km/h). This formula seems to correlate quite close to the values we observed at both 63 km/hr and 111 km/hr. Which were the two speeds we took samples (the l/hr are the same at both speeds).

    So great. Have l/100 km and it is an easy conversion to MPG (MPG= 235.214583/ l/100km). easy enough. So for fun I want to put the needle exactly on 30mpg at a speed of 63km/hr. I back solve and see I need a hex value of 46 (decimal 70). Put it in for the increment value and.....What? Guage reads more than 30mph. Trial and error finds that hex 53 (at 63km/hr) makes teh guage read 30mpg. I try to match it to the 50, 20 and 16 mpg lines as well and find that the guage reads about 18% higher compared to the test mode 4.0 shown digital values. [edit: was using US gallons where my cluster is a UK cluster and should be using imperial gallons]

    This reminds me of the MPG gauge in my E36. I noticed that the guage on the dash and the OBC didn't agree as well so never tryied to calibrate it to the LS1 engine. Which one does one calibrate it too? Same deal here. Adjust the programming to make the guage match real life or the digital values.? I think it all comes down to just putting an adjustment value in the program and let people put whatever value makes them happy in it

    To get the MPG guage to work off the analog values would just need to add a similar subroutine to the RPM sensing. The ardruino allows for 2 interupts so this should be no problem. Then feed an injection signal to it and do the calculations to adjust the increment value dyanmically and the guage can dance to the LS1 music.

    Quote Originally Posted by SeanCollins View Post
    I am gonna get some GM canbus data for you if I can.
    Great. Let us know what you find. If we can get that worked out we may be able to keep the DSC in play. And the programming and wiring may be simpler. But depends on how much programming and hardware is required to capture the serial bus signals.

    Thaniel

    Realized where the accuracy error is coming in. The difference between imperial gallons and US gallons. My instrument cluster is from UK so for this one the last converstion from l/km should be MPG = 282.481/(l/100km).

    Using this the calculated values and observed are within about 2%. Could easily argue if the needle is exactly in the center of the mark over that much
    Last edited by Thaniel; 02-17-2013 at 08:07 AM. Reason: Automerged Doublepost

  20. #145
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Another short update:

    Added the capture of a "Injection pulse signal" to the program. Should be able to tap the electrical pulses going to one of the injectors to send the signal to the Arduino. Long story short.

    The Ardruino and can sheild now runs the MPG gauge, tach, temp guage and check engine light from external "Analog" inputs.

    I've spent more time gettting my pulse generators to work properly to demonstrate they all work then making the change to add the injecting sensing took. But think I have it suitiable to make a video demonstration. Perhaps later this week.

    Thaniel.

  21. #146
    Join Date
    Mar 2004
    Location
    USA
    Posts
    3,241
    My Cars
    96 328is 6.0L
    Some amazing stuff
    - 96 328is 6.0L. (LS1 to LS2 build thread: http://forums.bimmerforums.com/forum...ad.php?2098938)
    - 96 328is 5.7L. (LS1 build thread: http://forums.bimmerforums.com/forum....php?t=1289987)
    - 95 ///M3 6.0L. (LS2 build thread: http://forums.bimmerforums.com/forum....php?t=1619249)

    - 97 ///M3. (e46 Fender Flares/track car build thread: http://forums.bimmerforums.com/forum....php?t=1727098)
    - 96 328is (Dual Fuel Pump to Surge Tank thread: http://www.bimmerforums.com/forum/sh...ad.php?1964025)

  22. #147
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by Thaniel View Post
    Another short update:

    Added the capture of a "Injection pulse signal" to the program. Should be able to tap the electrical pulses going to one of the injectors to send the signal to the Arduino. Long story short.

    The Ardruino and can sheild now runs the MPG gauge, tach, temp guage and check engine light from external "Analog" inputs.

    I've spent more time gettting my pulse generators to work properly to demonstrate they all work then making the change to add the injecting sensing took. But think I have it suitiable to make a video demonstration. Perhaps later this week.

    Thaniel.
    Nice!


    I just picked up an 03 325i w/ 5speed sedan this weekend, so I am already thinking "how do I swap a 5.3/T56 into this thing". Glad you have the MPG gauge working.
    Chris

  23. #148
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Here's the video

    [ame]http://youtu.be/vxCKy8eHZW8[/ame]

    E46 instrument cluster running off can bus with "analog" inputs to Ardruino. Only 3 signals wires (1 ground and 1 power) are fed into the Ardruino. Tach and injector pulse width are pulsed signals. The temp is a variable voltage. During the video I first turn it on. Then rotate a variable resistor that changes the pulse frequency coming from the "Leonardo" being fed into the Ardruino by the purple wire. Then I rotate the variable resistor that varies the voltage that is sent to the Ardruino on the light blue short wire. Then after removing the wire that is feeding puses to the speedometer (required to make the MPG work). I press buttons which vary the frequency sent on the long blue wire to the ardruino (freqency is varied to provide 500 rpm increases every time I push the button which is why the tach is not fluid).

    Attached is a picture of the wiring coming into the can bus. Signals come in through the small wires and then go out on the can bus through the DB9 connector (black wire). The 12V in and a gound are on that connector too.

    Also attached is a .zip file (named with .pdf for upload) which contains the exact software the Arduino is running during the video. It will need some calibration for the MPG values (different injectors and fuel pressures will consume differing amounts of fuel) So I didn't try to do calculations in injector pulsewidth vs fuel consumption. but I put in a nice MPG calibration variable for tweaking.

    I'd like to see how it would work on an actual E46 with an LS1.....

    Thaniel
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Thaniel; 04-11-2013 at 07:57 AM.

  24. #149
    Join Date
    May 2012
    Location
    South West Michigan
    Posts
    267
    My Cars
    e38 740i e39 540 wagon
    I got a e38 thats bound for a pretty nasty engine here somewhat soon. so maybe I can keep the stock cluster, that would be baller.

    as for the can info you need.

    heres the public stuff, which should be enough to work with any CAN capable ecu
    http://en.wikipedia.org/wiki/OBD-II_PIDs

    it may take some time to get ahold of the manufacturer specific stuff, if someone has a can sniffer, I can hook one up and use my modis to probe data.

  25. #150
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by SeanCollins View Post
    as for the can info you need.

    heres the public stuff, which should be enough to work with any CAN capable ecu
    http://en.wikipedia.org/wiki/OBD-II_PIDs

    it may take some time to get ahold of the manufacturer specific stuff, if someone has a can sniffer, I can hook one up and use my modis to probe data.
    PIDs. Think I may have talked about them before. I was about to write a message about how they a bad idea or won't work......But I got to thinking more. For the E46 side yes they don't work but the LSx side (providing the ECU is capable) it might work.

    The drawback with PID's is that each value wanted has to be asked for. Each and every time. And the ECU response is specific to the request. So this is all additional traffic on the bus. And the messages are low priority. So if the bus gets busy there will be lag or delays. When just listening to the modules anounce their information causes no additional traffic.

    But on the LSx engine in a BMW what else is it talking to?....nothing. So maxing out the bus bandwidth is not an issue. Just talking out loud let's do a short pro con list.

    Using PID's

    Con:
    Must request the information from the ECU instead of just Listen.
    Could cause lag and the guages may not respond quick enough (this worries me).
    More Bus traffic (probably a non issue)
    More processing for the Arduino (probably not an issue)
    This seems somehow like the less elegant way to interface.
    Can not send Can Bus specific information to imitate a missing modules

    PRO:
    PID's have standards for OBDII readers. Once set up the device could work on any ECU that uses the same protcol.
    The programming to read PID's already exists.

    Ok. So simple sometimes is better. The Can bus sheild I have had a free software for the Arduino that actually Sends PID's and grabs responses. I've already tested this with my Renault Laguna and it works fine. To make it work for the LS1 would be no big deal.

    Problem with this is I need 2 can bus sheilds (or the equivalent can chips) to do any testing. Which I don't have. I cold look at the programming side but someone would need to test it.

    Commenst or thoughts anyone?

    Thaniel
    Last edited by Thaniel; 04-11-2013 at 07:58 AM.

Page 6 of 40 FirstFirst 1234567891011121314151631 ... 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
  •