Lập trình điều khiển UGV-robot xe bằng bộ phát sóng RF nRF24L01 với Joystick shield

Thảo luận trong 'Thiết bị điều khiển' bắt đầu bởi chinh trung, 8/2/18.

  1. chinh trung

    chinh trung Moderator

    1. Thiết bị:
    + 1 Khung robot car (3 hoặc 4 bánh xe)
    + 1 Mạch điều khiển động cơ L298.
    + 2 Mạch thu phát RF NRF24L01.
    + 1 Bộ điều áp 5V/3.3V ASM1117 để bảo vệ NRF24L01.
    + 2 Board Arduino Uno R3.
    + 1 Joystick shield.

    2. Chọn Board:
    + Cài đặt phân mêm Arduino IDE v.1.8.4.
    + Cài đặt drivers:
    - đối với win 32bit: vào thư mục Arduino IDE v.1.8.4\drivers --> dpinst-x86.exe --> enter.
    - đối với win 64bit: vào thư mục Arduino IDE v.1.8.4\drivers --> dpinst-amd64.exe --> enter.
    + Vào Tool --> chọn Board "Arduino/Genuino Uno".

    3. Upload:
    + Upload file đính kèm Controller và Robot car vào 2 board Uno.

    4. Sơ đồ đấu dây :
    4.1.RF24 - Uno R3 (robot car)
    RF24---------------------Uno R3----------------ASM1117

    1.VCC--------------------------------------------------3.3V out
    2.GND-------------------------------------------------GND out
    3.CE------------------------D7
    4.CSN----------------------D8
    5.SCK----------------------D13(SCK)
    6.MOSI---------------------D11(MOSI)
    7.MISO---------------------D12(MISO)
    8.IRQ----------------------not connect
    -------------------------------5V------------------------5V in
    -------------------------------GND---------------------GND in
    4.2.RF24 - Uno R3 (controller)
    Gắn RF24 vào vị trí trên Joystick shield:
    RF24---------------------Uno R3----------------Nguòn
    1.VCC--------------------------------------------------3.3V (mặc định trên Joystick shield)
    2.GND-------------------------------------------------GND (mặc định trên Joystick shield)
    3.CE------------------------D9 (mặc định trên Joystick shield)
    4.CSN----------------------D10 (mặc định trên Joystick shield)
    5.SCK----------------------D13(SCK) (mặc định trên Joystick shield)
    6.MOSI---------------------D11(MOSI) (mặc định trên Joystick shield)
    7.MISO---------------------D12(MISO) (mặc định trên Joystick shield)
    8.IRQ----------------------not connect
    -------------------------------5V------------------------5V in
    -------------------------------GND---------------------GND in
    4.3. Joystick shield:
    Joystick shield--------Uno R3-----------------Nguồn

    1.VCC--------------------------5V--------------------5V (chuyển qua vạch 5V trên Joystick shield)
    2.GND-------------------------GND-----------------GND (mặc định trên Joystick shield)
    3.VRX------------------------A0 (mặc định trên Joystick shield)
    4.VRY------------------------A1 (mặc định trên Joystick shield)
    4.4. L298
    Uno-----------------------------------L298----------------Nguồn

    PIN 6(PWM)------------------------IN1
    PIN 5(PWM)------------------------IN2
    PIN 4----------------------------------IN3
    PIN 3(PWM)------------------------IN4
    PIN 9(PWM)------------------------ENA
    PIN 10(PWM)----------------------ENB
    ------------------------------------------12V--------------------12V
    GND------------------------------------GND-------------------GND
    Vin---------------------------------------------------------------7.5V

    5.Ref:
    + http://forum.dmec.vn/index.php?threads/test-bộ-thu-phát-sóng-rf-rf24-dùng-cho-drone.258060/
    + forum.dmec.vn/index.php?threads/lập-trình-điều-khiển-robot-xe-có-cảm-biến-khoảng-cách.256460/
    + http://www.modsbyus.com/arduino-nrf24-dual-drive-motor-remote-controlled-car/
    + http://hshop.vn/products/arduino-joystick-shield
    + http://hshop.vn/products/mach-thu-phat-d18-nrf24l01-2-4ghz

    Các file đính kèm:

    Chỉnh sửa cuối: 11/9/18

Chia sẻ trang này