-
First Results
06/05/2017 at 19:29 • 0 commentsAnother day...
I added a plotting function on my Controller so I can see the follow the output while flying. By doing that I found out the ultrasonic sensor detects distances between 0-25cm over a concrete floor. A little worse on grass. After that the noise and turbulences of the propellers take over. Now I can at least get an altitude hold of 20cm to work.
The quad holds altitude by lowering the throttle to a specified value on the controller when the specified height has been reached. This is just a crude proportional controller. A proper PID controller would do the job much better but for now the sensor problems have to get fixed first.
PPS: sent packets per second, RCV received sensor value in cm
-
Looking at the Ultrasonic Sensor in Detail
06/04/2017 at 11:45 • 0 comments -
More Flights
06/03/2017 at 21:49 • 0 commentsAfter a couple more flights it became apparent that there is an issue with the ultrasonic sensors.
They work fine on the ground but in the air with the propellers spinning the have a hard time detecting anything. This is likely caused by the noise and air pressure created by the props. when flying. After a little research I found this paper
http://www.daedalus.ei.tum.de/attachments/article/66/Ultrasonic Sensor Operation on a Quadcopter.pdf
which reinforces my theory.
So a little disappointed I bought a sharp IR distance sensor on ebay hoping it won't have the same issues.
I also just got the rf24 receiver to send back data from the sensors now so tomorrow I can see more precisely where and when the issues start to appear. I've been wanting to add a battery monitor for the quad as well. It would be great to see the battery status on the controller so you know exactly how much voltage you have left without having to rely on these annoying battery beepers.
-
First Flights
06/02/2017 at 20:43 • 0 commentsThe first flight was quite eventful with the quad taking off on its own due to an integer rollover causing the throttle to go from 0 to 255 when I lowered the sticks to much. After a couple of hours bug fixing the code on the controller the quad was finally again maneuverable without any hick ups.
I added a menu where I could precisely control the variables like distance of the obstacle, time it would override the pitch control, the scan interval and the override pitch value of the collision detection code on the receiver as well turn it off and on remotely of course.
Now I could finally test how the collision detection was working. And it worked partially. It would set the pitch of the quad to a set value moving it back a little bit from the obstacle. But the ultrasonic sensor was having a hard time correctly detecting it.
It seems that the position of the ultrasonic sensor isn't ideal because possibly some of the waves bounce off the underside of the quad itself.
More flights tomorrow...