Encouraged by the success of my previous custom board (Version 2), which happily carries my quad in the air (maiden flight) with some advanced features like self-stabilization, course lock, control loop operating at 400 Hz, etc., I decided to jump on a more ambitious project - the board with more sensors, more ports, etc.

In summary, the new board (Version 3) has the following parameters:

  • PIC24EP512GP806 MCU operating at 64 MHz;
  • Two MPU-6050 sensors (in the hope to achieve better vibration rejection) - one on the left and another one - on the right side of the board ;
  • New HMC-5983 magnetometer;
  • MPL3115A barometric altimeter that can be configured to report altitude instead of the raw pressure;
  • On-board 3.3V 1A voltage regulator;
  • 8 PWM ports for quad-, hexa-, and octo-copters and/or quad and camera control;
  • 4 UART ports for GPS, US-100 ultrasonic sensor, UART-enabled RC receiver, and Data Logger;
  • ICSP port for programming;
  • On-board signal LED and header for connecting external LED or buzzer (powered through MOSFET);
  • Standard size with mounting holes matching KK and MultiWii boards.

Here is the board overview (above)

I will be documenting every step of developing (mostly - porting from V2) firmware for this boards as well as sensors' calibration on my blog. Obviously, all the code is Open Source under the MIT License located in the SVN repository.

Views: 4047

Comment by mP1 on July 22, 2014 at 10:55pm

Any chance of selling these ?

Comment by Alex Zarenin on July 22, 2014 at 11:06pm

I do not do mass production - at least not yet :) However the Eagle files are provided and the PCB house that I use, https://www.oshpark.com/, accepts the ".brd" files for manufacturing boards - 3 copies of this board cost $48.00. The SW is also freely available - and I will be providing instructions for every piece.

However, if there will be sufficient interest, I may arrange with some manufacturing houses or through Sparkfun.com to manufacture these boards. However I still did not confirm that using two MPU-6050 will actually help to reject vibration.


Developer
Comment by Randy on July 23, 2014 at 5:16am

Alex,

One thing we've found with the Pixhawk is that it's good to actually use completely different accelerometers to reduce susceptibility to aliasing due to vibrations.  So if one runs at 800hz and the other at 1000hz it's less likely that you'll get aliasing on both at the same time.  Best of luck with your project.

Comment by Ravi on July 23, 2014 at 7:56am

it's a great job to design a flight controller single handedly. this type of project generally need a team. you knowledge can be of great help to the members of this blog. in improving the hardware.

Comment by Michael Ciurescu on July 23, 2014 at 11:36am

This is awesome!

I love PICs :)

When I got my F550 Hexa, I had the idea to make my own FC with a PIC32, but I never found the time for it, and also, I could not imagine the time to convert the existing code from other FCs to PIC, since starting from scratch would take far too long.

I bet you did not develop your code from scratch, what was the original? and how difficult is it to convert? also what compiler are you using?  (I am using MikroC PRO for my PIC projects)

 

My idea was to make my own custom FC, with many other options like built in OSD for FPV, with option to select from multiple cameras (for example to flip between FPV cam, or the GoPro on the gimbal). Also to add sensors (optical or sonar) in all directions and alert the user through the OSD when something is behind (left/right etc.) the drone.

Imagine using these sensors to program it to navigate automatically through a maze!!  or to automatically block you from getting too close to anything (like a building, tree, etc...)

 

Actually I got my F550 Hexa with the idea of making the above modifications to it, but I am having soooo many problems with it that most of my time I wasted just to get it to fly!  I got a MultiWii Pro board on it, and I hate it !!  I got it because I thought I would be able to modify the code to do the stuff mentioned above, but I could not get it to fly properly, I am still struggling with PIDs, GPS does not work, altitude does not work, and I am flying it with default PIDs (because nothing else seems to work) and also in acrobatic mode !!  I really hate that I spent so much time and got nothing working properly.  At the same time, I want to have some fun flying it !

 

Anyways... please give more details!  I'm exited to see someone making their own FC using PIC :)

Comment by Alex Zarenin on July 23, 2014 at 11:48am

