DYI Flight Controller based on timecop's STM32 mini r0

Post Reply
fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

DYI Flight Controller based on timecop's STM32 mini r0

Post by fiendie »

Hi guys,

I just wanted to share my results of trying to build a DIY flight controller based on timecop's STM32 mini development board (http://abusemark.com/store/index.php?main_page=product_info&cPath=5&products_id=40).
The IMU is an MPU-6050-based sensor board from Drotek with MS5611 Baro and HMC5883L Magnetometer (http://www.drotek.fr/shop/en/62-imu-10dof-mpu6050-hmc5883-ms5611.html).
You can find the necessary code changes to baseflight for changing the sensor alignment via CLI in my github repo (https://github.com/fiendie/baseflight/tree/master) but they should find their way to the main codebase pretty soon.

The rest of the components:
* HobbyKing F-20A ESCs with SimonK firmware
* Suppo 2208/17 motors
* GemFan 8"x4.5 props
* FrSky DX8 SP receiver

A short video of the first flight with near default settings.
I just trimmed up P for Pitch and Roll to 7.0, Throttle Expo to 0.40, Roll/Pitch Rate to 0.5 and RC Rate to 1.0:

http://www.youtube.com/watch?v=KXYMSUMkIAo

Please excuse the overall mess in my living room ;)

Photos of the board and the whole copter:
Image
Image

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by copterrichie »

AWE!! the spirit of reinventing the egg. LOL

I just love DIY Projects, great job.

JUERGEN_
Posts: 70
Joined: Sat Sep 08, 2012 9:12 am

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by JUERGEN_ »

fiendie wrote:I just wanted to share my results of trying to build a DIY flight controller based on
timecop's STM32 mini development board (http://abusemark.com/store/index.php?main_page=product_info&cPath=5&products_id=40).
8-)

I've always wondered what that means. :mrgreen:

Image

there is no documentation :?:

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by timecop »

Its just a breakout board with all IO labeled (i.e. PA0, PA1 etc).
http://www.st.com/internet/com/TECHNICA ... 161566.pdf
is all the documentation you need. i.e. page 25 for pinout and then the table following on page 27+ for pin descriptions.

JUERGEN_
Posts: 70
Joined: Sat Sep 08, 2012 9:12 am

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by JUERGEN_ »

timecop wrote:Its just a breakout board with all IO labeled (i.e. PA0, PA1 etc).
....

at least one picture would be appropriate :?: :roll:

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by fiendie »

JUERGEN_ wrote:I've always wondered what that means. :mrgreen:

Well, now you know ;)

there is no documentation :?:

Here's a pinout which you can just compare to the datasheet of the STM32F103CBT6 and the schematics of the naze32 rev4 (http://afrodevices.googlecode.com/files/naze32_rev4.pdf):

Image

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by doughboy »

slightly off topic. what did you use for legs on your quad?

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by fiendie »

doughboy wrote:slightly off topic. what did you use for legs on your quad?

Some water pipe insulation from the hardware store.
This is from an older build but you'll get the idea: https://dl.dropbox.com/s/z2wwk4yhlgijbfq/Quadcopter%20Landing%20Gear%20Reinforced.jpg?dl=1

JUERGEN_
Posts: 70
Joined: Sat Sep 08, 2012 9:12 am

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by JUERGEN_ »

JUERGEN_ wrote:
fiendie wrote:I just wanted to share my results of trying to build a DIY flight controller based on
timecop's STM32 mini development board (http://abusemark.com/store/index.php?main_page=product_info&cPath=5&products_id=40).
8-)
I've always wondered what that means. :mrgreen:

Image

there is no documentation :?:

na, geht doch. Image

gibt es das Püpchen dazu ? :mrgreen:

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by fiendie »

JUERGEN_ wrote:
JUERGEN_ wrote:
fiendie wrote:I just wanted to share my results of trying to build a DIY flight controller based on
timecop's STM32 mini development board (http://abusemark.com/store/index.php?main_page=product_info&cPath=5&products_id=40).
8-)
I've always wondered what that means. :mrgreen:

Image

there is no documentation :?:

na, geht doch. Image

gibt es das Püpchen dazu ? :mrgreen:

LOL

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by NikTheGreek »

http://abusemark.com/store/index.php?ma ... ucts_id=40
How much cost the shipment to Greece ?

