Sponsored

Home-built Android app for Lightning Math for any fellow geeks out there

MichaelPNW

Active member
First Name
Michael
Joined
Jan 26, 2023
Threads
1
Messages
28
Reaction score
21
Location
Marysville, WA
Vehicles
Ford f150 Lightning Lariat ER
I've been a long-time lurker, and this is my first post.

If you're like me, then on a long road trip you're constantly doing math in your head:
  • Sense-checking the guess-o-meter
  • Wondering about the impact of a headwind
  • Asking yourself whether driving faster actually saves time
  • Estimating how long a charge will take and whether you have time for a coffee or bathroom break, etc.
A couple of weeks ago, just before our summer road trip, I decided to build an app that would save me all that mental effort. I created it purely for myself (i.e., it’s not available on the Google Play Store), and it only works on Android.

The app was inspired by this post by @invertedspear where they had built a webpage for doing some basic EV-related calculations. I just took that idea further and turned it into an app.

Let me preface this by acknowledging that Google Maps does a really solid job estimating arrival time and state of charge (SOC) — far better than Ford's built-in estimator. ABRP (A Better Route Planner) is also useful because it accounts for factors like altitude, temperature, etc. Most of you are probably already using those tools, and might not be bothered with what I’ve built.

The App

The app has two main tabs:
  1. Driving Stats
  2. Charging Stats
1. Driving Stats Tab

This tab takes several inputs:
  • Battery size
  • Likely speed
  • An alternate (faster) speed
  • An estimate of your mi/kWh (sorry, Canadians — wrong units!)
  • Distance to destination
  • Current SOC
The outputs are grouped into three categories:
  • Time Estimates
    Helps answer how long the trip will take and whether driving faster actually saves you much time.
  • Energy Estimates
    Shows kWh used, battery percentage consumed, and estimated SOC at your destination.
  • Range Estimates
    Displays distance to empty, distance to a 10% buffer, and distance to a 20% buffer — for all you range-anxiety-prone drivers.
There’s even a button that reads the results out loud so you don’t need to stare at the screen.

2. Charging Stats Tab

This one takes just three inputs:
  • Starting SOC
  • Charging rate up to 80%
  • Charging rate from 80% to 90% (when it usually drops off a cliff)
I don’t usually charge beyond 90%, so I didn’t build in functionality for that.

Yes, I know the charge rate up to 80% is on a curve and changes constantly depending on the charger and many other factors — I just adjust the slider as the rate changes and recalculate.

Outputs are again grouped into three categories:
  • Time Estimates
    How long it takes to get to 80% SOC, and then to 90%.
  • Energy Stats
    Total kWh added during the charge.
  • Charging Speeds
    kWh per minute added, and how many minutes it takes to add 1% SOC.

Screenshots

Ford F-150 Lightning Home-built Android app for Lightning Math for any fellow geeks out there DrivingStats
Ford F-150 Lightning Home-built Android app for Lightning Math for any fellow geeks out there ChargingStats

Ford F-150 Lightning Home-built Android app for Lightning Math for any fellow geeks out there DrivingStatsResults
Ford F-150 Lightning Home-built Android app for Lightning Math for any fellow geeks out there ChargingStatsResults


Interested?

If anyone’s curious, I can figure out how to get you a copy. As I mentioned, I built it just for myself, but I figured a few of you might find it fun or useful. If there's enough interest, I might investigate publishing it on the Google play store or making an iOS version.

P.S. Roadtrip Notes

We started just north of Seattle, drove across eastern Washington into Montana, and continued all the way to Big Timber for some trout fishing. On the way back, we passed through eastern Idaho via Boise to visit friends — 1,841 miles in total. BlueCruise handled most of the work.

We charged using a mix of Tesla, EA, EVgo, and a Circle K. Tesla had the most charger availability (except at Burley, ID — Tesla drivers, please don’t leave a gap between vehicles!!). Interestingly, Tesla chargers de-rated the quickest. EVgo held a higher charge rate for longer, and EA has significantly improved from previous trips too.

I used both the Ford and A2Z Tesla adapters. The Ford one got very hot at one point, so I swapped it out for the A2Z to finish charging.

Also, from experience: I now always carry a squeegee and squirt bottle to clean the windshield at every stop—the bug splatter is relentless.

Big thanks to the Tesla charger at St. Regis, MT. Before that, the leg from Smelterville, ID to Missoula, MT was... not so bladder-friendly.

Let me know if you're interested or have any questions!
Sponsored

 
Last edited:

ZSC100

