So, E46 interface is done and working. I have added pic on first post!
So, E46 interface is done and working. I have added pic on first post!
oh my! I can't wait until I receive mine. dude, you've done some amazing work
Hi Bengt, Sama,
its me, Art, the one with the same thing on E39 ;) I finally also found a way to this forum.
Bengt, glad to hear that you progressed so far to have your board also finished. I am sorry that you have to made third prototype and hence lost money at the end. However, I assume the last one would work then like a charm :)
Can you say me, where you get those 20pin flat cable from? How long is that cable? And were did you get the connectors for this cable?
I am supporting one guy from a german E39-forum who is building now the same device as me for his own BMW. He made already nice progress of putting a 7'' into the frame. He has not to cut away the display, but had to remove the photosensor. Nevertheless, I am about to build such a button PCB for him now too, so and was looking around if I could do something better as what I had in my board with the connectors. So this FFC connector and cable would be perfect for this. However I always find only such with 152mm length, which is not unfortunately not enough.
All parts from digikey. Don't remember part no, but you should find it easliy. Cable is 8 inches. A good practice is to turn the connectors away from eachother. Easier to adjust cable length.
If you do make a change to your board, I suggest you use the logic I provided with the left knob. I get a single pulse on one GPIO (with interrupt) if turning clockwise, and a single pulse on a second pin when turning counter clock wise. Elliminates timing problem, code is minimized, and the circuits are dead cheap. But then again, your system seems to work. In my 2MHz system with only 100kbit IIC transfer I do not have time to catch the 2ms or so that the output pins are different. Not everytime at least, and not if turning knob fast.
Another thing to consider is to use DAC output for simulating LCD panel button presses! Works lika a charm :-) Video to come.
Edit: I have added screenshoots of my C# app for testing the board in post 1
I've took a look on the cables at digikey, wow pretty expensive, however the choice is great there. I wasn't able to find them here, at our stores.
Yes, I was also thinking about using DAC to control the LCD. This way the PCBs became more or less general, since they could be then used with many types of LCD boards. Since I am developing the beta2 interface, I would use the DAC and "the old" switching there. If DAC wouldn't work as I expect it, then will switch back to the previous case.
I was also thinking about minimizing the power amount required by the board. Unfortunately all my both measure instruments are broken, so I cannot measure the current power amount. However, I suppose it must be somewhere in the range of 20-50mA (when no LED is on). Therefor I thought about doing something similar as it is done with other iBus devices: switch uC into power save mode if no bus traffic for at least 5minutes. Since TH3122 can wakeup on iBus traffic it will also wakeup the main uC. Should work fine, need to experiment with that.
However this feature isn't really needed. In the last months I never got the case that I need to have the OpenBM device running all the time.
Yes, it does add up when ordering in small numbers. p&p is another 20US or so...
I reduced power in a simpler way. I wakeup at timer event allways (tic), and when all tasks are done I go to sleep again. When there is no ibus traffic and no buttons pressed there is not a lot to do! And I reduced the clock to 2MHz. I get 2mA, and the system is always on. tic 12.5ms.
One thing I would have loved to add to my board was LCD LED backlight driver. Unfortunately there was just no room for it. One extra wire to the BM house. But 4 instead of 3 is not to bad:-)
I am now done with the new version of the button pcbs. Currently all the things are ordered and the pcbs are in production. At the end the material price per unit is less than 90 Euros (including pcb production and all delivery costs), which is pretty fine.
Bengt, I made now similar things as you with the shutting down the CPU. However I made it slightly different. In my case I placed a MOSFET in front of the linear power regulator and this mosfet opens when VCC pin on the TH3122 has 5V. TH3122 turns on its regulator on BUS traffic, which means that as soon as there is a traffic main CPU will get power and will boot. Then the EN pin of the th3122 is connected to the main CPU. If there is no traffic for, say 30 seconds, then main CPU put EN pin to LOW, which turns off the th3122 regulator and then turns off the main mosfet. This way, I could make real hardware sleep for the full board. The software sleep, as you proposed will be also included, for faster wakeup. With the hardware sleep I can have the board always on power and provide such extra features like coming/leaving home or maybe some kind of a DWA. Through additional 3 outputs which are on the board, one can control external relais to switch the CarPC on or off just as soon as door is opened for example. When everything is built, then I can say the final power consumption in power off and idle modes.
Second change was to include additional mosfet for controlling power of the display. The vga display get power now not from some external connectors but directly from the pcb. This way I can control the power of the display. Hmm, I realize now by telling you that, I forgot to connect this mosfet to the CPU pin, instead I connected this also to the TH3122 VCC pin, so the display turns on as soon as main CPU. However, it might be better that CPU can turn this display on or off. I asked the pcb manufactureer if I can still make change to the layout, maybe I got the chance to change it.
Third, after experimenting with the resistors to emulate display buttons I realized that this is not a good way to solve that, since already in the first prototype it was hard to emulate pcb buttons with resistors only. And second I can not know in advance which resistors are to use. So I put a DAC ic there which connects over I2C bus with the main CPU and which will give me the different voltages to emulate display buttons. So, thank you Bengt for this tip!
To control display LED background, I haven't placed any driver there, or not really. I just put a transistor which will cut-off the LED background light power from the display. This way the main display driver board still have full control over the LED brightness, however I can drive that transistor with PWM in order to make my own control. Let see if this will work out, I wasn't able to test it before.
Additionally since I had free pins on one of the port expanders (pcf8574) I placed a rear view camera pin indicator there. This pin will have +12V when rear view camera should be activated and otherwise GND. Most of the small vga displays for automative market has support to switch directly to some of the AV inputs on such a signal, so I can use it to control fast switch to one of the AV inputs (in my case for rear view camera).
And finally a small gimmick was to add an analogeus temperatur sensor to the pcb. The temperature sensor will be used to check the inside temperature of the bordmonitor housing. The temperature sensor was very cheap and very easy to control. And since it was hard to find all components specified from -40 to +120 degrees, I thought I could check if inside temperature goes over 80, then CPU will shut down all components and let the FAN led blink to indicate that there is currently a temperature problem. I am not sure how well this will work, but just to play around.
So this was pretty long message ;) I should get the pcbs and a new vga display to play around in around 3 weeks, so I hope everything will work out as I've expected.
you guys are brilliant at the electronics stuff. It makes a bit of sense to me when I read it but it's still a pleasure :) (I did electronics engineering for just 1 year at university).
so my new pcbs are here and I have already soldered everything on them. I ordered 10 sets and payed around 100.- Euros for that including delivery costs. The quality is really good, so I can only recommend this pcb manufacturer. I am not sure how it is handled with links to other sites, so on request can let you know the manufacturer name.
Here are some impressions:
Beautiful! Great work Art!
I see that you use an FCC cable now. And that you could not avoid components on both sides either :-)
One suggestion if there is ever a new version is to turn them the other way around. At least on my E46 board the length of the cable is not exact, and it is easier to fold it neatly if connectors are turned against eachother. On the other hand it looks like it might be possible to solder the connectors the other way already on your pcb's...