User Tools

Site Tools


work:quadcopter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
work:quadcopter [2014/04/02 16:41] dongheework:quadcopter [2018/07/18 14:10] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== 개발: ======+====== 개발  ====== 
 + 
 + 
 +## ar9331 보드 만들기 
 + 
 +### USB 허브칩 ftdi GL850G 
 + 
 +TP WR703N의 확장 보드GL850사용해서 만든 허브 http://www.kean.com.au/oshw/WR703N/WR703N%20Expander%20v1.pdf 
 + 
 +arduino yun에서 RT8010-33GQW라는 step down dcdc 사용합 1.5mhz 1A 
 + 
 +---- 
 + 
 +## 알리바바에 파는 ar9331 보드  
 + 
 +![](http://i.imgur.com/ujk9RQQ.png) 
 + 
 +http://www.alibaba.com/product-gs/1333014406/150Mbps_Wireless_Module_AR9331_security_and.html 
 + 
 +이런거 사서 써도 되겠다. 100개 US $5 - 30 / Piece Get Latest Price 크기 50x30 
 + 
 +---- 
 + 
 +![](http://i.imgur.com/yDcJLr7.png) 
 + http://www.alibaba.com/product-gs/1242172281/OPENWRT_module_WLAN_module_WiFi_module.html 
 + 
 +FOB Price: US $10 - 13 /Port: Guangzhou/ Minimum Order Quantity: 1  
 + 
 + 
 +---- 
 + 
 +![](http://i.imgur.com/K4PFu7f.png) 
 + 
 +http://www.alibaba.com/product-gs/761550814/ar9331_module.html 
 + 
 +US $9 - 16 요거 작네(27.5x40.5) carambola2랑 비슷한 수준; 그런데 1000개가 기본 수량  
 + 
 +---- 
 + 
 +### TL-WR703N Reverse Engineering 
 + 
 + * https://github.com/Squonk42/TL-WR703N 
 + * http://squonk42.github.io/TL-WR703N/ 
 + 
 +---- 
 + 
 +## openwrt configure for tplink 703N 
 + 
 +steps: 
 + 
 +1. buy an tplink 703N, if it is A17 version , need to download an old firmware from tplink http://service.tp-link.com.cn/download/20131/TL-WR703N_V1_121204.rar 
 +2. download the bin to downgrade the firmware 
 +3. download tplink specific firmware with squre factory os 
 +4. flash the firmware within the web ui 
 +5. after reboot, link lan with laptop, and telnet into the system 
 +6. type passwd to set new passwd for root, reboot and ssh to system with new passwd 
 +7. change /etc/config/wireless file and reboot to enale wifi 
 +------------------------ 
 + 
 + STM32F Hard fault 
 + 
 +http://www.freertos.org/FreeRTOS_Support_Forum_Archive/February_2012/freertos_STM32F2_hard_fault_5015439.html 
 + 
 +http://www.coactionos.com/embedded-design/133-effective-use-of-arm-cortex-m3-svcall.html 
 + 
 +http://sourceforge.net/p/freertos/discussion/382005/thread/109acbfc 
 +좀 이유 설명  
 + 
 +Hard Fault freertos xPortPendSVHandler 
 + 
 +http://blog.frankvh.com/2011/12/07/cortex-m3-m4-hard-fault-handler/ 
 + 
 + 
 +http://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html 
 + 
 + 
 +http://sourceforge.net/p/freertos/discussion/382005/thread/49667801 
 +Mike, 
 +I've seen exactly this problem several times on the 205 and it was generally caused by the main 'C' stack being too small or corrupted. 
 + 
 +http://www.freertos.org/RTOS-Cortex-M3-M4.html 
 + 
 +. If you are using an STM32 with the STM32 driver library then ensure all the 
 + priority bits are assigned to be preempt priority bits by calling NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); before the RTOS is started. 
 + 
 +이미 NVIC_PriorityGroup_4로 되어 있네ㅣ 
 + 
 +스택 사이즈? 
 +시스템 테스크를 2배에서 4배로 스택 크기를 수정 
 + -> 그래도 죽네;; 다른때보다 3배정도는 늦게 죽는다. 
 + 
 +http://www.freertos.org/a00111.html 
 + 
 +Uart에 이걸 넣음 
 + 
 +vTaskSuspendAll() 
 +xTaskResumeAll() 
 + 
 +The stack in use when you call main() is recycled for use by all interrupt handlers. 
 + 
 + 
 + 
 +----------------  
 + 
 +Heli controls are like following 
 + 
 +Throttle/Collective Pitch == up/down 
 +Rudder == yaw, rotate left/right 
 +Elevator == (bank)/fly forward/backward 
 +Aileron == (bank)/fly sideways left/right 
 + 
 +openpilot 
 + 
 +https://github.com/zhao0079/openpilot/blob/master/hardware/Production/CopterControl/CopterControl%20Schematic.pdf 
 + 
 +체크 리스트  
 + - http://wiki.openpilot.org/display/Doc/Hardware+FAQ#HardwareFAQ-ESCsandBESCs BEC 영향 없나? 
 + - mbed로  
 + 
 + - openpilot esc 
 + - x copter, quard copter http://i.imgur.com/AesvWf9.png 
 + 
 + 
 +esc 세팅  
 +http://wiki.openpilot.org/display/Doc/TurboPWM+ESC's#TurboPWMESC%27s-Whyisthisimportant%3F 
 +http://wiki.openpilot.org/display/Doc/RapidESC+Database 데이터베이스  
 + 
 +http://git.openpilot.org/browse/OpenPilot 
 + 
 + 
 + 
 +http://www.rc-airplane-world.com/rc-airplane-controls.html 
 + 
 +pwm 코드 수정 
 + - http://guyvo-cortex.blogspot.kr/2009_04_01_archive.html 
 + - 50mhz 1ms~2ms 로 데이터 수정! 
 + 
 +pid 코드 수정 
 + - http://forum.bitcraze.se/viewtopic.php?f=6&t=192 
 + - pid 값 수정해서 스테이블한 상태 만들기 
 + 
 + 
 +modules/interface/pid.h  
 + 
 +http://forum.bitcraze.se/viewtopic.php?f=6&t=192 
 + 
 +crazyflie는 기본으로 attitude mode? rate 모드는 뭐지? 
 +     
 +Project Quadcopter  
 + 
 +http://quadcopter.wordpress.com/ 
 + 
 +http://wiki.bitcraze.se/_media/projects:crazyflie:hardware:crazyflie_control_board_schematics_rev.f.pdf 
 +http://wiki.bitcraze.se/_media/projects:crazyflie:hardware:crazyflie_control_board_rev.f_-_component_placement_top.pdf 
 + 
 +http://shop.8devices.com/wifi4things/carambola 
 +m-bugs altitude holding 
 + 
 +쿼드콥터 만들기 
 + - 8MIPS로 400hz? 제어기 성능보다 추저성능이 중요. 
 +http://blog.naver.com/PostList.nhn?from=postList&blogId=solsol8711&categoryNo=15&currentPage=2 
 + - 인터럽트 사용해서 쓰는uart와 i2c가 추적 성능을 낮게 만들지.도 nrf24는 dma로 했나? 
 + 
 +칼만필터: http://realsys.co.kr/data/hobby/6_%EC%B9%BC%EB%A7%8C%ED%95%84%ED%84%B0.pdf 
 + 
 + 
 +## crazyflie  
 + 
 +https://bitbucket.org/phiamo/crazyflie-firmware/commits/all 
 + 
 +http://forum.bitcraze.se/viewtopic.php?f=11&t=128 
 + 
 +슬라이딩 어떻게 하지? 
 + 
 +![](accelerometers) 
 + 
 + 
 +Accel보다 자이로만 사용했을때 계속 밀린다. 
 + 
 +GyroBias 값을 0으로 해보았는데, 흠 그럼 더 밀린다. 
 + 
 +Gyro에 low pass filter를 적용 해보자! 
 + 
 +-> lpf와 average filter(250hz) 적용 
 + 
 +low pass filter가 별로 나아지는것은 없어보이는데  
 +    GyroBias가 지대한 영향을 끼치는것 같다.  
 +분산, 평균을 이용해서 추세를 보는듯. 
 + 
 +0.296548, -0.452743, 3.047594 
 + gyro.x: 0.0, gyro.y: 0.0, gyro.z: -0.061035, acc.x: -0.007568, acc.y: 0.004882, acc.z 1.000732 
 +0.295663, -0.450056, 3.115887 
 + gyro.x: 0.030517, gyro.y: 0.0, gyro.z: -0.061035, acc.x: -0.007934, acc.y: 0.004272, acc.z 1.001464 
 +0.292134, -0.452814, 3.190397 
 + gyro.x: 0.0, gyro.y: 0.122070, gyro.z: 0.0, acc.x: -0.007568, acc.y: 0.005126, acc.z 0.999267 
 +0.236752, -0.417580, 3.254106 
 + 
 + 
 +---- 
 + 
 +bias계산 안하고 그냥 손으로 넣은게 나을려나? 
 + 
 +bias계산해서 넣으니깐 한쪽으로 계속 치우친다. 
 + 
 +날개를 바꾸는것도 이상해.  
 + 
 + 
 +---- 
 + 
 +#### Reading accelerometers 
 + 
 + AccelBias 를 사용해서 기울어진 것 찾기. 
 + 
 +## openpilot 
 + 
 + - http://wiki.openpilot.org/display/Doc/OpenPilot+Flight+Control+board+Common+issues 
 + 
 +---- 
 + 
 +https://bitbucket.org/danhamilt1/crazyflie-firmware/commits/7445a483fb44a25e730408e293088258be3d11e5?at=stabalizer 
 + 
 + 
 +모터를 exp? 왜 이렇게 계산하냐? 
 + 
 +   motorPowerM1 = limitThrust(calculatePower(thrust + pitch + yaw)); 
 +   motorPowerM2 = limitThrust(calculatePower(thrust - roll - yaw)); 
 +   motorPowerM3 =  limitThrust(calculatePower(thrust - pitch + yaw)); 
 +   motorPowerM4 =  limitThrust(calculatePower(thrust + roll - yaw)); 
 + 
 + static int32_t calculatePower(int32_t thrust) 
 + { 
 +   int32_t value = 0; 
 +    
 +-  value = ipow(UINT16_MAX, -0.5) * ipow(thrust, 1.5); 
 ++  value = fastPow(UINT16_MAX, -0.5) * fastPow(thrust, 1.5); 
 +   return value; 
 + } 
 + 
 ++double fastPow(double a, double b) { 
 ++  union { 
 ++    double d; 
 ++    int x[2]; 
 ++  } u = { a }; 
 ++  u.x[1] = (int)(b * (u.x[1] - 1072632447) + 1072632447); 
 ++  u.x[0] = 0; 
 ++  return u.d; 
 ++} 
 + 
 ++static double fastPrecisePow(double a, double b) { 
 ++  // calculate approximation with fraction of the exponent 
 ++  int e = (int) b; 
 ++  union { 
 ++    double d; 
 ++    int x[2]; 
 ++  } u = { a }; 
 ++  u.x[1] = (int)((b - e) * (u.x[1] - 1072632447) + 1072632447); 
 ++  u.x[0] 0; 
 ++  
 ++  // exponentiation by squaring with the exponent's integer part 
 ++  // double r u.d makes everything much slower, not sure why 
 ++  double r 1.0; 
 ++  while (e) { 
 ++    if (e & 1) { 
 ++      r *a; 
 ++    } 
 ++    a *a; 
 ++    e >>1; 
 ++  } 
 ++  
 ++  return r * u.d; 
 ++} 
 +
 +---- 
 안드로이드 콘트롤러  안드로이드 콘트롤러 
  
work/quadcopter.1396456898.txt.gz · Last modified: 2018/07/18 14:09 (external edit)