Crazyflie 2 with GPS

Firmware/software/electronics/mechanics
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Crazyflie 2 with GPS

Post by jackemoore »

Hi,

This week I've been experimenting with the latest crazyflie-firmware and crazyflie-client-python installing both from source code using releases 2016-02 Feb 17 along with adding GPS to the crazyflie platform.

The PC client has been installed in Windows 7 64-bit after pre-loading Python 3.4. This PC client is also used to update the crazyflie firmware. While posting this message, I now see PC client 2016.4 Apr 13 was released today and I will try this out later.

Also, I've installed in Windows 7 64-bit the VMware Player with Bitcraze VM 0.6 and VM 0.8 in order to build the stm and nrf firmware from source code.

GPS was added to the crazyflie using the Ublox Max M8C Pico Breakout with chip antenna and mounted approximately 6 cm above the control board. Currently, the combined total weight is 32 g and I hope to reduce this somewhat later. See attached image of the
Crazyflie 2 with GPS
Crazyflie 2 with GPS
setup.

Software supporting the GPS receiver was adopted from my earlier development work using Python 2,7 with Folium Leaflet javascript. This prior work used 2015 releases of crazyflie-firmware and PC client for the baseline. One of the many benefits of the newer 2016 PC client releases is it is simpler to create maps and update the flight position of the Crazyflie. Specifically this made modifications to the GpsTab.py module much easier. An image of a working PC client GpsTab map that was being updated by the Crazyflie 2 while running in GPS 3D fix and WAAS (DGPS) correction mode is shown
here.
here.
The small red circle shows the starting or “Home Position” and the blue circle shows the current latitude & longitude “GPS Fix” position of the Crazyflie.

One of the challenging issues with the Ublox GPS receiver has been it's weak ground plane potential and it's susceptibility to electromagnetic interference when mounted in close proximity to the Crazyflie electronics. The chip antenna on the Pico breakout board favors size and weight for less favorable lower reception sensitivity performance (antenna radiation pattern gain, phase and directivity). The Crazyflie itself emanates a certain level of radiated and conducted emissions that can interfere with the GPS antenna's ability to receive satellite signals. During the GPS satellite signal acquisition phase, the charger cannot be used and the Crazyflie control board when turned off causes less of a problem. Once sufficient satellites have been acquired, tracking the satellites in the receiver is made easier. When a 3D Fix is achieved , the Crazyflie electronics can safely be turned on to commence flight operations.

The Crazyflie stabilizer firmware has been modified to include position hold capability along side the existing altitude hold feature. In order to take advantage of latitude and longitude position updates, the Crazyflie control board's magnetometer sensor (3-axis magnetic compass) is being used to provide the reference for the Earth's orientation. Compensation for magnetic inclination (True North correction) and Crazyflie platform attitude compensation (roll-pitch orientation corrections) have been fully implemented. In addition, compass calibration has been implemented. My experimental development with position hold was last left off at the point of flight testing and tuning the PID controllers to hopefully achieve a stable position hold capability.

The reliability of the crazyradio performance (sending data packets at possibly higher transfer rates and with fewer lost or delayed packets) is something I'm interested in. I don't know if the recent software releases/updates incorporate any improvements in this area.
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Re: Crazyflie 2 with GPS

Post by Mitteau »

Hello Jackemoore
i am very interested by your post. This is my next objective. I am sure you will give the results in term of stability of the position. I think accuracy of GPS can not be better than 1 meter. So...
I presently work hard on altitude hold system. I install a flip-flop button to put up althold behavior. But I continue to investigate the control chain because the althold behavior with command set to 0 is not satisfactory: with thrust stick to 0, ALS target slowly decreases, I do not like this. I prefer a stable position with to 0, then raise or lower target by pushing stick up an down.
I will discuss this in another place of the forum.
Regards
Jean-Claude
tobias
Bitcraze
Posts: 2090
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Crazyflie 2 with GPS

Post by tobias »

Great achievements @jackemoore!
We have been struggling with GPS as well. Not easy to make something small and lightweight that is good. We are however not so far from having something that is working quite well using the Titan2 module. The reception is quite good however now we struggle with power supply noise. With a LC filter we seem to have fixed that as well so hopefully soon we will have something ready. Sent you a PM.
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Crazyflie 2 with GPS

Post by jackemoore »

Hi,

Thanks for the timely comments. The prospect of having another alternative for the GNSS receiver is exciting. For the Titan 2 along with what I assume requires a breakout board, are you far enough along to know what the total payload weight might be?

I'll be anxious to learn more about the Titan 2 approach as the results of your efforts become available.
tobias
Bitcraze
Posts: 2090
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Crazyflie 2 with GPS

Post by tobias »

As for the firmware we have only made a quick implementation in gtgps.c with a lot of brute force but it is working to parse position. The parsing should eventually be broken out so we can use it with any GPS module and only titan2 related setup should be in the gtgps file. We just haven't had time for it yet...
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Crazyflie 2 with GPS

Post by jackemoore »

Hi,

Mention was made of experimenting with reducing power supply noise using an LC filter. What are the component values you are using?
tobias
Bitcraze
Posts: 2090
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Crazyflie 2 with GPS

Post by tobias »

I got some good results with a 22uH 0805 inductor (MLZ2012N220LT000) and a 22uF 0805 cheramic capacitor. The datasheet of the Titan2 says the power supply ripple should be below 50mVpp.
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Crazyflie 2 with GPS

Post by jackemoore »

Hi,

Yesterday, I acquired a GlobalTop Titan-2 module with GNSS MT3333 receiver mounted on a custom prototyping deck and have attached this on the Crazyflie 2.0. Together the total weight is 35 g. The MediaTek MT3333 is capable of acquiring and tracking both GPS & GLONASS systems concurrently as well as WAAS, SBAS and RTMC features built-in. Because of its patch antenna the level of sensitivity in receiving signals should outperform any GNSS receiver with a chip antenna.

For the crazyflie-firmware I've integrated the gtgps.c source code into the 2016.02 (Feb 17) firmware release and into the GitHub 2016.04 (Apr 18) development source for the BigQuad expansion deck. In addition, I'm using the crazyflie PC client 2016.02 source code and Python 3.4 in a windows environment. The firmware inside the MT3333 is GlobalTop's default firmware. This only supports NMEA outputs and I've initiated an inquiry into a customized firmware version that offers NMEA as well as binary mode selection. Some applications may prefer NMEA and others can take advantage of a smaller one-sentence binary output. I'll share the details of this before making any commitments.

Unless I'm overlooking any LC filter already incorporated on the prototype deck, I'd like to add a low pass PI-section or T-section and would appreciate advice on where would be the most effective place to add this (crazyflie circuit board or on the deck circuit board? It would be nice to limit the power supply ripple before evaluating the Titan-2's acquiring and tracking performance.

Best regards,
Jack
tobias
Bitcraze
Posts: 2090
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Crazyflie 2 with GPS

Post by tobias »

It's going to be very interesting following your progress Jack!

We have done tests with MiniGPS test and could not see any difference when the motors are running using the LC filter you prototype is patched with. So running acquiring and tracking tests shouldn't be a problem however our measurements show 80mVpp ripple and the datasheet specifies max 50mVpp so we are not 100% sure...
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Crazyflie 2 with GPS

Post by jackemoore »

Hi,

On the prototype deck, I missed seeing an inductor component. By inspection I get the gist of the circuitry that supports the Titan-2 VCC, VBACKUP, TX0, RX0 and GND. If available, I'd appreciate a copy of the schematic. Thanks.

Best regards,
Jack
Post Reply