Does the flow deck work on a Big Quad?

Discussions about all things Bitcraze
simplexsigil
Beginner
Posts: 13
Joined: Thu Feb 01, 2018 3:42 pm

Does the flow deck work on a Big Quad?

Post by simplexsigil » Tue Aug 21, 2018 11:01 am

We mounted a flow deck on a Big Quad (with 2 breakout decks and some cable), sensor readings appear to be fine, still hover mode leads to building up oversteering until there is a crash after a few seconds.

Did anyone successfully try this combination?
Is it supposed to work or is it expected, that the flow deck would not work with the flight dynamics of a big quad?

arnaud
Bitcraze
Posts: 1888
Joined: Tue Feb 06, 2007 12:36 pm

Re: Does the flow deck work on a Big Quad?

Post by arnaud » Wed Aug 22, 2018 7:16 am

If you are getting good measurement from the deck, I would guess that the problem comes from the position PID tunning. You most likely need to re-tune the position PID, the parameters for it are in the param group "posCtrlPid".

We have flown the flow deck on a small big quad without problem otherwise, but I guess out quad as close enough to the dynamic of a Crazyflie to not cause this kind of problem.

I would also make sure the data are OK by moving the quad above the ground and looking at the X/Y estimates, just to make sure that the problem does not come from the cabling.

tobias
Bitcraze
Posts: 1818
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Does the flow deck work on a Big Quad?

Post by tobias » Wed Aug 22, 2018 8:56 am

A follow up question, did you do the modifications as pointed out in this post?

tungnx94
Beginner
Posts: 11
Joined: Wed Dec 27, 2017 11:49 am

Re: Does the flow deck work on a Big Quad?

Post by tungnx94 » Fri Aug 24, 2018 3:22 pm

We are not clear how to do this step:

2. Change HW ChipSelect. Easiest I think would be to move it (cut trace and solder patch) to IO1 on the flow deck.

Can you elaborate a bit more ?

simplexsigil
Beginner
Posts: 13
Joined: Thu Feb 01, 2018 3:42 pm

Re: Does the flow deck work on a Big Quad?

Post by simplexsigil » Fri Aug 24, 2018 3:41 pm

Thank you for your answer.

We did try reading the sensor values and in combination with the big quad deck they are garbage, once we remove the big quad deck, everything works fine.

From a close look to the console, we can see that the deck is recognized, but the sensor is not initialized correctly.

The next step will be to try tobias solution and use two breakout decks to make an adapter which changes IO3 to IO1 and to unsolder the capacitor.

Code: Select all

---
SYS: Crazyflie 2.0 is up and running!
SYS: Build 153:5b00ad02c63c (2018.01.1-153) MODIFIED
SYS: I am 0x3034363130374711003D0027 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 16 drivers
DECK_INFO: Found 2 deck memories.
DECK_CORE: 2 deck enumerated
PMW: Motion chip id: 0x:0xFF
BIGQUAD: Switching to brushless.
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using estimator 2
CONTROLLER: Using controller 1
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
Error while initializing the PMW3901 sensor
DECK_CORE: Deck 0 test [OK].
DECK_CORE: Deck 1 test [OK].
SYS: Free heap: 14688 bytes
Client uses old logging API!
Client uses old param API!

simplexsigil
Beginner
Posts: 13
Joined: Thu Feb 01, 2018 3:42 pm

Re: Does the flow deck work on a Big Quad?

Post by simplexsigil » Mon Aug 27, 2018 3:06 pm

We made the proposed changes (unsoldering C1 on BigQuad Deck and IO1 of the CF is connected to IO3 on the Flow Deck - Firmware changes see below) and the flowdeck seems to be recognised.

Code: Select all

---
SYS: Crazyflie 2.0 is up and running!
SYS: Build 153:5b00ad02c63c (2018.01.1-153) MODIFIED
SYS: I am 0x3034363130374711003D0027 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 16 drivers
DECK_INFO: Found 2 deck memories.
DECK_CORE: 2 deck enumerated
PMW: Motion chip id: 0x49:0xB6
BIGQUAD: Switching to brushless.
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using estimator 2
CONTROLLER: Using controller 1
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
DECK_CORE: Deck 0 test [OK].
DECK_CORE: Deck 1 test [OK].
SYS: Free heap: 13376 bytes
Client uses old logging API!
Client uses old param API!
However, when we watch motion.deltaX and motion.deltaY in the plotter, we see that there is no data available, those values never change unlike with a normal crazyflie.

We made the following changes in flowdeck_v1v2.c in the firmware:

Code: Select all

...
Line 72:
#define NCS_PIN DECK_GPIO_IO1
...


Line 165:
static const DeckDriver flowdeck1_deck = {
...
  .usedGpio = DECK_USING_IO_1
...
};


Line 210:
static const DeckDriver flowdeck2_deck = {
...
  .usedGpio = DECK_USING_IO_1
...
};
The same setup works fine, if the Big Quad Deck is not connected.

Do you have an idea, why there is no data read in?

simplexsigil
Beginner
Posts: 13
Joined: Thu Feb 01, 2018 3:42 pm

Re: Does the flow deck work on a Big Quad?

Post by simplexsigil » Mon Aug 27, 2018 4:23 pm

It looks like reading data from the flow deck over SPI fails, when a Big Quad Deck is connected.

You said it worked for you at some point of time, do you know which changes could have broken the functionality?

tobias
Bitcraze
Posts: 1818
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Does the flow deck work on a Big Quad?

Post by tobias » Wed Aug 29, 2018 9:02 am

That is a bit strange. From the latest console output the init of the PMW3901 looks OK:

Code: Select all

PMW: Motion chip id: 0x49:0xB6
1. Do you have anything connected to the MON port of the BigQuad as that would be problematic for the SPI?
2. Do you have BQ_DECK_ENABLE_PM defined? That would probably interfere with SPI as well.

simplexsigil
Beginner
Posts: 13
Joined: Thu Feb 01, 2018 3:42 pm

Re: Does the flow deck work on a Big Quad?

Post by simplexsigil » Wed Aug 29, 2018 5:46 pm

We do not have anything connected to the Big Quad Deck except for the motors, BQ_DECK_ENABLE_PM is not defined, I checked via printout to the console, nor is BQ_DECK_ENABLE_OSD.

I posted some pictures of the experimental setup here (more info in the captions):
https://imgur.com/a/Ln0Y0Go

I disconnected some pins which appeared to be without use, to minimize possible sources of error. The result is the same:

When the CF is connected to the Big Quad Deck, motion.deltaX and motion.deltaY are always 0 after requesting it (which is probably just the dummy value which can not be updated). It does not matter, if the system is powered by external battery or CF USB power.

When the CF is not connected to the Biq Quad Deck, everything works fine, although the rest (firmware and setup of the wiring to the Flow Deck via Breakout board) is still the same.

The reason why I disconnected the Pins is because I thought, the Reset of the Flow sensor might be activated in Combination with the Big Quad Deck, but it did not help.

When did you test the Big Quad Deck with the Flow Deck? Maybe we try out an older Firmware version.

simplexsigil
Beginner
Posts: 13
Joined: Thu Feb 01, 2018 3:42 pm

Re: Does the flow deck work on a Big Quad?

Post by simplexsigil » Wed Aug 29, 2018 5:58 pm

By the way, all of our Flow Decks seem to be Rev D, the schematics on the wiki references Rev E, though. Is that of any importance?

Post Reply