BuddyBot utilizes two PIC32s, where one acts as the leader (PIC 1) for user input/output, and the other acts as a follower (PIC 2) that only has outputs. These two PIC32s and auxiliary electronics together respond accordingly to user inputs and display various outputs, such as display changes, arm/dispenser movement through servo motors, and turning LEDs on and off.
The majority of sensors and feedback are controlled by the leader PIC32, including the IR proximity sensor, capacitive touch sensor, joystick, and four individual buttons. The LED display, servo motors, and the on/off button LED are also controlled by the leader PIC32. The follower PIC32 controls the audio board and the three mood button LEDs.
Communication between the leader PIC32 and the follower PIC32 is achieved through an encoder on the leader and a decoder on the follower. The encoder sends different pulse patterns based on the desired output, while the decoder processes those pulse patterns and sends corresponding signals to the audio board and LEDs as appropriate. Specifically, the signal pattern starts with an initial pulse of 70 ms pulse width and a certain number of pulses with a 20 ms pulse width, followed by a final pulse width of 35 ms to signify the end of the message.
The Leader PIC32 operates as the brain of BuddyBot, controlling the three 8x8 64-dot LED display matrices in series for general user display feedback, two servo motors for arm actuation and dispenser actuation, and an on/off indicator LED with a built-in resistor in parallel. The LED matrices receive input signals through the 74ACT244 Octal Buffer. Simultaneously, the Leader PIC32 receives input signals from four buttons (3 mood and 1 on/off), two IR proximity sensors for wave detection, a capacitive touch sensor for head pat detection, and a 2D joystick for user game controls. It also outputs a variety encoded pulse signals to the Follower PIC32 for audio outputs and additional LED outputs.
The Follower PIC32 operates as an audio and LED switch board, responding to encoded pulse signals from the Leader PIC32 and decoding them. It sends continuous pulse signals to the audio board based on the decoded signal and turns on three different mood LEDs when appropriate. The three LEDs have resistors built-in in parallel.
3.3V and GND for each IR sensor with a digital output line connected to the Leader PIC32. Relatively low proximity range on IR sensors to detect user waving.
5V and GND for each servo motor with a digital PWM input line connected from the Leader PIC32. Servo motors have a range of motion of ~180 degrees. Operates as actuators for arm and dispenser motion.
3.3V and GND for capacitive touch sensor with a digital output line to the Leader PIC32. Operates to detect user head pats.
3.3V and GND for joystick with two analog output lines for 2 degrees of freedom (XY). Button is unused. Operates as user game controller.
3.3V on a pull-up 10k resistor with a separate 1k resistor on the input line from the follower PIC32. Button press correlates to an GND connection with a 0.1 uF bypass capacitor. Three buttons correlate to three separate moods, and one button operates as on/off. Buttons are springback and do not remain pressed after release.
5V and GND for audio board with active low. Each individual .wav audio file is uploaded to the board and can be triggered with a continuous pulse from the Follower PIC32 for the duration of the audio file. Audio playing can be interrupted by stopping the pulse to one line and starting a pulse to another line. Plays a variety of audio files, including welcome message, various mood responses, game music, and goodbye message.