Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Chassis CAN Logging To ASCII Text Plus Graphing

This site may earn commission on affiliate links.
Would be ideal if we could find an (otherwise insignificant) CAN message to trigger the recording period. In my Subaru days we used the switch for the rear defroster to trigger logging. Maybe something like that is available ? (Seat heater, fog lamps, ??) This would allow arbitrary logging periods enabled by user input.

Also, I don't know if its feasible at these data rates, but realtime export via USB to a laptop would ease the storage limitation.

yak-55

Unfortunately nothing so benign is on the power train CAN on the Model S. :(

I think maybe it could be a dance with the cruise control speed setting or something. That's probably the best we can hope for as far as something not too intrusive on the power train bus.
 
Also, I don't know if its feasible at these data rates, but realtime export via USB to a laptop would ease the storage limitation.

yak-55

That's pretty straight forward, a high speed CAN reader, and something like SavvyCAN works (this is my set up using an EVTV supplied box).

I then have to replay the logs through a parser to get a "Cross tabbed" data set, which is the beauty of Bill's device, and something I'm emulating in my data structures.

The down side is that even with a good logger you would generate huge data sets if captured raw (I think a one minute capture was >5MB). I'm looking at bypassing this stage and making a console app that filters just the messages I am interested in, but also capable of running periodically (e.g. every minute) to pickup the battery charges, so I can leave it overnight to pick up the complete slow charge cycle.


I've just about finished messing with welders and plasma cutters (and have a "double barrel chiminea" for my efforts :) ) so should be able to put some effort in over the course of next week.
 
Below are the first 4 runs on my logger. My SP90DL has 19" Primacy tires at 44 PSI. The road was dry, but each run had some wheel spin, especially run 3 (big time). The least amount of wheel spin was on run 4, which was the best run. Next I'll post the plots that focus on the wheel spin.

run 1a.png

run 2a.png

run 3a.png

run 4a.png
 
Last edited:
  • Like
Reactions: benjiejr
Wow great data set, run 4 shows a 0-60 in ~3.05.

i was expecting to see higher torques but it looks like 450 ft-lbs at the rear is still the limit.

It looks like the current ramps-down after 6.5 to 7.5 seconds at around 92 mph, quite noticeable on run 4, probably something getting warm after being ridden hard and put away wet.
 
I edited my previous post above and replaced the plots of run 2, 3 and 4 to add the SoC and other Bat info (that was the only change).

- - - Updated - - -

Below, I adjusted the rear motor RPM scale to overlay the MPH (which I assume is from the front wheels). This shows wheel spin. As the wheels spin, the traction control system apparently reduces the torque (to both front and rear wheels even though only the rear is slipping!). This is the most apparent in run 3 where the wheel spin was so bad that the front wheel torque was cut to zero before the rear wheels recovered from slipping, after which the full torque was reapplied to both front and rear wheels by the traction control system.

I'm thinking that overly reducing the torque to the front wheels is a safety factor, since steering control is crucial.

run 1b.png

run 2b.png

run 3b.png

run 4b.png
 
  • Like
Reactions: benjiejr
You also have to eliminate front torque when you have rear slippage to protect your wheel speed (for TC slip determination). The TC is so quick that vehicle yaw is really not possible.
Yes, right on! That makes more sense than my guess that the reason is safety. Obviously, if both front and rear are slipping the same amount, the TC would think there was no slipping and not reduce power at all.

In fact, looking again at the shape of the curves in run 3, both front and back may have actually been slipping. Another thought is that the TC may be triggered by rate of change in wheel speed and not the difference in speeds.

My best run (run 4) could have been 2.8 sec 0-60 with rollout. I'm now temped to try reducing tire pressure (from 44 PSI) and see if it hooks up to the road better.
 
Yes, right on! That makes more sense than my guess that the reason is safety. Obviously, if both front and rear are slipping the same amount, the TC would think there was no slipping and not reduce power at all.

In fact, looking again at the shape of the curves in run 3, both front and back may have actually been slipping. Another thought is that the TC may be triggered by rate of change in wheel speed and not the difference in speeds.

My best run (run 4) could have been 2.8 sec 0-60 with rollout. I'm now temped to try reducing tire pressure (from 44 PSI) and see if it hooks up to the road better.

great data Bill, and graphs look pretty similar to p85d, yes. I'd like to overlay them if ok. Pm me your email and I'll create you a directory on the share you can write into. Alternatively where could I pull the data from and/or want to do this yourself?

Rep in your inbox ;-)

thanks, Mike
 
@MikeB, re: step integration, i was doing the same procedure that wk057 described except using Rrpm instead of mph to calculate the distance travelled in feet--both should give about the same answer, so it makes a good way to check for a closed solution.

