XK / XKR ( X150 ) 2006 - 2014

OBD2 display in ashtray location

Thread Tools
 
Search this Thread
 
Old Jun 13, 2020 | 09:52 AM
  #21  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default

Originally Posted by MarkyUK
Sadly my soldering skills aren't too great, so regrettably will give it a miss.
You'll need less soldering if you take an Arduino nano with headers, then it just is plugging in some headers (using the correct length cables with headers). the other parts needs soldering tho.
But I solder as much as possible, makes a better connection. My soldering skills are also not that great, but doing it a lot improve things :-)
 

Last edited by Cabrio Bob; Jun 13, 2020 at 11:48 AM.
Reply
Old Jun 13, 2020 | 10:27 AM
  #22  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default

Originally Posted by RedRider48
Ok Mate, I'll "hang loose" until you get this sorted to perfection. I like the idea of the "sliding" ashtray possibility. I just added the fuse relay as a potential component, the idea was to align pic reference with your list. As I mentioned, I already have an Android OBD reader, actually a couple, as I was seeking to use my IOS device in place of my old Android cell for the readout.
BTW, what gauge wiring id used?
Wiring will be 26~22 gauge I guess. the whole setup will not use more than ~120mA
Currently I'm testing without the HC-05 bluetooth module, and I'm drawing about 80mA at full brightness of the screen. An HC-05 draws about 40mA.

Today I managed to embed custom fonts into the arduino code, I'm going to use the "DS-digital" font, had to convert the TTF to a .BDF file using "Fony",
and convert that to a .c file using "bdfconv", and add some extra code to it.

p.s. I noticed that when using an Arduino Nano clone, some arduino root code needs some adjustments, and can differ from clone to clone.



DS-digital font working
 

Last edited by Cabrio Bob; Jun 13, 2020 at 10:51 AM. Reason: I hate typo's
Reply
Old Jun 13, 2020 | 10:33 AM
  #23  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default

Originally Posted by Reverend Sam


I'm not selling anything, just writing up things here so you can replicate it.




 
Reply
Old Jun 15, 2020 | 03:31 AM
  #24  
barnsie's Avatar
Senior Member
Joined: Sep 2019
Posts: 591
Likes: 470
From: Leicetershire, UK
Default

Hate it in the air vent - love it in the ashtray! Way beyond my skill set to make something like this, but I am full of admiration for those who can.

I didn't like it in the vent because a) it spoils the symmetry of the dual vent design (and I am into symmetry) and b) I like having cool air blowing on to me. Mostly a) though.

I love it in the ashtray because a) it looks more 'integrated' and b) the ashtray is redundant anyway (for me).

Really cool idea, Cabrio Bob. Please keep us updated as you go along.
 
Reply
Old Jun 15, 2020 | 12:59 PM
  #25  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default

Barnsie thanx for the heads-up.

Yesterday I was fiddling with the HC-05, connecting it to the Arduino.
Trying to throw some AT commands at it, but it didn't respond. After a few times disconnecting and re-connecting the power supply,
the arduino started blinking some leds in a weird way, and died. So now I have a probably dead HC-05 and arduino.
The arduino I may be able to reincarnate by uploading a fresh bootloader.

So I ordered some parts locally (2x "robotdyn nano v3" without and with headers, some Dupont cables, a new HC-05), and something new to me:
a "Wemos LOLIN32 - ESP32". That's an arduino-like microprocessor with some overkill specs and features, and built-in bluetooth and WiFi.

I also ordered a "Buzzer" which may be used as a button-press-confirmation-beep.
It's always nice to know by a sound that you pressed a button, but you already knew because you pressed the button ....
 
Reply
Old Jun 17, 2020 | 01:29 PM
  #26  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default HC-05 module pairing

An update,
above mentioned parts are delivered, and did some tests with the new HC-05 and new Arduino Nano (Robotdyn variant)
At first I wasn't able to "speak" to the HC-05 through the arduino, but after I disconnected everything from the arduino except the HC-05,
it started working.

I managed to pair the HC-05 to my OBD2 dongle, I did this offline, without the OBD2 connected to my car.
I provided 12V power to the OBD2 through pins 4 (ground) and 16 (+12V) using a 12V wall adapter.
Uploaded the arduino sketch from this instructable to the arduino, connected the "key" pin of the HC-05 to pin 9 of the arduino,
sent AT commands to the arduino / HC-05 from this instructable, with an extra AT command to check the correct OBD2 device name:
AT+RNAME?DC0D,30,488D60
where DC:0D:30:48:8D:60 is the MAC address of my OBD2 dongle.

