0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

能2公里無(wú)線遙控的2.4GHz遙控器

伊娃老師來(lái)了 ? 來(lái)源:伊娃老師來(lái)了 ? 作者:伊娃老師來(lái)了 ? 2023-03-04 11:11 ? 次閱讀

cfe89e06-b841-11ed-a826-dac502259ad0.png

工具:

焊槍+焊錫

焊接夾具

螺絲刀

膠水

d038f2fc-b841-11ed-a826-dac502259ad0.png

d09823c6-b841-11ed-a826-dac502259ad0.png

遙控器(發(fā)射器):

1 xNRF24L01+PA+LNA2.4G發(fā)射接收通信模塊

1 x24L01無(wú)線模塊轉(zhuǎn)接板

1 xArduinoNano板

1 x100nF100納法電容

2 x雙軸按鍵傳感器

2 x2檔搖臂開關(guān)

1 x7.4v460Mah鋰電池

1 x330R電阻

1 x10K電位器

2 x15P2.54mm單排排針插座

1 x54mmX20mmPCB

1 x7-9V的電池或者1x6節(jié)五號(hào)電池盒跟電池

若干:PCB板、電線、螺絲

// 8 Channel Transmitter (No Trim) | 8 Kanal Verici (Trim Yok)// Input pin A5
  #include   #include   #include   const uint64_t pipeOut = 000322;         // NOTE: The same as in the receiver 000322 | Al?c? kodundaki adres ile ayn? olmal?  RF24 radio(9, 10);                       // select CE,CSN pin | CE ve CSN pinlerin se?imi
  struct Signal {  byte throttle;  byte pitch;  byte roll;  byte yaw;  byte aux1;  byte aux2;  byte aux3;  byte aux4;
};  Signal data;  void ResetData(){  data.throttle = 0;  data.pitch = 127;  data.roll = 127;  data.yaw = 127;  data.aux1 = 0;                       // Signal lost position | Sinyal kesildi?indeki pozisyon  data.aux2 = 0;  data.aux3 = 0;  data.aux4 = 0;}  void setup(){                                       //Configure the NRF24 module  | NRF24 modül konfigürasyonu  radio.begin();  radio.openWritingPipe(pipeOut);  radio.setAutoAck(false);  radio.setDataRate(RF24_250KBPS);    // The lowest data rate value for more stable communication  | Daha kararl? ileti?im i?in en dü?ük veri h?z?.  radio.setPALevel(RF24_PA_MAX);      // Output power is set for maximum |  ??k?? gücü maksimum i?in ayarlan?yor.  radio.stopListening();              // Start the radio comunication for Transmitter | Verici i?in sinyal ileti?imini ba?lat?r.  ResetData();
}                                      // Joystick center and its borders | Joystick merkez ve s?n?rlar?  int Border_Map(int val, int lower, int middle, int upper, bool reverse){  val = constrain(val, lower, upper);  if ( val < middle )  val = map(val, lower, middle, 0, 128);  else  val = map(val, middle, upper, 128, 255);  return ( reverse ? 255 - val : val );}  void loop(){                                     // Control Stick Calibration for channels  |  Her bir kanal i?in kumanda Kol Kalibrasyonlar?
  data.roll = Border_Map( analogRead(A3), 0, 512, 1023, true );        // "true" or "false" for signal direction | "true" veya "false" sinyal y?nünü belirler  data.pitch = Border_Map( analogRead(A2), 0, 512, 1023, true );  data.throttle = Border_Map( analogRead(A1),570, 800, 1023, false );  // For Single side ESC | Tek y?nlü ESC i?in  // data.throttle = Border_Map( analogRead(A1),0, 512, 1023, false ); // For Bidirectional ESC | ?ift y?nlü ESC i?in  data.yaw = Border_Map( analogRead(A0), 0, 512, 1023, true );  data.aux1 = Border_Map( analogRead(A4), 0, 512, 1023, true );        // "true" or "false" for change signal direction | "true" veya "false" sinyal y?nünü de?i?tirir.  data.aux2 = Border_Map( analogRead(A5), 0, 512, 1023, true );        // "true" or "false" for change signal direction | "true" veya "false" sinyal y?nünü de?i?tirir.  data.aux3 = digitalRead(7);  data.aux4 = digitalRead(8);
  radio.write(&data, sizeof(Signal));} 

d0c043ec-b841-11ed-a826-dac502259ad0.png

