Posted by Chris Anderson on February 25, 2009 at 11:00pm
ArduPilot 2.0 uses the same hardware as ArduPilot 1.0 but new software to do both the navigation and stabilization functions itself, with no need for a FMA Co-Pilot (although we still use the FMA XY sensor). Here's how to directly connect the FMA sensor to ArduPilot.
[Note if you're buying the FMA XY sensor by itself, you'll need to order a cable, too. Also, note that the sensors come from FMA with a thin film (usually red) over the thermopile lenses. You have to remove the film before using them.]
Cut one of the cables that comes with the FMA sensor in half and pull the four wires apart for about two inches. Strip their ends by about a quarter of an inch. Slip on heat shrink tubing. If you have some red tubing, put it on the second wire in from the side of the cable with the red strip, to mark the positive power cable (yes, that's confusing. V+ isn't the wire with the red strip--it's the wire next to it!). Now solder each pair of wires to a two-pin male machine pin header, and shrink the tubing around them. (See photo above).
Now, solder on one two-hole female machine pin header to the ArduPilot board in the VCC and GND holes, and another one in holes Analog 0 and 1, as shown in the diagram below. You can see the FMA sensor pin-out details here.
Finally, solder a regular two-pin header on the ArduPilot's D6 and D7 holes. This is to place a jumper on when you're doing IR calibration the first time on the ground.
Note that in this version of ArduPilot, we do altitude control with the elevator, not the throttle, so plug in your servos as shown in the diagram below:
You can test your sensor by downloading and running this simple test program. Just load it on ArduPilot (make sure the board is powered and the GPS is not connected). With the FTDI cable connected, click on the serial monitor icon in Arduino and make sure the speed is set for 9600. The program will prompt you to tilt the sensor in certain directions and then strike any key and hit return when you're ready to take the X and Y sensor readings. Remember that sensor readings inside and near heat sources (like your hand) are nothing like the real thing outside. But it's still a good way to confirm that your sensor is working right.
Note that when you mount the sensor on your aircraft, the wire should be coming out towards the tail, as shown in the picture of an EasyStar configuration below (you don't need to put it on a pod like that--any position that has a relatively unubstructed view of all four sides is fine). The "P"s on the sensor should be facing forwards and towards the rear, with the one next to the FMA logo in front.
The header pins suggested for assembly are "machine" pins, a different part number than the ones on the original arduPilot board assembly instructions. What are the differences, minor, or of some importance?
Just an FYI, I bought both of my FMA CPD4 units from people on the RCGroups forum. The latest was two weeks ago. I paid $35 shipped for the unit which works perfectly.
I'm trying to upload the 2.0 code to my board and am getting the following error:
In function 'void Save_Launch_Parameters_Flagged()':
error: 'eeprom_write_dword' was not declared in this scope In function 'void Restore_Launch_Parameters()':
In function 'void print_data()':
In function 'void print_eeprom()':
When I reload 1.0 my mux light will not disengauge and I no longer get any response, just lights. Any ideas?
Comments
Can i use the same xy sensor as i would get with an Attopilot?
In function 'void Save_Launch_Parameters_Flagged()':
error: 'eeprom_write_dword' was not declared in this scope In function 'void Restore_Launch_Parameters()':
In function 'void print_data()':
In function 'void print_eeprom()':
When I reload 1.0 my mux light will not disengauge and I no longer get any response, just lights. Any ideas?