Page 4 of 40 FirstFirst 123456789101112131429 ... LastLast
Results 76 to 100 of 986

Thread: E46 Can bus project.

  1. #76
    Join Date
    Jan 2013
    Location
    London, UK
    Posts
    1
    My Cars
    2003 E46 320i
    Hi folks, just joined the forum for this thread. I've already got an Arduino and the Sparkfun Canbus shield. Is it possible to get a copy of your sniffer program Thaniel?

    Where have people been tapping into the Canbus, at the OBDII port?

  2. #77
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by PostMark View Post
    Hi folks, just joined the forum for this thread. I've already got an Arduino and the Sparkfun Canbus shield. Is it possible to get a copy of your sniffer program Thaniel?

    Where have people been tapping into the Canbus, at the OBDII port?
    I tapped my Arduino into behind the gauge cluster.

    Using the following link:
    http://www.e-ope.ee/_download/euni_repository/file/2905/CAN_BUS_LOCATION_GUIDE.pdf

    Gives the in-car CAN wires at the gauge cluster

    New BMW 3 Series
    Wire Colors CAN HIGH = YELLOW with RED trace
    CAN LOW = YELLOW with BROWN trace



    And using the following schematic of the Arduino CAN Shield: http://www.sparkfun.com/datasheets/DevTools/Arduino/canbus_shield-v12.pdf

    Gives the following four pins to be connected:
    Pin 2 = Ground
    Pin 3 = CAN HIGH
    Pin 5 = CAN Low
    Pin 9 = 12V+

    So, connections to be made:
    Pin 3 -> YELLOW with RED trace
    Pin 5 -> YELLOW with BROWN trace
    Chris

  3. #78
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by PostMark View Post
    Hi folks, just joined the forum for this thread. I've already got an Arduino and the Sparkfun Canbus shield. Is it possible to get a copy of your sniffer program Thaniel?
    Sure. Another forum member suggested I change the ending of the file so it can be uploaded. Looks like that will work. It's a .ZIP file not a PDF. So download and change.

    As a side note I'm trying to buy an E46 that was advertized only a few miles away from my home in USA (while I'm still in Europe). Buying cars based on pictures and descriptions is always a gamble. We'll see what happens.

    Thaniel
    Attached Files Attached Files

  4. #79
    Join Date
    Dec 2012
    Location
    Virginia Beach VA
    Posts
    74
    My Cars
    2001 525i Sport Wagon
    I've registered for the forum and subscribed to this thread.

    My interest is using CAN-capable stand-alone systems (Motec, MegaSquirt etc) in E46 and other BMW's, and still keep the stock instrument cluster.

    I've got a MicroChip CAN analyzer (really pretty limited device) and have sent messages to a cluster both in and out of the car, with mixed results. I suspect something with how often I can send messages. Basically I have to be sending messages (RPM coolant etc) while the cluster powers up, then I only get readings for a few seconds. The gauge or light then goes away, even while the tool is still sending messages.

    Are you repeating the messages on some periodic basis?

    I am able to read the cluster as long as it is powered, seeing Odometer etc.

    I have an Arduino CANShield but haven't written any code for it yet.

    Thanks for all the work on this.

    Awesome!

    Peter Florance
    PFTuning

  5. #80
    Join Date
    Nov 2004
    Location
    The Black Hills (Souf Dak
    Posts
    9,349
    My Cars
    Diesels and a 04 M3
    Thaniel, good luck with the progress man. Thanks for the info but I have decided on a different platform for my LSx motor (E38) and have already bought the car.
    I'm a ROLEX wear'N
    Diamond ring wear'N
    KISS steal'n
    WHEELIN DEAL'N
    Limousine RIDE'N
    JET PLANE FLY'N , SON OF A GUN!
    And I'm havin a hard time holdin these alligators down!!!!!!
    WHOOOOOO!!!!!!

  6. #81
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by pftuning View Post
    I've registered for the forum and subscribed to this thread.

    My interest is using CAN-capable stand-alone systems (Motec, MegaSquirt etc) in E46 and other BMW's, and still keep the stock instrument cluster.

    I've got a MicroChip CAN analyzer (really pretty limited device) and have sent messages to a cluster both in and out of the car, with mixed results. I suspect something with how often I can send messages. Basically I have to be sending messages (RPM coolant etc) while the cluster powers up, then I only get readings for a few seconds. The gauge or light then goes away, even while the tool is still sending messages.

    Are you repeating the messages on some periodic basis?

    I am able to read the cluster as long as it is powered, seeing Odometer etc.

    I have an Arduino CANShield but haven't written any code for it yet.

    Thanks for all the work on this.

    Awesome!

    Peter Florance
    PFTuning
    Hi Peter. Thanks for the comments and joining the thread. Sounds like you might have some experience to share. Please add whatever you can.

    Yes the messages have to be sent at a more or less regular basis. And yes the instrument cluster must recieve an acknowlegement from another module or it will sense an error (can sheild set to Normal mode will do this). If things get too out of wack with either the data sent or the frequency the messages are sent the instrument cluster will get an error and often ignore the messages. Sounds complicated but once the program is set up none of this has to be messed with. For a Stand alone ECU, LS1 or Electric car the sending routines are all the same. Just different input routines.

    Using some of the data samples from a working car I calculated the approximate time between messages. The time between messages varried somewhat. Especially in the less critical messages (Higher ARBID's). So this is a Rough average.
    ARBID: 545; 100ms (fuel consumption)
    ARBID: 316; 50ms (RPM)
    ARBID: 329; 20ms (Temperature)

    I experimented with several scenarios to find one that the instrument cluster liked and sent the messages as slow as possible. This is what I used.

    send_fuel(); //ARBID: 545
    delay(del); //this is 10 milli seconds
    send_RPM(); //ARBID: 316
    delay(del);
    send_temp(); //ARBID: 329
    delay(del);
    send_RPM(); //ARBID: 316,
    delay(del);
    send_RPM(); //ARBID: 316,
    delay(del);

    the send_xxx() is a subroutine call that would send that value over the can bus. you'll notice that the sending frequency doesn't match the averages. Well they were just that averages and some of the messages could be sent slower and still make the cluster happy. Slower is better as it leaves more bus band width. AND for the MPG gauge I found that the faster the messages are sent the more error there is in the values (difficult to describe. I'll try to another time). I'm intersted to find out if this same sending frequency will work with the cluster in the car with the other modules sending messages or if some adjustment to the timing will be necessary. But with a bare instrument cluster it works quite nicely.

    If you want send me your e-mail I'll send you what I have so far for an arduino sending program. The fuel consumption output isn't related to anything yet but the RPM and Temp are easily taylored to whatever you need. Just share whatever improvement ideas you come up with

    Thaniel.

    P.S. Things are looking like they may go through on the non running E46 I'm trying to purchase.

  7. #82
    Join Date
    Dec 2012
    Location
    Virginia Beach VA
    Posts
    74
    My Cars
    2001 525i Sport Wagon
    Quote Originally Posted by Thaniel View Post
    Hi Peter. Thanks for the comments and joining the thread. Sounds like you might have some experience to share. Please add whatever you can.

    Yes the messages have to be sent at a more or less regular basis. And yes the instrument cluster must recieve an acknowlegement from another module or it will sense an error (can sheild set to Normal mode will do this). If things get too out of wack with either the data sent or the frequency the messages are sent the instrument cluster will get an error and often ignore the messages. Sounds complicated but once the program is set up none of this has to be messed with. For a Stand alone ECU, LS1 or Electric car the sending routines are all the same. Just different input routines.

    Using some of the data samples from a working car I calculated the approximate time between messages. The time between messages varried somewhat. Especially in the less critical messages (Higher ARBID's). So this is a Rough average.
    ARBID: 545; 100ms (fuel consumption)
    ARBID: 316; 50ms (RPM)
    ARBID: 329; 20ms (Temperature)

    I experimented with several scenarios to find one that the instrument cluster liked and sent the messages as slow as possible. This is what I used.

    send_fuel(); //ARBID: 545
    delay(del); //this is 10 milli seconds
    send_RPM(); //ARBID: 316
    delay(del);
    send_temp(); //ARBID: 329
    delay(del);
    send_RPM(); //ARBID: 316,
    delay(del);
    send_RPM(); //ARBID: 316,
    delay(del);

    the send_xxx() is a subroutine call that would send that value over the can bus. you'll notice that the sending frequency doesn't match the averages. Well they were just that averages and some of the messages could be sent slower and still make the cluster happy. Slower is better as it leaves more bus band width. AND for the MPG gauge I found that the faster the messages are sent the more error there is in the values (difficult to describe. I'll try to another time). I'm intersted to find out if this same sending frequency will work with the cluster in the car with the other modules sending messages or if some adjustment to the timing will be necessary. But with a bare instrument cluster it works quite nicely.

    If you want send me your e-mail I'll send you what I have so far for an arduino sending program. The fuel consumption output isn't related to anything yet but the RPM and Temp are easily taylored to whatever you need. Just share whatever improvement ideas you come up with

    Thaniel.

    P.S. Things are looking like they may go through on the non running E46 I'm trying to purchase.
    Hi Thaniel
    My email is peter@pftuning.com
    I really appreciate the help and hope to contribute back.

    Thanks!

    Peter Florance

  8. #83
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by pftuning View Post
    Hi Thaniel
    My email is peter@pftuning.com
    I really appreciate the help and hope to contribute back.

    Thanks!

    Peter Florance
    You've got mail.

  9. #84
    Join Date
    Dec 2012
    Location
    Virginia Beach VA
    Posts
    74
    My Cars
    2001 525i Sport Wagon
    Quote Originally Posted by Thaniel View Post
    You've got mail.
    Got it.
    I'll wire up rpm and coolant inputs this weekend and see if I can get those working.
    After that, I should be able to get a MegaSquirt to talk to it.
    Thanks!!


    Sent from my DROID RAZR using Tapatalk 2
    Peter Florance
    PFTuning.com

  10. #85
    Join Date
    Aug 2011
    Location
    Salt Lake City
    Posts
    265
    My Cars
    '95 M3, 97' E39 540i-LS3
    Quote Originally Posted by PostMark View Post
    Hi folks, just joined the forum for this thread. I've already got an Arduino and the Sparkfun Canbus shield. Is it possible to get a copy of your sniffer program Thaniel?

    Where have people been tapping into the Canbus, at the OBDII port?
    I tapped into the steering wheel position sensor on the sensor side. This left the car's harness un-touched. The sensor was also easily accessible.

    Recently found out that my 2010 LS3 engine compartment fuse box gets a serial communication to initiate the motor starting. The module in the fuse box triggers the ECU's start wire. I can tap into the ECU wire, post module, but damn, everything is heading to the message platform.
    540i-LS3-TR6060 swap thread

  11. #86
    Join Date
    Dec 2012
    Location
    Virginia Beach VA
    Posts
    74
    My Cars
    2001 525i Sport Wagon
    Thaniel sent me a copy of his CANShield sketch that reads a couple of inputs and the joystick on the Arduino.

    I connected the Arduino to my MegaSquirt stimulator and was able to duplicate his results; driving Temp Gauge and it's warning light, Tachometer, and Check Engine light.

    The temp gauge is pretty slow responding, but the warning light is instantaneous; I wasn't sure until now whether that was a property of the DME or the cluster. Now I know it is a property of the cluster.

    Next step is to get a stand-alone engine ecu to talk to the dash.

    Thanks again Thaniel!

    Peter Florance

  12. #87
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Cool, so it sounds like everything is working as it should. Won't be long now before we have a fully working solution!
    Chris

  13. #88
    Join Date
    Jul 2011
    Location
    Houston
    Posts
    1,344
    My Cars
    LS e39, LT e53
    I think I am gonna get in the bus bandwagon. Gonna do some more research in the boards I need for the e39 and stock up on Advil. Interested in a cruise control solution and a/c button functionality. Other than that everything's accounted for.
    Clint
    2006 X5 L83 5.3 6l80 swapped in progress
    1999 528i 5.7L 4l60e swapped w/ 31 spline 8.8 cobra diff
    2007 ZX-10r - sold
    1987 R-10 SWB L83 5.3L 6L80e swapped

  14. #89
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by pftuning View Post
    Thaniel sent me a copy of his CANShield sketch that reads a couple of inputs and the joystick on the Arduino.

    I connected the Arduino to my MegaSquirt stimulator and was able to duplicate his results; driving Temp Gauge and it's warning light, Tachometer, and Check Engine light.

    The temp gauge is pretty slow responding, but the warning light is instantaneous; I wasn't sure until now whether that was a property of the DME or the cluster. Now I know it is a property of the cluster.

    Next step is to get a stand-alone engine ecu to talk to the dash.

    Thanks again Thaniel!

    Peter Florance
    Glad to hear it's working. I didn't doubt that it would.

    Quote Originally Posted by modular93fox View Post
    I think I am gonna get in the bus bandwagon. Gonna do some more research in the boards I need for the e39 and stock up on Advil. Interested in a cruise control solution and a/c button functionality. Other than that everything's accounted for.
    Clint
    Join the crowd. Can bus: everybody's doing it now The Cruise and A/C would be nice finishing touches to have.

    P.S. My E46 is suppose to be delivered today.

  15. #90
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by thaniel View Post

    p.s. My e46 is suppose to be delivered today.
    nice
    Chris

  16. #91
    Join Date
    Nov 2004
    Location
    The Black Hills (Souf Dak
    Posts
    9,349
    My Cars
    Diesels and a 04 M3
    Good news... Waiting for the progress
    I'm a ROLEX wear'N
    Diamond ring wear'N
    KISS steal'n
    WHEELIN DEAL'N
    Limousine RIDE'N
    JET PLANE FLY'N , SON OF A GUN!
    And I'm havin a hard time holdin these alligators down!!!!!!
    WHOOOOOO!!!!!!

  17. #92
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by V8Z4 View Post
    nice
    Buying a car is always fun. Even if thousands of miles separate the owner and car.

    I'm quite happy. Though I won't clutter this particular thread with a bunch about it. But I can't resist a little bit. It's a 2000 323i sport. Was advertized as didn't run and has a few flaws. But for $2000 delivered to my door I couldn't resist (Owner lived maybe 5 miles from my house and offered to tow it over to my house for me). Picture attached is at my house.

    My friend that took delivery said "It actually starts but won't stay running." So might even be fixable. Too bad I have 6 more months before I can see it in person.

    Back to Can Bus.

    With the latest interest in this project I finally turned my instrument cluster, with Arduino/can shield attached, back on. Looks like nothing was broken but It'll take me a bit to remember where I was. I then Went though and cleaned up my RPM/Temp sensing and output program (different from the previously posted can sniffer program). I've attached a copy if anyone would like to have a look or play with it. It's like with the other one. It is really a .ZIP file not a .PDF. So download and change the file type. If someone does make some improvements please pass them on.

    The program senses an input pulse for RPM and a voltage for Temp. It has some code to send a fuel consumption value (for MPG calculation) but it's not tied to anything. Just a fixed value. Though the needle will move as speed changed.

    That's it for now.

    Thaniel
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Thaniel; 01-05-2013 at 02:17 PM.

  18. #93
    Join Date
    Mar 2006
    Location
    CT
    Posts
    37
    My Cars
    E30
    Quote Originally Posted by Thaniel View Post
    Buying a car is always fun. Even if thousands of miles separate the owner and car.

    I'm quite happy. Though I won't clutter this particular thread with a bunch about it. But I can't resist a little bit. It's a 2000 323i sport. Was advertized as didn't run and has a few flaws. But for $2000 delivered to my door I couldn't resist (Owner lived maybe 5 miles from my house and offered to tow it over to my house for me). Picture attached is at my house.

    My friend that took delivery said "It actually starts but won't stay running." So might even be fixable. Too bad I have 6 more months before I can see it in person.

    Back to Can Bus.

    With the latest interest in this project I finally turned my instrument cluster, with Arduino/can shield attached, back on. Looks like nothing was broken but It'll take me a bit to remember where I was. I then Went though and cleaned up my RPM/Temp sensing and output program (different from the previously posted can sniffer program). I've attached a copy if anyone would like to have a look or play with it. It's like with the other one. It is really a .ZIP file not a .PDF. So download and change the file type. If someone does make some improvements please pass them on.

    The program senses an input pulse for RPM and a voltage for Temp. It has some code to send a fuel consumption value (for MPG calculation) but it's not tied to anything. Just a fixed value. Though the needle will move as speed changed.

    That's it for now.

    Thaniel
    I'm jealous I want that car for 2 grand...could be a fuel pump or HFM ... Try unplugging the HFM (MAF) DME should substitute values and start if it's bad

    Sent from my iPhone using BF.com

  19. #94
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by KDss14e30 View Post
    I'm jealous I want that car for 2 grand...could be a fuel pump or HFM ... Try unplugging the HFM (MAF) DME should substitute values and start if it's bad

    Sent from my iPhone using BF.com
    +1... I thought I got a killer deal when I found my 03 Z4 for $10,000 but $2K, dang.....
    Chris

  20. #95
    Join Date
    Feb 2007
    Location
    Dallas, Ga 30132
    Posts
    1,337
    My Cars
    97M3.4.5,EG,YZF
    Vacuum leaks are hell on these mass air cars too, so check master cylinder hose, the intake boot, all that crap. I found all kinds of rubber parts falling apart on my E36....been replacing it all. Lots of little stuff I never would have thought about.

  21. #96
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Quote Originally Posted by hefftone View Post
    Vacuum leaks are hell on these mass air cars too, so check master cylinder hose, the intake boot, all that crap. I found all kinds of rubber parts falling apart on my E36....been replacing it all. Lots of little stuff I never would have thought about.
    +1 to that, though if you disconnect the MAF the computer will force over to speed density mode and thus should negate the vacuum leaks (at least for problem solving standpoint).
    Chris

  22. #97
    Join Date
    Dec 2012
    Location
    Virginia Beach VA
    Posts
    74
    My Cars
    2001 525i Sport Wagon
    I autocross an E46. We've had a huge problem with throttle body connector throwing faults (Throttle Position Improbable).
    We actually carry a can of Deoxit D5 around and have used it twice when we declared a Mechanical and sprayed the connector.
    So check the throttle body connector pins and clean them if you get that fault.

    Quote Originally Posted by Thaniel View Post
    Glad to hear it's working. I didn't doubt that it would.

    I wasn't as confident; I have a history of breaking things...

    1/7/2013
    I've got temp and rpm broadcast from a MegaSquirt MS3 to an E46 cluster on the bench. The code only allows one update rate for both messages. 20 msecs seems to work fine.

    It took a while to compile, as I'm a horrible programmer.

    I'll post some video later.

    Thanks!
    Last edited by pftuning; 01-07-2013 at 01:11 PM. Reason: Automerged Doublepost

  23. #98
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by pftuning View Post
    1/7/2013
    I've got temp and rpm broadcast from a MegaSquirt MS3 to an E46 cluster on the bench. The code only allows one update rate for both messages. 20 msecs seems to work fine.

    It took a while to compile, as I'm a horrible programmer.

    I'll post some video later.

    Thanks!
    That is great to hear. When doing research for this project I had seen the MegaSquirts were adding Can bus. Nice to see it can be useful.


    Thank you everyone on tips for my new project car. I will definately give the ideas a try. Though it will be July before I get to try anything.
    Thaniel

  24. #99
    Join Date
    Dec 2012
    Location
    Virginia Beach VA
    Posts
    74
    My Cars
    2001 525i Sport Wagon
    Quote Originally Posted by Thaniel View Post
    That is great to hear. When doing research for this project I had seen the MegaSquirts were adding Can bus. Nice to see it can be useful.

    For some time MegaSquirt (II and 3) has had it's own CAN system that could be polled; some race datalog and dash products have plugins for it.

    The recently added CAN broadcast feature (first added by SteveP for VW/Audi/Porsche) was sorely needed.

  25. #100
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    So the MegaSquirt CAN stuff is able to drive the factory gauges as well?
    Chris

Page 4 of 40 FirstFirst 123456789101112131429 ... 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
  •