All Posts (14048)

Sort by
3D Robotics

Drones vs Pirates

From BotJunkie: "The US military is now using MQ-9 Reaper drones to track suspected pirate ships in the Indian ocean. That’s track, not attack, but the MQ-9 is specifically designed to carry weaponry, so it’s the logical next step. Throw some ninjas and zombies in there somehow, and we’ve got the greatest movie ever made." [via AUVSI] [Photoshop goof pic from BotJunkie]
Read more…
Developer

Visualizing PID loops

This post is an attempt to add a visual explanation of PID loops. I had read Michael King's excellent post , but I wasn't sure how to design loops to do specific things.To me PID loops seemed a bit of a black box, so I decided to graph them out in order to better understand the inputs and output of the equations. They are actually quite simple, but I've never seen a good visual explanation. I may have some details wrong, so if you have additions, please let me know and I will update the graphs.For this example I will show how the steering works on my plane using the rudder. The goal is to connect the bearingError (the difference between the plane bearing and the target bearing) to the rudder. The trick is that you can't just create a direct relationship, or your plane will death spiral. You need to connect the bearingError --> IR sensor --> rudder. That way the plane is always stabilized while it's turning.Here is a diagram of the bearing error. I'm limiting the error to ±30° because I want to limit how fast my plan can turn. More on that later.

IR sensors:The diagram below explains the input you can expect from the sensors. On a hot day you could expect the full range of 0-1023 from them. The value 511 means that the opposing cameras can see exactly the same temperature. This usually means they are looking at the horizon and hopefully you've placed them onto your plane in a perfectly flat orientation. On average days we need to scale the output to the full range, then we offset it by 511 so that we get a positive and negative value for pitch and roll.This graph shows the relationship of the IR sensors output to the rudder. You can see the trough created by the sensor values. The plane can actually bounce around in this trough causing the drunk driver effect.

In this diagram, the sensor output is scaled to .65. This works for my plane, and keeps oscillations at a minimum.

Connecting the bearing error to the IR sensors.In order to stabilize while turning we need to connect the planes bearing to an IR value which we will use as an offset of the actual value. In a sense we are moving the trough to the left or right based on how much we need to turn. I guessed my plane can only safely turn at an angle defined by the IR sensors as ±180. I also guessed I could ignore bearing errors larger than ±30° as my plane can only turn so fast. If you graph the values you'll see 30° bearing = 180IR and -30 = 180IR.

Notice that the proportional term is a lever with a direct output. There is no delay. If you want to have the response be delayed, use the Integrator. To calculate the value for the integrator, take the proportional value and divide it by the number of seconds you want the change to take. For example, if I want change to take 5 seconds, the I term is -6/5 or -1.2If you want some rapid response, and some delayed response, pick a ratio for each, do the math separately and then sum the answer. For example:Output 60IR for proportional and 120IR for the integral. This will cause the rudder to react to 1/3 of the input right away and 2/3 will be applied smoothly over a 5 second period.

A throttle may want all the input as an integral since the smooth transition can keep your plane from torqing sideways.When you take the IR offset value generated by the above equation and apply it to the stabilization you'll see the equilibrium piont has shifted to the right.

The plane will fight to hold that angle by moving the rudder back and forth. If the plane is holding the turn, note that rudder is straight.I know this is pretty basic stuff, but I could not wrap my head around it until I made these graphs.Jason
Read more…
Developer

AP with Ground Station and 2-way comm

I wanted to post the code and exe of the Flash file for the Ground Station and my AP. If you want to try it, you need to do a few things first.(If you try this, remove your throttle or disconnect your ESC from your motor!)1 - Load the DefaultsWriter.pde onto the Ardupilot HW to get some decent values into the EEprom2 - Load the Waypoint Writer onto the Ardupilot HW to put some waypoints into the EEprom3 - Load the JSXPilot_Navigate.pde onto the Ardupilot HW4 - Download Serproxy and configure it as indicated in the cfg file5 - Run the Flash app as an EXE or with a local Flash player or -maybe- it will work in a browser6 - Press the space bar to connect the GS to Serproxy7 - tilt the plane to adjust the IR sensors and the plane is set to fly at 30MPH - it's in debug mode8 - If you want to play further, look in the test.pde and see test versions of 3 important functions. Elsewhere in the code these functions have been relabeled with a "_off" also turn off debug mode in the defines.hThis is a lot, but I'm used to it. Also, this is information for people making there own AP or just curious. It's not supported. It only works with my radio. It's barely tested. The code is very well commented. If you can get it to work for you, you win a gold star.Download it hereYou can see the video here of it in action. GroundStation.mov
Read more…
Developer

ArduIMU+ V2 (Flat) now available for preorder..

The new and flat version is now available for pre-order for just $129, the estimated shipping date should be Tuesday and you can get it here. I also have big discounts for dealers and high quantity orders.

