Quick and dirty program to test your XY and Z sensors

This is just a repost for those who are new to ArduPilot:

Here's a very simple Arduino program that will test your XY and Z sensors. 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. Once you're finished, reload the ArduPilot code.

Views: 249


Developer
Comment by Jordi Muñoz on July 29, 2009 at 12:22am
This is the one i use for quality test in AttoPilot sensors, you must set the speed to 57600bps.
You should read values around 512 with max min of 300 and 700 if you move it around. If you stop moving them the values should be steady, if the values are jumping around is because they are damaged.
And MINE leave the values steady in the terminal so you can read them without changing/moving the printed values left and right. =)

InfraredBoards.zip
Comment by Vikram on July 29, 2009 at 1:29am
Thats quite easy program and good idea to test the sensors on analog port . I have just fried out my arduino board by giving opposite supply connections by mistake. I have ordered a new board so waiting eagerly to test the sensors....... Any method to test the chip whether fried out or not..? All pins are giving 3.75 volts on powering up the board.

3D Robotics
Comment by Chris Anderson on July 29, 2009 at 7:25am
As you might expect, Jordi's is much better than mine ;-) Use that one instead!

Developer
Comment by Jordi Muñoz on July 29, 2009 at 10:30am
Viky, normally they fry when you invert the polarity.
Comment by Jack Makrl on October 1, 2009 at 2:14pm
I'm trying to troubleshoot my ardupilot, I've loaded the InfraredBoards.pde and the output isn't what I was hoping for. I get steady x,y,z readings of 1022, 1023, 1022, without the sensors plugged in i get fluctuating readings of 95-106, 74-82, 165-175. I get similar readings with the FMA sensors and the diydrones store ottopilot sensors.

I'm wondering if anybody else has experienced this issue? In the air the plane just does loops when the ardupilot is engaged. I'm pretty sure I've followed the available documentation closely.

My guess is that something is wrong with my shield. Should I try hooking up the sensors directly to the adrupilot as a troubleshooting step?

Thanks.

3D Robotics
Comment by Chris Anderson on October 1, 2009 at 2:59pm
That's definitely a wiring or cabling problem. I would try connecting directing to the relevant analog ports on the board, so you can diagnose.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service