Quadcopter project - need some advice

What are you developing?
Post Reply
bumbur
Posts: 9
Joined: Thu Oct 20, 2016 5:55 pm

Quadcopter project - need some advice

Post by bumbur » Tue Nov 08, 2016 6:15 pm

Hi,
I am doing a quadcopter as a project at my university. I have a plan and started testing my devices but before I actually start real work I wanted to ask you - what do you guys think about it all, if it's okay etc. So my setup is:
- STM32F103C8T6 board
- USB2TTL adapter
- gyro+acc MPU6050
- barometer BMP180
- WiFi ESP-12 ESP8266 (it will be used for controlling the quadcopter, I know it's not the best solution but it's cheaper this way)
- 7.4V 2000mAh 25C Lipo Battery
- 6x4 Propellers
- 4x A2212/6T 2200KV Brushless Motors+30A Speed Controllers

I want to connect MPU to I2C1, BMP to I2C2, WiFi to UART1. Power these devices from the board. Power board and ESCs from the baterry using simple power distribution board (and also use a voltage regulator for connection between distribution board and the main board to make the voltage lower, around ~3.289V). Will it work this way?

I wanted to use stm32 standard peripheral library because there are a lot of examples for it but I had some problems with simple UART communication, probably wrong clock settings in my project but I just couldn't figure it out or find working project for my board. So then I tried HAL library with generated settings and it was working fine. I moved to testing devices, I edited this library https://stm32f4-discovery.net/2014/10/l ... r-stm32f4/ to make it work on my stm32f1 and I succeeded but data received from MPU was really messy - I mean, without touching the device data was jumping up and down. I thought MPU was faulty but then I used jrowberg/i2cdevlib library (and stm32duino) and it's working flawlessly. I'm just guessing, but is it because jrowberg's library uses DMP and the first one I posted doesn't so one would need to use filter along with it :?:
Anyhow I loved how simple it is to write code in Arduino. So even though I really don't want to give up on Arduino, I'm not sure if my teacher will let me do this project this way as "it's rather high-level programming", so as a backup plan I would like to ask you if there is any alternative to jrowberg library for MPU6050 with DMP using SPL or HAL libraries as I couldn't find any.

Besides all that stuff, I wanted also:
- use freeRTOS to control whole program
- read data from MPU and BMP and pass it to functions which would figure out how to change motors speed
- pass simple information through wifi from my laptop/phone, like fly forward etc.

I am rather a newbie in the electronics and microcontrollers world so any advice is really appreciated. I could make some easier projects first but I really wanted to do something cool and interesting I know it would be best to write my own libraries rather than use ready stuff but unfortunately I don't have enough time for that :(

stevestrong
Posts: 1835
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Quadcopter project - need some advice

Post by stevestrong » Tue Nov 08, 2016 8:34 pm

Are you sure u want to use freeRTOS? What is the reasoning behind?
Otherwise i would just use stm32duino package +Arduino and implement each feature one after another.
First try i2c. If it works then go for the next feature and so on.

bumbur
Posts: 9
Joined: Thu Oct 20, 2016 5:55 pm

Re: Quadcopter project - need some advice

Post by bumbur » Tue Nov 08, 2016 9:19 pm

stevestrong wrote:Are you sure u want to use freeRTOS? What is the reasoning behind?
Otherwise i would just use stm32duino package +Arduino and implement each feature one after another.
First try i2c. If it works then go for the next feature and so on.
Like I said it is a project at the university so the logic behind it was to mess around with more stuff connected with microcontrollers (even though it's not necessary). I thought that I can use it along with stm32duino + Arduino (just to implement tasks etc.), can't I? :?

bianchifan
Posts: 82
Joined: Sun Oct 18, 2015 1:27 pm
Location: W'tal, Germany

Re: Quadcopter project - need some advice

Post by bianchifan » Wed Nov 09, 2016 4:08 pm

bumbur wrote:- WiFi ESP-12 ESP8266 (it will be used for controlling the quadcopter, I know it's not the best solution but it's cheaper this way)
Outch..
Did I understand correctly and you like to develop all stuff from scratch by your own???

A friendly warning.. I saw things crashing down from sky more than once!!!
An open source controller soft may help to start, for ex. taulabs, libre pilot, cleanflight...

2thehardware..
MPU920 is more accurate.
F103 is usable but F3 is better (FPU).
A readymade "flight controller" like CC3D mini or SP3 saves space and weight.

Motors like to burn and crash, you' ll need much more than only four ;)
6" props will suck lots of current, no way for 2000mAh/25C.

Feel free to think about 3S and 5", GemFan, Kingkong, and so on...
Feel free to experiment with several setups of 5" / 6" props.
You will need definitely more than 4pcs...

IMHO the remote controller needs reliable gimbals.
First I wrote some arduino stuff and took a cheap WLtoys from banggood, the gimbals are only fucking crap.
At least I decided for a used DEvo 7e and a "Deviation TX" workflow on Ubuntu but sadly I switched the stock TX module...

Post Reply