This shows you the differences between two versions of the page.
pm:prj2025:eradu:daniel.afanasiuc [2025/05/25 02:33] daniel.afanasiuc [Hardware Design] |
pm:prj2025:eradu:daniel.afanasiuc [2025/05/25 04:13] (current) daniel.afanasiuc [Resources] |
||
---|---|---|---|
Line 29: | Line 29: | ||
** Components **: | ** Components **: | ||
- | * Arduino -- Quantity: 1 -- Notes: Main Controller | + | * Arduino Uno/Arduino 101 -- Quantity: 1 -- Notes: Main Controller |
* L298N Motor Driver Module -- Quantity: 1 -- Notes: Drives 2 DC motors | * L298N Motor Driver Module -- Quantity: 1 -- Notes: Drives 2 DC motors | ||
* DC Gear Motors (TT or N20) -- Quantity: 2 -- Notes: Drive rear wheels | * DC Gear Motors (TT or N20) -- Quantity: 2 -- Notes: Drive rear wheels | ||
Line 50: | Line 50: | ||
** Electrical table **: | ** Electrical table **: | ||
+ | | Component | Arduino Pin(s) | Power | GND | Notes | | ||
+ | | **L298N Motor Driver** | D5 (ENA), D8 (IN1), D12 (IN2), D11 (IN3), D10 (IN4), D6 (ENB), 5V (5V) | 5V - 12V | GND | ENA/ENB for speed (PWM), IN1-4 for direction; `JPI` jumper off so 5V pin works as logic input | | ||
+ | | **DC Gear Motor 1 (Left)** | Controlled via IN1, IN2 (L298N) | — | — | Connect to OUT1, OUT2 on L298N | | ||
+ | | **DC Gear Motor 2 (Right)** | Controlled via IN3, IN4 (L298N) | — | — | Connect to OUT3, OUT4 on L298N | | ||
+ | | **Ultrasonic Sensor Front-Right** | D2 (Trig), A0 (Echo) | 5V | GND | Use voltage divider on Echo if Arduino 101 (3.3V logic) | | ||
+ | | **Ultrasonic Sensor Front-Left** | D3 (Trig), A1 (Echo) | 5V | GND | Use voltage divider on Echo if Arduino 101 (3.3V logic) | | ||
+ | | **Ultrasonic Sensor Back-Left** | D4 (Trig), A2 (Echo) | 5V | GND | Use voltage divider on Echo if Arduino 101 (3.3V logic) | | ||
+ | | **Ultrasonic Sensor Back-Right** | D7 (Trig), A3 (Echo) | 5V | GND | Use voltage divider on Echo if Arduino 101 (3.3V logic) | | ||
+ | | **Push Button** | D9 | 5V (pull-up) | GND | Using INPUT_PULLUP | | ||
+ | | **Red LED** | A4 | 5V (via 220Ω) | GND | Status indicator | | ||
+ | | **Green LED** | D13 | 5V (via 220Ω) | GND | Status indicator | | ||
+ | | **Battery (Motors)** | — | 6V-12V to L298N `VCC` | GND | Powers motors through L298N | | ||
+ | | **Battery (Arduino)** | Vin | 7.5V/9V | GND | Powers Arduino Uno or 101 | | ||
+ | | **Breadboard** | — | — | — | — | | ||
Line 58: | Line 72: | ||
** IDE **: | ** IDE **: | ||
* Arduino IDE | * Arduino IDE | ||
- | * Platform: Arduino Uno | + | * Platform: Arduino Uno/Arduino 101 |
* Programming language: C/C++ with Arduino core | * Programming language: C/C++ with Arduino core | ||
Line 69: | Line 83: | ||
* Determines whether parking is possible based on precise distance thresholds (≤10 cm) from front and back sensors. | * Determines whether parking is possible based on precise distance thresholds (≤10 cm) from front and back sensors. | ||
* Detects the end of an obstacle before initiating the turn. | * Detects the end of an obstacle before initiating the turn. | ||
- | * Adjusts orientation using back sensor feedback and a direction function pointer for flexibility (left/right). | + | * Adjusts orientation using back sensor feedback. |
- | * Modular design using function pointers: Uses a struct to pass in the turn direction (left or right) as a function, so the same ''lateral_park'' code works for both sides. | + | |
* LED-based feedback system: Provides user feedback via LEDs — green for successful parking, red for failure. | * LED-based feedback system: Provides user feedback via LEDs — green for successful parking, red for failure. | ||
Line 148: | Line 161: | ||
===== Resources ===== | ===== Resources ===== | ||
- | <note> | + | Github: [[https://github.com/danielafanasiuc/Self-parking-Car]] |
- | Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**. | + | |
- | </note> | + |