I’m new to this forum, so a bit about me: I play with multicopters for not a very long time, hardly a couple of months… I started with a nice Hubsan X4, and since I built my own mini-quad based on a Hobbyking 328p MW board, and it flies quite nicely for now
So now I’m looking for a way to get information from the multiwii FC while in flight (essentially for now current flight mode, and alarms).
My goal is to feed a secondary custom arduino-based board with that to do lighting stuff and other things, depending on these data.
And I could use a little help form you…
I began by using buzzer output which was nice but not enough for my final purpose.
I though of different ways to get the data I need : using pilot lamp output or serial connection, ….
The pilot lamp would be nice, because we can have four « channels » of information (red, green and blue lights + buzzer) and set them as we want by configuring the alarms by flight mode. To use it, I basically recreated my own pilotlamp module to do want I want with the analyzed signals.
But I have trouble getting clear pilotlamp signals from my arduino board.
By analyzing multi code we have
Code: Select all
#define PL_GRN_ON 25 // 100us
#define PL_GRN_OFF 50 // 200us
#define PL_BLU_ON 75 // 300us
#define PL_BLU_OFF 100 // 400us
#define PL_RED_ON 125 // 500us
#define PL_RED_OFF 150 // 600us
#define PL_BZR_ON 175 // 700us
#define PL_BZR_OFF 200 // 800us
which is eventually used by the interrupt service routine of the pilot lamp in MultiWii.
This is where I’m getting lost : if I understand correctly, it will set the pilot lamp output to high for 300us to activate blue led, and for 400us to turn it off, am I correct on that?
If this is right, I didn’t manage to have a precise enough timing reading from my arduino board, my own implementation of pilot lamp receiver doesn’t work very well.
Basically, in my code I store microsecond value at each change in level of the multi pilot lamp output and calculate the time where the signal was HIGH.
My green channel seems OK, but not 100% accurate though, but blue and red are recognized~ish and I don’t have the buzzer.
I also tried a pre-compiled version of a pilot lamp on an ATTiny 85 (from here: http://fernitronix.fr/fr/multi-copters/les-gadgets-multiwii/module-pilot-lamp-buzzer-intelligent) but it wasn’t working well either…
So it might be my code, it might be my board, it might be my multiwii settings (because I changed the buzzer output to A2 and had to adapt some portion of MW code (there maybe a bug around this in multiwii btw - at least for my board))…. Hard to debug.
I don’t have an oscilloscope so I can’t check my signal reliably.
Do you have a correct or better way to read pilot lamp output ?
Well… I tried to keep my explanations and questions short and simple (I might have failed on that ^^), but if I’ve been clear enough, and you have feedback or ideas, please share and discuss
I still have a lot in mind about all this, but it was a bit too much for a first post