Its been nice outside so I have been flying RC airplanes and coding on my project in the evenings. There is much software to write so that is the focus right now.
Unfortunately that means my updates are not too exciting. I can post code but you guys will be bored.
Instead, I will post some functionality I am testing that the QuadCOP will need.
As I mentioned I can manually control the quadcopter and then put it in auto fly mode with a switch on my radio. So here are some things I am having it do, these items will be put to use but I am testing them one at a time. Each one builds up on the previous one.
Loiter - It goes into auto mode and simply tries to stay at the current GPS coordinates.
360 degree Loiter - Same as above but it turns slowly 360 degrees (sensor sweep)
Autolanding - It goes into auto mode, and using its loiter functionality it tries to land nicely at the current GPS coordinates. I am going to have to use a ping sensor for anything below 2 feet.
Return to Base - using a switch on my radio (macro record) it simply notes the current GPS location. I then fly it around and when I put it into automode, it returns to the GPS coordinates it noted and then lands.
Out of Bounds - Similar to return to base. It notes the current GPS coordinate on my mark, then it calculates a 400 foot radius arc in FRONT of the GPS coordinates. I then fly around and if I go out of bounds, the quadCOP will return to base and then give me control back. The Quad COP should never go behind me, only in front.
Collision detection - using some ultrasonic ping sensors, it if detects an object it will take evasive action. The action is a simple square type motion, by turning left and going a certain distance, then turning right again.
Once the above is completed, I can use the macro record functionality I built to start navigating waypoint macros. The main point here is altitude and heading information is recorded so I can be much more precise than using an IPAD to program waypoints. I can very precisely position the QuadCOP since I am manually flying it.
Issues I am resolving:
I am trying to use the XTrensic MEMS board for altitude and heading information. It works great with the Raspberry Pi B+ but not with the Raspberry Pi 2. I did some research and realized I need to enable I2C "repeated starts". You can read more about it here:
http://scummos.blogspot.com/2012/11/raspberry-pi-i2c-and-repeated-start.html
I have the sensors working with the Pi 2 but somehow it gets "out of sync" and I cannot poll the sensors. I think there may be a voltage or pull-up resistor issue involved. So I am considering my options, I do plan to include the Raspberry Pi B+ for camera purposes, I could just use it to read the sensors and then pass the info via I2C to the flight computer, or I could do the same thing using the ChipKit Pi. I'll figure it out! What puzzles me is why it works well with the B+ and not the Pi II because they use the same I2C chip...
Another small issue is with the Microstack GPS. It defaults to 9600 baud and updates at 1hz. It is supposed to accept commands so I can change the baud rate and the frequency. I will need the GPS info at least 2hz. It can go up to 10hz so if I can push 3hz and still not miss bytes I think I will be good. The QuadCOP wont moving fast but one update per second is really not a good idea if it is gusty out. In 1 second it can move pretty far if the wind is strong enough.
When I find both solutions I will post.
Top Comments