RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Calculated channel - brake bias
Author Message
Reply with quote
Post Calculated channel - brake bias 
I have a twin master cylinder brake set up with a balance bar, and two pressure sensors for front and rear brake line pressure
Has anyone with a similar setup created a calculated / math channel to work out brake balance from these inputs? Would be really useful for set up, either in the form of two dials showing front and rear as percentages, or one dial thatís part red part green showing percentage with a number under in..

Obviously thereís more to it than just Pf / (Pf + Pr) but itís more how to set up so it displays properly..
I wouldnít want it showing in real time per-se more just a screen I can go to when initially dialing a car in before headed out on track

View user's profile Send private message
Reply with quote
Post  
I'm not a lua expert but i'll try to help. If your pulling two analog channels then try this from the Lua Scripting examples. you'll end up with a virtual guage that will show front bias as a percent of front plus rear. should get you started in the right direction. prior to all this technology I've always set my bias in the shop by pressing the pedal until the frt guage showed 300, then read the rear psi. I have a feel for what I need the rear to be at 300psi frt as a starting point. works as a simple check if for say last race you turned the knob like crazy. Dave

--10Hz update
setTickRate(10)

--Create channel: "BrakeBias"
--Sample rate: 10Hz
--Logging precision: 0 decimal points
--min/max: 0/100
--Units: "%"
--getAnalog(0) is Front brake press sensor channel
--getAnalog(1) is Rear brake press sensor channel
avgId = addChannel("BrakeBias", 10, 0, 0, 100, "%")

function brakeBias()
local a1 = getAnalog(0)
local a2 = getAnalog(1)
setChannel(avgId, (a1 / (a1+ a2))
end
end

function onTick()
brakeBias()
end

View user's profile Send private message
Reply with quote
Post  
Hi, yeah, have done it, though with another brand display and a bargraph element instead of a dial...
Next to the formula you posted already I used a minimum pressure, before calculation is perfomed (something like "If brakepress front is greater than 3 bar then calculate value, else value = 50%... or zero... whatever you prefer).
That helps to rule out a division by zero (assuming rear press can't be negative Wink) and from a visual point of view I also prefer it as with very low pressures the number/dial would be useless nervous anyway.

I'm not sure why you have in mind to use two dials when you already have the percentage front-to-rear calculated?! With the minimum/maximum of the calculated parameter being either 0 and 100 or whatever you want the dial will point straight up in the middle when you have 50% brakebias, and you can easily observe how the bias moves around with varying pressures, before even dialing in the bias.
Of course you can set other MIN/MAX to have you prefered bias straight in the middle of the dial as well, for even less brain work (if you know your car wants 60% front distribution then arrange MIN/MAX so that the 60% value is right in the middle of the scale for example.

View user's profile Send private message Visit poster's website
Reply with quote
Post  
My comment re: two dials is basically showing front and rear on separate gauges. This is raw pressure though, and Iíd like to get to percentage (ie taking into account piston sizes, numbers, pads, disc sizes etc - effectively calculating brake torque % (f vs r) calculated from line pressures

This isnít as something to monitor or use regularly - itís just for set up to ďre zeroĒ the car or for reference once I had a good setting for a particular track / conditions

My plan would be to press the pedal to a reasonable pressure with the ABS off and then adjust and repeat to get close to the right setting before heading out in the car / taking it to the track

View user's profile Send private message
Reply with quote
Post  
Sorry, also meant to say thanks for the pointer - I will have a go at setting something up this week

View user's profile Send private message
Reply with quote
Post  
This has become a bit more of a lua question so will repost in that section of the forum to get some input there, but hopefully have a solution if anyone else needs this option

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum