CHIA CHENG TSAO's Posts (1)

Sort by

My TMR-FC Flight Controller

- Frame 

3689520481?profile=original

- Controller

DSC_0192.jpg

DSC_0193.jpg

3689520582?profile=original

3689520653?profile=original

3689520628?profile=original

3689520667?profile=original

- Introductions

    1. User Guide :

        TMR_FC_UM_V1_120730.pdf

    2. Sechematic :

        TMR_FC_HW_V1_120830.pdf

    3. Gerber :

        TMRFC_GB_V1_120930.rar

    4. Software :

         The software is Porting from "PX4".

         https://github.com/cctsao1008/TMR

- Hardware Features

    1. MCU : 

          STM32f405RG

    2. AHRS :

          MPU6050, HMC5883, MS5611

    3. Features :

          12 channels PWM output, one PPM input and one Futaba S.BUS input,

          Built-in 10 DOF, 5 LEDs ( controlled by PCA9533/9536), GPS port ( UART / I2C),

          Auxiliary SPI and  GPIO, RF port (APC230 or BT), LiPo Voltage measure via ADC,

          Beeper for tone alarm, SWD port, SONAR, USB VCP and MSC, Micro SD ( can be read via USB),

          Light Bar LED control, Internal FLASH EEPROM emulation using sector 1, 2 and 3 ( 16KB x 3 ),

          RTC ( power keep by 3V CR1220 )

          ....... etc

    4. Stress Test VB scripts :

 

          Auto re-boot loop test, tone alarm loop test, ..... etc

    5. Support PX4 Qupgrade tool :

        3689520712?profile=original

- Tests :

3689520760?profile=original

3689520733?profile=original

3689520694?profile=original

3689520778?profile=original

3689520746?profile=original

3689520808?profile=original

---------------------------------------

- Boot Log :

---------------------------------------

reboot
ABCDF
nsh_romfsetc: nsh > romfs_img_len 0xFF52F09C 
nsh_romfsetc: nsh > Mounting ROMFS filesystem at target=/etc with source=/dev/ram0
[boot] Initializing (HRT) 1...
[boot] Initializing (CPU) 2...
[boot] Initializing (DMA) 3...
[boot] Initializing pca953x driver
[PCA953X] on I2C bus 2 at 0x62
[TMRFC_LED] led_off, led = 0x338 
[TMRFC_LED] led_off, led = 0x332 
[TMRFC_LED] led_on, led = 0x334 
[boot] Initializing soft SPI for the MMC/SD slot
[boot] Successfully initialized soft SPI for the MMC/SD slot
[boot] Binding soft SPI device to MMC/SD slot 0
[boot] Successfuly bound Soft SPI device to MMC/SD slot 0
[boot] Initializing SPI3
[init] MODE = autostart 
[init] Looking for microSD... 
[init] Card mounted at /fs/microsd 
[init] tone_alarm start 
[init] Reading /fs/microsd/etc/rc.txt 
Detecting on board sensors on I2C bus(I2C2) ......

( 0x62 ) Have PCA9533DP
( 0x41 ) Have PCA9536DP
( 0x69 ) Have MPU6050

  Set MPU6050 auxiliary I2C bus to bypass mode......

  Detecting sensors on MPU6050 auxiliary I2C bus......

  ( 0x1e ) Have HMC5883L
  ( 0x77 ) Have MS5611

i2c: Done

[init] Start the ORB 
[uorb] ready
ramtron: RAMTRON not enabled, skipping.
param: selected parameter default file /fs/microsd/params
[init] param load /fs/microsd/params 
param: end of parameters
[init] Start mavlink ( 57600  /dev/ttyS1 ) 
mavlink: MAVLink v1.0 serial interface starting...
mavlink: DOWNLINK MODE
mavlink: UART is /dev/ttyS1, baudrate is 57600

[init] Start commander 
commander: starting
commander: No RGB LED found
[fcservo] default PWM output device
<fcservo> MODE_NONE
[fcservo] starting
<fcservo> adjusted actuator update interval to 100ms
FC driver (no PWM) started 
[init] Start sensors >> need to implement 
[init] Start one of the estimators ( attitude_estimator_ekf ) >> wait for MPU6050 driver ready !! 
[init] Start GPS >> need to implement 