Well-known member
First Name
Zach
Joined
Mar 29, 2023
Threads
6
Messages
380
Reaction score
293
Location
Tulsa, OK
Vehicles
2022 F150 Lightning SR EG 311A
Occupation
Electrical Engineer
Awesome, I assume you are a programmer of similar things by day? Have you thought about interacting with a Bluetooth OBD reader like ABRP does? I'm sure you don't want to deal with maps and trying to one-up ABRP, but maybe your app could just focus on one thing like: energy,,,,ABEP? 🤣

Also, do you know how to make it work with Android Auto on the infotainment screen?
 

K6CCC

Well-known member
First Name
Jim
Joined
Sep 12, 2024
Threads
18
Messages
435
Reaction score
354
Location
Glendora, Calif.
Vehicles
2024 Lightning Flash ER in Antimatter Blue, 2017 Toyota Corolla (wife's car)
Occupation
Two Way radio systems
Sure, I'm interested in trying it out.
 

Sponsored
OP
OP

MichaelPNW

Active member
First Name
Michael
Joined
Jan 26, 2023
Threads
1
Messages
28
Reaction score
21
Location
Marysville, WA
Vehicles
Ford f150 Lightning Lariat ER
Awesome, I assume you are a programmer of similar things by day? Have you thought about interacting with a Bluetooth OBD reader like ABRP does? I'm sure you don't want to deal with maps and trying to one-up ABRP, but maybe your app could just focus on one thing like: energy,,,,ABEP? 🤣

Also, do you know how to make it work with Android Auto on the infotainment screen?
Thanks for the feedback! I'm just a part-time programmer of similar things. More of a tinkerer really.

The next options I was going to explore with the app included interacting with the vehicle telemetry via OBD, interactions with maps etc, and adding it to Android Auto.

The telemetry option is somewhat limited as Ford doesn't give people like us much access via APIs so I'll wait to see if they open it up at some point.

I was going to add map and gps data, but then I felt like I was going to start to recreate Google Maps or ABRP, both of which do a much better job.

Android Auto is intriguing, but I'd have to add a lot of voice controls to the UI as Google won't let you add any apps that might distract the driver by being too hands-on. I cheat and get my passenger to work the app. This might be the next area I play with.

So far I've invested about 6 hour's effort and zero dollars. Each of the above is going to take quite a bit more! I'm actually hoping Ford Pass or Google eventually adds these types of stats into their apps.
 

ZSC100

Well-known member
First Name
Zach
Joined
Mar 29, 2023
Threads
6
Messages
380
Reaction score
293
Location
Tulsa, OK
Vehicles
2022 F150 Lightning SR EG 311A
Occupation
Electrical Engineer
Thanks for the feedback! I'm just a part-time programmer of similar things. More of a tinkerer really.

The next options I was going to explore with the app included interacting with the vehicle telemetry via OBD, interactions with maps etc, and adding it to Android Auto.

The telemetry option is somewhat limited as Ford doesn't give people like us much access via APIs so I'll wait to see if they open it up at some point.

I was going to add map and gps data, but then I felt like I was going to start to recreate Google Maps or ABRP, both of which do a much better job.

Android Auto is intriguing, but I'd have to add a lot of voice controls to the UI as Google won't let you add any apps that might distract the driver by being too hands-on. I cheat and get my passenger to work the app. This might be the next area I play with.

So far I've invested about 6 hour's effort and zero dollars. Each of the above is going to take quite a bit more! I'm actually hoping Ford Pass or Google eventually adds these types of stats into their apps.
Interaction with OBD is the way to go. I can help with PIDs and understanding what's possible. I'm worried though that others that are interested in this are already using their bluetooth OBD (MX+) in most cases with another app. Can it support multiple connections to hosts simultaneously?
https://www.obdlink.com/products/obdlink-mxp/

Ford does have a good API for FordPass/cloud, but I'm afraid it doesn't do Jack SHIT while the vehicle is on. They claim this is for safety, but it's really about control and to keep people from doing what you're wanting to do :(

I totally agree, don't try to do anything with maps, you'll never beat google.

That sucks that Android Auto development. I was afraid they would do something like this. What they don't realize or care is that this just forces people to use magic boxes (there are so many brands) when it's up to the driver to be safe, PERIOD.

I feel ya with time and development. I've done so many mods for this truck that I want to release to the community, but can't really without spending a LOT of time on the boring part of product development, software, documentation, testing.... Also, there are so many different configurations for this truck, it's impossible for us middle class owners to test across the gamut.
Sponsored

 
 







Top