Tag: physical computing

Printer disassembly + baby

A stop motion animation from my studio in Berlin 2011 where I disassemble and reuse old ink jet printers to construct new a series of kinetic artworks. Guest starring Joelle and four-month-old Sophia.

Schematic for You Never Close Your Eyes Anymore

“Open sourcing” the schematic for the electronic components for You Never Close Your Eyes Anymore.

Picture 5

Products:

RBBB boards (Arduino clone)
custom-designed circuits
– female headers
– TIP31 transistor
– 6-wire Unipolar Stepper motor (48 step Nippon Electric Pulse Motor)
– ULN2803A Darlington Array
– hook-up wire
– various resistors
– LEDs
used camera lenses
aluminum “flat bar”
hose clamps
rubber wine corks
various mounting hardware

Fading an LED with PWM and a Potentiometer

Using a potentiometer and PWM on an Arduino to fade an LED.

  1. /* POT to LED test -> by Owen Mundy March 11, 2010
  2. from: http://itp.nyu.edu/physcomp/Labs/AnalogIn
  3. —————————————————————*/
  4. int potPin = 0; // Analog input pin that the potentiometer is attached to
  5. int potValue = 0; // value read from the pot
  6. int led = 9; // PWM pin that the LED is on. n.b. PWM 0 is on digital pin 9
  7. void setup() {
  8. // initialize serial communications at 9600 bps:
  9. Serial.begin(9600);
  10. // declare the led pin as an output:
  11. pinMode(led, OUTPUT);
  12. }
  13. void loop() {
  14. potValue = analogRead(potPin); // read the pot value
  15. analogWrite(led, potValue/4); // PWM the LED with the pot value (divided by 4 to fit in a byte)
  16. Serial.println("hello"); // print the pot value back to the debugger pane
  17. delay(10); // wait 10 milliseconds before the next loop
  18. }

Here is the schematic for the above project.

potentiometer_to_led

Using PWM and a potentiometer to fade an LED and drive a stepper motor, powered by a Boarduino RBBB.

  1. /*
  2. Owen Mundy
  3. July 29, 2009
  4. p. 262 of Physical Computing
  5. Using BBB to run stepper motor by manually moving steppers
  6. */
  7. int pin1 = 3; // PWM
  8. int pin2 = 5; // PWM
  9. int pin3 = 6; // PWM
  10. int pin4 = 9; // PWM
  11. int ledpin = 13; // LED
  12. int led = false; // LED monitor
  13. int motor_time_lapse = 80;
  14. int potPin = 0; // Analog input pin that the potentiometer is attached to
  15. int potValue = 0; // value read from the pot
  16. int ledPotPin = 11; // PWM pin that the LED is on. n.b. PWM 0 is on digital pin 9
  17. void setup()
  18. {
  19. pinMode(pin1, OUTPUT); // sets the pin as output
  20. pinMode(pin2, OUTPUT); // sets the pin as output
  21. pinMode(pin3, OUTPUT); // sets the pin as output
  22. pinMode(pin4, OUTPUT); // sets the pin as output
  23. pinMode(ledpin, OUTPUT); // sets the pin as output
  24. // initialize serial communications at 9600 bps:
  25. Serial.begin(9600);
  26. // declare the led pin as an output:
  27. pinMode(ledPotPin, OUTPUT);
  28. }
  29. void loop()
  30. {
  31. potValue = analogRead(potPin); // read the pot value
  32. analogWrite(ledPotPin, potValue/4); // PWM the LED with the pot value (divided by 4 to fit in a byte)
  33. Serial.println(potValue);
  34. digitalWrite(pin1, HIGH); // on
  35. digitalWrite(pin2, LOW); // off
  36. digitalWrite(pin3, HIGH); // on
  37. digitalWrite(pin4, LOW); // off
  38. delay(motor_time_lapse); // wait
  39. digitalWrite(pin1, LOW); // off
  40. digitalWrite(pin2, HIGH); // on
  41. digitalWrite(pin3, HIGH); // on
  42. digitalWrite(pin4, LOW); // off
  43. delay(motor_time_lapse); // wait
  44. digitalWrite(pin1, LOW); // off
  45. digitalWrite(pin2, HIGH); // on
  46. digitalWrite(pin3, LOW); // off
  47. digitalWrite(pin4, HIGH); // on
  48. delay(motor_time_lapse); // wait
  49. digitalWrite(pin1, HIGH); // on
  50. digitalWrite(pin2, LOW); // off
  51. digitalWrite(pin3, LOW); // off
  52. digitalWrite(pin4, HIGH); // on
  53. delay(motor_time_lapse); // wait
  54. blink();
  55. }
  56. void blink()
  57. {
  58. if (led == false)
  59. {
  60. led = true;
  61. digitalWrite(ledpin, HIGH); // on
  62. }
  63. else
  64. {
  65. led = false;
  66. digitalWrite(ledpin, LOW); // on
  67. }
  68. }

BBB (Freeduino) and stepper motor test

