Tuesday, November 7, 2017

E90 LCD add + iPod

Added a LCD to my car to show the coolant temp.

Then got to thinking.  While I had a connection to the CAN bus then why not have the program monitor for the skip buttons on the wheel.  The send skip the song on my iPod. Similar to the ibus ipod interface I had for my E46.

Got that working. Then thought if I put a bigger screen I display the song title (E46 I put it on the radio display).  With this screen I could fit a bunch of information.

View of the screen in the ash tray.

Close up of the screen.  It's a color screen. I chose a color that matched the rest of the cars displays.  I do have the engine temp change color based on Cold, Normal or HOT.

I made the screen bezel on my 3D printer. I need to glue it in instead of the tape. But you get the idea.

The program is essentially the same ipod program I posted earlier in this blog.  Except I modified the ibus inputs to be CAN bus.  And the outputs go to the LCD instead of the ibus.  I'll post code in the future.  Need to work out a few more formatting things.

Tuesday, December 20, 2016

E90 Test bench

 With the holiday visitors coming I needed to clean up my test bench area.  After tossing everything in a cardboard box I was unhappy.  Doing some testing during my time off would be fun.  Decided to take my first day off and use it to mount all my E90 modules into an old computer tower.  There is a Kombi, IHKA, JBE and DME.  Soon there will be an EKP.  Need to do a little more to finish but it's quite portable now.



This will help keep my desk from being too cluttered and the test setup is wired up much better.

3/20/2018 edit:
Here is another video of the test bench.  Added a bit on to it.
In this video a Arduino with a CAN bus shield is mimicking the E90 DME signals to run the gauges and errors lights.  Another Arduino with a fault tolerant CAN chip mimicking the CAS module to turn the unit on.

E90 review, opinions



This is the third generation of 3-series BMW I've owned.  My first BMW was a 1993 325i,  E36 in BMW code.  I've also owned several E46s (still have 3 on the road).  And now I have an E90.  Excited to have the newer and better designs and technology.  However it is interesting to see that not everything is better.  Here are some thoughts on the E90.  In fact there are several things gone all together.  There is no spare tire, no dipstick and no temperature gauge.

No spare tire.  Well this is pretty obvious why it isn't cool.  But beyond the obvious the trunk space is smaller.  The specs I had read was the e90 trunk was LARGER.  There is no way this is true.  That is if you include the space in the trunk where the spare is.  And it is trunk space and should be included.  On a recent trip with my e90 I took a BMW wheel with me to return to my brother.  With that wheel in the trunk there was not much room left for luggage.  Only hand luggage or duffle bags would fit.  In contrast my previous 3-series BMWs had a spare and could fit luggage in as well.  What gives?  The reviews of the e90 said the trunk is bigger.  No way!

No dipstick.  Found this out soon after getting the car.  How do you check the oil then?  There is an electronic sensor.  Well that sounds ok.  I guess.  Except in older cars it is nice to look at the oil to look for and diagnose problems.  Guess one has to drain the oil to do that now.  And how about doing an oil change.  How does one know if they have filled it up enough?  The electronic sensor can take up to 5 min to get the oil level vs 10 seconds with a dipstick.  This may be some cool tech that allows me to check the oil when I drive (that is pretty funny).  But keep the dipstick too.  Deleting it is a big annoyance.

No temperature gauge.  I hadn't really thought much about it.  That is until, the weather got cold and my heater wasn't warm.  The first question I needed to answer was is the engine getting warm.  Something that on previous 3-series was just a glance at the dash.  Now I had to go through trouble to find out.  Find and connect a diagnostic tool to the car.  Just to find no it wasn't getting to temperature.  Something I would have noticed BEFORE it had gotten cold if I would have had a temperature gauge.  (And no there was no check engine light).  So I had several very cold drives while getting the parts and repairs done.  And had to work on the car in the cold.  All knowing this would have been done in the warm weather if there had been a temperature gauge.  Oh and by the way.  It wasn't a simple thermostat.  That was the first and third thing I replaced trying to repair it (oddly it was the radiator).

Over all I like the car.  There are many things that are improved.  But it seems to me there isn't a reason to make the car worse in some ways while better in others.  Feels like a case of one step forward.  Ones step back.

Wednesday, August 17, 2016

Learing more about the E90 is going to happen.

