Here's how to connect the FMA XY and Z sensors.
[Note: the sensors come from FMA with a thin film (usually red) over the thermopile lenses. You have to remove the film before using them.]
The basic connections are as shown in this picture:
Cut one of the cables that comes with the FMA XY sensor in half and pull the four wires apart for about two inches. Strip their ends by about a quarter of an inch. Do the same for the Z sensor (you can cut off the fourth wire, the one furthest from the red one, off at the sensor level since it isn't used on that sensor). Twist the red wires and the one next to it from each sensor together, since they'll be sharing a connector.
Now it's time to slip on heat shrink tubing. If you have some red tubing, put it on the two twisted-together second wires in from the sides of the cables 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!). Black tubing goes on the two twisted-together red cables (which are Ground, which is confusingly the red one). Slip tubing on the other three wires, two from the XY and one from the Z senors.
At this point the instructions depend on whether you're powering the board from the Rx/ESC, as most people are, or if you're powering the board via the BATT pins. The following is for the standard boards using Rx/ESC power. Notes for BATT power are below in [brackets].
Solder each wire or pair of wires on a five-pin male machine pin header like the below (use the picture above to get the order right, and solder the two ground and V+ wires together at each of those two pins).
If you haven't already done so, also solder a five pin female machine pin header in the five holes made by ArduPilot's Batt -,+ and Analog 0,1,2 holes. By combining all the sensor wires in one strip, we can ensure that we'll have the best, strongest connection:
How did we get that otherwise unused Batt + pin on ArduPilot to actually be +5v? By soldering a wire on the bottom from the VCC pin in the FTDI row!
[If you are powering the board from the BATT pins, you'll need to attach the sensors differently. Solder a three-hole female header in the Analog 0,1 and 2 holes, and a two-hole header in the VCC and GND holes in the FTDI row. Solder the three sensor data lines to a three-pin male header in the same order as above, and combine the V+ and GND power lines from the two sensors to a two-pin male header. Connect the matching male and female headers.]
Note that for the 2.1 version of the software, the sensor should be placed diagonally on the aircraft so the cable plug is facing backwards (towards the tail) and the FMA logo is at the front, as shown in the picture at the top. If you want the cable facing forwards, you can change that in the code. (look for "#define REVERSE_X_SENSOR 1 //1 = cable behind, 0 = cable front" in the first tab)
Here's a diagram that shows how everything hooks up:
Here's a very simple program that will test all your sensor (XY and Z). 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.
all exited now!..have the system all up and running, just want to comit to aviation with this.
ON a personal note, (as i said, i have been following this for a while(quite a while)) if you guys want this your products driven out from here in the UK, we have a successful business here that would fit into this genre superbly. please PM or email me. Its nice to deal with someone that says what he means and means what he says! (been reading your posts) Fools are not suffered gladly!
As you can tell, im am a noob here, been working on and around uav`s for a while, and this project is top notch, been following it for a while.
I have aquired all your gear, however, the 'Z' Sensor is proving a pain, can anyone give me a definative place to purchase this unit as this is the last hurdle before we test 2.1, im guessing that teh 2.1 code will not work with only xy?
I swapped the z sensor and the y sensor inputs around. The z sensor input changes on the y input, but the y sensor still does no change on the z input.
I think my XY sensor is faulty from supplier. Can anyone suggest anything else to test the sensor? Has anyone had any problems with there XY sensor not working?
Note: I had to remove a 2 pin header in analog 0 and 1 to add the 5 pin female header. Could it be possible if I held the soldering iron on to long I could have fried the input or some component? I might try connecting the XY analog to analog input 2 which I know is working with the Z sensor
As far as I can see yes. There is 5V on the connector to the XY sensor on the ground and V+ wires as indicated by your picture. And the analogs go into 0 and 1.
When I disconnect the plug from the sensor the X Y analog value float around X:160 and Y:150, is this normal?
Are there no pull down resistors to ground?
Hey I have just soldered and connected up my XY and Z sensor to the 168 board as per instructions above. I ran the sensortest program and seem to be getting a changing result from the Z sensor ~400 - ~600 when covering the sensors. But I dont seem to be getting any changes for the XY sensor. They just stay at these value:
X: 491.00 Y: 512.00 Z: 518.00
Should these values change if you cover the sensors (when inside)?
I have doubled checked my wiring and its correct. Could this possibly be a faulty sensor? When the sensor arrived it doesnt look the best construction. The top and bottom case dont join up properly, the sensor lenses look dirty almost like its second hand. Also there was no cover on the lenses as you suggested.
Comments
all exited now!..have the system all up and running, just want to comit to aviation with this.
ON a personal note, (as i said, i have been following this for a while(quite a while)) if you guys want this your products driven out from here in the UK, we have a successful business here that would fit into this genre superbly. please PM or email me. Its nice to deal with someone that says what he means and means what he says! (been reading your posts) Fools are not suffered gladly!
Again, Many thanks.
Mike.
As you can tell, im am a noob here, been working on and around uav`s for a while, and this project is top notch, been following it for a while.
I have aquired all your gear, however, the 'Z' Sensor is proving a pain, can anyone give me a definative place to purchase this unit as this is the last hurdle before we test 2.1, im guessing that teh 2.1 code will not work with only xy?
Looking forward to your thoughts.
regards,
Mike
Thanks
I think my XY sensor is faulty from supplier. Can anyone suggest anything else to test the sensor? Has anyone had any problems with there XY sensor not working?
When I disconnect the plug from the sensor the X Y analog value float around X:160 and Y:150, is this normal?
Are there no pull down resistors to ground?
X: 491.00 Y: 512.00 Z: 518.00
Should these values change if you cover the sensors (when inside)?
I have doubled checked my wiring and its correct. Could this possibly be a faulty sensor? When the sensor arrived it doesnt look the best construction. The top and bottom case dont join up properly, the sensor lenses look dirty almost like its second hand. Also there was no cover on the lenses as you suggested.
Is there any other method for testing the sensor?
Thanks heaps guys.