Esk8 calculator

I put up a new calculator at https://calc.esk8.news

It has a similar model to @saul’s that used to be at calc.esk8.today

Let me know if you think it could be better :smiley:

23 Likes

Super cool @b264

3 Likes

This is great Brian, thank you.

Did you make that logo yourself?

2 Likes

No; a computer made it.

4 Likes

Hahaha, nice one !

And good job on the calculator by the way. But who did the code review for it ??? :wink:

Is it possible to get a midichlorian count feature?

1 Like

Fucking George Lucas. Why explain the force through little creatures that choose whether to live in you or not. What a cock.

1 Like

You could implement some of your tests with it. If you do anything below 10s it reports back “You have MRSA”

2 Likes

We have a beta unit with this as a hidden built in random number generator test haha shh don’t tell the FDA they have 0 humor stats.

3 Likes

That is great and love that fact you can switch from volts to C rating because that is super helpful if you are using LIPO as they usually have the C rating for discharge.

You’re doing the code review :stuck_out_tongue_winking_eye:

1 Like

I don’t ever recommend using C-rating and the only reason I put that there is because the old one had that there. You’re better off just typing your own current numbers in there.

4 Likes

Damn broski. Thanks!!

2 Likes

The root cause of the problem is that the C-ratings are almost meaningless as they are mostly marketing jive. It’s at that point where you move from “science” to “guessing”, as evidenced by one line in the source code:

miToKm:number = 1.609344;
lipoManufacturerExaggerationFactor:number = 5.25;
pi:number = Math.asin(1)*2;
1 Like

If you send me a spreadsheet in .ods format with inputs and output formulas, I will make a tab for that.

1 Like

@b264 how about a “peak loaded velocity & gear ratio calculator” for those uphill races?


suppose i’ll be climbing 1.8miles on a steady 5% grade…

i have 4x 190kv 0.05ohm motors & 83mm tires, 120a motor current and 60a battery current limit per motor, & 13S (48.1v)

what’s my maximum top speed up slope and what gear ratio gives this top speed assuming 0.6m^2 frontal area, 0.75 drag coefficient & 200lbs?


assuming battery current limit is 95% or less than the motor current limit, and a vesc with max 95% duty cycle is used in BLDC mode:

60a battery limit / 95% duty = 63.1578a motor current at peak mechanical power

63.1578a^2 * 0.05ohm = 199.445385042w copper loss per motor at peak mechanical power

60a battery limit * 48.1v battery = 2886w electrical power at peak mechanical power per motor

2886w peak electrical - 199.445385042w copper loss = 2686.554614958w peak mechanical power per motor

2686.554614958w peak mechanical power per motor * 4 motors = 10746.218459832w peak mechanical

60 / (190kv * 2 * pi) = 0.05025945571323010603228Nm per motor amp

63.1578a * 0.05025945571323010603228Nm per motor amp = 3.174276652045044390766 Nm torque at peak mechanical power

2686.554614958w peak mechanical / 3.174276652045044390766 Nm = 846.3517548878964569933rad/sec @ peak mechanical

(60 / (2 * pi)) * 846.3517548878964569933rad/sec = 8082.063923094534641801 motor rpm @ peak mechanical power

^peak mechanical power is 10746.218459832w @ 8082.063923094534641801 motor rpm

A = meters per second = XX.XXX
B = drag coefficient = 0.75
C = frontal area = 0.6m^2
D = fluid density of air = 1.225kg/m^3
E = wind drag force in watts
F = sine of 5% slope = sin(atan(5/100)) = 0.04993761694389223373491
G = acceleration of gravity = 9.80655m/s^2
H = vehicle mass in kg = 90.7184kg = 200lb / 2.20462lb/kg
I = mechanical watts required for constant speed up slope with no wind drag
J = mechanical watts required for constant speed up slope including wind drag
K = H * G * F
L = (1/2) * D * C * B

E = ((1/2) * D * C * (A^2) * B) * A

I = H * G * A * F

