Feeding is detected through a beam breaker circuit. Much like a gum ball machine, inserted ping pong balls are routed through a specific channel before they are deposited into the feeding tray. Along the route, an IR emitter is directed toward a phototransistor. In the absence of ping pong balls, the IR light from the emitter floods the phototransistor, causing it to conduct. When a pin pong ball passes through the channel, it momentarily blocks the IR light from reaching the phototransistor, causing it to momentarily stop conducting. Through op-amp and comparator stages, the ON/OFF switching of the phototransistor can be accurately translated into a digital input signal at the PIC.
The critical design choice in this circuit was to increase feedback resistance in the op-amp gain stage so its output saturated from small magnitudes of phototransistor current. This greatly reduced false positive readings, by ensuring that the default ON state was invariant to small changes in environment.
Beam Breaker Configuration: this setup is placed near the exit of the ball path
Cuddling is detected through buttons on the underside of the box. The buttons are wired in a NAND configuration. When the box is sitting on a surface, all buttons are engaged. This pulls the input to the PIC LOW. When the box is lifted, one or more buttons disengage, breaking the circuit and pulling the input to the PIC HIGH.
Petting location is detected through a resistive voltage divider on the petting surface. The petting surface is divided into three distinct conductive strips. Each adjacent strip is connected through a resistor, while the leftmost strip is tied through a low pass circuit to ground. As the petting glove, which is tied to logic HIGH, slides across the petting surface, the voltage at the output of the circuit changes. Using this voltage reading, it is possible to discern location on and movement across the body. The body contact switches in the circuit diagram represent the state of electrical conduction between the glove and the petting surface at each of its three conductive strips. When the glove is in contact with a conductive strip on the petting surface, the circuit is tied to logic HIGH at that location of the petting surface. When the glove is not in contact, the connection to power acts like an open circuit.
We selected the resistance ratios in the voltage divider to produce equally-spaced voltage output readings of 0.7V, 2.0V, and 3.3V at the three respective contact points. The capacitor across the output terminal attenuates signal noise by creating a low pass filter with the load resistor. We sized the resistors and capacitors with consideration of signal response time and the resistance of the employed conductive paint. The response time of a low-pass filter scales as the product of the resistance and capacitance in the filter. Therefore, we aimed to minimize component magnitudes to the extent possible. The limit to which we could reduce the resistances in the voltage divider was determined by the conductive properties of the paint. Conductive paint is a mildly resistive material, and thus acts like a potentiometer. After applying paint in strips along the petting surface, we measured the resistances from end to end across each strip to be on the order of 100 Ω. In order to produce consistent voltage readings invariant to the location of contact along each strip, we selected the smallest resistance in the voltage divider to be an order of magnitude larger than that of the paint. From there, we sized the capacitor to find a balance between signal response time and noise attenuation.
Petting force is detected through a voltage divider with a force sensitive resistor. As force is applied, the resistance of the sensor drops, increasing the output voltage across the static load resistor.
Petting Prototype: Initial prototype of petting surface and glove with a shoe box and aluminum foil.
Petting Surface: Manufactured petting surface with strips of black, conductive paint connected through a resistive voltage divider (not shown)