// 8 Channel Transmitter & Trims | 8 Kanal Verici ve Trimler
  #include   #include   #include   #include 
  const uint64_t pipeOut = 000322;        // NOTE: The same as in the receiver 000322 | Al?c? kodundaki adres ile ayn? olmal?  RF24 radio(9, 10);                      // Select CE,CSN pin | CE ve CSN pinlerin se?imi
 #define trimbut_1 1                      // Trim button 1 / Pin D1 #define trimbut_2 2                      // Trim button 2 / Pin D2 #define trimbut_3 3                      // Trim button 3 / Pin D3 #define trimbut_4 4                      // Trim button 4 / Pin D4 #define trimbut_5 5                      // Trim button 5 / Pin D5 #define trimbut_6 6                      // Trim button 6 / Pin D6
 int tvalue1 = EEPROM.read(1) * 4;        // Reading trim values from Eprom  |  Trim de?erlerinin Epromdan okunmas? int tvalue2 = EEPROM.read(3) * 4; int tvalue3 = EEPROM.read(5) * 4;
  struct Signal {  byte throttle;  byte pitch;  byte roll;  byte yaw;  byte aux1;  byte aux2;  byte aux3;  byte aux4;};
  Signal data;  void ResetData(){  data.throttle = 512;                      // Signal lost position | Sinyal kesildi?indeki pozisyon  data.pitch = 127;  data.roll = 127;  data.yaw = 127;  data.aux1 = 0;  data.aux2 = 0;  data.aux3 = 0;  data.aux4 = 0;}  void setup(){                                         // Configure the NRF24 module  | NRF24 modül konfigürasyonu  radio.begin();  radio.openWritingPipe(pipeOut);  radio.setAutoAck(false);  radio.setDataRate(RF24_250KBPS);       // The lowest data rate value for more stable communication  | Daha kararl? ileti?im i?in en dü?ük veri h?z?.  radio.setPALevel(RF24_PA_MAX);         // Output power is set for maximum |  ??k?? gücü maksimum i?in ayarlan?yor.  radio.stopListening();                 // Start the radio comunication for Transmitter | Verici i?in sinyal ileti?imini ba?lat?r.  ResetData();
  pinMode(trimbut_1, INPUT_PULLUP);  pinMode(trimbut_2, INPUT_PULLUP);  pinMode(trimbut_3, INPUT_PULLUP);  pinMode(trimbut_4, INPUT_PULLUP);  pinMode(trimbut_5, INPUT_PULLUP);  pinMode(trimbut_6, INPUT_PULLUP);
  tvalue1= EEPROM.read(1) * 4;  tvalue2= EEPROM.read(3) * 4;  tvalue3= EEPROM.read(5) * 4;}
// Joystick center and its borders | Joystick merkez ve s?n?rlar?  int Border_Map(int val, int lower, int middle, int upper, bool reverse){  val = constrain(val, lower, upper);  if ( val < middle )  val = map(val, lower, middle, 0, 128);  else  val = map(val, middle, upper, 128, 255);  return ( reverse ? 255 - val : val );}  void loop(){
// Trims and Limiting trim values  |  Trimler ve Trim de?erlerini s?n?rland?rma
  if(digitalRead(trimbut_1)==LOW and tvalue1 < 630) {    tvalue1=tvalue1+15;    EEPROM.write(1,tvalue1/4);    delay (130);  }  if(digitalRead(trimbut_2)==LOW and tvalue1 > 280){    tvalue1=tvalue1-15;    EEPROM.write(1,tvalue1/4);    delay (130);  }
  if(digitalRead(trimbut_3)==LOW and tvalue2 < 630) {    tvalue2=tvalue2+15;    EEPROM.write(3,tvalue2/4);    delay (130);  }  if(digitalRead(trimbut_4)==LOW and tvalue2 > 280){    tvalue2=tvalue2-15;    EEPROM.write(3,tvalue2/4);    delay (130);  }
    if(digitalRead(trimbut_5)==LOW and tvalue3 < 630) {     tvalue3=tvalue3+15;     EEPROM.write(5,tvalue3/4);     delay (130);  }  if(digitalRead(trimbut_6)==LOW and tvalue3 > 280){    tvalue3=tvalue3-15;    EEPROM.write(5,tvalue3/4);    delay (130);  }
