|
||||||
| Electronics | Audio | NAV | Infotainment Anything related to in-car electronics, navigation, and infotainment. |
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#57 |
|
Senior Member
Join Date: Jan 2014
Drives: Whiteout FR-S
Location: Miami
Posts: 251
Thanks: 97
Thanked 200 Times in 111 Posts
Mentioned: 33 Post(s)
Tagged: 0 Thread(s)
|
I'm hoping to get the money together soon to start building mine and figuring out mounting location. I also need to get an obd2 splitter so i can hopefully keep the use of my p3 gauge
Sent from my iPhone using Tapatalk |
|
|
|
|
|
#58 |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
I think I figured out the oil temp thing.
I think I send it "07E02101" and get back a 29 byte answer and use the 29th byte (aka "AC" (which, as an aside was something I was being dense about until last night. The numbering system for returns is documented as A=1, B=2,...,AA=27, AB=28, AC=29) and subtract 40 to get oil temp in C. I'll try it later tonight. (If this works then I can also probably get that fuel tank level thing working as well.) |
|
|
|
| The Following User Says Thank You to robot For This Useful Post: | marcoaferrer (06-19-2014) |
|
|
#59 |
|
Junior Member
Join Date: May 2014
Drives: Toyota GT86
Location: Germany
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
|
Hi robot,
it should be the last byte in the message, see my code: http://mbed.org/users/chrta/code/Obd...emperature.cpp Since i do the CAN message decoding on my own, my packet data length may differ from yours. BTW: I will use this display http://www.adafruit.com/products/1431 (1,5" OLED) |
|
|
|
|
|
#61 | |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
Quote:
It turns out the PID is actually a CAN one and I was reading it wrong because the ELM command set returns it with numbered "stanzas" and not just in one long string. |
|
|
|
|
|
|
#62 | |
|
Banned
Join Date: Sep 2013
Drives: 2013 GBS BRZ Limited
Location: Colorado
Posts: 1,925
Thanks: 627
Thanked 1,445 Times in 711 Posts
Mentioned: 41 Post(s)
Tagged: 0 Thread(s)
|
Quote:
When I plug it into the Arduino Leonardo, I can get it to work fine for my application, but I dont have enough EEPROM for the SDCard library. So I got a Mega, and the shield doesnt "just work" like it did with the Leo & UTFT Lib. So now I want to get it to work in serial mode, but havent messed with it much. If I could get that working I would try to get the touchscreen to work for very basic gestures. |
|
|
|
|
|
|
#63 | |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
Quote:
https://learn.adafruit.com/1-8-tft-d...eed-spi-wiring Shows you the different pins. The rest of the tutorial is probably not helpful for your setup. "On Atmega 328/168/8 type Arduinos ('classic' type) the hardware SPI pins are 11 (MOSI), 13 (SCK) and 10 (CS). For Megas it is 51 (MOSI), 52 (SCK), and 53 (CS). The CS pin can be a different pin but if you use any other pin you must still have the hardware SPI CS pin (10 or 53) as an output!" |
|
|
|
|
|
|
#64 |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
I got oil temp working. It was a pain.
Code:
Serial1.println("AT SH 7E0");
getResponse();
Serial1.println("2101");
Serial.println("brz oil temp");
//value = ( (getResponseCAN('4', 11) ) - 40) * 1.8 + 32; //29th byte - 40 (?)
getResponse();
//Serial.println(&rxData[109]);
//Serial.println((float)strtol(&rxData[109],0,16));
value = ((float)strtol(&rxData[109],0,16) - 40) * 1.8 + 32;
Serial.println(value);
//Serial1.println("AT D"); //these two lines make the next 2101 reading get cut off
//Serial1.println("AT E0");
//Serial1.flush();
delay(40);
Serial1.println("ATSP6");//doesn't work and is slow (probing for protocol takes work)
//getResponse();
|
|
|
|
|
|
#65 |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
http://www.gps-laptimer-forum.de/vie...hp?f=20&t=1364
The one jpg link in the thread is a screenshot of someone with a prog querying the ecu for what pids it supports. ECT is supported. ECT is engine coolant temp. I must be doing something wrong. I bet there is still data in a buffer or something when I start reading the coolant temp and the offset messes it all up. |
|
|
|
|
|
#66 |
|
Banned
Join Date: Sep 2013
Drives: 2013 GBS BRZ Limited
Location: Colorado
Posts: 1,925
Thanks: 627
Thanked 1,445 Times in 711 Posts
Mentioned: 41 Post(s)
Tagged: 0 Thread(s)
|
robot,
Curious - Have you looked at using a droid phone as the interface/display unit for the arduino? I see that there is a USB HOST library for Droid, but I havent dug into it much. I think that would be an excellent choice for these purposes as almost everyone has an old droid smart phone laying around. Then from the Arduino's poit of view, all IO is just through the Serial IF (no need for the UTFT lib.) |
|
|
|
|
|
#67 |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
If anyone is interested I could use some help. I'm stuck on the timing of the OBD II UART device. I sort of, almost have readings working from all of the PIDs. They just aren't working one after the other.
|
|
|
|
|
|
#68 |
|
Senior Member
Join Date: Jul 2013
Drives: WRB BRZ
Location: Toronto, Canada
Posts: 286
Thanks: 21
Thanked 161 Times in 97 Posts
Mentioned: 5 Post(s)
Tagged: 2 Thread(s)
|
How fast is your refresh rate? I'm polling at around 30ms period for rpm without any issues.
Sent from my Nexus 4 using Tapatalk
__________________
|
|
|
|
|
|
#69 | |
|
There are now 2 carseats!
Join Date: Nov 2012
Drives: 2013 DGM BRZ
Location: The Emerald City
Posts: 434
Thanks: 21
Thanked 166 Times in 75 Posts
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
|
Quote:
Depending on how I have things set up I start of with no readings and then after looping through several pages I get readings ok. OR I get readings from everything but the water temp. I'm kind of confused at the moment and should probably do some code cleanup to help things out. I did find this...and it was extremely helpful: https://forum.sparkfun.com/viewtopic...32457&start=60 (it's the post by rocketboy...it's basically a way for you to type commands in from a serial monitor and see the responses.) http://forum.arduino.cc/index.php?topic=258730.0 is my call for help on the Arduino forums. I should have studied more CS in school. |
|
|
|
|
|
|
#70 |
|
Senior Member
Join Date: Jul 2013
Drives: WRB BRZ
Location: Toronto, Canada
Posts: 286
Thanks: 21
Thanked 161 Times in 97 Posts
Mentioned: 5 Post(s)
Tagged: 2 Thread(s)
|
Anytime I have timing issues, I usually relax all timings. For CAN, the identifier ID also relates to priority. The higher the number, the lower the priority. If you're reading all values by sending out a request for each value, I suggest increasing your loop delay.
Sent from my Nexus 4 using Tapatalk
__________________
|
|
|
|
|
|
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EGT gauge | SubBrZ | Engine, Exhaust, Transmission | 23 | 11-10-2015 10:31 PM |
| Gauge pod | ikeryder13 | Want-To-Buy Requests | 4 | 03-30-2014 02:02 PM |
| WTB DCW gauge pod | mikepaul21 | Want-To-Buy Requests | 1 | 03-26-2014 09:28 PM |
| FS DCW Gauge Pod | whitefrs | Interior Parts (Incl. Lighting) | 7 | 03-26-2014 03:39 PM |
| Temperature Gauge a dummy gauge? | bambbrose | BRZ First-Gen (2012+) — General Topics | 40 | 08-19-2012 05:29 PM |