Test bộ thu phát sóng RF RF24 dùng cho Drone

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

  1. chinh trung

    chinh trung Moderator

    1. Thiết bị:
    + 2 Mạch thu phát RF NRF24L01.
    + 2 laptop để làm máy phát (T) và máy nhận (R)
    + 2 Board Arduino Uno R3.

    2. Chọn Board:
    + Cài đặt phân mêm Arduino IDE v.1.8.4.
    + Vào Tool --> chọn Board "Arduino/Genuino Uno".

    3. Upload:
    + Upload file đính kèm vào cả 2 board Uno

    4. Sơ đồ đấu dây :
    RF24---------------------Uno R3

    1.VCC----------------------3.3V
    2.GND---------------------GND
    3.CE------------------------D9
    4.CSN----------------------D10
    5.SCK----------------------D13(SCK)
    6.MOSI---------------------D11(MOSI)
    7.MISO---------------------D12(MISO)
    8.IRQ----------------------not connect

    5. Test:
    5.1. Vào Arduino IDE ở cả 2 laptop, chọn Tool -->mở Serial Monitor với tốc độ 57600 hiển thị:


    RF24/examples/GettingStarted/
    ROLE: Pong back
    STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
    RX_ADDR_P0-1 = 0xf0f0f0f0d2 0xf0f0f0f0e1
    RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
    TX_ADDR = 0xf0f0f0f0d2
    RX_PW_P0-6 = 0x08 0x08 0x00 0x00 0x00 0x00
    EN_AA = 0x3f
    EN_RXADDR = 0x03
    RF_CH = 0x4c
    RF_SETUP = 0x07
    CONFIG = 0x0f
    DYNPD/FEATURE = 0x00 0x00
    Data Rate = 1MBPS
    Model = nRF24L01
    CRC Length = 16 bits
    PA Power = PA_HIGH

    5.2. Gỏ "T" vào hộp thoại Send ở máy (T) và gỏ "R" ở máy (R) cho kêt quả:

    Now sending 90...ok...Got response 90, round-trip delay: 28
    Now sending 1122...ok...Got response 1122, round-trip delay: 26
    Now sending 2152...ok...Got response 2152, round-trip delay: 27
    Now sending 3182...ok...Got response 3182, round-trip delay: 29
    Now sending 4214...ok...Got response 4214, round-trip delay: 27
    Now sending 5244...ok...Got response 5244, round-trip delay: 29
    Now sending 6277...ok...Got response 6277, round-trip delay: 26
    Now sending 7307...ok...Got response 7307, round-trip delay: 26
    Now sending 8337...ok...Got response 8337, round-trip delay: 29
    Now sending 9369...ok...Got response 9369, round-trip delay: 27
    Now sending 10399...ok...Got response 10399, round-trip delay: 29
    Now sending 11431...ok...Got response 11431, round-trip delay: 27
    Now sending 12462...ok...Got response 12462, round-trip delay: 28

    6. Ref
    + Library: https://github.com/nRF24/RF24
    + https://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/
    + hshop.vn/products/mach-thu-phat-nrf24l01-pa-2-4ghzcu-khech-dai-cung-suat-thu-phat
    + http://forum.dmec.vn/index.php?threads/lập-trình-điều-khiển-drone-bằng-arduino-pro-mini.256050/
    Chỉnh sửa cuối: 1/2/18

Chia sẻ trang này