We needed to replace one of our cars and I got memorized by the idea of buying something newer.  But I didn't want to spend more.  So I bought an E90 that needs some love.  For good or bad.  Either way I'm learning more about E90's and we will have a car to try things on.

Towed it home.  Was a 2 hr drive.  The 330i E46 tows it so good.  Had the cruise and air on and my speed was only limited by the speed limit.  The car has a OEM BMW hitch that I picked up in Europe.   In Europe (where the car is designed) they use sedans for towing.

Monday, April 4, 2016

20th module shipped

Funny how things go. I had intended to just make DIYs about how to interface with the E46 can bus. But we had several requests from swappers, busy with engine installs, asking if we could make one for them. So we made a few modules.

After the second one we decided to have custom circuit boards made. Recently we shipped our 20th, the last of our first run of custom circuit boards and have ordered another batch.  Never would have guessed that would happen.

Wednesday, November 18, 2015

E90 Can bus

Purchased an E90 Can bus Instrument Cluster to play with.


The cluster pin out is simple.  It only has: Power, Ground, Can bus High, Can bus Low and 2 wires for the outside air temperature.  Makes it easy to hook up :-) All gauges are driven by the can bus.  Using can values from https://loopybunny.co.uk/CarPC/k_can.html and some info we had we quickly had it up and running. 

When power is applied nothing happens.  The cluster, and most of the E90 modules,  require a "terminal 15" on signal, sent over the can bus, to wake up and come a live.

The Instrument cluster gauges are actually on the K-Can bus and the engine, DSC, TCU etc. is on the PT-Can bus.  In the car there is a gateway (the junction box) that is between PT-Can and K-Can Bus.  It repeats the necessary messages for the gauges to work, from the DME on the PT-Can bus, on the K-Can bus.  One thing to be aware of is that the PT-Can bus is at 500kb/s and the K-Can is 100kb/s. When setting up a Can bus interface be sure to use the correct Baud rate.

Later we will take some time to hunt down the proper bytes and bits to turn on the engine warning lights.

Edit:  For T15 turn on we send the following every  100 milliseconds.  Some units will stay on until a turn off is received.  Others will turn off after a length of time without the T15 on message.


to turn on
  id = 0x130;
  len =5;
  data[0]= 0x45; //0x45;  //Key Status
  data[1]= 0x42; // 0x40;  //Transponder Detected
  data[2]= 0x69;  // 0x21;  //Terminal Status
  data[3]= 0x8F;  // Steering lock?
  data[4]= 0xE2;  //Counter and Checksum

