Coder Social home page Coder Social logo

stmicroelectronics-centrallabs / st_drone_fcu_f401 Goto Github PK

View Code? Open in Web Editor NEW
157.0 40.0 114.0 71.07 MB

Toy drone project for STEVAL-FCU001V1 flight controller unit demo board.

License: Other

C 93.67% HTML 1.60% C++ 1.02% Assembly 3.46% Batchfile 0.01% Objective-C 0.01% Java 0.18% OpenSCAD 0.01% Makefile 0.06% PowerShell 0.01%

st_drone_fcu_f401's Introduction

ST_Drone_FCU_F401

Toy drone project for STEVAL-FCU001V1 flight controller unit demo board. Official documentation of the evaluation board (and link to Online Distributors to buy it) can be found in STMicroelectronics website: http://www.st.com/content/st_com/en/products/evaluation-tools/solution-evaluation-tools/sensor-solution-eval-boards/steval-fcu001v1.html

ST Drone Zone community and forum: https://community.st.com/community/drone-zone

The project is intended for developers, makers, universities, research institutes, drone enthusiasts, who are approaching Drone design for the first time and are looking for a project easy to understand and to customize. It's not intended as a commercial FCU and the features implemented cannot be compared to major FCU projects present in the market (Betaflight, Cleanflight, Ardupilot, PX4, ...) sustained by a large commmunity. The STEVAL-FCU001V1 and relative FW project is also a good reference board to evaluate performance of 6-axis IMU sensors, pressure sensor, magnetometer, BLE module, in real flight condition. Any contributor to the project (for any aspect, FW project, Smartphone application, original frame design, ...) in the Makers community is welcome.

The FW project has been validated on a mini drone platform with following characteristics:

  • 65mm propeller
  • 8520 DC motors
  • 1S Lipo battery 500-600mAh
  • Overall weight below 70g
  • External Remocon RX module with PWM input (50Hz, 1-2msec Ton)

Tests have been done also with an external ESC configuration (please checkHW User Manual of the board documentation for HW modifications needed to the circuit to bypass the DC motor driver Mosfet onboard) and FPV250 frame, but not yet extensively.

Latest Official version with BLE remocon Android app (170318)

New official Release with BLE remocon (new Android app available).

Major new features:

  • Drone controlled by BLE app
  • In case BLE connectivity is used, Sensor calibration procedure and Arming/Disarming commands sent by the app
  • Disarming and motor off in case of BLE connectivity lost
  • Datalog of FCU data sent by BLE (Motion MEMS sensor raw data, Pressure sensor raw data, Magnetometer sensor raw data, Battery level, RSSI level FCU side, Arming status)
  • LED1 and LED2 ON when sensor calibration done and motor armed

Future implementations in plan:

  • USB Virtual COM not yet implemented
  • Sensor calibration must be performed at each power on of the FCU board. In future implementation the sensor calibration offset value should be stored in Flash
  • Pressure sensor and Magnetometer (for e-Compass) data can be read in actual release, but they are not used in the stabilization algorithm of the drone. In future implementations altitude control and RTH (Return To Home) features may be added.

First Official version (221117)

Known bugs with current release and future implementations in plan:

  • If RF connection is lost DC motors are still rotating according to last value sent by Remocon. To insert a timeout to switch off the motors in case of RF connection lost.
  • BLE communication with external app (at first for Android) under debugging.
  • USB Virtual COM not yet implemented
  • Sensor calibration must be performed at each power on of the FCU board. In future implementation the sensor calibration offset value should be stored in Flash.
  • Pressure sensor and Magnetometer (for e-Compass) data can be read in actual release, but they are not used in the stabilization algorithm of the drone. In future implementations altitude control and RTH (Return To Home) features may be added.

Beta version with BLE remocon feature (301117) (app for Android devices - OLD version, new one already released)

New features:

  • BLE remocon or external remocon selectable by #define in rc.h
  • with BLE remocon motors switched OFF if connection is lost
  • Solved issue of drift at liftoff by changing to correct PID parameters for minidrone frame (modified 18th Dec 2017)

Known bugs or features to be added in future releases:

  • BLE connectivity still under debugging, not yet extensively tested
  • Android app not yet extensively tested
  • Data from FCU sensors to Android app not yet implemented
  • Information of motors armed to Android app not yet implemented
  • Only 4 channels (4 joystick channels for flight control, THR, AIL, ELE, RUD) sent via BLE managed by FCU. Other channels to be added.

st_drone_fcu_f401's People

Contributors

gmessina72 avatar messinajo avatar nikapov-st avatar teomaras76 avatar vkomenda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

st_drone_fcu_f401's Issues

HW Component failure

Hello, my magnetometer does not initialize .
It was working fine, now it stopped working spontaneously.
Please direct me to hardware support.

Turning off the drone

Hello how can I turn off the board without disconnecting the battery every time? Have I overlooked any option in the appDrone? There's always a blinking LED...

New firmware not working

