Additional sensor doesn't work during flight
Posted: Tue Jun 15, 2021 8:12 pm
Hi!
I integrated an analog sensor (OPT101 photodiode) to a prototype deck on the bottom of the crazyflie and used it in combination with a lighthouse deck on top. I take several samples from the the sensor, process them internally and then retrieve the result by adding it to a log group. I first tested that the readings work well by creating a python program to log the information without flying (just me holding the CF) and it works as expected. However, when I run the same program with the crazyflie flying autonomously I notice that my sensor readings stop working and return what I believe is just noise.
I first suspected that this could be an electrical problem from the motors drawing power away from my sensor but I see that the photodiodes uses less than 15mA of current. Does this sound like a hardware problem? The analog sensor is connected to the VCC, GND and to the A0 pin (DECK_GPIO_TX2).
Otherwise, what could be changing when the drone is on flight that makes the sensor stop working properly.
I integrated an analog sensor (OPT101 photodiode) to a prototype deck on the bottom of the crazyflie and used it in combination with a lighthouse deck on top. I take several samples from the the sensor, process them internally and then retrieve the result by adding it to a log group. I first tested that the readings work well by creating a python program to log the information without flying (just me holding the CF) and it works as expected. However, when I run the same program with the crazyflie flying autonomously I notice that my sensor readings stop working and return what I believe is just noise.
I first suspected that this could be an electrical problem from the motors drawing power away from my sensor but I see that the photodiodes uses less than 15mA of current. Does this sound like a hardware problem? The analog sensor is connected to the VCC, GND and to the A0 pin (DECK_GPIO_TX2).
Otherwise, what could be changing when the drone is on flight that makes the sensor stop working properly.