This page describes how to assemble the Android 13 controller, which controls movement for a sensor fusion test rig and lighting for ITS-in-a-box. The sensor fusion test is part of the Camera Image Test Suite (Camera ITS) in the Compatibility Test Suite (CTS). The Android 13 controller is designed to ease assembly and reduce costs as compared to previous controller versions. Additional benefits are supply isolation between electronics and servos and control of up to three servos and three lights from a single controller.
Android 13 controller overview
Servo and lighting control in test rigs
The sensor fusion test rig provides a fixed motion of the phone for reproducible testing. The phone is rotated in front of a checkerboard target to allow image capture with the phone at various positions. For test_sensor_fusion, the servo rotates the phone around the camera center of axis 90 degrees and back in about 2 seconds. For test_video_stabilization, the servo rotates the phone around the camera center of axis 10 degrees and back repeatedly to mimic the phone movement when taking a video while walking. Figure 1 shows two phones moving in a sensor fusion test rig. Figure 2 shows one phone moving in a sensor fusion test rig.
ITS-in-a-box provides a consistent testing environment with fixed distance between the test tablet and test phone, in addition to consistent lighting without external light source. For test_auto_flash, a dark environment with lights turned off is needed to trigger the auto flash function on test phones. Figure 3 shows the lights in ITS-in-a-box being turned off and on by the Android 13 controller.
Figure 1. Phone movement in test rig for test_sensor_fusion
Figure 2. Phone movement in test rig for test_video_stabilization
Figure 3. Lights turned off and on for test_auto_flash
Servo motor control
The analog servo motors in the test rig are positional servos controlled using pulse-width modulation (PWM). A typical positional control example is shown in Figure 3. The control signal has a period of 20 ms. Changing the pulse width to the minimum width moves the motor to the neutral position and changing the pulse width to the maximum width moves the motor 180 degrees clockwise.
Figure 4. Typical servo control description
Video tutorial
This is a video tutorial on how to set up the Android 13 controller.
Revision history
The following table describes the revision history of the Camera ITS WFoV rig and includes download links to each version of the production files.
Date | Revision | Production file download | Change log |
---|---|---|---|
December 2022 | 1.1 |
|
|
March 2022 | 1 |
|
Android 13 controller implementation
To control the servo motor motion and lights via a host computer, the sensor fusion test rig requires a USB connection. The Android 13 controller uses a USB-connected Arduino UNO R3 board with a custom routing board (or shield) mounted on top. The two-layer shield is designed with an open-source online PCB design tool and is available at https://oshwlab.com/leslieshaw1023/cameraits_arduino_shield_populated. The top and bottom views of the custom routing shield are shown in Figures 5 and 6.
Figure 5. Custom routing shield (top view)
Figure 6. Custom routing shield (bottom view)
The Android 13 controller can control up to three sensor fusion rigs and three ITS-in-a-box from a single host computer. The top view shows the silkscreen outlines for mounting the three 3-pin motor headers along the center axis, and three LED power jacks. The bottom view shows the silkscreen outlines for the 4 and 8-pin header connections required to mate with the UNO, a 5 V power jack and a 10 uF bypass capacitor.
To isolate the servo and lighting currents, power for the servos is provided through the external 5 V jack. The UNO electronics are powered separately through the USB connector, and there is no sharing of power between the two boards. Note that the existing external power jack on the UNO is unused and is covered up in the enclosure design to avoid confusion when connecting power to the controller.
Figure 7. Lighting and 12V power connected to Android 13 controller
Depending on the lighting power's barrel size, use adapter as needed.
Figure 8. Adapter connecting lighting power to controller
Assembling Android 13 controller
Bill of materials (BOM)
Qty | Description | PN/Link |
---|---|---|
1 | 1.6 mm thick CameraITS Arduino shield | https://oshwlab.com/leslieshaw1023/cameraits_arduino_shield_populated |
1 | Arduino UNO R3 | https://store.arduino.cc/usa/arduino-uno-rev3 |
6 | 2.1x5.5 mm, 5 V through-hole, right-angle barrel jack | 101179 |
2 | 35 V, 10%, 10 uF tantalum capacitors | 2290863 |
2 | 50 V, 5%, 100 pF ceramic 1206 mount capacitors | 12065A101JAT2A |
3 | 1 kΩ, surface mount resistor | CRCW08051K00FKEAC |
3 | Power MOSFET | RFP30N06LE |
3 | 1x3x, 100 mil (2.54 mm) pitch, through-hole male header | 732-5316-ND |
1 | 1x8x, 100 mil (2.54 mm) pitch, through-hole male header | 732-5321-ND |
1 | 1x4x, 100 mil (2.54 mm) pitch, through-hole male header | 732-5317-ND |
3 | 11 mm female-female nylon standoffs (5 mm width, M3-0.5 threads) | 92319a317 |
4 | 6 mm male-female nylon standoffs (5 mm width, M3-0.5 threads) | 95783a004 |
3 | M3-0.5 6 mm pan-head nylon screws | 92492A716 |
4 | M3-0.5 8 mm flat-head machine screws | XM2510008A20000 |
2 | M3-0.5 6 mm flat-head machine screws | XM2510006A20000 |
6 | #4, 1/2 in round-head sheet metal screws | 90925A110 |
1 | 5 V, 15 W UL-listed power supply, 2.1x5.5 mm plug (motors) | KSAS0180500300VU-VI |
1 | 12 V, 60 W UL-listed power supply, 2.1x5.5 mm plug (lights) | GSM60A12-P1J |
Other tools needed
- Soldering iron, solder, solder-sucker
- Small Phillips head screwdriver
- Size T10 Torx screwdriver
Populating the routing board
Populate the top and bottom of the routing board with the parts fitting in their outlines. For the bottom of the board, the male headers can be aligned by placing the headers into the correct locations in the Arduino board and placing the routing board on top of the connectors. The 1x8 and 1x4 headers can then be soldered in place, guaranteeing good alignment between the Arduino and the routing board. The same can be done for the power jack, but a shim is needed for tight assembly as the power jack doesn't rest on the Arduino after assembly. After soldering the bypass capacitor, the top of the board can be populated with the six 1x3 male headers for motor control. Note that the header should be oriented so that the bottom of the snap in connector is toward the motors to give maximum room for the motor mount.
When all components are soldered in place, the system can be assembled using the standoffs and screws. There are four male-female 6 mm standoffs to provide mechanical stability between the Arduino and the bottom of the plastic enclosure. However, there are only three 11 mm female-female standoffs between the Arduino and the custom shield because one hole on the Arduino (the one near the SCL pin) is unusable due to its proximity to the female header on the Arduino. Screw the three female-female standoffs on to three male-female standoffs to secure the standoffs to the Arduino. Then attach the routing board shield to the standoffs with the three M3 screws. Figure 9 shows a schematic of the Arduino shield.
Figure 9. Schematic of Arduino shield
Controller enclosure
The controller includes a custom enclosure. The assembled controller mounts to the enclosure through four countersunk screws through the bottom plate of the enclosure. Assemble the enclosure using six round-head and two flat-head assembly screws. Pertinent information, such as servo and 5 V external supply, are etched into the plastic top. Figure 10 shows a image of the controller inside the assembled enclosure.
Figure 10. Populated shield and assembled system in enclosure
Software control from host
Micro-code can be downloaded to the UNO to assign the PWM pins to the motor
signals and define the pulse-width ranges for different angles. The micro-code
for servo rotation control of the six HS-755MB motors is included in
Other resources. That section also includes a link to a
simple program called rotator.py
, which rotates the servos.
Using the Android 13 controller
Camera ITS usage:
python tools/run_all_tests.py device=device_id camera=0 rot_rig=arduino:1 scenes=sensor_fusion
With included test script:
python rotator.py --ch 1 --dir ON --debug
Previous controllers and compatibility
The Rev. 2 controller and Rev. 1 controller (shown in Figure 11 and 12) aren't compatible with Android 13 and don't support test_preview_stabilization, test_video_stabilization and test_auto_flash because they don't allow for the fine movement required for stabilization and lighting control.
Figure 11. Rev. 2 Arduino controller
Figure 12. Cana kit controller
Other resources
Mechanical drawing downloads
Software control downloads
- Arduino Micro-code for Android 11 and higher
VarSpeedServo_and_lighting_control.ino
- Python control test code
rotator.py