This resulted in a successful pairing between the HC-05 and OBD2, see video below.
The new HC-05 differs from the old one, this one can cope with 5V on the RXD line, meaning the voltage divider is obsolete. (1K and 2.2K resistors in the PDF scheme)
the old HC-05 has a description on it "LEVEL 3.3V", the new HC-05 has a description on it: "LEVEL 3.3V-6V".
I haven't tried to see what the HC-05 does when the display and photo resistor is connected again to the arduino. Also I didn't test the Wemos Lolin32 yet.

Video:
first the OBD2 is connected to power - red LED lights up,
then the Arduino is powered, OBD2 blue LED starts blinking and HC-05 LE starts double-blinking (hardly visible - blocked by a wire)


p.s. the 3D print is still not delivered. takes longer than usual .....
 

Last edited by Cabrio Bob; Jun 17, 2020 at 01:30 PM. Reason: I always edit
Reply
Old Jun 17, 2020 | 02:00 PM
  #27  
RedRider48's Avatar
Veteran Member
10 Year Member
Liked
Loved
Community Favorite
Joined: Feb 2014
Posts: 1,545
Likes: 376
From: Severna Park, MD
Default

Thanks for the update. I'm thinking I'm one of a number of folks waiting for the finished product and it's updated list of parts.
Nice work!
 
Reply
Old Jun 21, 2020 | 06:52 AM
  #28  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default some progress

Still working on it,
today I did a "real car test", trying to get the RPM output of the OBD2 displayed on the screen.
At first this was troublesome, but after changing the communication baud rate in the arduino code from 115200 to 38400 it started working!
The video below shows first an attempt to connect to the OBD2 dongle, then a "connection success" (with a wrongly coded text offset),
and then it starts displaying the RPM output. The arduino code is far from optimal at this point, the 4th digit is wrongly refreshed due to a
wrongly coded black rectangle (line 98 in the pastebin code) and the screen refresh rate is currently horrible.

