The dots (and the rest of the icons) are on my TODO list for sure.
So far all of my attempts have just been changing the last 4 bytes that the LCD driver is sending.
But no luck as of yet.
I ordered a second OBC off ebay so I can try and decode the LCD protocol using a logic analyser.
Is there not some memory chip that can be read and the binary decompiled?
Verstuurd vanaf mijn SM-G935F met Tapatalk
Thanks so much, xobloof, for the time you are putting into this. I can't wait to try out the ethanol sensor code.
'97 M3, Estoril blue, 2 dr, euro 6-spd, EFR 9180 divided T4 .92 IWG, RK tuning, CP 8.5:1 pistons, Eagle rods, Schrick cams, L19 11 mm ARP studs, O-ringed block, Supertech stainless/inconel valves, Supertech springs & Ti retainers, ported head, S54 oil pump/pan, 80 lb. injectors, OBD1 intake manifold, Steedspeed twin scroll T4, 3.5" SS exhaust, eBoost2 EBC, HFS-4 W/M injection, AEM Failsafe, Zeitronix data logger, Racelogic TC, OpenOBC w. ethanol %, Ireland Eng. engine mounts, UUC black tranny mounts w. enforcers, UUC twin disc feramic, ARC-8's, MCS 2-ways, Z3 rack, Rallyroad strut bar, X brace, Eibach sway bars, Ground Control LCAB bushings, Bimmerworld RTAB's, Powerflex subframe bushings, 210 4-clutch LSD, Stoptech BBK, titainium shims, steel braided lines, brake cooling ducts.
Ok, I got the icons working.
There is now a 12 hour clock mode with "AM" and "PM" icons
The colon works on clock
The dots work on date
The leading 0 is no longer displayed.
This all should mimic the stock look.
The only exception is that the Memo icon is currently used to display comms status.
I hooked a stock OBC up to a Saleae Logic 8 and took some timing measurements.
Most of the work was already done.
The code was already in the dev branch on github.
All I had to do was add some delays after the unk1 strobe.
Then just add calls to setSymbol() from ObcClock.cpp to turn the icons on and off.
I will post the updated code soon.
Thanks for the encouragement guys. Its fun to figure this stuff out.
This is really quite an amazing thread and project. I am glad I can help.
benemorius (and everyone else who contributed) really did a nice job on the firmware.
It is better code than I am able to write, and I learn best by just jumping into a well
organized code base like this.
Here is the updated code
https://www.dropbox.com/s/eau9wr5mgb..._v0.2.zip?dl=0
* Icons working (colon, dots, am/pm, etc)
* 12 Hour Clock is default you can set 24 via config file
* consum button got 5th screen for flex fuel (can be enabled via config file, defaults off)
* Stored accelerometer zero data to sd card config file
Acceleromter zero now has a 1 second delay from pressing the button to capturing the new
zero values. I added a tiny bit of dead band to the display reading. Accelerometer axis changed
from X,Y, and Z to more intuitive Lateral, Vertical, and Axial (L, V, A) labels.
More great work!
I always thought it would be nice to have a floating peak G value over the last five seconds. That may give enough time to actually see what the peak G's were.
I'd like a bit more info on how to connect the ethanol sensor up to the OpenOBC when you get a chance.
'97 M3, Estoril blue, 2 dr, euro 6-spd, EFR 9180 divided T4 .92 IWG, RK tuning, CP 8.5:1 pistons, Eagle rods, Schrick cams, L19 11 mm ARP studs, O-ringed block, Supertech stainless/inconel valves, Supertech springs & Ti retainers, ported head, S54 oil pump/pan, 80 lb. injectors, OBD1 intake manifold, Steedspeed twin scroll T4, 3.5" SS exhaust, eBoost2 EBC, HFS-4 W/M injection, AEM Failsafe, Zeitronix data logger, Racelogic TC, OpenOBC w. ethanol %, Ireland Eng. engine mounts, UUC black tranny mounts w. enforcers, UUC twin disc feramic, ARC-8's, MCS 2-ways, Z3 rack, Rallyroad strut bar, X brace, Eibach sway bars, Ground Control LCAB bushings, Bimmerworld RTAB's, Powerflex subframe bushings, 210 4-clutch LSD, Stoptech BBK, titainium shims, steel braided lines, brake cooling ducts.
Yeah, I like the Max Hold idea. I will add it to the Todo list.
The flex fuel sensor will need a voltage divider to drop the +12V down to <3.3V.
I drew a small PCB that has the divider, a pull-up resistor, a PTC fuse, a clamping diode and a terminal block.
It will mount on the "ANALOG" header of the OpenOBC.
I just got an email that the boards shipped today so I should have them on Monday.
The boards were super cheap at OSHPark. $2.05 for 3 boards.
DM me your address and I will send you a built one when I get them.
This will require you soldering the 4 pin ANALOG header, but then you will have
a 3 position screw terminal block that you can run the 3 sensor wires to.
On another note, I got my MC33660 ICs so I can finally install my OpenOBC!
If anyone is having trouble sourcing them I tried ebay and amazon (same seller) and
have not yet received anything. So I went direct to NXP and was able to find them.
I did buy another circuit board and am going to build up a second OpenOBC so I can
keep the development going from the comfort of my desk, instead of doing testing
in the car.
- - - Updated - - -
Yay, it works!
I got worried there for a minute when the Coolant Temp wasn't working.
Then I remembered I need to remove the 20 pin connector cap.
It's all good now.
Here is a teaser of the clock with icons.
installed.jpg
Xobloof are you already aware of the problem with the serial com chips frying?
Verstuurd vanaf mijn SM-G935F met Tapatalk
Only the little that I read a few pages back. I haven't heard any details yet.
Is it happening to all of the OpenOBCs or just Raddee when he is testing?
It looks like Raddee has a BMS43
I have a US 1995 M3 (OBD1) so I think mine is the M3.3.1
Not sure what the differences are. I just hope I don't hurt my DME trying.
I am looking forward to trying to get the serial comms to be more useful.
But the frying chips have me nervous to try on my daily driver. I hope it only
damages the IC on the OpenOBC and not the DME or anything like that.
I was aware of the chip frying before placing my order. So I do have 6 extra
chips just in case I let the smoke out of a few. (and a bunch more if those
ebay and amazon ones ever get here)
Ideally I would try to find a DME at a junkyard and interface with it, but I don't
know what other modules I might need to get it up and running.
The DME should probably be fine, car electronics are generally very well designed and protected (but don't hold me liable ). My last guess was that the 3.3V supply to those ICs is incorrect which makes things like overcurrent protection not work properly. The datasheet says it needs a 5V supply. I tried to get in touch with benemorius about this but he's playing dead.
I did some work on OpenOBC before, but frankly, I don't really have the time to continue it right now and I got really stuck on the K-line issue.
If you want, I'll contribute my findings and code so you can merge it into your code. The most interesting is probably support for the ATBS iTPMS tire pressure monitoring system that I'm using in my car right now. I also have some info and logic analyser captures of K-line diagnostic data from a european M3 SMG. I can also forward you the info I gathered on the K-line issue.
Send me a PM with your e-mail address and we'll get in touch.
Xo,
I would like to run ethanol sensor, if you have an extra board ill buy it. Shoot me your paypal.
Also, I can take care of you if you ever have an ecu issue . Ill be working on the obc again soon. Just gotta put the turbo in my car xD.
Sent from my iPhone using Tapatalk
1989 535i - sold
1999 M3 Tiag/Dove - sold
1998 M3 Turbo Arctic/black - current
2004 Built motor TiAg/Black - Sold
2008 E61 19T Turbo-Wagon - current
2011 E82 135i - S85 Swap - current
1998 M3 Cosmos S54 swapped Sedan - current
1998 Turbo: PTE6870 | 1.15 ar | Hp Cover, Custom Divided T4 bottom-mount, 3.5" SS exhaust, Dual Turbosmart Compgates, Turbosmart Raceport BOV, 3.5" Treadstone Intercooler, 3.5" Vibrant resonator and muffler, Arp 2k Headstuds | Arp 2k Main studs | 87mm Je pistons | Eagle rods | 9.2:1 static compression, Ces 87mm cutring, Custom solid rear subframe bushings, Akg 85d diff bushings, 4 clutch 3.15 diff, , Poly engine mounts, UUC trans mounts W/ enforcers, 22RPD OBD2 Stock ECU id1700 E85 tune, 22RPD Big power Transmission swap w/ GS6-53
xobloof
This is fantastic progress - really fantastic.
I have always been a fan of this project and I was one of the first people to receive a board when benemorious released them all those moons ago. But, due to work pressures, family illness and the fact that things have been so disjointed with regard to shared updates from any competent coders, I am ashamed to say that my OBC is still running the same firmware that it was shipped with as I was always scared that I would brick the thing!
Anyway, as luck would have it, I do now have more free time on my hands and your great progress has given me the confidence to have a go and at the very least upload the files you kindly shared. I do have a copy of the idiots guide and don't mind having a go but I hope you don't mind if I do pop back for advice if I get stuck?
I am hoping that once I have at least uploaded new firmware a couple of times that I will gain the confidence to have a look at the code and try and understand what it is doing. I am no coder mind!
Thank you so much for all the hard work you have put in on this and for sharing it with us all.
Cheers, Mark
Last edited by clabs; 01-07-2017 at 04:09 PM.
Yeah go for it!
It's not too hard, all you need is a micro usb cable, and flashmagic. The idiots guide has all the info you need. If you get stuck just holler.
My zip file has the compiled .hex so you don't need to worry about installing the compiler if you don't want to do any modifications.
So if you just want to install the updated firmware skip to the 'flashmagic' part on page 6 of the idiots guide.
(assuming you are running windows or mac)
For those that are running linux the zip file also contains lpc21isp and a couple of scripts called "program.cmd" and "terminal.cmd".
You may need to change the serial port in the .cmd files but they should make building and flashing nice and convenient.
My usual build command is
"make && ./program.cmd && ./terminal.cmd"
which will build, flash and start the debug terminal all from one line.
I usually have this running in a second window while I edit code in the first. This way I can code while l wait for the flash.
I didn't have any luck with the toolchain that was mentioned in the github README file.
Instead I used this toolchain:
https://launchpad.net/gcc-arm-embedded
All I had to do was extract the tarball and add the bin directory to my PATH environment variable.
Then just "make" from the OpenOBC project main directory.
There are windows and mac versions available too.
Last edited by xobloof; 01-07-2017 at 06:42 PM.
I received the FlexFuel and CAN bus expansion boards today.
Here is the FlexFuel board. It is pretty much just a voltage divider and a terminal block.
The red wire needs to be connected to a "RUN" wire to power the sensor if you want to
"home run" all 3 sensor wires to the expansion board. (Don't hook it to the "+12V" holes
on the OpenOBC or the sensor will never power down. That net is hot at all times.)
The PCB design is shared on OSH Park:
https://oshpark.com/shared_projects/7JCAxk60
The boards cost $2.05 for 3 (min order from OSH Park)
FlexFuel.jpg
Here is a CAN bus expansion board.
I have not yet tested this one, but as soon as I do I will share the design on OSH Park as well.
There is an optional spot for a termination resistor also.
canbus.jpg
Also, I just noticed that today is this threads Birthday. 8 years!
xobloof
Just a quick heads up to let you know that I managed to reflash my OBC with the code you so kindly shared. With the help also of Daandaman's great idiots guide (thanks man!) it was a pretty simple procedure and I don't know why I worried so much about wrecking it. The biggest pain was spending 1 1/2 hrs trying to get various PCs to recognise it was connected, only to find that the brand new USB lead I was using was faulty
I really love the updates to have done - just the job. But now some questions. I don't want to constantly want to bug you but if I wanted to make some fairly basic changes - would you be able to steer me in approximately the right direction?
The "simple" changes I have in mind are to change the month/day to day/month (I am in the UK) and it would be great if the little : in the clock flashed once per second.
I imagine the second request is much more complex than the first and with that in mind, I trawled through your "source code" for date/day, hoping to find only one or two entries but instead, found lots. Would I just need to change all of those round, but in the same syntax you have used? A pointer here would hopefully help me try and understand the basics of how this thing all strings together.
Thanks again for helping to keep this project alive mate.
Best regards, Mark
Edit: Happy Belated Birthday, thread!
Last edited by clabs; 01-14-2017 at 04:17 PM.
Nice! Glad it's working out for you.
Those mods shouldn't be too hard. It sounds like you can re-compile so I will just describe them to you and let you have a crack at it.
Both modifications can be done in the file tasks/ObcClock/ObcClock.cpp
First for the date, change line 88 from
setDisplayClock("%02i%02i", obc.rtc->getMonth(), obc.rtc->getDay());
to
setDisplayClock("%02i%02i", obc.rtc->getDay(), obc.rtc->getMonth());
Next for the blinking colon. I suspect that the colon would ideally blink on for half a second and off for half a second. That will take a bit of work because the RTC, from what I can see, will only give 1 second resolution and not half second. So if we want to blink like that I think our only option is to add a timer object to the ObcClock class which will be a bit of work. But if you are okay with a 1 second on and one second off blink rate then here is a quick and dirty change.
Replace lines 82, and 83:
obc.lcd->setSymbol(ObcLcdSymbols::TopDot, true);
obc.lcd->setSymbol(ObcLcdSymbols::BottomDot, true);
with this:
// Blink Colon
if(obc.rtc->getSecond()%2) {
obc.lcd->setSymbol(ObcLcdSymbols::TopDot, true);
obc.lcd->setSymbol(ObcLcdSymbols::BottomDot, true);
} else {
obc.lcd->setSymbol(ObcLcdSymbols::TopDot, false);
obc.lcd->setSymbol(ObcLcdSymbols::BottomDot, false);
}
Happy Hacking! and if you get stuck just holler.
Last edited by xobloof; 01-15-2017 at 12:51 PM. Reason: attempted reformatting code examples, fixed typo
I've got my OpenOBC out of the car and hooked up to the computer. I just have to tweak some of your code before flashing. I'm excited.
'97 M3, Estoril blue, 2 dr, euro 6-spd, EFR 9180 divided T4 .92 IWG, RK tuning, CP 8.5:1 pistons, Eagle rods, Schrick cams, L19 11 mm ARP studs, O-ringed block, Supertech stainless/inconel valves, Supertech springs & Ti retainers, ported head, S54 oil pump/pan, 80 lb. injectors, OBD1 intake manifold, Steedspeed twin scroll T4, 3.5" SS exhaust, eBoost2 EBC, HFS-4 W/M injection, AEM Failsafe, Zeitronix data logger, Racelogic TC, OpenOBC w. ethanol %, Ireland Eng. engine mounts, UUC black tranny mounts w. enforcers, UUC twin disc feramic, ARC-8's, MCS 2-ways, Z3 rack, Rallyroad strut bar, X brace, Eibach sway bars, Ground Control LCAB bushings, Bimmerworld RTAB's, Powerflex subframe bushings, 210 4-clutch LSD, Stoptech BBK, titainium shims, steel braided lines, brake cooling ducts.
how should one go about getting one for themselves?
'97 M3
Thanks xobloof
The day/month change worked perfectly for me - even I found that easy.
So far as the flashing colon is concerned, yeah - I am happy with that quick fix. Unfortunately, when I try and compile with that code, I get the following error:
make: *** [makefile:131: tasks/ObcClock/ObcClock.o] Error 1
I tried quite a few times, checking those lines but I always get the same result. It is no major deal - it is just cosmetic after all. But if you have a chance sometime to have a look then I'd really appreciate it.
Best regards, Mark
Opps, sorry I should have compiled that first.
Change this line
if(obc.rtc->getSeconds%2) {
to this
if(obc.rtc->getSecond()%2) {
That should compile now.
- - - Updated - - -
Nice!
Are you looking for an OpenOBC or the expansion boards?
xobloof - thanks very much for the fast response - worked fine with that small change.
It is not quite perfect in that the dots do not always appear at the same time and if you watch it, the timeframes for on and off are very slightly irregular. But you mentioned it was a dirty fix and it is certainly good enough for me so thanks buddy!
Looking forward to having a play with this and also excited to see how you get along with your CAN bus expansion board because I think that is something I think will open up some more cool possibilities.
Best regards, Mark
I received my break out board, thanks so much again.
'97 M3, Estoril blue, 2 dr, euro 6-spd, EFR 9180 divided T4 .92 IWG, RK tuning, CP 8.5:1 pistons, Eagle rods, Schrick cams, L19 11 mm ARP studs, O-ringed block, Supertech stainless/inconel valves, Supertech springs & Ti retainers, ported head, S54 oil pump/pan, 80 lb. injectors, OBD1 intake manifold, Steedspeed twin scroll T4, 3.5" SS exhaust, eBoost2 EBC, HFS-4 W/M injection, AEM Failsafe, Zeitronix data logger, Racelogic TC, OpenOBC w. ethanol %, Ireland Eng. engine mounts, UUC black tranny mounts w. enforcers, UUC twin disc feramic, ARC-8's, MCS 2-ways, Z3 rack, Rallyroad strut bar, X brace, Eibach sway bars, Ground Control LCAB bushings, Bimmerworld RTAB's, Powerflex subframe bushings, 210 4-clutch LSD, Stoptech BBK, titainium shims, steel braided lines, brake cooling ducts.
'97 M3, Estoril blue, 2 dr, euro 6-spd, EFR 9180 divided T4 .92 IWG, RK tuning, CP 8.5:1 pistons, Eagle rods, Schrick cams, L19 11 mm ARP studs, O-ringed block, Supertech stainless/inconel valves, Supertech springs & Ti retainers, ported head, S54 oil pump/pan, 80 lb. injectors, OBD1 intake manifold, Steedspeed twin scroll T4, 3.5" SS exhaust, eBoost2 EBC, HFS-4 W/M injection, AEM Failsafe, Zeitronix data logger, Racelogic TC, OpenOBC w. ethanol %, Ireland Eng. engine mounts, UUC black tranny mounts w. enforcers, UUC twin disc feramic, ARC-8's, MCS 2-ways, Z3 rack, Rallyroad strut bar, X brace, Eibach sway bars, Ground Control LCAB bushings, Bimmerworld RTAB's, Powerflex subframe bushings, 210 4-clutch LSD, Stoptech BBK, titainium shims, steel braided lines, brake cooling ducts.
Bookmarks