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

Thảo luận trong 'Thiết bị điều khiển' bắt đầu bởi chinh trung, 6/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ơ Arduino Motor shield L293D.
    + 2 Mạch thu phát RF NRF24L01.
    + 1 Bộ điều áp 5V/3.3V ASM1117 để bảo vệ NRF24L01 của Robot car
    + 1 Board Arduino Uno R3.
    + 1 Board Arduino Mega 2560
    + 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" cho Controller
    + Vào Tool --> chọn Board "Arduino/Genuino Mega or Mega 2560" cho Robot car

    3. Upload:
    + Upload file đính kèm Controller và Robot car lần lượt vào 2 board Uno và Mega

    4. Sơ đồ đấu dây :
    4.1.RF24 - Uno R3(controller)
    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.2.RF24 - Mega 2560(robot car)
    RF24---------------------Mega 2560----------ASM1117

    1.VCC--------------------------------------------------3.3V out
    2.GND-------------------------------------------------GND out
    3.CE------------------------D49
    4.CSN----------------------D53
    5.SCK----------------------D52(SCK)
    6.MOSI---------------------D51(MOSI)
    7.MISO---------------------D50(MISO)
    8.IRQ----------------------not connect
    4.3. Joystick shield:
    Joystick shield------Uno R3---------------Nguồn

    1.VCC--------------------------------------------------5V (mặc định trên Joystick shield)
    2.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. Motor shield L293D
    Mega---------------------------------L293D----------------Nguồn------Motor

    ------------------------------------------12V--------------------12V
    GND------------------------------------GND-------------------GND
    Vin---------------------------------------------------------------7.5V
    -------------------------------------------M3-----------------------------------A(Left)
    -------------------------------------------M4-----------------------------------B(Right)

    Note:
    + Tháo jump PWR trên Motor shield do sử dụng nguồn bên ngoài

    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/arduino-motor-shield-l293d-4
    + http://hshop.vn/products/mach-thu-phat-d18-nrf24l01-2-4ghz
    + Lib: https://github.com/adafruit/Adafruit-Motor-Shield-library
    https://github.com/maniacbug/RF24

    Các file đính kèm:

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

Chia sẻ trang này