# Remote Control Device to Drive the Arm Gestures of an Assistant Humanoid Robot
## 4 Remote Control Device
### Electronic Control Board and Sensors  
The electronic control board of the remote control device is based on a microcontroller responsible for reading the sensors and sending the commands to the robot. Figure 3 shows the schematic diagram of the board and its connections with the sensors. The microcontroller used is the STM32F407G microcontroller from ST Microelectronics (Geneva, Switzerland). This microcontroller includes an ARM Cortex-M4 32-bit processor with a clock frequency of 168 MHz. The chip also packages 1 MB of non-volatile flash memory for user code and 196 kB of internal SRAM. The STM32F407G provides a wide variety of hardware peripherals such as precision timers, USART, 12C, SPI, CAN, and USB OTG communications, as well as three 12-bit Analog to Digital Converters (ADC) that can be configured to sample different input pins, two Digital to Analog Converters (DAC), two General Purpose Direct Memory Access (DMA) controllers and 80 General Purpose Inputs and Outputs (GPIO) pins. The sensors used are one potentiometer at each arm joint and multiple selection buttons on the auxiliary gamepads placed on the hands' region.  
The joints' angular positions in the remote control device are measured using the 3547S three-turn precision potentiometers manufactured by Bourns (Bourns, Inc., Riverside, CA, USA), which have a total resistance of 1 k\(\Omega\)\(\pm\) 3%, and a maximum dissipated power of 1 W. The potentiometers are connected to a supply voltage of 3.3 V, resulting in a 3.3 mA of current drawn. Each potentiometer actuation knob is coupled to the mechanical structure of the arms so that any change in the angular position of the joints causes a change in  
Figure 2: Kinematic representation of the joints of the remote control device, which is a scaled-down reproduction of the upper part of the APR-02 robot, with four degrees of freedom in each arm.  
its resistance. The resistance of each potentiometer is indirectly measured by reading its output voltage using the internal ADCs, which return a value between 0 and 4095 that is calibrated and mapped to an angular position. The auxiliary gamepads have 8 buttons and a joystick with two additional potentiometers each. Each button is connected to an individual GPIO pin, which reads them as digital inputs. The potentiometers of the joysticks are also connected to ADC channels.  
Table 1 shows the sensors and the sampling frequencies used to get their outputs. The microcontroller samples the position of the joints every 20 ms and sends this information to the mobile robot every 20 ms. Other information such as the state of the buttons of the auxiliary gamepads is sampled every 100 ms, but it is only submitted to the robot in case of changes, as it is only used to activate specific functionalities in the mobile robot. One of the joysticks in the auxiliary gamepads is used to control the motion of the mobile robot (forward, backward, left and right displacements) and is sampled every 100 ms. The other joystick is used to control the gaze of the eyes of the robot which are updated at 20 ms in order to synchronize the motion of the gaze and the arms. The submission rate can be decreased if arm movement becomes discontinuous.