kanaman
Posts: 3
Joined: Wed Jul 10, 2013 3:07 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by kanaman »

? what?

ReadError
Posts: 70
Joined: Sun Sep 09, 2012 11:08 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by ReadError »

Jeeze guy, read the site its clearly posted.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by timecop »

Zero, since it's not in stock :)
But I suppose I should make some.
Maybe if I have time this week.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by copterrichie »

timecop wrote:Zero, since it's not in stock :)
But I suppose I should make some.
Maybe if I have time this week.


While you are at it, can you also make some breakout boards with a REAL MPU-6000 on them? Or what about a ST32 with a real MPU-6000 connected SPI?

Don't get upset, just asking.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by timecop »

Not upset. Breakout - too much effort as I don't have any made.
STM32 + MPU6000 + HMC5983 + MS5611 all on SPI = done, but no software written for it.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by copterrichie »

timecop wrote:Not upset. Breakout - too much effort as I don't have any made.
STM32 + MPU6000 + HMC5983 + MS5611 all on SPI = done, but no software written for it.


Well damn, care to sell me one? Promise no repeats from the past.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by timecop »

When I say no software, I really mean it. Unless you consider a once-flown-but-never-tested taulabs port "software".
It might not be worth your time.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by copterrichie »

timecop wrote:When I say no software, I really mean it. Unless you consider a once-flown-but-never-tested taulabs port "software".
It might not be worth your time.


Well Timecop, all I really have is time, not sure how much that I have remaining. :)

jihlein
Posts: 27
Joined: Sat Sep 08, 2012 3:10 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by jihlein »

STM32 + MPU6000 + HMC5983 + MS5611 all on SPI = done, but no software written for it.


Which STM32? this sounds like a great combination for the F3......

I can modify some code I have for this configuration real quick.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by timecop »

F303, I had it done like 5 months ago, just no time to do code or anything else with it.
http://i.imgur.com/TTU2NLZ.jpg
There's a crusty taulabs port for that hardware here -> https://github.com/trollcop/TauLabs for pinout.

jihlein
Posts: 27
Joined: Sat Sep 08, 2012 3:10 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by jihlein »

I ran out of time on the baseFlightplus code with the F103 and I2C sensors. Never got around to doing non-blocking I2C.

With SPI sensors and F303, it would work (I have a version running on the Discovery F3, with mixed I2C and SPI sensors). Let me look at the pinouts and see what it would take to convert.

jihlein
Posts: 27
Joined: Sat Sep 08, 2012 3:10 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by jihlein »

I have my F3 code ported per the IO map. Leads me to a couple questions.

1)Does this new board use native STM32 USB, or does it still have a uart-usb bridge chip? If the bridge chip, which uart is it connected to? Hope it's the bridge chip - I don't have the STM32 F3 VCP working yet......
2)That white JST connector, is that a Spektrum connector? Again, which com port.

Also not sure if my sensor phasing is correct, but that's a simple fix. The port is very simple, would only work with quad x or hex x for now, no servo PWM outputs. Really should have the baseFlight output pin mapping features added, but for proof of concept to get something working, this code would suffice. It's been flown in the F4 variant and works pretty well. The F4 variant is currently being tested with a vertical velocity hold mode and vertically damped altitude hold mode.

FWIW, this effort made me look at the HMC5983, neat that they added temperature compensation. I can add the HMC5983 spi driver to my library....

Nice work TC. Let me know if you have the time/desire to test this.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: DYI Flight Controller based on timecop's STM32 mini r0

Post by timecop »

1) Native USB. Got tired of USB>Serial junk. VCP is not hard to do, plus you get free DFU bootloader. Central rx/tx pins are connected to USART2.
2) JST goes to PB11, which is USART3_RX, or TIM2_CH4. This will allow me to use it for a couple things, either spektrum rx, or telemetry out (to osd/whatever), or as frsky digital telemetry input (from flvs-01/fas-100) using PWM capture.

There's also canrx/tx on last 2 RX channels.. additional uart at PA2/3 (motors 3/4).

I made 3 boards because aadamson asked, so you can have one of them. The driver framework for my F1 stuff needs pretty bad rewrite (its really messy already) before I even start thinking about hacking in F3 support into it.

Post Reply