The sensor fusion test measures timestamp accuracy of camera and other
sensors for Android phones. This page provides step-by-step directions on
how to setup the Sensor Fusion test and Sensor Fusion Box for the first
time.
Required tools
Before getting started, ensure you have the following cables and cords
available:
USB A to B cable
USB A to C cable (for test phone)
12V power cord (for servo control box)
12V power cord (for lighting, with switch)
Interconnected cable (for lighting)
Conversion cable (for lighting)
Step 1: Connect lights
To connect the lights:
Use the interconnected cable to connect the two lights.
Connect one light to the conversion cable.
Thread the unconnected end of the conversion cable through the round
hole that exits the box, then connect the end of that cable to the power
cable for lighting.
Figure 3. Lighting conversion cable exiting the box and connecting
to power cable
Step 2: Attach servo
To attach the servo:
Plug the servo connector into the servo control. Be sure to insert
the connector oriented to the corresponding colors as labeled (Y =
Yellow, R = Red, B = Black), as reversing the order could damage the
motor.
Connect the servo control with its power cord (the lighting and
servo control have independent, dedicated power supplies).
Figure 5. Connecting the servo control to its dedicated power
cord
Use the USB A to B cable to connect the servo control box to the
host (machine that is running the test).
Figure 6. Connecting the servo control box to the host machine
Step 3: Attach phone
Set the phone on the fixture and clamp it down.
Figure 7. Placing and clamping the phone on the fixture
The upside-down thumb screw provides back support while the
other screw tightens the grip by turning right. For more help,
refer to the video on loading the phone (included in the
Sensor
Fusion Box zip file).
Use a zip tie to hold the phone USB cord to the fixture plate and
lead it outside the box through the exit hole. Plug the other end
of the cord to the host running the test.
Step 4: Run test script
The main python executable for the test script is:
You can also enter the actual rotator address at the command line
using:
rot_rig=VID:PID:CH
To determine the Vendor ID (VID) and Product ID (PID), use the Linux
command lsusb.
By default, the VID and PID are set
to 04d8 and fc73 with channel "1".
Multiple runs, different formats
To perform multiple runs with different formats, you can use a
different script (however, the results will not be uploaded to
CtsVerifier.apk). Sample test script:
To resolve permission issues related to controlling the motor through the
USB port:
Add the operator username to dialout group using:
sudo adduser $username dialout
Log out the operator.
Log in the operator.
Adjusting the motor
You can adjust the speed of the motor and the distance the phone' travels
using the resistance ports (labelled A,
B, and T) on the side of the controller
box.
Ensure the phone fixture travels a full 90 degrees (from 12
o'clock to 9 o'clock when looking at the phone) for each rotation.
To adjust the distance travelled, use the A and
B screws (where A is the starting
location
and B is the final location).
Upon first receiving the box, it is easiest to power up the box and
determine the initial position. If the initial position on power-up
is not close to 12 o'clock, unscrew the phone fixture (single Philips
head screw in mount hole) and rotate the phone fixture to 12
o'clock.
Adjust the rotation speed to travel a full rotation in 1.5s. Turning
the resistor pot clockwise slows down the motion.
A is the start position of the fixture.
B is the end position of the fixture.
T is the speed motor rotates.
Figure 9. How to adjust the position and speed of servo and phone
fixture
For more help, refer to the video of the sensor fusion box running (included
in the Sensor Fusion Box
zip file).