Page 1 of 1
CPPM receiver with BigQuad deck on the Roadrunner
Posted: Wed Jul 10, 2019 4:02 pm
by matejkarasek
Hi,
I have a Roadrunner board with the BigQuad deck, and have managed to hook up a servo that I can actuate via PWM, using the Android Crazyflie Client app.
I have also connected a CPPM receiver, but no idea how to get that working. I would like to use CPPM signals as the main controller.
Does anyone have experience with that?
Thanks,
Matej
Re: CPPM receiver with BigQuad deck on the Roadrunner
Posted: Thu Jul 18, 2019 9:18 am
by tobias
Unfortunately the CPPM input does not work at the same time as the Loco deck which is integrated to the Roadrunner. It might be possible to move the CPPM to another available TIMER and PIN but that requires some investigation and coding work. Also to have the Loco deck work with the BQ-deck have you checked
this?
Re: CPPM receiver with BigQuad deck on the Roadrunner
Posted: Thu Jul 25, 2019 8:57 am
by matejkarasek
Hi Tobias,
Thanks for your reply, only replying now as my notifications were not set up correctly...
I have made the software and hardware changes as described under your link (only the first part as I don't plan to use the flow deck).
I won't need the CPPM and the (integrated) Loco deck working at the same time (at least at the beginning). Is it possible to disable the Loco deck for now (I suppose this would require hardware change to get CPPM working)?
Is there some example how to set up CPPM with a BigQuad deck on the crazyflie board?
Thanks!
Matej
Re: CPPM receiver with BigQuad deck on the Roadrunner
Posted: Tue Aug 06, 2019 2:20 pm
by tobias
The loco deck would need a FW were it is disabled. In the tag.mk comment out the bcDWM1000 line
Then rebuild the tag FW and flash it.
In the tag.mk file you have probably added build flags for the BigQuad deck right so you know how to do this?
As for the CPPM there is no good documentation and it's been a while since I used it myself so you might have to play around a bit. The configuration for the channels etc can be found in
extrx.c. This defines you might have to change or configure accordingly in your transmitter so the mapping is correct. Other then that the extrx input has priority, so as soon as a signal is received, it should start working. A good way to debug would be to look at the
extrx log variables.
Re: CPPM receiver with BigQuad deck on the Roadrunner
Posted: Tue Aug 06, 2019 9:25 pm
by matejkarasek
Thanks, Tobias, got it working following your instructions!
Obviously (although not obvious to me at first) I also needed to uncomment the previously commented lines as described
here
Thrust still behaves a bit strange, will look at that tomorrow...
Re: CPPM receiver with BigQuad deck on the Roadrunner
Posted: Mon Aug 26, 2019 4:16 pm
by matejkarasek
Reviving this thread...
Got to a point, where I would like to use the CPPM and the Loco deck at the same time.
I am trying to move the CPPM to PB6 (SCL of I2C1 by default), but my embedded programming skills are very limited.
Since I2C1 is also used by the EEPROM, I would like to disable it and use hardcoded values instead, but for now not sure how to do that...
Following
this forum thread, in configblockeeprom.c, in configblockTest(void) I have replaced
with
But I suppose that only bypasses the test...
Do I need to disable I2C1 entirely?
To reconfigure the CPPM pin, I have changed the
cppm.c in the following way (lines 43-52):
Code: Select all
#define CPPM_TIMER TIM4
#define CPPM_TIMER_RCC RCC_APB1Periph_TIM4
#define CPPM_TIMER_CH_Init TIM_OC1Init
#define CPPM_TIMER_CH_PreloadConfig TIM_OC1PreloadConfig
#define CPPM_TIMER_CH_SetCompare TIM_SetCompare1
#define CPPM_GPIO_RCC RCC_AHB1Periph_GPIOB
#define CPPM_GPIO_PORT GPIOB
#define CPPM_GPIO_PIN GPIO_Pin_6
#define CPPM_GPIO_SOURCE GPIO_PinSource6
#define CPPM_GPIO_AF GPIO_AF_TIM4
I can make without errors and flash, but CPPM is not working.
I suppose
line 92 should also be changed to TIM4_IRQn (?), but that seems to make the board freeze.
@tobias I would appreciate some pointers on the next steps...