Sponsored

Change in battery %

Zprime29

Well-known member
First Name
Brandon
Joined
Jul 26, 2022
Threads
42
Messages
2,508
Reaction score
2,671
Location
Tucson, AZ
Vehicles
2022 Lightning ER, 2025 XC90 Recharge
SoC is mainly known by Coulomb counting and will not adjust inside 0-100% displayed. The problem is everyone just sees "SoC displayed" on their Instrument Panel which is a funny number massaged by Ford with the influence of temperature and other things. To see the real SoC you need CarScanner.
I did a 100% - 14% - 100% SOC test a while ago and have ODB screenshots of the actual. I lost 1.2% actual SOC while parked at work in the low 60% range. See thread here:
https://www.f150lightningforum.com/forum/threads/100-range-test-follow-along.25107/post-484869
Sponsored

 

topher10

Well-known member
Joined
Oct 25, 2024
Threads
8
Messages
62
Reaction score
33
Location
Louisiana
Vehicles
2024 Flash
Is it better to just leave the keys in the truck in this case, so that it doesn't sense you approaching and then walking away all day long? You can lock them in the truck with the keypad, or just leave it unlocked if supervised. I guess that doesn't work with PaaK.
 

bc1

Well-known member
Joined
Oct 25, 2025
Threads
7
Messages
139
Reaction score
105
Location
McPherson, KS
Vehicles
2025 Ford f150 Lightning Flash
What is this particular car scanner I would need to buy? Thanks.
 

PJnc284

Well-known member
Joined
Sep 30, 2024
Threads
0
Messages
928
Reaction score
1,007
Location
Garner, NC
Vehicles
2023 Ford F150 Lightning Lariat ER

bc1

Well-known member
Joined
Oct 25, 2025
Threads
7
Messages
139
Reaction score
105
Location
McPherson, KS
Vehicles
2025 Ford f150 Lightning Flash
Thanks. I actually have one of those already, a similar brand. Looks like I need to download the car scanner app to go with it.
 

Sponsored

ZSC100

Well-known member
First Name
Zach
Joined
Mar 29, 2023
Threads
9
Messages
552
Reaction score
589
Location
Tulsa, OK
Vehicles
2022 F150 Lightning SR EG 311A
Occupation
Electrical Engineer

PJnc284

Well-known member
Joined
Sep 30, 2024
Threads
0
Messages
928
Reaction score
1,007
Location
Garner, NC
Vehicles
2023 Ford F150 Lightning Lariat ER
Did you make your own GOM from CarScanner's new EV internal calcs.

If so, did you notice the reset action PID doesn't reset it 😓

Can you believe that Ford doesn't give us PID access to any of the trip data 😓
I went the easy route so didn't go too far in the weeds. Have you tries getvar setvar? I wanted to make it the last 15 miles or so but me and chatgpt could never come to an agreement and the Car Scanner documentation leaves a lot to be desired.



Ford F-150 Lightning Change in battery % 1000011844
 

ZSC100

Well-known member
First Name
Zach
Joined
Mar 29, 2023
Threads
9
Messages
552
Reaction score
589
Location
Tulsa, OK
Vehicles
2022 F150 Lightning SR EG 311A
Occupation
Electrical Engineer
getvar setvar ??? as in a way to program or save/retriev variables within Car Scanner???? If there is such a thing or meant to be such a thing and I didn't know about I'll feel stupid AF. Tell me more please. Did you notice that Stan (the developer) updated the graphics and front end of CarScanner a few months ago, a lot of stuff changed, the "Energy Used" must have been added or fixed otherwise I would've seen it and played with it pre-new version. The new version broke a lot of my stuff, I have a LOT of custom PIDs talking to a module for the Charge While Driving stuff I am testing and exporting/importing PIDs and dashboards has never worked well, especially between different Android platforms.