Test with BBB (Freeduino) board, Darlington H-Bridge, Mabuchi # PF35T-48L4 stepper motor. Many thanks to Tom Igoe and his Physical computing book.

  1. /*
  2. Owen Mundy
  3. July 29, 2009
  4. p. 262 of Physical Computing
  5. Using BBB to run stepper motor by manually moving steppers
  6. */
  7. int pin1 = 3; // PWM
  8. int pin2 = 5; // PWM
  9. int pin3 = 6; // PWM
  10. int pin4 = 9; // PWM
  11. int ledpin = 13; // LED
  12. void setup()
  13. {
  14. pinMode(pin1, OUTPUT); // sets the pin as output
  15. pinMode(pin2, OUTPUT); // sets the pin as output
  16. pinMode(pin3, OUTPUT); // sets the pin as output
  17. pinMode(pin4, OUTPUT); // sets the pin as output
  18. pinMode(ledpin, OUTPUT); // sets the pin as output
  19. }
  20. void loop()
  21. {
  22. for (int i=0; i<24; i++)
  23. {
  24. digitalWrite(pin1, HIGH); // on
  25. digitalWrite(pin2, LOW); // off
  26. digitalWrite(pin3, HIGH); // on
  27. digitalWrite(pin4, LOW); // off
  28. delay(10); // waits for a second
  29. digitalWrite(pin1, LOW); // off
  30. digitalWrite(pin2, HIGH); // on
  31. digitalWrite(pin3, HIGH); // on
  32. digitalWrite(pin4, LOW); // off
  33. delay(10); // waits for a second
  34. digitalWrite(pin1, LOW); // off
  35. digitalWrite(pin2, HIGH); // on
  36. digitalWrite(pin3, LOW); // off
  37. digitalWrite(pin4, HIGH); // on
  38. delay(10); // waits for a second
  39. digitalWrite(pin1, HIGH); // on
  40. digitalWrite(pin2, LOW); // off
  41. digitalWrite(pin3, LOW); // off
  42. digitalWrite(pin4, HIGH); // on
  43. delay(10); // waits for a second
  44. }
  45. blink();
  46. for (int i=0; i<24; i++)
  47. {
  48. digitalWrite(pin1, HIGH); // on
  49. digitalWrite(pin2, LOW); // off
  50. digitalWrite(pin3, LOW); // off
  51. digitalWrite(pin4, HIGH); // on
  52. delay(10); // waits for a second
  53. digitalWrite(pin1, LOW); // off
  54. digitalWrite(pin2, HIGH); // on
  55. digitalWrite(pin3, LOW); // off
  56. digitalWrite(pin4, HIGH); // on
  57. delay(10); // waits for a second
  58. digitalWrite(pin1, LOW); // off
  59. digitalWrite(pin2, HIGH); // on
  60. digitalWrite(pin3, HIGH); // on
  61. digitalWrite(pin4, LOW); // off
  62. delay(10); // waits for a second
  63. digitalWrite(pin1, HIGH); // on
  64. digitalWrite(pin2, LOW); // off
  65. digitalWrite(pin3, HIGH); // on
  66. digitalWrite(pin4, LOW); // off
  67. delay(10); // waits for a second
  68. }
  69. blink();
  70. for (int i=0; i<6; i++)
  71. {
  72. digitalWrite(pin1, HIGH); // on
  73. digitalWrite(pin2, LOW); // off
  74. digitalWrite(pin3, HIGH); // on
  75. digitalWrite(pin4, LOW); // off
  76. delay(10); // waits for a second
  77. digitalWrite(pin1, LOW); // off
  78. digitalWrite(pin2, HIGH); // on
  79. digitalWrite(pin3, HIGH); // on
  80. digitalWrite(pin4, LOW); // off
  81. delay(10); // waits for a second
  82. digitalWrite(pin1, LOW); // off
  83. digitalWrite(pin2, HIGH); // on
  84. digitalWrite(pin3, LOW); // off
  85. digitalWrite(pin4, HIGH); // on
  86. delay(10); // waits for a second
  87. digitalWrite(pin1, HIGH); // on
  88. digitalWrite(pin2, LOW); // off
  89. digitalWrite(pin3, LOW); // off
  90. digitalWrite(pin4, HIGH); // on
  91. delay(10); // waits for a second
  92. }
  93. blink();
  94. for (int i=0; i<6; i++)
  95. {
  96. digitalWrite(pin1, HIGH); // on
  97. digitalWrite(pin2, LOW); // off
  98. digitalWrite(pin3, LOW); // off
  99. digitalWrite(pin4, HIGH); // on
  100. delay(10); // waits for a second
  101. digitalWrite(pin1, LOW); // off
  102. digitalWrite(pin2, HIGH); // on
  103. digitalWrite(pin3, LOW); // off
  104. digitalWrite(pin4, HIGH); // on
  105. delay(10); // waits for a second
  106. digitalWrite(pin1, LOW); // off
  107. digitalWrite(pin2, HIGH); // on
  108. digitalWrite(pin3, HIGH); // on
  109. digitalWrite(pin4, LOW); // off
  110. delay(10); // waits for a second
  111. digitalWrite(pin1, HIGH); // on
  112. digitalWrite(pin2, LOW); // off
  113. digitalWrite(pin3, HIGH); // on
  114. digitalWrite(pin4, LOW); // off
  115. delay(10); // waits for a second
  116. }
  117. blink();
  118. }
  119. void blink()
  120. {
  121. digitalWrite(ledpin, HIGH); // on
  122. delay(1000); // waits for a second
  123. digitalWrite(ledpin, LOW); // off
  124. }