02-14-2014 11:16 PM
Hello,
I'm from team 3053 and I’m asking for help making an auto leveling system for our part on our robot. It is kind of like a scissor lift. We are using two motors to control it.
Can someone assist me in doing this please. I attached our code that we have right now.
So basically, we have two motors, one is controlling the right side, one is controlling the left side. When both motors are moving, the scissor lift like mechanism raises. we wanted to attach a gyroscope to the bottom of it to automatically adjust the speed of the motors as we manually raise it with a button.
02-17-2014 08:35 AM
To do leveling you will want to use the accelerometer not the Gyro.
The accelerometer has an x,y and z axis that detect acceleration.
If you robot is not moving the largest acceleration detected will be gravity.
If you orientate the accelerometer so the z axis is exactly perpendicular to the floor it will read a value and the x and y values will be close to zero.
When the accelerometer is tilted the x and y axis will increase and the z will decrease.
Using trigonometry and physics you can figure out the angle of tilt and send motor commands to level the platform.
There is an example of using accelerometers to get you started.
11-06-2014 12:04 PM
Hi Mark,
I am new to this and am looking to create a stabilization platform for a small camera. Do yo know of any examples or have any that I can get ideas from? I am waiting on my crio student kit and am hoping to start messing with it soon.
Thanks!