Jiji

Well-Known Member
First Name
Rick
Joined
Jul 26, 2021
Threads
17
Messages
345
Reaction score
447
Location
Finger Lakes
Vehicles
2022 Mustang Mach-E GT 2023 Rivian R1S
Country flag
6/6/2023 Update: OBD Play Update for TestFlight
Many improvements and features for those using OBD Record to record trips and charges. See the new post for what is now available.

3/18/2023 Update: Second Invitation Beta using TestFlight
The results of the first were positive and much of the feedback has ben rolled into this beta that is open for 50 testers. No ODBLink MX+ adapter is required if you wish to explore the OBD Play software - just an iPhone running iOS 16.2 or later.

3/14/2023 Update: First Invitation Beta using TestFlight
Just 10 25 to start but it will open up if the feedback is good.

3/10/2023 Update: Added Charges, Points of Interest, and Settings descriptions

TL;DR
I have been working on a trip and charge logging application and now it is time to show off the results. Every winter I choose a technology project to explore new trends and this year I decided to write an iPhone SwiftUI application (OBD Record) that records Mach-E trips and charging sessions from the OBDII connector using an OBDLink MX+ adapter and makes them viewable with a companion application which I have thoughtfully named OBD Play.

My previous solution involved multiple Raspberry Pi's but now I have a solution that can be used by anyone with an iPhone running iOS 16.2, has an OBDLInk MX+ ODBII adapter (it can be left plugged in :cool:), and of course, access to a Mustang Mach-E. But best of all - no programming skills are required as Apple has method to distribute iPhone apps without being submitted to the AppStore. While I use OBD Record every chance I get to drive my wife's MME, it needs a few more finishing touches before it is ready. So here a preview of OBD Play which will be available for everyone via the Apple TestFlight application.

This is what you see when you start OBD Play after the onboarding of a data source and vehicle. To make it readily usable by all, I am providing a demonstration data source (OBD Geek) and vehicle (My Mach-E) so just a iPhone is needed for anyone wishing to try it out when it officially available (rolling out in small batches to avoid a disaster so stay tuned).

Trips
This is the trip overview (left side) for a pair of trips I recorded earlier today (but you can view trips for the past week, month, or for a specific day). The binoculars are what I call the trip Spotlight, these are reports that usually reflect all the trips (right side) and will be explored in a bit:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678396944240


Simple enough - right? Made two trips totaling 27 miles and used 8 kWh of energy and averaged 3.4 mi/kWh which is huge for a 32℉ day. Now if you select a trip you can see the details and find out why I had a magic pedal today:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678396354482


Wow! 3.7 mi/kWh is fantastic but you can see that the destination is 450' below the start so gravity really helped out on this Costco run.

And remember the Spotlight option? Here are the three charts displaying the energy efficiency by month, the efficiency and temperature moving averages, and a chart of trip efficiency against temperature with points colored to show the change in evolution:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678397382715


Charges
This is the charge overview (left side) for the charging sessions I recorded the past week (but you can view charges for the past week, month, or for a specific day). The binoculars are here too and contain reports that usually reflect all charges (right side) and will be explored in a bit:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678463470917


Simple enough, I made two charges adding 30.5 kWh to the high voltage battery and measured 33.8 kWh at the plug for a conversion efficiency of 90.2%. Now if you select a specific charge you can see the all the details (the screen scrolls so the left side is the top and the right side is the bottom of the view after scrolling):

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678463771172


There are many data points you can watch during a charging session and the keys ones are what the charger and high voltage battery are doing.

Currently I have not implemented DCFC but eventually I will get around to it so you are only going to see level 2 charging sessions for now. Another future upgrade is to add spotlights to the detailed charge session as it might nice to see what the vehicle is requesting and what the charger is delivering, and the power delivered over the charge duration.

Since I just mentioned the spotlights, here are the two charts currently available the charge spotlights: displaying the energy use by month and the history of the battery State of Health (SoH):

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678464437855


