XK / XKR ( X150 ) 2006 - 2014

OBD2 display in ashtray location

Thread Tools
 
Search this Thread
 
  #21  
Old 06-13-2020, 09:52 AM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-13-2020 at 11:48 AM.
  #22  
Old 06-13-2020, 10:27 AM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-13-2020 at 10:51 AM. Reason: I hate typo's
The following users liked this post:
barnsie (06-22-2020)
  #23  
Old 06-13-2020, 10:33 AM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
Default

Originally Posted by Reverend Sam


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




 
The following users liked this post:
MarkyUK (06-13-2020)
  #24  
Old 06-15-2020, 03:31 AM
barnsie's Avatar
Senior Member
Join Date: Sep 2019
Location: Leicetershire, UK
Posts: 582
Received 464 Likes on 235 Posts
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.
 
  #25  
Old 06-15-2020, 12:59 PM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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 ....
 
The following users liked this post:
barnsie (06-21-2020)
  #26  
Old 06-17-2020, 01:29 PM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-17-2020 at 01:30 PM. Reason: I always edit
  #27  
Old 06-17-2020, 02:00 PM
RedRider48's Avatar
Veteran Member
Join Date: Feb 2014
Location: Severna Park, MD
Posts: 1,518
Received 359 Likes on 254 Posts
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!
 
The following users liked this post:
Doctodd (06-03-2021)
  #28  
Old 06-21-2020, 06:52 AM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-21-2020 at 07:12 AM. Reason: added MP3 Arduino video
The following 2 users liked this post by Cabrio Bob:
ArtyH55 (09-13-2020), barnsie (06-21-2020)
  #29  
Old 06-28-2020, 09:14 AM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-28-2020 at 10:03 AM. Reason: typo's
The following 8 users liked this post by Cabrio Bob:
ArtyH55 (09-13-2020), barnsie (06-28-2020), gkubrak (06-28-2020), Jaxxr1 (03-09-2022), MarkyUK (06-28-2020), Roger Cavling (06-04-2021), u102768 (06-28-2020), Vistacom1 (01-09-2022) and 3 others liked this post. (Show less...)
  #30  
Old 06-28-2020, 09:53 AM
barnsie's Avatar
Senior Member
Join Date: Sep 2019
Location: Leicetershire, UK
Posts: 582
Received 464 Likes on 235 Posts
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.
 
The following users liked this post:
Cabrio Bob (06-28-2020)
  #31  
Old 06-28-2020, 11:21 AM
MarkyUK's Avatar
Veteran Member
Join Date: Feb 2013
Location: Somerset UK
Posts: 1,628
Received 667 Likes on 451 Posts
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
 
The following 2 users liked this post by MarkyUK:
barnsie (06-28-2020), Cabrio Bob (06-28-2020)
  #32  
Old 06-28-2020, 11:28 AM
barnsie's Avatar
Senior Member
Join Date: Sep 2019
Location: Leicetershire, UK
Posts: 582
Received 464 Likes on 235 Posts
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.
 
The following users liked this post:
Cabrio Bob (06-28-2020)
  #33  
Old 06-28-2020, 11:31 AM
barnsie's Avatar
Senior Member
Join Date: Sep 2019
Location: Leicetershire, UK
Posts: 582
Received 464 Likes on 235 Posts
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!
 
The following 2 users liked this post by barnsie:
ArtyH55 (09-13-2020), Cabrio Bob (06-28-2020)
  #34  
Old 06-29-2020, 10:36 AM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-29-2020 at 11:20 PM. Reason: added modify link
The following 2 users liked this post by Cabrio Bob:
barnsie (06-29-2020), J Mosley (01-28-2022)
  #35  
Old 06-29-2020, 04:23 PM
RedRider48's Avatar
Veteran Member
Join Date: Feb 2014
Location: Severna Park, MD
Posts: 1,518
Received 359 Likes on 254 Posts
Default

Hey cabriolet Bob,

Looking though the links and setup I don't see the "Jaguar.h" file that displays the startup Jag Logo?
 
  #36  
Old 06-29-2020, 04:52 PM
Sean W's Avatar
Veteran Member
Join Date: Jun 2013
Location: USA
Posts: 8,344
Received 4,186 Likes on 2,346 Posts
Default

FYI, I made a request to add this thread to the DIY sticky.
 
The following 2 users liked this post by Sean W:
barnsie (06-30-2020), Cabrio Bob (06-29-2020)
  #37  
Old 06-29-2020, 05:00 PM
RedRider48's Avatar
Veteran Member
Join Date: Feb 2014
Location: Severna Park, MD
Posts: 1,518
Received 359 Likes on 254 Posts
Default

Excellent Sean!
 
  #38  
Old 06-29-2020, 11:19 PM
Cabrio Bob's Avatar
Senior Member
Thread Starter
Join Date: Apr 2020
Location: Netherlands
Posts: 301
Received 312 Likes on 147 Posts
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; 06-30-2020 at 11:04 PM. Reason: zip file updated
  #39  
Old 06-29-2020, 11:30 PM
RedRider48's Avatar
Veteran Member
Join Date: Feb 2014
Location: Severna Park, MD
Posts: 1,518
Received 359 Likes on 254 Posts
Default

Hey Mate, thanks for the update. Hope you don't mind me picking your brain as I delve into this project deeper.
 
The following users liked this post:
Cabrio Bob (06-29-2020)
  #40  
Old 06-30-2020, 09:38 AM
GGG's Avatar
GGG
GGG is offline
Join Date: Dec 2011
Location: Durham, UK
Posts: 120,461
Received 16,826 Likes on 12,179 Posts
Default

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

Graham
 
The following 6 users liked this post by GGG:
Cabrio Bob (06-30-2020), kj07xk (06-30-2020), paXKid (10-05-2020), ralphwg (06-30-2020), Sean W (06-30-2020), V7Sport (07-02-2020) and 1 others liked this post. (Show less...)


Quick Reply: OBD2 display in ashtray location



All times are GMT -5. The time now is 10:07 PM.