I also found out that my car is already "made ready" for an AUX input by one of the previous owners,
but I can't find any RCA's anywhere in the car, but this brought me to
the idea of a new project to come (later): creating an arduino based MP3 player (below see someone else's video).
Or just buy a cheap MP3 player off aliexpress ......




example MP3 player using an arduino:

 

Last edited by Cabrio Bob; Jun 21, 2020 at 07:12 AM. Reason: added MP3 Arduino video
Reply
Old Jun 28, 2020 | 09:14 AM
  #29  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default an update

It's time for an update,
Did a full test in the car with the setup, all is working.
Currently it displays 6 items: coolant temperature, speed, voltage, time since engine start, outside temperature, intake temperature.

There are 2 issues:
The voltage displays without a decimal, I will have to sort that out,
when the car is not started (or shut down), an error appears, from which it does not recover after starting the car, has to be sorted too.

The arduino code is now quite large, it occupies 96% of the arduino nano capacity.,
so more than 6 display items will not be possible.

A custom logo has been made to display in the screen after successful initialization.
The arduino code has been prepared for imperial users, by just uncomment some lines and change some text this can be achieved.

Current arduino code:
https://pastebin.com/qN0jd1Zh

The youtube video:


The 3D print has finally arrived.
The hole for the button was slightly too large, so this is corrected in the design (I'll glue it in and not re-print it)
A bar where the lid snaps in is very thin and fragile, I changed this in the design, made it 0.3mm thicker.
Photo's below: in real life it looks much better than the pictures.
Upcoming next is priming, sanding and painting the 3D print, do some soldering and finalize the code, white a tutorial and we're finished.
Maybe later I will "hydrodip" the display lid if I can find a similar wood pattern.

3D print picture, with the fragile bar on the left



Components inserted


Test-install in the car: it fits nicely.





Closing is not a problem


Arduino code - Arduino nano is almost full!




I've done hydrodipping before:


 

Last edited by Cabrio Bob; Jun 28, 2020 at 10:03 AM. Reason: typo's
Old Jun 28, 2020 | 09:53 AM
  #30  
barnsie's Avatar
Senior Member
Joined: Sep 2019
Posts: 591
Likes: 470
From: Leicetershire, UK
Default

^^^^^

Amazing! Love it! The OBD2 display is just amazing - terrific job!

I didn't even know it was possible to DIY hydropdipping but you make it look real easy. I think that merits a thread all to itself as the possibilities are endless on our Jaguars.
 
Reply
Old Jun 28, 2020 | 11:21 AM
  #31  
MarkyUK's Avatar
Veteran Member
Joined: Feb 2013
Posts: 1,628
Likes: 671
From: Somerset UK
Default

Defo agree Barnsie, if that's CB doing the job then WELL DONE THAT MAN!!

I want to hydro dip my engine cover, side gills, bonnet & bonnet louvres, natch for the engine cover I'll need a huge water container, the rest can be done in a bucket
 
Reply
Old Jun 28, 2020 | 11:28 AM
  #32  
barnsie's Avatar
Senior Member
Joined: Sep 2019
Posts: 591
Likes: 470
From: Leicetershire, UK
Default

Originally Posted by MarkyUK
Defo agree Barnsie, if that's CB doing the job then WELL DONE THAT MAN!!

I want to hydro dip my engine cover, side gills, bonnet & bonnet louvres, natch for the engine cover I'll need a huge water container, the rest can be done in a bucket
Cabrio Bob makes it look easy, but my DIY skills are, shall we say, 'limited' I;d be prepared to give that a try though. Admire your bravery in going for the engine cover!! I'd be prepared to try my bonnet louvres and side gills though.
 
Reply
Old Jun 28, 2020 | 11:31 AM
  #33  
barnsie's Avatar
Senior Member
Joined: Sep 2019
Posts: 591
Likes: 470
From: Leicetershire, UK
Thumbs up

BTW, I love the way Cabrio Bob has stamped a Jaguar logo on the underneath of his centre console display component, where it will never be seen, once installed. Fabulous attention to detail!
 
Reply
Old Jun 29, 2020 | 10:36 AM
  #34  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default 3D files available

I made the 3D files available for download through this link.
Press the download button and unzip the file.
The 3D STL files are ready for 3D printing, and if you want to view them you can use software:

- Papa’s Best STL Viewer (free, windows x32/x64, my favorite)
- GLC player (free, Windows, Mac)
- Fast STL Viewer (free, Android)
- 3D Model Viewer - AR View (free, iPhone)
- or select one appropriate program from here.

If you want to modify them, use something like meshmixer (also free, for Windows and Mac).
 

Last edited by Cabrio Bob; Jun 29, 2020 at 11:20 PM. Reason: added modify link
Reply
Old Jun 29, 2020 | 04:23 PM
  #35  
RedRider48's Avatar
Veteran Member
10 Year Member
Liked
Loved
Community Favorite
Joined: Feb 2014
Posts: 1,545
Likes: 376
From: Severna Park, MD
Default

Hey cabriolet Bob,

Looking though the links and setup I don't see the "Jaguar.h" file that displays the startup Jag Logo?
 
Reply
Old Jun 29, 2020 | 04:52 PM
  #36  
Sean W's Avatar
Veteran Member
10 Year Member
Liked
Loved
Community Favorite
Joined: Jun 2013
Posts: 8,930
Likes: 4,739
From: USA
Default

FYI, I made a request to add this thread to the DIY sticky.
 
Reply
Old Jun 29, 2020 | 05:00 PM
  #37  
RedRider48's Avatar
Veteran Member
10 Year Member
Liked
Loved
Community Favorite
Joined: Feb 2014
Posts: 1,545
Likes: 376
From: Severna Park, MD
Default

Excellent Sean!
 
Reply
Old Jun 29, 2020 | 11:19 PM
  #38  
Cabrio Bob's Avatar
Thread Starter
|
Senior Member
Joined: Apr 2020
Posts: 301
Likes: 316
From: Netherlands
Default

Originally Posted by RedRider48
Looking though the links and setup I don't see the "Jaguar.h" file that displays the startup Jag Logo?
Here (updated 7/1/2020) you can download the complete set of code files.
Included are the ELMDuino.cpp and ELMduino.h libraries, because these are modified in order to read out more data.
When "X150_OBD2_astray.ino" doesn't compile, you need to install other libraries such as:
SSD1283A,
U8g2_for_Adafruit_GFX,
Bounce2,
probably also Adafruit GFX and LCDWIKI.

Do not use the ELMduino libraries from the internet, these will break the arduino code.


 

Last edited by Cabrio Bob; Jun 30, 2020 at 11:04 PM. Reason: zip file updated
Reply
Old Jun 29, 2020 | 11:30 PM
  #39  
RedRider48's Avatar
Veteran Member
10 Year Member
Liked
Loved
Community Favorite
Joined: Feb 2014
Posts: 1,545
Likes: 376
From: Severna Park, MD
Default

Hey Mate, thanks for the update. Hope you don't mind me picking your brain as I delve into this project deeper.
 
Reply
Old Jun 30, 2020 | 09:38 AM
  #40  
GGG's Avatar
GGG
10 Year Member
Liked
Loved
Community Favorite
Joined: Dec 2011
Posts: 120,439
Likes: 17,005
From: Durham, UK
Default

Thread added to XK/XKR - 'How To' / DIY Repair & Maintenance sticky under UPGRADES.

Graham
 
Reply



All times are GMT -5. The time now is 01:25 AM.