To turn off: (if the device doesn't automatically turn off.  IHKA turns off on it's own.  KOMBI doesn't)
  id = 0x130;
  length =5;
  data[0]= 0x00;
  data[1]= 0x40;  //Transponder Detected
  data[2]= 0x21;
  data[3]= 0x8F;
  data[4]= 0x50; //Counter and Checksum

Tuesday, October 20, 2015

Can Bus to Analog

Well we haven't been good at updating the blogs.  As my son said yesterday.  We are too busy doing things to write about them.  Which is only partly true.  But we do enjoy doing more than documenting.

We've done lots of cool stuff.  Last night we took a can bus signal (RPM values from an E46) and turned them into an analog signal.

E36 analog tach in foreground.  E46 Can Bus tach in the back ground.


http://www.youtube.com/watch?v=nTuw4p5Vbhs

Tuesday, March 18, 2014

I/Kbus interface options for Arduino

There is quite a bit of information and readimade cables for interfacing a PC with the BMW Ibus PC for diagnostic purposes.  What if one wanted to connect an Arduino to the bus?  The PC serial port runs at 7 volts and the Arduino runs at 5 volts.  So right there we have a problem.  It also worth noting that the ibus voltage can be near 12V, at idle, which would most definitely fry the Arduino. 

During my testing and experimentation I’ve used several different options for connecting an Arduino to the ibus.  Thought I would share what I have learned in hopes of saving someone else some time and trouble.  This blog entry provide 3 interface options for an Arduino or other serial device to the BMW Ibus or Kbus.  This should  also work for interfacing with the TX1 (Diagnostic bus) and TX2 bus (ISO OBDII protocol) as they all use the same protocol.  9600 baud 8E1  If using an Arduino define with this statement:  xxx.begin(9600, SERIAL_8E1);

The three different options I’ve attached have some advantages and disadvantages.  We will go through them in the same order I discovered and used them.

ibus simple:


This circuit is similar to how an ELM clone connects to the OBDII ISO line.   It has the benefit of beings a fairly simple circuit to build and only requires some readily available and inexpensive resistors and transistors.  Great.  Then why do anything else?  There isn’t much separation between the 12V Kbus and the Arduino.  If a component fails or is bridged it is likely that 12V will get to the Arduino pins.  But this circuit does work and I have used it for quite a while.  I really only moved to the next version to provide isolation to reduce some audio noise in one of my projects.

ibus Optocoupler:




This is similar to the ibus simple but adds optocouplers in place of 2 of the transistors.  This isolates the bus from the Arduino ensuring there are no over voltage accidents.  Only downside to this circuit, if there is one, is that it requires using an optocoupler which not everyone might have handy.  But optocouplers are inexpensive and a great addition to your electronics supplies.  I used this circuit with great success for a long period of time.  I only moved to the next circuit as I had been looking for a way to put my circuit to sleep  and wake it with bus activity with fewer components.  (I had built a latching circuit but it was very complicated and took a long time to solder up)

ibus linbus:

This is by far my favorite method for connecting to the i/kbus.  But depending on what type of circuit is being made one of the other circuits might make more sense.  This circuit uses a linbus transceiver to translate the bus pulses into a serial data stream for the Arduino.  While the linbus data stream is not the same, the voltage structure is.  Therefore the transceiver can translate the bus pulses into a serial stream safe for the Arduino.  Transceiver chips are also used in some BMW OEM equipment. although different ones are used but they do not appear to be produced anymore.

The chip I selected, MCP2025, is also sold with a built in voltage regulator and has a sleep mode.  This allows the Arduino to put the transceiver into sleep mode reducing power drain with the car is off and kbus activity wakes the transceiver up.  It has some other cool features that you can read about in its spec sheet.  Pretty slick and all for about $1.50 each. 

Friday, January 31, 2014

BMW cruise buttons





 Inside the BMW cruise buttons.  The chip on the left is an Ibus transceiver with built in voltage regulator.

1 Jan 2018 update:
Well we got a oscilloscope for Christmas.  The perfect thing to try out on the cruise buttons.  But first let's talk about the LH buttons, the stereo and phone buttons.  As mentioned above there is an ibus transceiver and a micro controller on the RH button circuit board.  But I don't believe the RH buttons use ibus.  To be sure opened up a set of LH buttons.  And yes.  No big chips.  See below



So all the converting to digital is done by the RH buttons.  As I had expected.  Back to decoding the cruise data stream.  Hooked up the cruise buttons as shown in the MFL button wiring diagram from the WDS.  this time I had a MFL wiring harness (LH and RH buttons complete).  When hooking it up I found it odd that Red (pin4) was the Cruise signal.  Not the usual color.  Lots of testing and not much success.  Pulled the circuit board out and my son traced the signal circuit.  It didn't make much sense as it seemed it'd never see or make pulses.  Then the thought ""Maybe the signal and 12V in are switched".  Well anything is worth a try and well it worked.  Then we pulled up the wiring diagram for the Volute spring.  Guess what it shows.  The red (pin4) was power and the Gray (pin2) was the cruise signal.  UGH.... All this time we weren't getting it because the one MFL diagram was wrong.  Seriously.  But now we have a nice wave form that differs based on each button pressed.  Here are some examples;
 

It appears to be a PWM signal.  The last pulse is the toggle bit.  Which simply cycles back and forth every so often unrelated to if the button is pressed or not.The rest vary 1 or 2 of the pulses when a button is pressed (not counting the toggle bit).  Armed with this and a little Arduino magic we are able to get the arduino to tell us which button we are pressing.  Whoo hoo.  Finally mystery solved.

It's a start.

During 2012-2013 while temporarily living in Sweden, my son and I started learning about micro controllers and electronics.  This kept us busy on those dark Scandinavian nights. Since then we have learned and collected a lot of information and written many programs which may be helpful to other DIY's.   The difficult is putting it into a coherent useful format.

In this we will post some of our "electronics" projects and information. E46 Tuning, Ibus Kbus, ipod and Arduino. To start here are some links to a google drive where we will house some of the diagrams, spreadsheets and programs.  Click on the links to be taken to the google drive with the relevant information: