-
UART signals fixed
07/18/2017 at 08:54 • 0 commentsI finally turned the soldering iron on ;) and got some work done!
I've pocked around the ODB adapter and managed to get an NPN transistor with the collector connected through a resistor to the 5V rail and connected the UART TX line to the base of it. Then connected the collector to the base of the NPN that drives the K-Line.
This way I don't need to have the interrupt inverting "thing" that could ruin the UART timings.
Need to take a photo to post... :)
-
ESP8266 ready
07/18/2017 at 08:49 • 0 commentsI finally got a new layout ready and the communication "API" defined.
I was aiming for a structure with an ID, Value and checksum in binary format but for now, and to make debugging easier I made a simple API with all ASCII values: <ID>,<space>,<float><\n>.
This way I can enter a serial console and set the values manually and check if everything is working ok.
Now I have to get the STM32 code to send the values accordingly to this API.
P.S. I haven't been able to do it yet but I'm going to test the OBD comunication above the 90Km/h mark with the VAGCOM software running on the PC. If it works than it's something buggy on the code, if not than I might have to rethink this whole thing...
-
Why 90? (part 2)
04/20/2017 at 10:30 • 0 commentsI've made some code optimizations to try to reduce the display printing times.
Got it to a minimum still using only the STM32 but even at idle engine I got some connection fails and retries.
So the "diy" "hacked" UART TX signal inverting using an interrupt might be ruining the communication. Either that or the long cable carrying the UART signals from the OBD plug location to the dash... :) I have to fix the inverting and retry...
Edit:
Meanwhile I got the ILI9341 to refresh at 60fps on the ESP8266 xD
I'm able to run the display at 80Mhz SPI speeds!!!! xDDD
-
Why 90?
04/12/2017 at 08:40 • 0 commentsSo, I've managed to get some cables on the car and route the K-line control signals from the OBD adapter to the dashboard. This way I can drive and look at the display without loosing sight of the road!!! Drive safely!! :)
Then I hit the road and all was fine. An occasional reconnection here and there but all seems ok.
But then I entered the highway and everything went crazy! I noticed that after 90Km/h the OBD seems to stop responding.
When I come back under 90 it reconnects and everything is ok.
The code is not very optimized because I read the OBD values (3 blocks) and then I update the display and also read the temperature sensor and also update the display with that. This takes around 130+90=220ms. From what I've seen using the VAG-COM software on the laptop and capturing the control signal, when the software is idling it sends ACK frames back and forth to the ECU. So this 220ms might be too long between communications and the ECU might drop the connection. Still have to investigate further...
But I'm planning to add a ESP8266 to be in charge of the display control and leave the STM32 only with the OBD tasks. This way I can leave it reading the blocks at max speed and reporting them to the ESP through RS232 and leave it to display the data.
More to come...