en:iot-open:hardware2:sensors_angle
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:hardware2:sensors_angle [2023/10/02 18:00] – pczekalski | en:iot-open:hardware2:sensors_angle [2024/05/23 22:44] (current) – pczekalski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Angle & Orientation Sensors ==== | + | ====== Angle & Orientation Sensors ====== |
| + | {{: | ||
| + | == The Inertial Measurement Unit (IMU) == | ||
| - | ===Potentiometer=== | + | An IMU is an electronic device |
| - | A potentiometer is a type of resistor, the resistance of which can be adjusted using a mechanical lever. The device consists of three terminals. The resistor between the first and the third terminal has a fixed value, but the second terminal is connected to the lever. Whenever the lever is turned, a slider of the resistor is moved; it changes the resistance between the second terminal and side terminals. Variable resistance causes the change of the voltage, which can be measured to determine the position of the lever. Thus, the potentiometer output is an analogue value. | + | |
| - | + | ||
| - | Potentiometers are commonly used as a control level, for example, a volume level for the sound and joystick position. They can also be used to determine the angle in feedback loops with motors, such as servo motors. | + | |
| - | + | ||
| - | <figure label> | + | |
| - | {{ : | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | <figure label> | + | |
| - | {{ : | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | <figure label> | + | |
| - | {{ : | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | An example code: | + | |
| - | <code c> | + | |
| - | + | ||
| - | // | + | |
| - | int potentioPin = A0; | + | |
| - | //The analogue reading from the potentiometer output | + | |
| - | int potentioReading; | + | |
| - | + | ||
| - | void setup(void) { | + | |
| - | //Begin serial communication | + | |
| - | Serial.begin(9600); | + | |
| - | // | + | |
| - | pinMode(potentioPin, | + | |
| - | } | + | |
| - | + | ||
| - | void loop(void) { | + | |
| - | //Read the analogue value of the potentiometer sensor | + | |
| - | potentioReading = analogRead(potentioPin); | + | |
| - | Serial.print(" | + | |
| - | Serial.println(potentioReading); | + | |
| - | delay(10); | + | |
| - | } | + | |
| - | </ | + | |
| - | + | ||
| - | ===The Inertial Measurement Unit (IMU)=== | + | |
| - | + | ||
| - | An IMU is an electronic device | + | |
| * moving forward/ | * moving forward/ | ||
| * moving left/right, | * moving left/right, | ||
| Line 56: | Line 12: | ||
| * yaw left and right. | * yaw left and right. | ||
| - | A **gyroscope** is a sensor that measures the angular velocity. | + | A **gyroscope** is a sensor that measures the angular velocity. |
| Gyroscope sensors are used in aviation, navigation and motion control. | Gyroscope sensors are used in aviation, navigation and motion control. | ||
| Line 64: | Line 20: | ||
| A **magnetometer** is a sensor that can measure the device' | A **magnetometer** is a sensor that can measure the device' | ||
| - | Different elements allow measuring linear accelerations, | + | Different elements allow measuring linear accelerations, |
| + | \\ The latter automatically calculates additional information like gravity vector and absolute orientation expressed as an Euler vector or a quaternion. The sample connection circuit for the BNO055 sensor is present in figure {{ref> | ||
| - | < | + | < |
| {{ : | {{ : | ||
| < | < | ||
| </ | </ | ||
| - | < | + | < |
| {{ : | {{ : | ||
| < | < | ||
| </ | </ | ||
| - | < | + | < |
| {{ : | {{ : | ||
| < | < | ||
| </ | </ | ||
| - | < | + | < |
| {{ : | {{ : | ||
| < | < | ||
| Line 118: | Line 75: | ||
| </ | </ | ||
| - | <note important> | + | <note important> |
| - | <note important> | + | <note important> |
en/iot-open/hardware2/sensors_angle.1696258847.txt.gz · Last modified: by pczekalski