Did you notice that the "Reset" Action PID that resets the trip stuff built in to Car Scanner does not reset the "Energy Used" This is very unfortunate. I have emailed him to ask if this is intentional and/or if he can fix it.
 

PJnc284

Well-known member
Joined
Sep 30, 2024
Threads
0
Messages
928
Reaction score
1,007
Location
Garner, NC
Vehicles
2023 Ford F150 Lightning Lariat ER
getvar setvar ??? as in a way to program or save/retriev variables within Car Scanner???? If there is such a thing or meant to be such a thing and I didn't know about I'll feel stupid AF. Tell me more please. Did you notice that Stan (the developer) updated the graphics and front end of CarScanner a few months ago, a lot of stuff changed, the "Energy Used" must have been added or fixed otherwise I would've seen it and played with it pre-new version. The new version broke a lot of my stuff, I have a LOT of custom PIDs talking to a module for the Charge While Driving stuff I am testing and exporting/importing PIDs and dashboards has never worked well, especially between different Android platforms.

Did you notice that the "Reset" Action PID that resets the trip stuff built in to Car Scanner does not reset the "Energy Used" This is very unfortunate. I have emailed him to ask if this is intentional and/or if he can fix it.
Yeah I had some issues and noticed it looked different. Hadn't tried the energy used until recently but the custom pid I created to track the average mi/kWh seems to track with what's displayed on the IPC. Haven't actually tried using the setvar/getvar yet but ran across when asking chatgpt about averaging efficiency over a set period (last 15-20 miles or so). Seems getvar/setvar could be pretty useful. I may tinker with trying the regen v power draw when I get some time since I've just been exporting the carscanner data and manually filtering/comparing the past couple trips.

Custom sensors (PIDs) – Car Scanner ELM OBD2
SetVar(key,value) – store in memory some value. Car Scanner has a key-value dictionary, that is shared for all pids. Key – any integer number, e.g. 0, 1, 2, 3, 9999. Value – any value, e.g. 45.24. Returns the same value.
SetVarOnce(key,value) – store in memory some value, ONLY if it is not stored there yet (with the same key). Returns the same value.
GetVar(key,default_value) – get value from dictionary previously set by SetVar or SetVarOnce. If value doesn’t exist in shared dictionary yet, returns default value. Example: GetVar(123,789.244) – returns value, stored in key 123, but if there’s no value with such key it returns 789.244

chatgpt
Example 2: Rolling average (the classic use case)

Say you’re calculating rolling mi/kWh and want smoothing.

Step 1: Accumulate distance

SetVar(dist_sum, GetVar(dist_sum) + {Distance travelled})

Step 2: Accumulate energy

SetVar(energy_sum, GetVar(energy_sum) + {Energy used})

Step 3: Rolling efficiency

GetVar(dist_sum) / GetVar(energy_sum)

⚠ This will accumulate forever unless you reset (more on that below).


Example 4: Manual reset logic (super useful)
You can reset vars when a condition changes, like ignition off → on.

Example: Reset when speed = 0 and SOC increases (charging event).

SetVar(
dist_sum,
if({Speed} < 1 && {State of charge} > GetVar(last_soc),
0,
GetVar(dist_sum) + {Distance travelled}
)
)

And track last SOC:

SetVar(last_soc, {State of charge})

4️⃣ Separate regen vs discharge (Lightning gold)

Problem: Split regen energy from traction energy.

Traction energy (positive draw)

SetVar(
discharge_kwh,
if({Battery power} > 0,
GetVar(discharge_kwh) + {Battery power} / 3600,
GetVar(discharge_kwh)
)
)

Regen energy
SetVar(
regen_kwh,
if({Battery power} < 0,
GetVar(regen_kwh) + abs({Battery power}) / 3600,
GetVar(regen_kwh)
)
)

Display:
GetVar(regen_kwh)

⚠ Assumes Battery power in kW and update rate ≈ 1s.
Sponsored

 
 







Top