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/11/18 18:07] – pczekalski | en:iot-open:hardware2:sensors_angle [2024/05/23 22:44] (current) – pczekalski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Angle & Orientation Sensors ====== | ====== Angle & Orientation Sensors ====== | ||
| - | + | {{: | |
| - | == Potentiometer == | + | |
| - | 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. The potentiometer symbol is present in figure {{ref> | + | |
| - | + | ||
| - | <figure potentiometer1> | + | |
| - | {{ : | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | <figure potentiometer2> | + | |
| - | {{ : | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | <figure potentiometer3> | + | |
| - | {{ : | + | |
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | 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) == | == The Inertial Measurement Unit (IMU) == | ||
| - | An IMU is an electronic device | + | An IMU is an electronic device |
| * moving forward/ | * moving forward/ | ||
| * moving left/right, | * moving left/right, | ||
| Line 55: | 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. | ||
| - | An **accelerometer** measures the acceleration of the object. The sensor uses microelectromechanical system (MEMS) technology, where capacitive plates are attached to springs. When acceleration force is applied to the plates, the capacitance is changed; thus, it can be measured. Accelerometers can have 1 to 3 axes. The 3-axis accelerometer can detect the device' | + | An **accelerometer** measures the acceleration of the object. The sensor uses microelectromechanical system (MEMS) technology, where capacitive plates are attached to springs. When acceleration force is applied to the plates, the capacitance is changed; thus, it can be measured. Accelerometers can have 1 to 3 axes. The 3-axis accelerometer can detect the device' |
| Accelerometers measure objects' | Accelerometers measure objects' | ||
| Line 64: | Line 21: | ||
| 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> | + | \\ 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> |
| <figure imu6050> | <figure imu6050> | ||
en/iot-open/hardware2/sensors_angle.1700323661.txt.gz · Last modified: by pczekalski
