Help leveling a platform - Page 1
Forum section: electronics / beginners

author: eNinja
author_rank: Contributor
timestamp: September 11, 2016, 08:38:06 am
content: Hi guysIve been trying to solve the following problem:Basically i have a platform with 4 lifts/motors and i want to level it but i only have access to the following info:-The amount the legs have extended, and the pitch and roll of the platform (in degrees).The only way i can think of doing it is checking the pitch and roll and then adjusting as follows:If the pitch of the platform is outside of the level threshold, lift a leg and a see if it improves or makes the the pitch worse. If it improves it keep lifting that leg, if it makes it worse reverse it a little and move to the next leg.Repeat the same on each leg for correcting the roll.Once everything is level the platform will start to raise all four legs up and down together.Though this logic doesnt work right, it will work if the surface its on is relatively flat (eg. just pitch is out) , but if its on a surface thats very uneven on all four legs it doesnt seem to be able to reach level.Im guessing my solution is wrong, there is probably a better way for me to be adjusting the legs (maybe in stages or using pairs) but i dont know how.If you can help me i would appreciate it very much

author: Ian.M
author_rank: Super Contributor
timestamp: September 11, 2016, 09:55:27 am
content: First you need an algorithm for making sure all the feet are in contact. This is extremely difficult with no load sensors in the legs. Even if all you can sense is motor current, that would be most helpful. Without load sensing, I would suggest extending one leg at a time and seeing if any tilt is detected. If not, it cant have been in contact. If it tilts, back up till it stops moving. If you've got load sensing, you can determine which leg is redundant, (i.e. the center of gravity (CG) is between the other three legs), by lifting each in turn slightly then returning it to its original position, and calculate the approx CG, then distribute the load as evenly as possible between the redundant leg and the two legs nearest to it.Then, assuming the legs are on a rectangular footprint, adjust a pair of diagonally opposite legs in opposite directions to minimise tilt about that diagonal and repeat for the other pair.

author: SL4P
author_rank: Super Contributor
timestamp: September 11, 2016, 10:56:52 am
content: Also consider that you need to normalise all the legs within their range of extension, otherwise you'll run to the limits - and nothing will happen.

author: eNinja
author_rank: Contributor
timestamp: September 11, 2016, 12:01:40 pm
content: Quote from: Ian.M on September 11, 2016, 09:55:27 amIve got code to check that the feet are making contact with the ground, simply a true or false for each leg. I might have load sensing but im expecting that it won't be accurate so i don't want to rely on the actual force values.I will also be able to tell if the legs are either fully extended or fully retracted.i should also mention this is a simulation in code at the moment, no device has been built yet.So if i can check if each foot is making contact, then if i understand you correctly i should check the diagonal legs, adjust one at a time to see if its affecting the tilt, then move to the next diagonal and do the same ?

author: Ian.M
author_rank: Super Contributor
timestamp: September 11, 2016, 12:22:05 pm
content: No, Once all the feet are in contact, you adjust a diagonal pair at a time in opposite directions, so all the legs remain in contact and it tilts about an axis between the feet you are not adjusting. You drive the active legs to minimise the tilt about the diagonal axis between the currently fixed pair of feet. Repeat for the pair on the other diagonal and iterate till the tilt is within your required tolerance.If you detect loss of contact for any foot at any time for longer than a moment, you need to return to the 'get all feet in contact' routine.Its not too tricky on a reasonably uniform hard surface but on difficult surfaces e.g. randomly raked deep pea gravel) you will have to contend with the feet shifting.

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 11, 2016, 01:03:57 pm
content: what is this for? 4 legged walking creature? or 3d printer platform?

author: eNinja
author_rank: Contributor
timestamp: September 11, 2016, 01:15:53 pm
content: Quote from: Mechatrommer on September 11, 2016, 01:03:57 pmA motion platform. Like one that you would connect to a racing game.

author: eNinja
author_rank: Contributor
timestamp: September 11, 2016, 01:18:48 pm
content: The code is not for levelling the hardware platform though, its for levelling what its going to represent in the software.