Cámara is a robotic creature built on a commercial PTZ camera and a Raspberry Pi 5. It already sees and hears; now it also feels when it is touched. It has three sensitive zones —its hair, one side and its underside— and each one triggers a different reaction.
The hard part is not detecting a finger, it is where the sensor lives: it is mounted on the part that pans and tilts, and the camera keeps turning. A wire from there to the Pi got tangled with the movement. That is why touch is a separate node, battery-powered and over Bluetooth.
Feel
Copper tape and hair with conductive steel threads: the body becomes a sensor.
Report
A battery node that reports over Bluetooth Low Energy (BLE), with no wire to the Pi.
React
Each zone has its own gesture and sound, for as long as the touch lasts.
Feel: a finger changes the charge
Cámara's touch is capacitive, like a phone screen. Each sensitive zone is a piece of metal —an electrode— wired to a chip that measures how much electric charge it can hold. The human body conducts, so when a finger comes close the electrode effectively “grows” and the reading rises. No pressing needed: a brush is enough.
The chip is an MPR121, which reads 12 electrodes at once and reports which ones are touched. The electrodes come in two kinds:
The copper lines are strips of adhesive copper tape stuck on the side and on the underside. They are cheap, cut with scissors and go wherever you want skin. Each strip has its own wire to an MPR121 pin.
The hair is a plastic tuft of the kind used to decorate motorcycle helmets, with conductive steel threads woven through it. The plastic gives it shape and movement; the steel is what feels. That way Cámara reacts to a stroke of its hair, not just to a tap on a surface. The steel threads are joined with clips to the copper wire that runs to the MPR121: steel cannot be soldered with tin, and a clip makes the joint without solder. The hair uses only 2 electrodes, one at the front and one at the back, each tied to 10 threads: with more electrodes, the threads of one would end up brushing against another's and a touch would land in the wrong zone.

| zone | material | electrodes | connection |
|---|---|---|---|
| side | copper tape | E0–E3 | wire |
| hair | steel threads in plastic hair | E4–E5 | clips to a copper wire |
| underside | copper tape | E8–E11 | wire |
The zones were mapped by touching each one separately: a hand activates several neighboring electrodes at once, never just one. That is why Cámara reacts to a zone, not to a single electrode.
Each electrode has its own noise, which depends on the wire length and on what is nearby. So at power-on the node spends 3 seconds measuring each one with nobody touching it, and sets its threshold at twice the measured noise (between 12 and 200). To call it released it asks for half that. If someone touches it during that window, the touch counts as noise and that zone ends up less sensitive.
Any conductor can be skin
With a capacitive sensor, the shape is a design choice: a tape, a thread inside hair. Conducting is enough, but the joint to the wire needs thought: steel conducts but does not take tin solder, which is why it goes on clips.
Measure the threshold in place
An electrode's noise depends on where it is mounted. Calibrating at every power-on, fully assembled, is more reliable than a fixed number from the datasheet.
Report: wireless because the wire got tangled
The first idea was obvious: a wire from the MPR121 to the Raspberry Pi. But the sensor sits on top, on the part that tilts, and that part also pans. With every turn the wire wound itself around the camera. The fix was to remove the wire: touch is its own node, with its own battery and radio.
| part | what it does |
|---|---|
| Seeed XIAO ESP32-C3 | Microcontroller with Bluetooth Low Energy. Reads the MPR121, reports to the Pi and also charges the LiPo. |
| MPR121 | 12-electrode capacitive sensor, connected over I2C (address 0x5A). |
| LiPo 822540, 600 mAh | The battery. Charges through the XIAO's USB. |
| 330 kΩ / 100 kΩ divider | Lets the XIAO measure the battery voltage. |
| Copper tape and hair with conductive steel threads | The electrodes. |
The node does not keep asking the MPR121 whether it is being touched. The MPR121 has an alert line, the IRQ, that only goes low when something changes: a new touch or a finger leaving. Only then does the XIAO read the 12 electrodes —they fit in 2 bytes, one bit per electrode— and send that to the Pi over Bluetooth.
On the Pi, a separate thread listens to the node (with the bleak library) and records each touch with its arrival time. That way a 30 ms touch that starts and ends between two turns of the main loop is not lost. To save energy, the chip sleeps between events and runs its clock at 40 to 80 MHz. The battery is measured every 30 seconds but not transmitted: the Pi reads it on connect, and the node only speaks up when it is running low or has finished charging.
Cámara stays alive without the node. If it is off, out of battery or out of range, the robot keeps seeing and hearing, and says so in its log: after 60 s without a link it warns; with the battery below 15 %, too. A sensor that goes silent without warning is indistinguishable from “nobody is touching it”.
What rotates does not get wired
A sensor on a rotating part calls for a radio and a battery, or a slip ring. For little data, the radio is simpler.
Report changes, not states
Sending only when something changes saves radio and battery. The cost is paid on the other side: the receiver has to remember the last state.
React: each zone, its own response
Cámara does not have one reaction to touch: it has one per zone. Each zone is an impulse, a rule that says “if this happens, do that”. To avoid reacting to an accidental brush, the touch has to last at least 0.3 s. And while it is still being touched, the reaction repeats: a long stroke gets a long response.
| zone | movement | sound |
|---|---|---|
| hair | a soft, wavy nod | a contented “mmmm” |
| side | a short head shake | a ticklish giggle |
| underside | a purr on both axes at once | purr |
Movement and sound are two different bodies: the camera's motors and a speaker. Each has its own turn, so they can happen together —Cámara moves and purrs at the same time— without fighting over the same resource.
The purr goes through the speaker because the motors' purr is barely audible: the vertical axis hums at 150 Hz, only 8 to 11 dB above the room noise. The speaker's purr is a train of short pulses, about 24 per second, which the ear cannot separate and hears as a texture. The pitch sits around 182 Hz and changes a little each time, because repeating exactly the same sound reads as a recording on loop. The other two sounds are also synthesized and also change each time: the “mmmm” is a vowel with almost no high harmonics, which sounds like a closed mouth, and the giggle is a train of 7 to 9 short syllables that drop in pitch, like a laugh running out of air.
An honest limit: if Cámara is following someone or in the middle of another gesture, it does not let go of the motors, and the touch is lost.
Zones, not electrodes
A real hand never touches a single point. Grouping sensors by body zone makes the reaction stable and easy to understand.
Each output, its own turn
Treating movement and sound as independent resources lets a creature do two things at once without an arbiter blocking them.
Problems we ran into
A resting finger looked like an old touch
The node reports changes: “touched” and “released”. But each impulse requires the data to be fresh, less than 1 s old, so it does not react to something that already happened. With a finger resting for 10 seconds, the last report was 10 seconds old, and Cámara treated it as stale exactly while it was being touched.
The fix: while the Bluetooth link is up, the Pi re-records the last touch state on every turn, with the current time. If the link drops, it stops: the age grows and Cámara stops believing it is being touched, which is the truth —it no longer knows.
“No change” is not “no data”
A change-driven sensor needs someone to know whether the link is still alive; otherwise, the absence of reports means two opposite things.
A datum's age is a datum
Storing when something was learned, not just what, lets the robot stop believing what it can no longer confirm.
How we tested it
The node is tested on its own, without the robot, from the Pi or from any computer with Bluetooth: a script of about 30 s connects and shows each touch per electrode and the battery. The zones came out of that same test, touching each part of the body separately.
| test | tool | stimulus | what it measures |
|---|---|---|---|
| Node alone | ble_check.py | touching each electrode | link, touch mask, battery |
| Zone map | ble_check.py | a hand on each zone, one at a time | which electrodes fire together |
| Battery | multimeter | actual LiPo voltage | divider correction (3.90 → 4.00 V) |
| Per-electrode noise | firmware, at power-on | 3 s untouched | each electrode's threshold |
What carries over to other robots
Cámara's touch is small, but it leaves rules that work on any creature.
Map by touching, not by drawing
Which electrode belongs to which zone is found with a real hand on the assembled body, not on the drawing.
Test each piece separately
A node that can be tested without the robot isolates failures: if the script sees the touch and the robot does not react, the problem is in the robot.
An optional sensor must announce when it is missing
A robot that keeps working without a part is good; one that does so silently hides the failure.