Micro Python Quadcopter

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
Turbinenreiter
Posts: 269
Joined: Sun May 04, 2014 8:54 am

Re: Micro Python Quadcopter

Post by Turbinenreiter » Tue Nov 04, 2014 5:40 pm

so, here is my skin:
https://github.com/turbinenreiter/pyskin-IMU

It would use double sided male headers on the unused pins, so those can be used on the next skin in the stack, servos or, in our case, motor controllers.
A silk screen and solder resist would be nice, I guess, but I haven't figured that out yet.
My biggest concern would be trying to use it anywhere near my kids - they are still small enough that it would be quite dangerous to them, and they could quite easily do a lot of damage to it.
I remember my dad having the same problem. He solved it by raising me according to aircraft maintenance and operation safety rules. Still can't change a freaking light bulb without a checklist :D

blmorris
Posts: 344
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: Micro Python Quadcopter

Post by blmorris » Tue Nov 04, 2014 9:33 pm

@Turbinenreiter - Got it, had a look. Its a good start, but there are a few problems that Eagle's Design Rule Checker (DRC) found. (Also a bunch of cosmetic things that we could fix but don't need to.)

The solder mask and paste screen layers are already in your drawing - 29-tStop, 30-bStop, 31-tCream, 32-bCream; you just need to turn on the display. (I imagine the names will be a bit different if you are running the program in German).

I have some more questions and comments, I'll write more in a little bit.

-Bryan

User avatar
pythoncoder
Posts: 1960
Joined: Fri Jul 18, 2014 8:01 am

Re: Micro Python Quadcopter

Post by pythoncoder » Wed Nov 05, 2014 9:09 am

This looks like a great project. I'd love to have a crack at it when I get the time. I hope I'm not preaching to the choir here but I gather there's some rather "interesting" maths involved in converting the readings from the IMU into the yaw pitch and roll values required for aircraft stabilisation. It's beyond me, involving Quaternions. There's some example code for the MPU-9150 here:
https://github.com/sparkfun/MPU-9150_Br ... 0_DMP6.ino
Incidentally the MPU-9150 is a great piece of kit IMO - the first I've used with a magnetometer which works reliably and a decent low drift gyro.

Regards, Pete
Peter Hinch

tom
Posts: 1
Joined: Wed Nov 05, 2014 8:34 pm

Re: Micro Python Quadcopter

Post by tom » Wed Nov 05, 2014 8:46 pm

Hi all,

Just to pitch in here, I'm the "other guy" that's working with Damien on this little project. Our hardware is identical (we ordered two of everything :) ), and I also just got a chance to throw things together quite roughly last night. It seemed too tempting not to try running all four motors, despite the lack of any stabilising control! My flatmate kindly filmed it for me, as I needed hands on for stabilising...

https://www.youtube.com/watch?v=UmAZzPdgcH8

As it happens the power supply I'm using provides *just* enough power for the thing to lift off the ground and hover, which might be a good safety net when debugging flight controller code (should hopefully limit the damage I can do!).

blmorris
Posts: 344
Joined: Fri May 02, 2014 3:43 pm
Location: Massachusetts, USA

Re: Micro Python Quadcopter

Post by blmorris » Thu Nov 06, 2014 4:02 am

After a little discussion with @Turbinenreiter I have volunteered to clean up and publish his navigation board design. I suggested that it would probably be possible to arrange things to fit a footprint for this GPS Receiver on the board as well- it is a fully integrated receiver module with a built-in antenna in a 16x16x5 mm package requiring essentially no external components to work; pretty much just provide it with 3.3V and put it out in the open and you will start receiving GPS location data from the UART in under a minute.
However, at $30 it would add substantially to the cost of the navigation board, so I would want to make it optional; however, while it is possible to hand-solder a module like this I expect that would be tricky for most users.
Any votes on including this? Possible alternative parts for GPS? I have some more questions for potential users, so I'll start another topic soon to discuss the navigation board, but I wanted to get a sense of peoples interest here.
pythoncoder wrote:I hope I'm not preaching to the choir here but I gather there's some rather "interesting" maths involved in converting the readings from the IMU into the yaw pitch and roll values required for aircraft stabilisation. It's beyond me, involving Quaternions. There's some example code for the MPU-9150 here:
https://github.com/sparkfun/MPU-9150_Br ... 0_DMP6.ino
Yes, quaternions aren't a topic I would want to have to tackle on my own (complex numbers with two more 'imaginary' components - fun!) but fortunately we probably don't have to; as you pointed out there is plenty of work already out there. Another issue if we include GPS would be figuring out how to integrate that data with the IMU data. The IMU should be very useful for small movements over short time scales, and GPS provides a solid reference for large movements over longer time scales, but it isn't obvious to me how to link them - however, @Turbinenreiter suggests that this is also a 'solved problem', so it should be possible to make use of prior work.
-Bryan

pfalcon
Posts: 968
Joined: Fri Feb 28, 2014 2:05 pm

Re: Micro Python Quadcopter

Post by pfalcon » Thu Nov 06, 2014 7:22 pm

@Damien: I envy you that you can start doing application-level stuff with uPy ;-). I tried few projects, but still don't run anything in "production" ;-).

Damien
Site Admin
Posts: 545
Joined: Mon Dec 09, 2013 5:02 pm

Re: Micro Python Quadcopter

Post by Damien » Thu Nov 06, 2014 10:28 pm

pfalcon wrote:I envy you that you can start doing application-level stuff with uPy ;-). I tried few projects, but still don't run anything in "production" ;-).
I wouldn't quite call it "production": I have 1 motor spinning, using the standard Servo class (and also custom PWM), and not much else. In fact, this will be 1 of many projects that, as you said, I apply a round-robin schedule to :)

I also wanted to give uPy a good run for its money, so I can see how it works in the field and hopefully improve it more. For instance, I will need to add a watch dog class, and improve the boot up time so it can recover from a crash (which in this case could lead to a real physical crash!). I think a quadcopter is a good (and fun) test to see if the board (and uPy core software) is powerful enough to do a tight and critical feedback loop. I would even like to build it around uasyncio to get that tested as well.

There's something really satisfying about typing "class Quadcopter:" in your main.py and realising that it actually is a quadcopter, not just some model or simulation!

rbli
Posts: 6
Joined: Sun Nov 09, 2014 5:19 am

Re: Micro Python Quadcopter

Post by rbli » Thu Nov 13, 2014 4:24 am

Why not bluetooth control from mobile devices or other boards?

Turbinenreiter
Posts: 269
Joined: Sun May 04, 2014 8:54 am

Re: Micro Python Quadcopter

Post by Turbinenreiter » Thu Nov 13, 2014 3:46 pm

rbli wrote:Why not bluetooth control from mobile devices or other boards?
Because bluetooth range isn't enough to do the real fun stuff.

coanda
Posts: 5
Joined: Sun Jul 27, 2014 11:04 pm

Re: Micro Python Quadcopter

Post by coanda » Sun Jan 04, 2015 9:52 pm

Hello guys - I've spent a couple of years researching quadcopters/autonomous, understanding the design and operation of them. There's an explanation of quaternions in this book which is quite good (imo):

http://www.amazon.co.uk/gp/product/0691 ... ge_o04_s00

I'm currently looking in to using a pyboard to control a stabilised LIDAR scanning unit which can be mounted wherever you want and streams data offboard. The LIDAR sensor can be used outdoors and can be programmed for different scan patterns / strategies.

Post Reply