Randy, it is possible to run two MPU-6050 at different refresh rates - like 1 kHz and 333Hz; I will check this option as well.

Comment by Rob_Lefebvre on July 23, 2014 at 12:03pm

1kHz is basically a straight multiple, and won't do as much to eliminate aliasing as two frequencies with different roots.  1kHz and 333Hx will both cause aliasing with frequencies of 1kHz, 2kHz, etc.

800Hz and 1kHz will only both alias at 4 and 8kHz.  

Comment by Alex Zarenin on July 23, 2014 at 12:30pm

Thomas, I am definitely not working for Microchip and this is not a master's thesis - a few details about me are here. This is my hobby project - I am just interested in understanding the minute details of flight controllers, and the best way to do it is to build one :)

 I am familiar with PIC - have been using them for my hobby for about 10 years and they work fine for me - my control loop (with all the calculations in floating point) runs at 400 Hz on a 40 MHz processor, which probably will somewhat improved with the new board running at 64 MHz. I am querying all the sensors at their maximum speed - for example, MPU-6050 I query every millisecond and average samples for the control loop. While raw power is important, careful programming may provide more benefits. Microchip also provides easy to use and free development environment, which was a big plus when I just started with MCUs.

Moreover, I am not sure I would be able to solder those STM32F4xx processors manually onto my board J I probably will migrate to 32-bit platform when PIC32MZ line will become available (only advertised for now).

Bottom placement of some parts is not an issue for me as I solder my boards manually; anyway, I do not pretend to make a product for sale or manufacturing at this time – I am just investigating some ideas and share my thoughts and designs with hobbyists.

There is no need for a USB interface on my board – it does have an ICSP header allowing for in-circuit programming with a $30 PicKit-3. What would I do with the USB port?

The previous version of the board that I use to fly my quad is very, very stable in the air (https://www.youtube.com/watch?v=kEo5DSe7PDg), but it gives me a rather large margin of error when I try to use integral over the vertical acceleration to estimate current altitude – that’s primarily what I am trying to achieve with two IMUs. Also I found out if I reduce DLPF (low-pass filtering) on MPU-6050 below 3 there is too much jitter in the output. DLPF=3 introduces about 5 msec delay in sensor output due to filtering (typical result for FIR or IIR digital filters) – I hope that by averaging 2 sensors I would get the same stable output with lower DLPF.

By the way, what MPU-6050 setting (specifically, DLPF and refresh rate) are you using in your design?

My LED can play Morse or any other kind of sequence asynchronously – allows me to stick with one LED/buzzer. I split digital outputs in two banks because primarily I plan to use it as a quad, which will provide other four pins for “gadgets”, but this can be reconfigured in SW.

If you need 5V (or any other voltage) on the output pins, it would be really easy to add a buffer on the board you are trying to control. The ESCs I use are happy with the 3.3V signal.

I would like to have full control over the design and programming of my boards – thus making HAL for ArduCopter is not an option. Anyway, it is my hobby – and I am not too interested in converting it into the business enterprise – kills the fun:)

Thank you,

--Alex

Comment by Alex Zarenin on July 23, 2014 at 12:39pm

Michael,

Actually I do develop all my code from scratch - no "ports", no "black-box" libraries. I do use ideas of other people, but just as the ideas or algorithms, but never code :) Very helpful for my development work were the articles by Bill Premerlani (member of DIYDrones) http://gentlenav.googlecode.com/files/DCMDraft2.pdf and Starlino at http://www.starlino.com/dcm_tutorial.html on DCM algorith.

All my code is available at https://code.google.com/p/custom-pic-quad/ and I recently started blog http://flightcontroller.blogspot.com/2014/07/introduction.html where I plan to discuss all details of the code.


T3
Comment by William Premerlani on July 23, 2014 at 3:43pm

Hi Alex,

I totally get why you are doing this. Its nice to know there are still members of diydrones who still want to "do it yourself". You have put an amazing amount of work into your hardware and firmware. Congratulations.

I am also a fan of the PIC.

I have a question about the relative orientation of your MPU and your magnetometer...

I notice there is a small amount of yaw rotation between them.

Why did you do that?

I assume you account for the rotation in your computations.

Best regards,

Bill

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service