Why "+" in the name? Because it's an Inertial Measure Unit (sensors and hardware filter circuitry) plus an Arduino-compatible processor that can run our Attitude Heading Reference System (AHRS) code, based on Bill Premerlani's DCM algorithm. This hardware consists of a 3 axis accelerometer and three gyro sensors, dual power regulator (3.3v and 5v), GPS port, an Atmega328@16mhz and a lot of status LED's. It's the cheapest IMU-AHRS on the market!Note: this IMU is not designed to work with ArduPilot as is, and is not a replacement for ArduPilot's thermopile sensors. We may in the future release versions that do work with ArduPilot, but this version is designed as a stand-alone IMU/AHRS, for use with your own projects.Includes the pin headers and all the sensors needed, some assembly is required.Features:-Flat Desing.-Low cost.-3 Axis Accelerometer.-3 Axis Gyroscope-Arduino Compatible.-Source Code included and Open Source!-Power LED (Green).-Status LEDs (Red, Blue, Yellow).-1 SPI port.-1 I2C port (possible expansion shield with magnetometers).-Two PWM outputs (for servos).-GPS port (uBlox ready!).-Protection diode.-Serial port output with servo standard connector for easy interface with any device (Ground, 5V, TX-OUT).-Latest Firmware-Board-Schematics-XY gyro LPR530AL-Z gyro LY530ALH-XYZ 3g Accel. ADXL335
Read more…

I Can See My House From Up Here!

I Can See My House From Up Here! The Northrop Grumman RQ-4 Global Hawk unmanned aerial vehicle (UAV) is quite an impressive piece of hardware. It can stay in the air for more than a day, has a range of 3,400 miles, and at very high altitude (its record is 19,928 meters (65,380.6 ft)). Usually it's the military that would have control over these UAVs, but two Global Hawks have been turned over to NASA for environmental research flights .

Read more…
3D Robotics
Free video streaming by Ustream Tomorrow night (Sunday) we'll do our regular podcast, which everyone here is welcome to participate in by listening to the chat live above and commenting and asking questions via the DIY Drones chat function. We'll be starting at 9:00 PM PST. This week we'll by joined by Gerardo Iglesias from VectorNAV, talking about their $500 VN-100 IMU+AHRS (shown), which is described as the smallest and lightest in the world. Other themes include: --The latest on the ArduIMU+ --Tim finishes his extended Kalman filter sim code! --Favorite blogs posts of the week --And whatever other cool stuff comes up!
Read more…

Want to test code with the simulator X-Plane?

Here's an example of how to get data from the simulator: http://gist.github.com/228998It has everything you need to treat it as a virtual IMU. This was instrumental in getting my extended Kalman filter running (to be open sourced soonish) and I hope you find it useful too!(I'll do an updated version that shows you how to control the plane in X-Plane from your code.)

Read more…

ArduIMU v2 Questions

I was wondering what kinda of extra instrumentation would be required to use the ArduIMU as the autopilot for an autonomous aerial vehicle. I was also interesed in the benefits of the IMU vs. the thermopile concerning takeoff and landing from water, and if the water would in some way confuse the standard Ardupilot because of the temperature of water vs. that of the ground.
Read more…

This week in aerospace

THE C328 LIVESAfter 3 weeks of hacking, the C328 started producing decent results. Your main problem if you intend to control it from a computer on the ground, using Xbees, is getting the UART to work reliably. It needs a real clean signal & short cables to work at 115200. Initializing it still takes several power cycles & 20 second delays. Decided 320x240 is the best compromise between resolution & frame rate.We use a microcontroller to generate ACKs locally but generate every other control code from the ground.

Fuggetabout dual 2.4Ghz Xbees for telemetry & video. They interfere even when on different frequencies, spaced 2 ft apart, using wire antennas. You're still stuck with 900Mhz for video. While no radio combination is completely interference free, got good results with 2.4Ghz for autopilot & 900Mhz for C328, even when they're right next to each other.Set the 2.4Ghz for broadcast mode, 0 retries. Set the 900Mhz for addressed mode, 3 retries. We use 2.4Ghz for flight control & 900Mhz for video.Even though the C328 allows video capture, we have never used the captured footage. It just sucks too much. The C328 has a rolling shutter. We use a main camera recording to flash & the C328 as a preview camera.The perpetually out of stock rangevideo.com has drastically reduced the prices of 900Mhz video. If you have the licenses, he ever stocks anything, & you don't mind buying analog video capture hardware, it's now a better deal than a C328 + 900Mhz XBees.Have a tail rotor rebuild.

1st crash damage since becoming Major Marcy enabled was this tail rotor during the roof crash.Took a 400ft timelapse on Halloween while the rest of you were partying.This video shows the key steps in stabilizing.For the timelapses, we use 1 battery to aim with the C328 at 33m. Last month it was 32m. Now it's 33m. Then program the heading into the flight computer & burn another battery to shoot the footage fully autonomous at 120m. Until better radios come along, those 120m flights need to be as autonomous as possible.

In flight preview on the C328.FLIGHT COMPUTER RESETSNext, rediscovered if the servos are not powered & the flight computer generates PWM, the servos may act like short circuits & cause the flight computer to reset. Not an issue on standard autopilots, but VicaCopter has 2 power circuits. 1 circuit powers only the flight computer so U can get GPS locks. Her flight computer doesn't generate servo PWM unless the transmitter is on.PROPELLER CRACKSFinally, discovered cracks in our GWS 12x6's. They were drilled 1 size too small, threaded on the shafts & probably had too much stress. Important safety tip. Drill big enough so they glide on the shafts.

Normal propeller
Read more…