Left side is your monthly energy report so you can estimate what it costs to charge in a given month. The right side tracks changes in your high voltage battery State of Health, you would like to be high and degrade slowly; in my case I have 98.% of the battery left after 10000 miles of use.

Points of Interest (POI)
When you look at a detailed trip or charge you see an address that was reverse geocoded from the latitude and longitude. You can convert this address into a point-of-interest and make your trips and charges be more personal.

By selecting the trip destination of 160 Grant Avenue you get a list of nearby POIs that you can select, in this case it was a trip to Starbucks so we select that hit the back button:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678472920026


Now the detailed trip view has been updated to reflect the actual destination:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678473357998


We can go back and fix the 297 Grant address start was the start of the trip but we find that there are no nearby POIs since we parked far away from other vehicles and the store. In this case we can add our own POI so we know which trip this was:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678473688157


So now both are updated POIs which will be reused next time we visit either location:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678473941465


Settings
The Settings tab contains links to mange the vehicles, data sources, and other useful features of OBD Play along with options to backup and restore the settings from a file:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678474067887


Vehicles
The Vehicle setting page lets you add (right side), remove (left side swipe on a vehicle), and edit vehicles (center). Most importantly it has a picker for the active vehicle when you are a multiple Mach-e family (left side top):

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678474280198


Data Sources
Very similar to the vehicle settings but now for managing the data sources:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678474236614


Location
The Location settings show the cached results of the reverse geocoded lookups. Apple limits these to 50 per minute so you can't be bothering Apple all the time so they are looked up once and then stored to fast retrieval without network access:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678474252302


About
Just the build information should find a problem:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678474623732


Wrap Up
Almost everything has been covered, you should have enough information to download a copy and look around if this is something useful.

And a reminder for anyone making it this far. The OBD Play (and OBD Record) apps will soon be available for download using the Apple TestFlight application so I will post a link here with instructions for joining the beta when it is available.
 
Last edited:

Jefke77

Well-Known Member
Joined
May 9, 2022
Threads
2
Messages
45
Reaction score
9
Location
Belgium
Vehicles
Mustang Mach E4X
Country flag
Amazing 🤩,
Also possible to set it in metric? Km?
Charging history at home location in kWh would be awesome. There isn’t anything available for it at the moment.
Would love to test it.
 
OP
OP
Jiji

Jiji

Well-Known Member
First Name
Rick
Joined
Jul 26, 2021
Threads
17
Messages
345
Reaction score
447
Location
Finger Lakes
Vehicles
2022 Mustang Mach-E GT 2023 Rivian R1S
Country flag
Amazing 🤩,
Also possible to set it in metric? Km?
Charging history at home location in kWh would be awesome. There isn’t anything available for it at the moment.
Would love to test it.
Of course, all the base units are metric so I made special accommodations for those living in the feet/mile/mph/°F world. Jumping the gun here but select Metric in the settings and voila:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678401826236


The bigger issue is how you like to see efficiency, kWh/100km?
 

mdolan92869

Well-Known Member
First Name
Mike
Joined
Feb 25, 2021
Threads
21
Messages
871
Reaction score
2,008
Location
Orange County, CA
Vehicles
'21 Mach-e (Had '83 GT, '89 GT Ragtop, '13 GT)
Occupation
Retired Software Engineer
Country flag
Is this tightly tied to the OBDLink MX+ adapter or should it work with a VEEPeak adapter (the one I already have)? Is the OBDLink MX+ adapter better than the VEEPeak in some way that you know, or do you just have the OBDLink MX+ adapter and that's what you wrote the code for?

Thanks for any info. This seems like a really awesome tool, but it would cost me the price of a new OBD adapter.
 
OP
OP
Jiji

Jiji

