aerospace engineer

Post Reply
aonsquared
Posts: 5
Joined: Tue Nov 14, 2017 10:41 am

aerospace engineer

Post by aonsquared » Fri Nov 17, 2017 12:18 pm

Hello!

I'm Arthur, based in the UK. I'm new to STM32, been programming AVR through Arduino for the past 5 years or so but I've started outgrowing the limited RAM, flash and power of the AVRs.

I'm an aerospace engineer, specialised mostly in aerodynamics and structures, but I've had electronics as a hobby since I was in school.

I'm now making altimeters using STM32s, particularly the STM32L476. I might tinker with STM32H7s when I get my hands on the H7 Nucleo later on. I'm a bit of an all-rounder in terms of hardware and software knowledge, but I have lots to learn, so I might be the one asking questions for a while before being able to contribute :D

User avatar
RogerClark
Posts: 7447
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: aerospace engineer

Post by RogerClark » Fri Nov 17, 2017 8:36 pm

Hi Arthur

Sounds like an interesting project.

I just wonder why you need such a powerful mcu for what appears a simple task.

How are you measuring altitude ? I presume its barometric pressure?
I know the Bosch sensors like the BMP280 are good at measuring changes in barometric pressure in a domestic environment, but I am not sure how they work for use with aviation.

aonsquared
Posts: 5
Joined: Tue Nov 14, 2017 10:41 am

Re: aerospace engineer

Post by aonsquared » Fri Nov 17, 2017 10:41 pm

A simple MCU to talk to BMP280 doesn't need to be powerful at all - just I2C, avrs can do it quite easily.

But I'm now adding lots of things - a high resolution LCD, an MPU9250 sensor, bluetooth, a GPS antenna and getting it to calculate heading, ground track, glide slope and navigation among other things which is why I've started on STM32.

I've actually built myself a wrist computer with an STM32 and will take it with me on a night skydive (my hobby) early next month :D I'm using the official STM32 core, but grumpyoldpizza's core has caught my eye and it will probably be the basis for my future projects and hopefully I can contribute back to it eventually :)

User avatar
RogerClark
Posts: 7447
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: aerospace engineer

Post by RogerClark » Sat Nov 18, 2017 2:59 am

HI Arthur

OK. That explains things ;-)

I originally started to look at the STM32 to process data from one of those IMU sensors

aonsquared
Posts: 5
Joined: Tue Nov 14, 2017 10:41 am

Re: aerospace engineer

Post by aonsquared » Sat Nov 18, 2017 9:17 am

I made my first altimeter with an Attiny85 with 8kb of flash and 1kb of sram - I had to do some hacks to make the sketch fit, and also work around the lack of floating point in the hardware. I'm quite used to making code as efficient as possible... so I've barely scratched the surface of what my STM32L476 is capable of :D

State estimation, quaternions and computer vision is my thing if anyone needs advice with those.

User avatar
RogerClark
Posts: 7447
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: aerospace engineer

Post by RogerClark » Sat Nov 18, 2017 11:03 am

When I looked at the MPU9150 I was using a library called RTIMU, but I must admit I didn't fully understand all the maths.

I was hoping to get the the rough position of a object using the MPU9150 as an IMU sensor, but it was no good at all because any small errors got double integrated and hence the error got worse and worse over time.

I know there are things like the kalman filter which help with this, for known environments (I've seen demos where the IMU tracks people as they walk , but in this case, they know that the walk on a semi level surface and that each step is usually 1 metre long etc etc).
But as I didnt have a specific goal in mind, I didnt peruse it.

BTW. I do have some aeronautical experience, as I use to have a UK PPL, but that was 20 years ago, when I had more disposable income, and regulations were not strict etc etc

aonsquared
Posts: 5
Joined: Tue Nov 14, 2017 10:41 am

Re: aerospace engineer

Post by aonsquared » Sat Nov 18, 2017 3:51 pm

Yes, Kalman filters would improve it, but the cumulative error would still be there.

Unfortunately accelerometers and gyroscopes cannot be made more accurate because of regulations rather than technical limits,otherwise they will become subject to ITAR regulations (anything better than 130 ug or 130ppm stability and 1250ppm repeatability I think).

So I use the magnetometer in the MPU9250 to periodically correct the gyroscope, and the GPS to correct the position estimate (which would only work outdoors). I did manage to fit a Kalman filter in an Atmega328p, but had to make some compromises, which I won't have to with the STM32L476. Also AVRs don't have debug capability. :)

User avatar
RogerClark
Posts: 7447
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: aerospace engineer

Post by RogerClark » Sat Nov 18, 2017 6:51 pm

Hi Arthur

Re:ITAR

It didnt cross my mind that the issue was regulations rather then technical.


Probabiy not much use for when you are at altitude, but the "optical flow Sensors" ( while have a camera like in a mouse and calculate movement based on changes to sequential images), are becomming popular with drone ( quadcopters) to provide anither form of position data input.

I suspect they could be used as a landing aid, but you would probabky need to coreect for pitch and roll.


https://www.ebay.co.uk/itm/New-Optical- ... 1995547551

I bought 2 a bit like the one in the link, and strangely mine have a stm32f101 on the back of the board, so I can reprogram them to do additional processimg if I want, rather then them just outputting x,y via serial

aonsquared
Posts: 5
Joined: Tue Nov 14, 2017 10:41 am

Re: aerospace engineer

Post by aonsquared » Sat Nov 18, 2017 9:31 pm

Ooh that optical flow thing is interesting - I was working on that a lot years ago with OpenCV on Linux. I actually wrote the "Median Flow" implementation there in C++, but it's actually a massively parallel computation that suits GPUs better (or FPGAs) than regular processors.

However those sensors seem cheap enough that I might just buy one to tinker around with :) thanks for the link!

User avatar
RogerClark
Posts: 7447
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: aerospace engineer

Post by RogerClark » Sat Nov 18, 2017 10:09 pm

Re: Flow sensor

The lens on the one I have is adjustable, so can be used at various distances, so perhaps may work at 100ft or more. No idea about what it would do if you were at FL50 etc ;-)

But, like you day they are cheap enough to warrant buying one to try, and they may provide additional data when on final etc

Post Reply