Page 3 of 40 FirstFirst 1234567891011121328 ... LastLast
Results 51 to 75 of 986

Thread: E46 Can bus project.

  1. #51
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by KarlSpackler View Post
    C'mon man. I got a LS2 waiting for a e46 m3 chassis....
    Need someone like yourself to try it and tell the rest of us how it works . I'm quite confident the analog program will work. Of course never know till we try. Timing may require tweaking since in the car more devices will be on the bus.

    Small update.
    I brought along the gear tooth sensor I had bought for My EV. For fun I wired it up to the Arduino to send the RPM pulses (this is how I'll sense RPM in my EV). Need a spinning target to create the pulses. Sadly here in sweden I don't have much to work with. Not even so much as a hand drill. But necessity is the mother if invention. With a broken CD rom, 2 old watch batteries, a driver install disk (from the new CD ROM) and some masking tape I improvised.

    Sure enough it works. But by hand I can only get the disk to spin to about 200 RPM. Good enough for the test though.
    Attached Images Attached Images

  2. #52
    Join Date
    Mar 2004
    Location
    USA
    Posts
    3,241
    My Cars
    96 328is 6.0L
    I'm loving it
    - 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. #53
    Join Date
    Nov 2004
    Location
    The Black Hills (Souf Dak
    Posts
    9,349
    My Cars
    Diesels and a 04 M3
    Quote Originally Posted by Thaniel View Post
    Need someone like yourself to try it and tell the rest of us how it works . I'm quite confident the analog program will work. Of course never know till we try. Timing may require tweaking since in the car more devices will be on the bus.

    .
    Lets do it! I am serious
    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!!!!!!

  4. #54
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by KarlSpackler View Post
    Lets do it! I am serious
    I make this offer is for anyone that would like to try: Get duplicate hardware to what I have and I'll send over the program I've written and do my best to help with tech support in getting it hooked up. Would help if the person had some electrical knowlege but don't think that's required.

    It pains me I'm not able to do more on my own. I love being the first person to do something But if someone else wants to give it a try first I'm willing to help.

    Eventually I'll post the whole program once I get it more settled and cleaned up. In the meantime if someone wants to look it over and give feedback or try it out just shoot me a PM with your e-mail.

    Thaniel

  5. #55
    Join Date
    May 2011
    Location
    CA
    Posts
    455
    My Cars
    1999 BMW 528i (E39)
    Out of pure curiosity, do you know if E8x/E9x clusters behave the same way?

  6. #56
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by betaflame View Post
    Out of pure curiosity, do you know if E8x/E9x clusters behave the same way?
    My understanding is that the E87 has a different bus structure. However how different the RPM etc data is on the can bus data stream I can't say.

    Thaniel

  7. #57
    Join Date
    May 2011
    Location
    CA
    Posts
    455
    My Cars
    1999 BMW 528i (E39)
    Quote Originally Posted by Thaniel View Post
    My understanding is that the E87 has a different bus structure. However how different the RPM etc data is on the can bus data stream I can't say.

    Thaniel
    Here's what I found if you're interested: http://www.e90post.com/forums/showthread.php?t=177272

  8. #58
    Join Date
    Nov 2004
    Location
    The Black Hills (Souf Dak
    Posts
    9,349
    My Cars
    Diesels and a 04 M3
    And here we go. Thanks to Thaniel. I am going to be ordering stuff and getting started.
    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!!!!!!

  9. #59
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by KarlSpackler View Post
    And here we go. Thanks to Thaniel. I am going to be ordering stuff and getting started.
    Welcome on board

    Update:

    Spent some time messing with the MPG again. Tried different sending speeds and different steps. During that found that despite sending the MPG can messages at different speeds the values for MPG were fluctating 15 L/100 KM. At all sending speeds. Humm Started to sound like it wasn't the timing varying. So looked into the speed signal generator (Not part of the can bus or Arduino) and it turns out the signal wasn't steady. Some of the problems with a jumpy needle seem to be the fault of my test set up.

    Changed our program that generates our speed pulses and got it steady and also found a setting of can sends that had the MPG needle very steady. Once every min or so might move just slightly. Could still be a flutuation in the speed signal but either way I guarentee no one will see that in a moving car.

    So we took a bunch of data and will try to put some formulas to it. Then we can use it to represent some speed realted value. Since speed is part of the equation no getting out of that. Well I guess we could grab the speed from the can bus then cancel the speed part out. But what's the point in that?

    Thaniel

  10. #60
    Join Date
    Mar 2004
    Location
    USA
    Posts
    3,241
    My Cars
    96 328is 6.0L
    Nice to see the progress in the MPG department. On "related" note... What would it take to figure out the Oil Temperature guage for someone who has M3s?
    - 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)

  11. #61
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by bimerok View Post
    Nice to see the progress in the MPG department. On "related" note... What would it take to figure out the Oil Temperature guage for someone who has M3s?
    To get the Oil temperature we would need some can bus data samples over a known range of data.

    Expect it could found with a long enough sample and knowing when the gage starts to move and to what values etc. It's all about just isolating the values then correlating them to known numbers.

    If it were my car I'd hook up a can bus sniffer and then cycle the gage through its range manually by removing the connection to the sender and hooking up a variable resister.

    I expect the oil temp would be like the coolant temp (and in one of the ECU messages) and should be easy to spot.

    Yah the MPG thing was bugging me. It's satisfying to get the handle on it. I just have to do some more number crunching and check over things a bit more.

    Thaniel

  12. #62
    Join Date
    Sep 2010
    Location
    Poland,ME,USA
    Posts
    489
    My Cars
    1998 m3 3/4/5 LS1/t56
    Not to get off topic but whats the abs and airbag configuration of the e46? are they separate systems like the e36?

  13. #63
    Join Date
    May 2011
    Location
    CA
    Posts
    455
    My Cars
    1999 BMW 528i (E39)
    Quote Originally Posted by birdman2447 View Post
    Not to get off topic but whats the abs and airbag configuration of the e46? are they separate systems like the e36?
    I think so.

  14. #64
    Join Date
    May 2010
    Location
    Low earth orbit
    Posts
    33
    My Cars
    2018 340
    Wow...simply wow. PM'ing you. I have an Aruino Mega laying around and was looking to order the same CAN board from Sparkfun. I have a little project I want to try.

  15. #65
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by siado View Post
    Wow...simply wow. PM'ing you. I have an Aruino Mega laying around and was looking to order the same CAN board from Sparkfun. I have a little project I want to try.
    Replied via e-mail

    Update:

    Well not a lot of progress. My work space went from:
    [IMG]http://forums.***************************************?att achmentid=426096&d=1354967555[/IMG]

    TO: (the kids table at our America style thanksgiving in Sweden. With REAL Swedes)
    [IMG]http://forums.***************************************?att achmentid=426100&d=1354967779[/IMG]

    I've still not gotten everything back on my table and plugged back in. Since it all grew a bit at a time I had not realized how much there was to it all. For some reason I'm lacking modivation. Really want to do some wrenching or welding. This electronics is ok fun but just not the same.

    In other news I finally did get my ELM 327 after weeks of waiting.
    [IMG]http://forums.***************************************?att achmentid=426098&stc=1&d=1354967522[/IMG]

    Inside:
    [IMG]http://forums.***************************************?att achmentid=426097&stc=1&d=1354967522[/IMG]

    My plan was to use this to interface with a LS1 powered vehicle and grab the data stream from the Serial 2 bus and attempt to decode. I've only found a few people talking about successfully doing this on the net. But have had no luck getting anyone to reply with more info. Guess it's up to us?

    I have found out that 1 person I know has a '99 corvette. He imported into Sweden it when he moved here from the USA over 10 years ago. That explains what one is doing here. Not sure what my odds are of getting him to let me connect to it are. When I saw the car it was under a car cover in his garage. Maybe when it warms up a bit I'll see if he's game. Right now it has gotten very dark (sunset at 3:30pm) and Cold. Not interested in doing much outside. Or inside.....

    One useful bit of information. Found a cheaper can sheild if anyone is interested. Does require assembly though. Here is a link http://fazjaxton.net/products/fazcan/main.html It appears that it should work similar to the sparkfun but without the SD card, GPS or Joystick. If one were using it to just send info to the Inst cluster it should work. I wouldn't recommend for data collection as the SD card is really needed to capture the data stream fast enough.

    Anyone have any thoughts?

    Thaniel
    (can't get the pictures to show in the thread right . Oh well.)
    Attached Images Attached Images
    Last edited by Thaniel; 12-08-2012 at 07:23 AM.

  16. #66
    Join Date
    Jul 2006
    Location
    Arizona
    Posts
    797
    My Cars
    2003 Z4 Roadster
    Hey Thaniel,
    Glad to see you are still working on it (a bit). I hear you on the "lacking motivation" part and I'm in the same boat. I'm in the "parts procurement" phase (got a T56 last week), but am slowly having to save and wait to get the LS1. My hope is that once I have an engine and trans sitting in the garage, I'll rig up a test stand to run them on. Then I can fire up the engine and can read as much or as little data right off the system as we want. Until then though, it's hard not to feel like "what's the use....".

    Keep at it and let me know if you need anything.

    Chris
    Chris

  17. #67
    Join Date
    Apr 2010
    Location
    South Africa
    Posts
    32
    My Cars
    BMW 120d
    Quote Originally Posted by Thaniel View Post
    Yes lots of reading in this project. And it seems there is always another layer of deeper information each time I turn around.

    ...

    Actually I think it was the can bus sheild can filter some signals. I hadn't set any filters and assumed that would mean all the messages would come through. But I tried some different program which happened to configure the filters to wide open on the sheild prior to listening and it worked. And so I tried the program that I tried last week (that didn't configure filters) and it now reported a changing data stream too where previously only reported one ARBID. (The filter settings stay stored in the shields memory)
    Hi Thaniel

    Awesome project you got going here. I can agree with the fact that the more you think you know, the less you really do...

    I recently purchased the Sparkfun shield and Arduino. I have really been struggling to get the shield reading the can messages.

    You mention above about the use of filters. What program did you use to set up the filters correctly?

    I am really frustrated with this at the moment. Any help you can give would mean alot.

    Kind Regards

  18. #68
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by nurburgracer View Post
    Hi Thaniel

    Awesome project you got going here. I can agree with the fact that the more you think you know, the less you really do...

    I recently purchased the Sparkfun shield and Arduino. I have really been struggling to get the shield reading the can messages.

    You mention above about the use of filters. What program did you use to set up the filters correctly?

    I am really frustrated with this at the moment. Any help you can give would mean alot.

    Kind Regards
    Thank you for the comment. I need something to get back into this again. But on the plus side my guitar playing is getting better.

    Sorry to hear you have been struggling to get the messages. The work I've done is so others don't have to.

    Drop me a PM with your e-mail and I'll send you my listener program. I've tried to link to this post but it says "invalid file". So I'll have to e-mail it to you.

    Setting up the filters was just a few more statements in the Arduino program. My experience was the filters were reset everytime the power was lost. So I made it part of the initialization process.

    However taken out of context the statements are:

    //****************** reset filters and Masks ****************
    void CAN_resetFiltersAndMasks() {
    //disable first buffer
    CAN_setMaskOrFilter(MASK_0, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    CAN_setMaskOrFilter(FILTER_0, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    CAN_setMaskOrFilter(FILTER_1, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    //disable the second buffer
    CAN_setMaskOrFilter(MASK_1, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    CAN_setMaskOrFilter(FILTER_2, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    CAN_setMaskOrFilter(FILTER_3, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    CAN_setMaskOrFilter(FILTER_4, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    CAN_setMaskOrFilter(FILTER_5, 0b00000000, 0b00000000, 0b00000000, 0b00000000);
    }
    //***************************** set mask or FIlter **********************
    void CAN_setMaskOrFilter(byte mask, byte b0, byte b1, byte b2, byte b3) {
    CAN_setMode(CAN_MODE_CONFIG);
    CAN_setRegister(mask, b0);
    CAN_setRegister(mask+1, b1);
    CAN_setRegister(mask+2, b2);
    CAN_setRegister(mask+3, b3);
    CAN_setMode(CAN_MODE_LISTEN_ONLY);
    }

    //************************** Set register ******************************
    void CAN_setRegister(byte reg, byte value) {
    // mcp2515_write_reg (reg, value); this should be instead to write the registers
    //static void mcp2515_write_reg (uint8_t addr, uint8_t buf)
    // used from other program. Replaced by above
    digitalWrite(SS_PIN, LOW);
    delay(10);
    SPI.transfer(WRITE);
    SPI.transfer(reg);
    SPI.transfer(value);
    delay(10);
    digitalWrite(SS_PIN, HIGH);
    delay(10);
    }

    Thaniel

  19. #69
    Join Date
    Apr 2010
    Location
    South Africa
    Posts
    32
    My Cars
    BMW 120d
    Quote Originally Posted by Thaniel View Post
    Thank you for the comment. I need something to get back into this again. But on the plus side my guitar playing is getting better.

    Sorry to hear you have been struggling to get the messages. The work I've done is so others don't have to.

    Drop me a PM with your e-mail and I'll send you my listener program. I've tried to link to this post but it says "invalid file". So I'll have to e-mail it to you.

    Setting up the filters was just a few more statements in the Arduino program. My experience was the filters were reset everytime the power was lost. So I made it part of the initialization process.

    Thaniel

    Ha ha. We need motivation every now and then to keep going with projects. I have been back and forth with this arduino so many times.

    This is the first time when someone refers to filters and buffers about this shield. Good to try something different!

    PM Sent!

  20. #70
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by nurburgracer View Post
    Ha ha. We need motivation every now and then to keep going with projects. I have been back and forth with this arduino so many times.

    This is the first time when someone refers to filters and buffers about this shield. Good to try something different!

    PM Sent!
    E-mailed you the file. Let us know how it turns out.

    I tried many different programs and was suprised that I didn't find one that worked without some modification.

  21. #71
    Join Date
    Nov 2002
    Location
    90278
    Posts
    4,135
    My Cars
    '03 M3, '92 525i
    Quote Originally Posted by Thaniel View Post
    E-mailed you the file. Let us know how it turns out.

    I tried many different programs and was suprised that I didn't find one that worked without some modification.
    Not much to contribute to your thread other than a hearty encouragement. Very impressive! I hope that once you get back from Sweden next summer, your work will be validated so that I can consider an LS7 in place of a turbo
    '03 E46 M3 - "Brittney"
    '92 E34 525i - "Ivanka"

  22. #72
    Join Date
    May 2011
    Location
    west Australia
    Posts
    18
    My Cars
    1999 528i touring 5spd
    lots of good swap info, would be nice to know that everything on the dash and the cAC can be made to work as it should, subscribed, keep up the good work

  23. #73
    Join Date
    Apr 2010
    Location
    South Africa
    Posts
    32
    My Cars
    BMW 120d
    Quote Originally Posted by Thaniel View Post
    E-mailed you the file. Let us know how it turns out.
    Well I have good news and bad news. The good news is that it works! Yay! However the bad news is that it doesnt write to the SD card.

    I have read that you need to enable a pin to write, but cant remember where.

    Will try later tonight when I have some time...

    [Edit]
    I dont think its the sd card itself. I have tried the demo code that comes with the arduino and it writes to the card OK.

    The issue I was having is that it would create a file (for example WRITE17.TXT) but there would be nothing within that file.
    Last edited by nurburgracer; 12-20-2012 at 05:31 PM.

  24. #74
    Join Date
    Nov 2005
    Location
    Kilmarnock, VA
    Posts
    1,873
    My Cars
    E53, E90, Triumph GT6
    Quote Originally Posted by nurburgracer View Post
    Well I have good news and bad news. The good news is that it works! Yay! However the bad news is that it doesnt write to the SD card.

    I have read that you need to enable a pin to write, but cant remember where.

    Will try later tonight when I have some time...

    [Edit]
    I dont think its the sd card itself. I have tried the demo code that comes with the arduino and it writes to the card OK.

    The issue I was having is that it would create a file (for example WRITE17.TXT) but there would be nothing within that file.
    Was going to suggest trying the demo SD code. Make sure you can write and put data on it. The card has to be formatted FAT for the card reader to work. Most cards are not formated FAT by default.

    Another thought. Are you pushing the joystick down to terminate the capture? If the program doesn't close the file properly there will be nothing in it. if you don't get "File closed, Data saved" when using while connected through the serial monitor the file is not closed.

    The program enables all the right pins etc. Which Arduino are you using? There are some pin mappings in the program that might have to be changed if not using an UNO.

    Thaniel
    Last edited by Thaniel; 12-21-2012 at 04:06 AM.

  25. #75
    Join Date
    Apr 2010
    Location
    South Africa
    Posts
    32
    My Cars
    BMW 120d
    Well that must be the issue! I do recall pressing the joystick down, but I didnt get any message stating "File Closed, Data Saved".

    Well that does give me hope, will try this afternoon. Wont be able to do any more work after today, but hopeful of something in mid Jan.

    I am using the UNO...

    Thanks again Thaniel!

Page 3 of 40 FirstFirst 1234567891011121328 ... 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
  •