Well-Known Member
First Name
Rick
Joined
Jul 26, 2021
Threads
17
Messages
345
Reaction score
447
Location
Finger Lakes
Vehicles
2022 Mustang Mach-E GT 2023 Rivian R1S
Country flag
Is this tightly tied to the OBDLink MX+ adapter or should it work with a VEEPeak adapter (the one I already have)? Is the OBDLink MX+ adapter better than the VEEPeak in some way that you know, or do you just have the OBDLink MX+ adapter and that's what you wrote the code for?
I really don’t know but it uses the OBDLink MX+ STPX command to read the data which is an extension of the AT commands probably used by most OBDII adapters.

The bigger requirement is support for the MSCAN bus since Ford put the high resolution odometer there.


Thanks for any info. This seems like a really awesome tool, but it would cost me the price of a new OBD adapter.
Which is why you should try before you buy and see if it is worth $150. Everything else is free, and a hosted data source to store your data costs less than a dollar a month.
 


Mach-Lee

Well-Known Member
First Name
Lee
Joined
Jul 16, 2021
Threads
203
Messages
7,729
Reaction score
15,301
Location
Wisconsin
Vehicles
2022 Mach-E Premium AWD
Occupation
Sci/Eng
Country flag
TD;LR
I have been working on a trip and charge logging application and now it is time to show off the results. Every winter I choose a technology project to explore new trends and this year I decided to write an iPhone SwiftUI application (OBD Record) that records Mach-E trips and charging sessions from the OBDII connector using an OBDLink MX+ adapter and makes them viewable with a companion application which I have thoughtfully named OBD Play.

My previous solution involved multiple Raspberry Pi's but now I have a solution that can be used by anyone with an iPhone running iOS 16.2, has an OBDLInk MX+ ODBII adapter (it can be left plugged in :cool:), and of course, access to a Mustang Mach-E. But best of all - no programming skills are required as Apple has method to distribute iPhone apps without being submitted to the AppStore. While I use OBD Record every chance I get to drive my wife's MME, it needs a few more finishing touches before it is ready. So here a preview of OBD Play which will be available for everyone via the Apple TestFlight application.

This is what you see when you start OBD Play after the onboarding of a data source and vehicle. To make it readily usable by all, I am providing a demonstration data source (OBD Geek) and vehicle (My Mach-E) so just a iPhone is needed for anyone wishing to try it out when it officially available (rolling out in small batches to avoid a disaster so stay tuned).

Trips
This is the trip overview (left side) for a pair of trips I recorded earlier today (but you can view trips for the past week, month, or for a specific day). The binoculars are what I call the trip Spotlight, these are reports that usually reflect all the trips (right side) and will be explored in a bit:

1678396944240.png


Simple enough - right? Made two trips totaling 27 miles and used 8 kWh of energy and averaged 3.4 mi/kWh which is huge for a 32℉ day. Now if you select a trip you can see the details and find out why I had a magic pedal today:

1678396354482.png


Wow! 3.7 mi/kWh is fantastic but you can see that the destination is 450' below the start so gravity really helped out on this Costco run.

And remember the Spotlight option? Here are the three charts displaying the energy efficiency by month, the efficiency and temperature moving averages, and a chart of trip efficiency against temperature with points colored to show the change in evolution:

1678397382715.png


This pretty much does it for the trip reports, I will be back soon and edit this post to show the various reports you have for your MME charging sessions.

And a reminder for anyone making it this far. The OBD Play (and OBD Record) apps will soon be available for download using the Apple TestFlight application so I will post a link here with instructions for joining the beta when it is available.
Question - how are you calculating efficiency? If you're just using kWh to empty I don't think that's accurate without a correction. For example, if you precondition the battery while unplugged the kWh to empty may increase.

Is this tightly tied to the OBDLink MX+ adapter or should it work with a VEEPeak adapter (the one I already have)? Is the OBDLink MX+ adapter better than the VEEPeak in some way that you know, or do you just have the OBDLink MX+ adapter and that's what you wrote the code for?
OBDLink MX+ has a lower idle draw and security features so only authorized devices connect. I wouldn't want to leave the VEEPeak connected all the time since anyone could walk up and connect to it with their phone.
 
Last edited:

mdolan92869

Well-Known Member
First Name
Mike
Joined
Feb 25, 2021
Threads
21
Messages
871
Reaction score
2,008
Location
Orange County, CA
Vehicles
'21 Mach-e (Had '83 GT, '89 GT Ragtop, '13 GT)
Occupation
Retired Software Engineer
Country flag
Question - how are you calculating efficiency? If you're just using kWh to empty I don't think that's accurate without a correction. For example, if you precondition the battery while unplugged the kWh to empty will increase.



OBDLink MX+ has a lower idle draw and security features so only authorized devices connect. I wouldn't want to leave the VEEPeak connected all the time since anyone could walk up and connect to it with their phone.
I didn't know about the idle draw and security. Haven't paid much attention to OBD adapters since I bought this one. Maybe a reason to upgrade my toys knowing that and this nice tool coming along.
 
Last edited:

RedDragon

Well-Known Member
Joined
Nov 24, 2021
Threads
22
Messages
392
Reaction score
298
Location
New Jersey
Vehicles
22 Mach E AWD Premium Ext Bat - Rapid Red
Country flag
Any chance u are also making an Android version?
 

scoopman

Well-Known Member
Joined
Jan 30, 2021
Threads
60
Messages
2,769
Reaction score
5,797
Location
Bay Area
Vehicles
2023 KIA EV6 GT, 2021 VW ID.4 Pro S
Occupation
former electric pony jockey
Country flag
Let me know when I can test it and give you feedback!
 
OP
OP
Jiji

Jiji

Well-Known Member
First Name
Rick
Joined
Jul 26, 2021
Threads
17
Messages
345
Reaction score
447
Location
Finger Lakes
Vehicles
2022 Mustang Mach-E GT 2023 Rivian R1S
Country flag
Question - how are you calculating efficiency? If you're just using kWh to empty I don't think that's accurate without a correction. For example, if you precondition the battery while unplugged the kWh to empty may increase.
I use the difference in EtE (Energy to Empty) at the trip start and end as the kWh used. In my 1.0 setup I used EtE and also calculated my own using the HVB voltage/current to calculate power and then integrating it for an energy use value which was always within a few percent of the EtE difference. I also used look at the reported usage by the in-vehicle Trip display which also seems to be the difference in EtE when it is working.

I just looked the trip up in FordPass and it combined all my driving into one trip so I can't break it out, which is why I don't use FordPass for trips. 🤦‍♂️

I also know for a fact that the State of Charge can change, I have charged to 80% and seen it go up but in this the EtE difference is reasonable:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678410275982
.

Since preconditioning occurs prior to a trip when you aren't around the vehicle I can't do much about it but I don't ever recall seeing 'weird' energy use values for a trip which would be a result of EtE increasing during a trip. If they did exist they would be immediately apparent in the scatter plot of efficiency vs temperature that you can see above. But there is much I don't know and I am always to open to suggestions for improvements.

Finally I do record an EtE data point during a trip so at some point the detailed trip display can display it and other measurements logged but not yet displayed. Here is the EtE logged during this particular trip:

Ford Mustang Mach-E OBD Play: an iPhone app for viewing Mach-E trips and charging data 1678410768052


OBDLink MX+ has a lower idle draw and security features so only authorized devices connect. I wouldn't want to leave the VEEPeak connected all the time since anyone could walk up and connect to it with their phone.
Excellent point, the MX+ uses Bluetooth and not Bluetooth Low Energy (BLE) so it must be paired with the phone before using which means you car is unlocked.
 
OP
OP
Jiji

Jiji

