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
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
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
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!!!!!!
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
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
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
Cool, so it sounds like everything is working as it should. Won't be long now before we have a fully working solution!
Chris
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
2003 X5 4.6is - for sale
2006 X5 L83 5.3 6l80 swapped in progress - for sale
1999 528i 5.7L 4l60e swapped w/ 31 spline 8.8 cobra diff - for sale
2007 ZX-10r - sold
1987 R-10 SWB L83 5.3L 6L80e swapped
www.87chevy.com
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!!!!!!
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
Last edited by Thaniel; 01-05-2013 at 02:17 PM.
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.
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.
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
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
So the MegaSquirt CAN stuff is able to drive the factory gauges as well?
Chris
Bookmarks