NuttShell (NSH)
nsh> eeprom test
---------------------------------------------------------------------------------------
RM0090 Table 5. Flash module organization (STM32F40x and STM32F41x)            
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08000000, SE = 0x08003FFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (986):Check_Sector_Erased 0  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08004000, SE = 0x08007FFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (988):Check_Sector_Erased 1  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08008000, SE = 0x0800BFFF, COUNT = 0x00004000  
[DEBUG]internal_flash_test (990):Check_Sector_Erased 2  (ERASED)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x0800C000, SE = 0x0800FFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (992):Check_Sector_Erased 3  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08010000, SE = 0x0801FFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (994):Check_Sector_Erased 4  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08020000, SE = 0x0803FFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (996):Check_Sector_Erased 5  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08040000, SE = 0x0805FFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (998):Check_Sector_Erased 6  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08060000, SE = 0x0807FFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (1000):Check_Sector_Erased 7  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x08080000, SE = 0x0809FFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (1002):Check_Sector_Erased 8  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x080A0000, SE = 0x080BFFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (1004):Check_Sector_Erased 9  (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x080C0000, SE = 0x080DFFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (1006):Check_Sector_Erased 10 (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]Check_Sector_Erased (845):SS = 0x080E0000, SE = 0x080FFFFF, COUNT = 0x00000001  
[DEBUG]internal_flash_test (1008):Check_Sector_Erased 11 (DATA)     
---------------------------------------------------------------------------------------
[DEBUG]internal_flash_test (1011):Warning !! This test will destroy the data stored on sector 1 and 2 ! 
[DEBUG]internal_flash_test (1014):1)sched_lock.... 
[DEBUG]internal_flash_test (1018):2)FLASH_Unlock.... 
[DEBUG]internal_flash_test (1022):3)EE_Init.... 
[DEBUG]EE_Init (146):EE_Init 
[DEBUG]EE_Init (330):EE_Init >> VALID_PAGE 
[DEBUG]EE_Init (345):EE_Init >> ERASED 
[DEBUG]EE_Init (347):EE_Init >> FLASH_EraseSector 1 
[DEBUG]Check_Sector_Erased (845):SS = 0x08008000, SE = 0x0800BFFF, COUNT = 0x00004000  
[DEBUG]EE_Init (355):Page 1 blank, skip to erase it. 
[DEBUG]internal_flash_test (1025):4)FLASH_Lock.... 
[DEBUG]internal_flash_test (1029):5)sched_unlock.... 
nsh>

---------------------------------------

-log for DJI F450 :

---------------------------------------

ABCDF
nsh_romfsetc: nsh > romfs_img_len 0x80B7DC8
nsh_romfsetc: nsh > Mounting ROMFS filesystem at target=/etc with source=/dev/ram0
[boot] Initializing HRT Callout Interface
[boot] Initializing CPU Load Estimation
[boot] Initializing Serial DMA
[boot] Initializing PCA9533 and PCA9536
[PCA953X] on I2C bus 2 at 0x62
[TMRFC_LED] led_off, led = 0x338
[TMRFC_LED] led_off, led = 0x332
[TMRFC_LED] led_on, led = 0x334
[boot] Initializing soft SPI for the MMC/SD slot
[boot] Successfully initialized soft SPI for the MMC/SD slot
[boot] Binding soft SPI device to MMC/SD slot 0
[boot] Successfuly bound Soft SPI device to MMC/SD slot 0
[boot] Initializing SPI3
[init] MODE = autostart
[init] Looking for microSD...
[init] Card mounted at /fs/microsd
[init] tone_alarm start
[init] Reading /fs/microsd/etc/rc.txt
sercon: Registering CDC/ACM serial driver
uart_register: Registering /dev/ttyACM0
sercon: Successfully registered the CDC/ACM serial driver
[init] eeprom
eeprom: mounted EEPROM at /eeprom
param: end of parameters
sercon:: ERROR: Already connected
[init] Start the ORB
[uorb] ready
param: selected parameter default file /fs/microsd/params
[init] param load /fs/microsd/params
param: end of parameters
Try to get an USB console
nshterm [12:100]
11: + SYS_AUTOSTART: equal
Load .. 11_dji_f450
[init] TMRFC v1 on DJI F450
MAV_TYPE: curr: 1 -> new: 2
nsh: px4io: command not found
mavlink: MAVLink v1.0 serial interface starting...
mavlink: DOWNLINK MODE
mavlink: UART is /dev/ttyS2, baudrate is 57600

[fcservo] default PWM output device
<fcservo> MODE_12PWM
<fcservo> set_pwm_rate 0 50 50
[fcservo] starting
<fcservo> adjusted actuator update interval to 20ms
<fcservo> MIXERIOCRESET

<fcservo> MIXERIOCLOADBUF

<fcservo> new MixerGroup

<fcservo> set_pwm_rate 0 50 400
<fcservo> set_pwm_rate fff 50 400
<fcservo> adjusted actuator update interval to 2ms
[uorb] already loaded
uORB started
ADC
<adc> init done
[MPU6050] on I2C bus 2 at 0x69
[MPU6050] Ready.
[HMC5883] on I2C bus 2 at 0x1e
[HMC5883] Ready.
[MS5611_I2C] on I2C bus 2 at 0x77
[MS5611] Ready.
[sensors] Initializing..
sensors_task: using system accel
sensors_task: using system gyro
sensors_task: mag cal status changed
preflight_check [38:100]
commander: starting
commander: No RGB LED found
sdlog2: logging to directory: /fs/microsd/sess003
sdlog2: log buffer size: 16384 bytes.
[gps] starting
[gps] failed to open serial port: /dev/ttyS3 err: 2
Extended Kalman Filter Attitude Estimator initialized..

position_estimator_inav: started.
multirotor_att_control: starting
multirotor_pos_control: start
multirotor_pos_control: started
sdlog2: start logging.
sdlog2_writer: logging to: /fs/microsd/sess003/log001.bin.
position_estimator_inav: init baro: alt = 45.242
position_estimator_inav: main loop started.

Read more…