Well-Known Member
First Name
Rick
Joined
Jul 26, 2021
Threads
17
Messages
345
Reaction score
447
Location
Finger Lakes
Vehicles
2022 Mustang Mach-E GT 2023 Rivian R1S
Country flag
Let me know when I can test it and give you feedback!
It will be announced here. Upping the user base to three turned up an crash as Apple limits reverse geocoding (which is how GPS latitude/longitude become an address or a point-of-interest (POI) - which I should write up since it is cool) to 50 per minute and when exceeded I must get some unexpected data and do something bad with it.

Not the end of the world as the reverse geocoding results are cached in the app (since it is costly) so it eventually works but I prefer to not let it out to a wider audience when you select the week or months trip period and it crashes. Which you will do since more often than not the demo data source rarely shows trips the same day they occur.

Something about first impressions being important, maybe cuz I'm overly sensitive but at least Apple will tell about crashes so I can try to fix them.
 

Mach-Lee

Well-Known Member
First Name
Lee
Joined
Jul 16, 2021
Threads
203
Messages
7,729
Reaction score
15,301
Location
Wisconsin
Vehicles
2022 Mach-E Premium AWD
Occupation
Sci/Eng
Country flag
I use the difference in EtE (Energy to Empty) at the trip start and end as the kWh used. In my 1.0 setup I used EtE and also calculated my own using the HVB voltage/current to calculate power and then integrating it for an energy use value which was always within a few percent of the EtE difference. I also used look at the reported usage by the in-vehicle Trip display which also seems to be the difference in EtE when it is working.

I just looked the trip up in FordPass and it combined all my driving into one trip so I can't break it out, which is why I don't use FordPass for trips. 🤦‍♂️

I also know for a fact that the State of Charge can change, I have charged to 80% and seen it go up but in this the EtE difference is reasonable:

1678410275982.png
.

Since preconditioning occurs prior to a trip when you aren't around the vehicle I can't do much about it but I don't ever recall seeing 'weird' energy use values for a trip which would be a result of EtE increasing during a trip. If they did exist they would be immediately apparent in the scatter plot of efficiency vs temperature that you can see above. But there is much I don't know and I am always to open to suggestions for improvements.

Finally I do record an EtE data point during a trip so at some point the detailed trip display can display it and other measurements logged but not yet displayed. Here is the EtE logged during this particular trip:

1678410768052.png



Excellent point, the MX+ uses Bluetooth and not Bluetooth Low Energy (BLE) so it must be paired with the phone before using which means you car is unlocked.
You should try navigating to a DCFC 20+ miles away with the built-in nav so the battery heating turns on as you approach (en-route preconditioning). See what effect that has on the energy consumption and how it compared to the built-in efficiency reading.

Another question, does this record charging activity as well? NVM, coming soon I see.

Not sure if you noticed, but if you charge to 100% you will not really see more than about 80 kWh EtE (even when the pack is warm). Where did the other 11 kWh go? That's why I think some kind of correction factor has to be involved. Also EtE is not linear, if you go on a road trip at a constant speed you'll notice some curves in the EtE as it goes down. I'm not sure what the solution is to that EtE accuracy problem, it might require some kind of temperature compensation or lookup table for the curve. Just wanted to point out the pitfalls of using the EtE parameter and that it could introduce up to 15% error into the calculations.
 
OP
OP
Jiji

Jiji

Well-Known Member
First Name
Rick
Joined
Jul 26, 2021
Threads
17
Messages
345
Reaction score
447
Location
Finger Lakes
Vehicles
2022 Mustang Mach-E GT 2023 Rivian R1S
Country flag
This looks awesome! Wish I had your coding skills.
it really helps to not know what you are getting into.😱

For those following along, here a couple links that will be supporting the project.

GitHub repo that will hold the code and has the README file with project updates:

OBD Play

I have also setup a discussion forum where I plan to support the software (no need to pollute this fine forum) and make announcements such as new download links will be here:

OBD Play Discussions
Sponsored

 
 




Top