// Control Stick Calibration for channels  |  Her bir kanal i?in kumanda Kol Kalibrasyonlar?
  data.roll = Border_Map( analogRead(A3), 0, tvalue1, 1023, true );       // "true" or "false" for signal direction | "true" veya "false" sinyal y?nünü belirler  data.pitch = Border_Map( analogRead(A2), 0, tvalue2, 1023, true );  data.throttle = Border_Map( analogRead(A1),570, 800, 1023, false );    // For Single side ESC | Tek y?nlü ESC i?in  // data.throttle = Border_Map( analogRead(A1),0, 512, 1023, false );   // For Bidirectional ESC | ?ift y?nlü ESC i?in  data.yaw = Border_Map( analogRead(A0), 0, tvalue3, 1023, true );  data.aux1 = Border_Map( analogRead(A4), 0, 512, 1023, true );  data.aux2 = Border_Map( analogRead(A5), 0, 512, 1023, true );  data.aux3 = digitalRead(7);  data.aux4 = digitalRead(8);  radio.write(&data, sizeof(Signal));} 

控制電機(jī)(接收器):

1xNRF24L01+PA+LNA2.4G發(fā)射接收通信模塊

1x24L01無(wú)線模塊轉(zhuǎn)接板

1xArduinoNano板

1x100nF100納法電容

2x15P2.54mm單排排針插座

3x8P單排排針

1x54mmX20mmPCB板

1x7-9V的鋰電池

1x無(wú)刷電機(jī)+電子調(diào)速器(測(cè)試用,也可換舵機(jī))

6x輕觸開關(guān)

若干:PCB板、電線

d111e3a0-b841-11ed-a826-dac502259ad0.png

