2 KiB
Clay PCB mesh
Code and other resources for the workshop Earthbound Hardware, as part of the Connecting Otherwise artistic research consortium. Based on the original research and documentation of Patrícia J. Reis and Stefanie Wuschitz: https://github.com/FeministHardware/Making-PCBs-from-natural-clay/tree/main
"Mesh network"
The goal is to create a symbolic 'mesh' network using the clay pcbs. Pressing a button on one node sends a signal across a shared two-wire bus, all other nodes blink a pin in response corresponding to the senders ID. We tried to keep the parts count minimal as possible (just a resistor and conductive material).
RS232 did not fit because assumes a hierarchy, one device is always in charge, others respond. RS485 avoids that but needs an extra hardware, a transceiver chip on every node that were hard to source as used. Instead we ended up on bitbanging, the nodes communicate by directly toggling a pin, a bit like morsecode. It keeps the circuit as bare as possible: two wires, a pull-up resistor, and whatever conductive material you find to connect the PCB's together.
Code
Communication uses bitbanging over a half-duplex two-wire bus (signal pulled up with a 4.7kΩ resistor). Each node:
- Has a unique NODE_ID (set in the sketch, values up to ~32)
- Sends its ID on the bus when the button is pressed
- Blinks its LED when it receives any message
Because everything runs in the main loop with delayMicroseconds, avoid using delay() elsewhere as it will break communication.
Before uploading, set a unique NODE_ID per node:
#define NODE_ID 3 // change for each node
Hardware modifications
The stamp used to press the PCB traces into clay has been modified:
- The trace between the motor driver circuit and pin 9 is removed.
- Two additional magnet/connection points have been added to allow nodes to connect to the shared bus.
One of the needs needs to pull up the bus wire with a 4.7ohm resistor! To do this add a resistor between one of the 5V connection points (the 5V input makes sense) and the bus pin (D2).