Doubly-Linked Pendulum
Oshadha Gunasekara – Fall 2018
The doubly-linked pendulum is a mesmerizing metronome with an aesthetically minimal design.
The fixture consists of a servo connected to an actuated arm, which is in turn connected with a rotating joint to an unactuated arm. Actuating the first arm in a fixed manner results in seemingly chaotic behavior of the second arm. However, if observed for an extended period of time, patterns arise in the motion of the second link, to be discovered by those who have plenty of spare time on their hands!
It also acts as a metronome, with the actuated arm swinging with a period of 1 second. The movement of the servo produces different frequencies when travelling forwards and backwards. This can be used to augment the human perception of rhythm by maintaining a 60 bpm swing.
The doubly-linked pendulum can be placed anywhere that allows the two arms to hang freely. Some locations include on top of my fridge, on top of a friend’s head, on the wall, and on the side of a mailbox (for passersby to appreciate the beauty of the pseudo-random).
Arduino Code
#include <Servo.h> // constant variables const int SERVO_PIN = 5; const int SERVO_UPPER_LIM = 170; const int SERVO_LOWER_LIM = 20; const int SERVO_INCR_AMOUNT = 3; const int SERVO_DELAY = 10; // servo variables Servo small_servo; int servo_pos = 90; int servo_dir = 1; void incrementServo() { int tmp_pos = servo_pos + servo_dir * SERVO_INCR_AMOUNT; if (((servo_dir == 1) && (tmp_pos > SERVO_UPPER_LIM)) || ((servo_dir == -1) && (tmp_pos < SERVO_LOWER_LIM))){ servo_dir = servo_dir * -1; incrementServo(); } else{ servo_pos = tmp_pos; small_servo.write(servo_pos); } } void setup() { // put your setup code here, to run once: small_servo.attach(5); Serial.begin(115200); } void loop() { incrementServo(); delay(SERVO_DELAY); }
Leave a Reply
You must be logged in to post a comment.