//  8 Channel Receiver | 8 Kanal Al?c?
#include #include #include #include 
int ch_width_1 = 0;int ch_width_2 = 0;int ch_width_3 = 0;int ch_width_4 = 0;int ch_width_5 = 0;int ch_width_6 = 0;int ch_width_7 = 0;int ch_width_8 = 0;
Servo ch1;Servo ch2;Servo ch3;Servo ch4;Servo ch5;Servo ch6;Servo ch7;Servo ch8;
struct Signal {
byte throttle;byte pitch;byte roll;byte yaw;byte aux1;byte aux2;byte aux3;byte aux4;};
Signal data;
const uint64_t pipeIn = 000322;RF24 radio(9, 10);
void ResetData(){
data.throttle = 0;data.roll = 127;data.pitch = 127;data.yaw = 127;data.aux1 = 0;                                              // Define the inicial value of each data input. | Veri giri?lerinin ba?lang?? de?erleridata.aux2 = 0;data.aux3 = 0;data.aux4 = 0;}
void setup(){                                                           // Set the pins for each PWM signal | Her bir PWM sinyal i?in pinler belirleniyor.  ch1.attach(0);  ch2.attach(2);  ch3.attach(3);  ch4.attach(4);  ch5.attach(5);  ch6.attach(6);  ch7.attach(7);  ch8.attach(8);
  ResetData();                                             // Configure the NRF24 module  | NRF24 Modül konfigürasyonu  radio.begin();  radio.openReadingPipe(1,pipeIn);  radio.setAutoAck(false);  radio.setDataRate(RF24_250KBPS);                          // The lowest data rate value for more stable communication  | Daha kararl? ileti?im i?in en dü?ük veri h?z?.  radio.setPALevel(RF24_PA_MAX);                            // Output power is set for maximum |  ??k?? gücü maksimum i?in ayarlan?yor.  radio.startListening();                                   // Start the radio comunication for receiver | Al?c? i?in sinyal ileti?imini ba?lat?r.
}
unsigned long lastRecvTime = 0;
void recvData(){while ( radio.available() ) {radio.read(&data, sizeof(Signal));lastRecvTime = millis();                                    // Receive the data | Data al?n?yor}}
void loop(){recvData();unsigned long now = millis();if ( now - lastRecvTime > 1000 ) {ResetData();                                                // Signal lost.. Reset data | Sinyal kay?psa data resetleniyor}
ch_width_1 = map(data.roll, 0, 255, 1000, 2000);ch_width_2 = map(data.pitch, 0, 255, 1000, 2000);ch_width_3 = map(data.throttle, 0, 255, 1000, 2000);ch_width_4 = map(data.yaw, 0, 255, 1000, 2000);ch_width_5 = map(data.aux1, 0, 255, 1000, 2000);ch_width_6 = map(data.aux2, 0, 255, 1000, 2000);ch_width_7 = map(data.aux3, 0, 1, 1000, 2000);ch_width_8 = map(data.aux4, 0, 1, 1000, 2000);

ch1.writeMicroseconds(ch_width_1);                          // Write the PWM signal | PWM sinyaller ??k??lara g?nderiliyorch2.writeMicroseconds(ch_width_2);ch3.writeMicroseconds(ch_width_3);ch4.writeMicroseconds(ch_width_4);ch5.writeMicroseconds(ch_width_5);ch6.writeMicroseconds(ch_width_6);ch7.writeMicroseconds(ch_width_7);ch8.writeMicroseconds(ch_width_8);

} 

d13ffcae-b841-11ed-a826-dac502259ad0.png

d177f618-b841-11ed-a826-dac502259ad0.png

9V穩(wěn)壓器:

1 x7809三級(jí)穩(wěn)壓管

1 x1uF微法電容

1 x10uF微法電容

2 x100nf納法電容

若干:PCB板、電線

d1abe108-b841-11ed-a826-dac502259ad0.png

5V穩(wěn)壓器:

1 x7805三級(jí)穩(wěn)壓管

1 x1uF微法電容

1 x10uF微法電容

2 x100nf納法電容

若干:PCB板、電線

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 遙控器
    +關(guān)注

    關(guān)注

    18

    文章

    829

    瀏覽量

    65890
  • DIY
    DIY
    +關(guān)注

    關(guān)注

    176

    文章

    886

    瀏覽量

    348071
  • nRF24L01
    +關(guān)注

    關(guān)注

    17

    文章

    330

    瀏覽量

    69358
  • 2.4GHz
    +關(guān)注

    關(guān)注

    0

    文章

    44

    瀏覽量

    17856
  • Arduino
    +關(guān)注

    關(guān)注

    187

    文章

    6459

    瀏覽量

    186520
收藏 人收藏

    評(píng)論

    相關(guān)推薦

    nRFready?2.4GHz 射頻智能遙控器參考設(shè)計(jì)

    外圍設(shè)備,這種無(wú)線和協(xié)議的組合提供帶寬,延遲和共存性能,無(wú)縫支持所有nRFready?射頻智能遙控器的先進(jìn)功能,即使在最具挑戰(zhàn)性的2.4GHz的操作環(huán)境(例如,附近有其它的Wi - Fi和藍(lán)牙
    發(fā)表于 03-24 10:09

    nRFready?2.4GHz 射頻智能遙控器參考設(shè)計(jì)

    外圍設(shè)備,這種無(wú)線和協(xié)議的組合提供帶寬,延遲和共存性能,無(wú)縫支持所有nRFready?射頻智能遙控器的先進(jìn)功能,即使在最具挑戰(zhàn)性的2.4GHz的操作環(huán)境(例如,附近有其它的Wi - Fi和藍(lán)牙
    發(fā)表于 03-24 12:53

    2.4GHz 無(wú)線VISTA遙控器實(shí)驗(yàn)開發(fā)系統(tǒng)

    attach://167141.pdfattach://167141.pdf為了便于用戶開發(fā)應(yīng)用先進(jìn)的Nordic Flash SOC無(wú)線芯片,迅通科技提供2.4GHz 無(wú)線VISTA遙控器
    發(fā)表于 11-04 09:31

    家電常用2.4G遙控器方案

    `睿訊電子提供的2.4G遙控器方案已經(jīng)在市場(chǎng)上推廣應(yīng)用達(dá)5年之久,也是國(guó)內(nèi)最早從事普及型2.4G遙控器的方案商,我們可提供全系列數(shù)字RF遙控器
    發(fā)表于 11-11 15:43

    基于STM32的開源微型四軸飛行之傳感航模遙控器

    航模遙控器常見的無(wú)線遙控按照使用技術(shù)不同,主要有紅外遙控2.4G遙控。紅外
    發(fā)表于 04-10 17:22

    2.4GHz無(wú)線射頻芯片A7105應(yīng)用

    2.4GHz無(wú)線射頻芯片A7105應(yīng)用...本文進(jìn)行了室內(nèi)照明系統(tǒng)的無(wú)線遙控研究,采用2.4GHz無(wú)線
    發(fā)表于 02-29 16:55

    萬(wàn)遙控器設(shè)置方法_萬(wàn)遙控器代碼

    電視是每個(gè)家庭必不可少的家用電器,所以我們?cè)谑褂?b class='flag-5'>遙控器的時(shí)間也會(huì)比較多。但如果遙控器換了怎么辦,很多人都會(huì)想到配一個(gè)萬(wàn)遙控器,那么萬(wàn)
    發(fā)表于 09-14 18:08 ?18.8w次閱讀
    萬(wàn)<b class='flag-5'>能</b><b class='flag-5'>遙控器</b>設(shè)置方法_萬(wàn)<b class='flag-5'>能</b><b class='flag-5'>遙控器</b>代碼

    一文弄懂無(wú)線遙控器

    相信大家對(duì)于無(wú)線遙控器都有著自己的認(rèn)知,認(rèn)為無(wú)線遙控器就是我們家用的電視啊、空調(diào)啊的遙控器嗎?是的,這些當(dāng)然是
    發(fā)表于 11-14 09:18 ?9050次閱讀

    2.4G遙控器解決方案

    日常生活當(dāng)中我們常用的遙控器就是無(wú)線紅外遙控器,這種遙控器成本低,實(shí)用性也強(qiáng),不好的地方就是不能隨便轉(zhuǎn)換角度遙控,也不能遮擋。但
    的頭像 發(fā)表于 12-01 16:45 ?4429次閱讀

    2.4G遙控器方案開發(fā),無(wú)需指向也可以進(jìn)行遙控

    相比于傳統(tǒng)的紅外線式遙控器,無(wú)線2.4g遙控器擺脫了指向性的問(wèn)題,我們可以在屋內(nèi)任何位置以及任何角度來(lái)使用遙控器操作設(shè)備而不用擔(dān)心設(shè)備無(wú)法接
    的頭像 發(fā)表于 12-08 13:03 ?2199次閱讀
    <b class='flag-5'>2.4</b>G<b class='flag-5'>遙控器</b>方案開發(fā),無(wú)需指向也可以進(jìn)行<b class='flag-5'>遙控</b>

    宇凡微2.4G遙控器方案開發(fā),靈活控制無(wú)需指向

    日常生活當(dāng)中我們常用的遙控器就是無(wú)線紅外遙控器,這種遙控器成本低,實(shí)用性也強(qiáng),不好的地方就是不能隨便轉(zhuǎn)換角度遙控,也不能遮擋。但
    的頭像 發(fā)表于 08-01 11:28 ?845次閱讀

    一種使用2.4GHz頻段的無(wú)線遙控器方案開發(fā)

    2.4G遙控器是一種使用2.4GHz頻段的無(wú)線遙控器,常用于遙控玩具、航模和家電等電子設(shè)備上。
    的頭像 發(fā)表于 01-11 17:22 ?1202次閱讀

    2.4G無(wú)線遙控器方案開發(fā),穩(wěn)定性強(qiáng),可用于多種應(yīng)用

    2.4G遙控器是一種使用2.4GHz頻段的無(wú)線遙控器,常用于遙控玩具、航模和家電等電子設(shè)備上。相
    的頭像 發(fā)表于 01-18 15:44 ?2245次閱讀

    應(yīng)用在機(jī)頂盒遙控器中的2.4GHz無(wú)線芯片

    機(jī)頂盒遙控器是用于控制機(jī)頂盒,進(jìn)而控制電視機(jī)的遙控器。以機(jī)頂盒遙控器為例,其遙控器按鈕由前后兩部分組成,前一部分按鈕是用來(lái)代替電視機(jī)遙控器
    的頭像 發(fā)表于 02-29 09:48 ?776次閱讀
    應(yīng)用在機(jī)頂盒<b class='flag-5'>遙控器</b>中的<b class='flag-5'>2.4GHz</b><b class='flag-5'>無(wú)線</b>芯片

    2.4GHz ISM射頻前端芯片GC1103在無(wú)線遙控玩具中的應(yīng)用

    2.4GHz ISM射頻前端芯片GC1103在無(wú)線遙控玩具中的應(yīng)用
    的頭像 發(fā)表于 05-23 09:54 ?498次閱讀
    <b class='flag-5'>2.4GHz</b> ISM射頻前端芯片GC1103在<b class='flag-5'>無(wú)線</b><b class='flag-5'>遙控</b>玩具中的應(yīng)用