AlphaBot: Lane tracking with camera: Unterschied zwischen den Versionen
| Zeile 112: | Zeile 112: | ||
The GY-85 IMU sensor measures the yaw rate which helps determine the yaw angle. | The GY-85 IMU sensor measures the yaw rate which helps determine the yaw angle. | ||
Formula for yaw angle. | |||
\[ | \[ | ||
\theta(t) = \theta_0 + \int_{0}^{t} \omega(t)\, dt | \theta(t) = \theta_0 + \int_{0}^{t} \omega(t)\, dt | ||
\] | \] | ||
\[ | \[ | ||
\theta_k = \theta_{k-1} + \omega_k \cdot \Delta t | \theta_k = \theta_{k-1} + \omega_k \cdot \Delta t | ||
Version vom 25. März 2026, 11:16 Uhr

| Autor: | Syed Muhammad Abis Rizvi |
| Art: | Praxissemester |
| Studiengang: | ELE |
| Starttermin: | 02.03.2026 |
| Abgabetermin: | 21.06.2026 |
| Betreuer: | Prof. Dr.-Ing. Schneider |
| Sprache: | DE EN |
Introduction
This is an Alphabot by waveshare which supports advanced navigation and sensing features. In this project our task is to drive the Alpha bot with in the right lane along the course by using a pixy2 camera and modify its speed limit. We also added a GY-85 gyroscope IMU sensor to record the Yaw rate so that we can later calculate the yaw angle from the yaw rate data, later we plan to add a Bluetooth module to get the data wirelessly.These components works together so that Alpha bot can drive independently in real time.
Requirements
| Req. | Description | Priority |
|---|---|---|
| 1 | An AMR must drive autonomously in the right-hand lane. | 1 |
| 2 | The Topcon Robotic Total Station is used as the reference measurement system. | 1 |
| 3 | The AMR must evaluate the road data via camera (Pixy 2.1) to follow the lane. | 2 |
| 4 | The reference values must be recorded with MATLAB (x, y, ). | 1 |
| 5 | Measurement errors must be appropriately filtered. | 1 |
| 6 | The two-dimensional digital map showing the robot's pose during movement must be provided as a MATLAB® file (.mat). | 1 |
| 7 | The solution path and solution must be documented in this wiki article. | 1 |
| 8 | An AlphaBot must be used as the AMR. | 1 |
| 9 | MATLAB®/Simulink must be used as the control software. | 1 |
| 10 | From the measured yaw rate the yaw angle must be determined and compared to the reference from Req. 4. | 1 |
| 11 | The AlphaBot's speed must be optimized to it's maximum. | 1 |
Working principle
The AlphaBot uses the Pixy" camera to detect the lane which helps Alphabot to poistion itself on the track and based on this infromation the motor runs and the Alphabot runs independently on the track and stop immediately when it does not detect any line.
GY-85 IMU sensor measures the yaw rate, which is used to detemine the AlphaBot's (yaw angle) according to its movements.
All componennts work together in real time to make sure the AlphaBot runs independently in real time.
Technical Overview
The system is built on the waveshare AphaBot which is integrated with motors. A pixy2 camera is used for keeping the AlphaBot on track.
Gy-85 IMU used to record yaw rate and yaw angle.
Bluetooth module is used for collecting the output wirelessly in real time.
Pin Assignment
The following pin configuration is used to interface the sensors and control the AlphaBot:
Pixy2 Camera (SPI/UART Interface) Pixy2 Camera is connected to the controller using I2C: SDA : A4 SCL : A5 VCC : 5V GND : GND
GY-85 IMU Sensor (I2C Interface) GY-85 IMU Sensor communicates via I2C:
SDA → A4 (shared I2C bus) SCL → A5 (shared I2C bus) VCC → 3.3V / 5V GND → GND
Serial / Bluetooth (Optional) TX (Bluetooth) : RX (D0) RX (Bluetooth) : TX (D1) VCC : 5V / 3.3V GND : GND
Both Pixy2 and GY-85 share the same I2C lines.
Motor Driver (on AlphaBot)
The motors are controlled via PWM pins from the controller:
Left Motor
PWMA : D6 (PWM)
AIN1 : A1
AIN2 : A0
Right Motor
PWMB : D5 (PWM)
BIN1 : A2
BIN2 : A3
Power Supply Battery : AlphaBot power input and sensors powered via onboard voltage regulator.
Measurement method
Measurement is done by using onboard sensors on AlphaBot. Pixy2 camera detects the lane position from which lateral error is calculated. The GY-85 IMU sensor measures the yaw rate which helps determine the yaw angle.
Formula for yaw angle.
\[ \theta(t) = \theta_0 + \int_{0}^{t} \omega(t)\, dt \]
\[ \theta_k = \theta_{k-1} + \omega_k \cdot \Delta t \]
Measuring Circuit
Software
Arduino IDE
Simulink
Measurement
Video
Datasheets
Related Links
SVN-Repository
https://svn.hshl.de/svn/HSHL_Projekte/trunk/AlphaBot
→ zurück zum Hauptartikel: Aufbau und Test eines Autonomen Fahrzeugs