His method is probably easier when hungover since i had to convert to revs, multiply by gear ratio, and then multiply by pi() x tire diameter before doing the moving sum. i can send you the file or upload to the shared if you want.

cheers, kenny
 
great data Bill, and graphs look pretty similar to p85d, yes. I'd like to overlay them if ok. Pm me your email and I'll create you a directory on the share you can write into. Alternatively where could I pull the data from and/or want to do this yourself?

Rep in your inbox ;-)

thanks, Mike
I'm looking forward to seeing your plot overlays. I sent you a PM with my email address for the Google Drive access. Let me know after you've set up the Bill D folder and I'll write my data into it. I'm also experimenting with spreadsheet changes which I'll share in the folder.
 
@MikeB, re: step integration, i was doing the same procedure that wk057 described except using Rrpm instead of mph to calculate the distance travelled in feet--both should give about the same answer, so it makes a good way to check for a closed solution.

His method is probably easier when hungover since i had to convert to revs, multiply by gear ratio, and then multiply by pi() x tire diameter before doing the moving sum. i can send you the file or upload to the shared if you want.

cheers, kenny

Thanks Kenny,

Yea - I was doing it from RPM and had PI*D and a whole bunch of other things in it - though no magic 5280. If you PM me your email - I'll setup s folder for you too and we can share. Thanks, Mike

- - - Updated - - -

I'm looking forward to seeing your plot overlays. I sent you a PM with my email address for the Google Drive access. Let me know after you've set up the Bill D folder and I'll write my data into it. I'm also experimenting with spreadsheet changes which I'll share in the folder.

you should have an email from me/google drive with edit access to the new BillD directory :)

- - - Updated - - -

I've got four meg on the device and can easily bump the data file up in size. This does bring about longer erasure times.

I would happily make this trade off. Also, if you could make a version with this - could you add the code to make it start/stopping logging via the switch please Bill?
 
thanks. Hungover brain struggling on the 5280 number...? Is this one of those inches/feet things?

Yup, 5280 = feet in 1 mile. Otherwise you'd end up with distance traveled in miles, which would be very small.

I'm reading this thread, even though I'm understanding perhaps 10% of what is being written. My hat is off to you guys who have such a deep and thorough understanding of this stuff, the math, the physics, etc.

Which is why the above just cracked me up!
 
Electrical vs Mechanical Horsepower

Here's another look at lolachampcar's FF 0-60 run1 from the other day to compare the input electrical power to the developed mechanical power (in HP). The difference between these two would be a measure of the losses in the system, e.g. energy conversion, heating, gearbox, etc...

So the electrical power in Watts is Volts x Amps, then divide by 746 to convert Watts to HP. This is the top line (green) in the chart, elec hp.

i took the Rrpm x RTorque/5250 to get Rear Motor Mechanical HP. i used F:R gear ratios x Rrpm to get Frpm, then mult by FTorque/5250 to get F Mech Hp. Then added F+R to get a total motor mech hp(blue line). i'm always open to suggestion on some other method to get Frpm. HP on the left, speed in mph on the right.

lcc_run1ff_hp.png


update:
oh yeah if we had the weights of the car+driver, then the actual output HP at the wheel could be calculated using the speed. Then a comparison of input electrical power, developed mechanical power, and output delivered-to-the-road power could be shown.
 
Last edited:
  • Informative
Reactions: benjiejr
Electrical vs Mechanical Horsepower
Can you add another data series "1 - Efficiency" ("Loss %"?) using the same right axis (10 - 70) but measured in percentage with the following formula: ({elec hp} - {F+R mech hp})/{elec hp}?

I think I'm seeing (worst?) 21% at 1790.5 and (best?) 12% at 1793.5. It would be interesting to see it plotted across the time range.

Thanks.
 
Has anyone graphed DI_dissipation, DIS_dissipation, and/or BMS_powerDissipation? That should be interesting. Presumably these numbers are for the heat being generated inside the relevant items.

- - - Updated - - -

So, I'm not certain of this, just speculation......... but I may have stumbled upon the demo car performance not equaling production car performance configuration variable....

Code:
performanceDemoMode = false
performanceDemoRequest = Max

I'm going to change performanceDemoMode to true on my car using root and log a run or two and see if it makes any difference. Edit: I didn't see this variable before the Ludicrous upgrade.
 
  • Like
Reactions: benjiejr
So, I'm not certain of this, just speculation......... but I may have stumbled upon the demo car performance not equaling production car performance configuration variable....

Code:
performanceDemoMode = false
performanceDemoRequest = Max

I'm going to change performanceDemoMode to true on my car using root and log a run or two and see if it makes any difference.


That would be completely crazy. Therefore, I believe it is likely to be the explanation.