i compiled and flashed my fcu001v1 using the latest MDK project, i use MDK5 .
after the flashing both LEDs LD1 and LD2 remain lit and i cant find my device on the bluetooth app.
anybody experienced similar issue ?

BLE Remocon Firmware + app v11

Hello I have an issue with the android app, as soon as I arm the drone using the proper command sequence, the DC motors start to spin but the application loses the connection with the STEVAL board.

Then I'm forced to reset the board and start it over.

Any help?

Cannot Program Steval-FCU001V1 in System Workbench with the provided files

In System Workbench, the file that defines the memory locations for the microcontroller chip are for the STM32F401VCT. I bought my board in November 2019 and it has the STM32F401CCU chip on it. My guess is that ST changed the chip on the board. I'm working on creating a new project to program the board but would appreciate the System Workbench files being updated to work with the current microcontroller on the board. Thanks.

App - Motors not armed

even if you arm the motors, in the app GUI you always see the "Not armed" red button.
It will be also useful to have an indicator of the battery voltage level.

SWD not working

The device is not working with ST LINK V2 provided in the STM32F4 Discovery.
does the device support DFU ?
Is the USB micro port configured as USB device on factory firmware ?

Reading sensor values in AccGyroMagCharHandle using Bluez

I am trying to read the ACC+GYRO+MAG data stream using bluez. So I connect to the FCU:
pi@raspberrypi:~ $ sudo gatttool -b EF:2F:D0:24:0D:B2 -t random -I
[EF:2F:D0:24:0D:B2][LE]> connect
Attempting to connect to EF:2F:D0:24:0D:B2
Connection successful

I have put a printf in sensor_service.c to read the AccGyroMagCharHandle:
ret = ACI_GATT_UPDATE_CHAR_VALUE(HWServW2STHandle, AccGyroMagCharHandle, 0, 2+332, buff);
PRINTF("%u\n", AccGyroMagCharHandle);

From my PC serial terminal I can see successful connection, and that the handle value is 27 decimal (0x1b).
However, when I try to read this handle, I always get 1 line of constant data:
[EF:2F:D0:24:0D:B2][LE]> char-read-hnd 1b
Characteristic value/descriptor: 10 1c 00 1b c5 d5 a5 02 00 36 ac e1 11 01 00 00 00 e0 00

I was hoping to get a stream of data, similar to sensortile as explained here:
http://iot.ee.ucla.edu/UCLA-STMicro/index.php/Home

Can you please help me with the correct way of reading this data?
Thanks

Can't find Drone via BLE

I uploaded Official release with BLE Remocon - 170318 to board via STLink with TrueSTUDIO. Then LED 1 and LED 2 off. (I toggled RST button). But can't find Drone in Android app.

image

External ESC

Hello,
I read that some hardware changes are required to use fcu with external ESC.
Presence of MOSFET drivers at pwm out should not be a problem to external ESC right ? (We just have a larger current limit superficially).
I wish there were schematics or videos of FCU with external esc of some 30A.
Thanks

Add comments to SPI Half-Duplex code

Hi,

Could you add comments to the code that explain the reason for the 67 __asm("dsb\n"); in the SPI_Read function. The comment that is there suggests it has to do with SPI clock timing, but a comment explaining how 67 was derived would be very helpful.

https://github.com/STMicroelectronics-CentralLabs/ST_Drone_FCU_F401/blob/master/STM32%20FW%20Project/Official%20release%20-%20170120/Drivers/BSP/STEVAL_FCU001_V1/steval_fcu001_v1.c#L523-L533

SPI_Read_nBytes also has 2 __DSB(); calls and it would be helpful to add a comment on why 2 DSB's were used.

https://github.com/STMicroelectronics-CentralLabs/ST_Drone_FCU_F401/blob/master/STM32%20FW%20Project/Official%20release%20-%20170120/Drivers/BSP/STEVAL_FCU001_V1/steval_fcu001_v1.c#L611-L612

Thanks!

Battery voltage

The battery voltage measurement is not representative. It is providing a percentage between 0V to 4.2V, so the drone actually die at 80% of the battery.
I propose this modification:

// VBAT percentage between 3.7 and 4.2V
VBAT = ((VBAT - 3.7f)*100.0f)/(4.2f-3.7f);
if (VBAT < 0) VBAT = 0;
MCR_BLUEMS_F2I_1D(((int32_t)(VBAT)), intPart, decPart);
BattToSend = intPart*10+decPart;
if (BattToSend > 1000){
	BattToSend =1000;
}

I miss official release binaries

Hello. I bought STEVAL-FCU001V1 kit. When I connected the USB power, it looked that it was working, but I didn't succeeded with Bluetooth connection through Android application. I compile the project using SW4STM32, load the firmware (SWD), but it doesn't work right (both red LEDs blinks quickly - I lose debugging always around sensors init).

I want to load origin FW to check that board is still Ok. But I didn't find any binary release available. Is it possible to download origin binary, which is loaded during production?

Thanks.
Nelup

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.