Gryo Setup

My team is looking into using a gyro and I know how to wire it but what I’m not sure is how to mount it onto the robot. How would you go about mounting the gyro onto the robot?

Is there an option to “plug” the gyro into the steering output you have created? If so, use a PWM so you can connect your speed controller to it. I’ve only used mini ones, so your’s should have more capabilities than mine. Since it is more advanced you may not be able to use this option, but give it a shot.

Use the mounting holes in the PCB secure it to a non-conducting surface (Lexan, plywood, etc). Don’t torque it down too hard.
*
*

Talking about mounting gyro, since the gyro and the accelerometer are together (I know you can separate them but it’s nice to be in one piece), I am wondering how the other teams mount them onto the robot regarding shock absorbing. A few years ago, we were forced into a situation that we need to use the accelerometer in place of the encoders to determine the distance travelled. That means doing double integration of the accelerometer values. It was terrible because the sensor picked up so much noise when the robot is moving. Not that we will attempt again, but I am always wondering if adding shock absorbing material to the mount would improve the situation. In theory, it might help the gyro as well.

It depends on how you want to use it. The gyroscope sensor senses rotation in the plane of the board, so if you want to sense the robot turning, put it level somewhere on the robot. It doesn’t matter a whole lot where, but you may want to center it (seems like this shouldn’t be an issue at all…). If you want to use it to measure the robot tipping, say, forward and back, you would mount it vertically to put that rotation in plane with the sensor.

If you want to try and balance this way I would suggest using the accelerometer since this will give you an absolute “heading” of sorts, whereas the gyro only gives rate which must be integrated to get heading. The software does this for you, but since all you care about is the heading, the accelerometer is better suited.

Alternatively, velcro or dual-lock can work well, and still isolates it from the frame.

The accelerometer doesn’t give you “absolute heading”, it gives you the G force that was applied to each axis. It’s perfect for detecting tilt using the Z-axis because if you are flat on the ground, the Z-axis will read 1 G. But if you are tilted then by applying physics to split the G force vector into two vectors (one perpendicular to the accelerometer: the Z-axis, another parallel to the surface of the accelerometer), you can see the Z-axis will have a value smaller than 1 G. The more it is tilted, the smaller the Z-axis value). So to determine the tilt angle, you can do an arccosine to the Z value.

Precisely. This is what I was suggesting.

Arctangent actually.

Actually, ArcCosine :slight_smile:

Actually, NO.

You have to make me do some work :slight_smile:

Tilt.jpg


Tilt.jpg

Thanks for all the help guys, got the gyro up and running by the end of yesterday’s work day. :smiley:

It actually gives you exactly the acceleration applied to each axis, including:
-The acceleration of gravity
-The acceleration of the robot when it accelerates/decelerates (moves)
-The acceleration of the robot when the bridge moves up/down

What happens when you move? When the bridge moves? You will get acceleration other than gravity.

Your solution assumes all of the signals represent the same gravity vector. In reality, there are more acceleration vectors which affect the accelerometer, making it a poor choice for bridge balancing while you and the bridge are moving.

I think Team 1501 put their yaw rate sensor (“gyro”) in a small box of Silly Putty in the middle of their robot a couple of years ago.

I think Team 1501 put their yaw rate sensor (“gyro”) in a small box of Silly Putty in the middle of their robot a couple of years ago.

Yes we do and it works great.