Hi,
I am struggling to make an external WS2812 LED to mimic the onboard status LED of the Pixhawk board but with no results.
My board is an genuine 3DR Pixhawk 1 (PX4FMUv2), and the firmware I installed is ArduRover 4.0.0, fmuv2
Everything is working as is should as an autopilot of a RC boat. I wanted to have an external status LED so I set up as follows:
SERVO8_FUNCTION set to Neopixel1
NTF_LED_TYPES set to 258 (Internal Toshiba and Neopixel)
plug the WS2812 led (with the diode hack) into PWM output channel 8
I also hooked up an oscilloscope on the channel 8 to capture potential signals
I did not get light from the LED or any signal on the oscilloscope. Could it be an hardware limitation? I searched on the firmware limitation wiki but I got no retriction about WS2812 (Neopixel) LEDs. Does anyone has any solution, please?
Hi!
I did further tests with other available boards (the Pixhawk was in “production”, I did not want to break what was working ) so I tested on Omnibus F4 Pro and on Matek 405-wing, each of them initially flashed with Arduplane 4.0.9 (latest official). The WS2812 LED wouldn’t work either on both FCs so I decided to test a DEV version, Arduplane 4.1.0. I know the topic is about ArduRover but I think my findings might apply to ArduRover also.
So, I found out that Arduplane 4.1.0 can light up the WS2812 LEDs as a status LED. The steps were the same as in previous post. It just worked, out of the blue. I guess this option was not implemented in the official version that can be flashed with Mission Planner. Although on relase notes for ArduRover 4.0.0 is says it supports WS2812 (maybe they were not intended to be used as a FC status LED yet, I don’t know). I will make a test in the near future (I have to dissasemble the boat for testing on Pixhawk FC) with ArduRover to verify if DEV version on ArduRover will work with WS2812).
Another interesting thing I discovered during the tests was that FC outputs must pe set to the same type of signal (PWM, DSHOT, NEOPIXEL etc.). After I celebrated the working Neopixel option I noticed that the servo and motor channels were dead (I checked with the oscilloscope also). In the beginning, I did not make the connection between the Neopixel and the PWM issue but after a few hours I found the cause. All the output channel must be set to the same protocol or, at least, to the same protocol by per output groups. Every FC board has its channels groups, for example Omnibus has 3 output groups: 1/2/6, 3/4/5 and 7/8. Matek 405 is even better, 5 groups: 1/2, 3/4, 5/6, 7/8/9 , and 10. In my case I just moved the servo and throttle channels on another group and it worked fine.
All these are written on Ardu Wiki but one must get stuck with issues so he can read all this good stuff .
OK, finally I dicovered what I was doing wrong from the beginning with the Pixhawk board: I was trying to connect the WS2812 input pin to some PWM dedicated channels (1-8), instead of AUX pins (1-6). I guess it is the same “output group” thing as I found out for other FCs. Now it is working even with ArduRover 4.0.9 - the latest official (I tried first with the DEV version).