J = E + I

J = (((1/2) * D * C *(A^2) * B) * A) + (H * G * A * F)

J = (1/2) * D * C * B * A^3 + H * G * F * A

J = (L * A^3) + (K * A)

^this can be rearranged to:

A=(sqrt(3) * sqrt(27 * J^2 * L^4 + 4 * K^3 * L^3) + 9 * J * L^2)^(1 / 3) / (2^(1 / 3) * 3^(2 / 3) * L) - ((2 / 3)^(1 / 3) * K) / (sqrt(3) * sqrt(27 * J^2 * L^4 + 4 * K^3 * L^3) + 9 * J * L^2)^(1 / 3)

we know:

J = 10746.218459832w peak mechanical
L = 0.275625 = (1/2) * D * C * B
K = 44.42622815547907982077 = H * G * F

therefore:

A=(sqrt(3) * sqrt(27 * 10746.218459832^2 * 0.275625^4 + 4 * 44.42622815547907982077^3 * 0.275625^3) + 9 * 10746.218459832 * 0.275625^2)^(1 / 3) / (2^(1 / 3) * 3^(2 / 3) * 0.275625) - ((2 / 3)^(1 / 3) * 44.42622815547907982077) / (sqrt(3) * sqrt(27 * 10746.218459832^2 * 0.275625^4 + 4 * 44.42622815547907982077^3 * 0.275625^3) + 9 * 10746.218459832 * 0.275625^2)^(1 / 3)

A=32.32551993764664323864 meters per second

^therefore the peak velocity up slope is 32.32551993764664323864 meters per second

72.31024856931928212624mph = 32.32551993764664323864 meters per second * 2.23694 mph per m/s

^72.31mph is the maximum possible top speed up 5% slope w/ 200lbs, 0.75 drag coefficient, 0.6m^2 frontal area, 4x 190kv 0.05ohm motors & 120a motor current limit & 60a battery current limit per motor w/ 48.1v battery

therefore we need:

8082.063923094534641801 motor rpm @ peak mechanical power @ 72.31024856931928212624mph w/ 83mm tires

83mm * pi = 260.7521902479528387924mm per rotation

1mph = 0.44704 meters per second

72.31024856931928212624mph * 0.44704 meters per second per mph = 32.32551993764664323864 meters per second

32.32551993764664323864 meters per second * 1000mm per meter = 32325.51993764664323864mm per second

32325.51993764664323864mm per second / 260.7521902479528387924mm per rotation = 123.9702719540260136714 tire rotations per second

123.9702719540260136714 tire rotations per second * 60 seconds per minute = 7438.216317241560820284 wheel rpm required for 72.31024856931928212624mph @ 83mm tire diameter

8082.063923094534641801 motor rpm / 7438.216317241560820284 wheel rpm = 1.086559408652925905457 gear ratio

^1.08:1 gear ratio is needed to obtain maximum possible 72.31mph top speed up 5% slope w/ 200lbs, 0.6m^2 frontal area, 0.75 drag coefficient, 4x 190kv 0.05ohm motors, 83mm tires, 120a motor current limit, 60a battery current limit per motor & 48.1v (13S) battery

answer:

72.31mph & 1.08:1 gear ratio

^graphed out it looks about like this 25T wheel & 23T motor = 1.088:1 ratio for ~72mph up 5% slope w/ 4x 190kv 0.05ohm, 83mm tires, 120a motor current and 60a battery current limit per motor, 13S (48.1v) w/ 200lbs, 0.6m^2 frontal area and 0.75drag coefficient.

8 Likes

Good god I am so hard right now.

8 Likes

I think my brain fell out of my head

3 Likes

It will probably help if you use the markdown to break the entire analysis into heading, sub headings, sub sub heading, bullet points etc. People are not generally inclined to read a wall of text unless there is an outline of what they are about to read.

1 Like

I can directly turn a spreadsheet into an online calculator. A wall of text would take me 8 hours to turn into a calculator

3 Likes