Ian Shei and Yael Canaan
-
Pressure > IR > motor double transducer -
Pressure > IR > motor double transducer -
When pressure is applied to the FSR, the OLED display and servo motor update accordingly. -
A small cardboard tube with coated black interior shields the IR components from interference. -
Cardboard shield removed, showing the IR transmitter and receiver situated in close proximity.
Description
This project transfers a pressure signal from a force-sensing resistor (FSR) pad to an infrared (IR) transmitter which is picked up by an IR receiver. The amount of IR light received is then used to move a servo motor, acting as a dial-like analog display, to a corresponding angle. Additionally, a digital OLED display shows the amount of pressure being applied to the pressure pad as a percentage.
ELI5: A pad is pressed and the force is displayed on a monitor. Two lights communicate with each other based on how hard you press and the lights tell the motor how much to move.
Progress images
-
The sensor, IR, and motor working together. -
Preliminary wiring. Used to test functionality of IR components and perform readings of pressure outputted to Serial. -
Final wiring. Note the repositioned IR components, FSR wiring extension, OLED display, and servo motor. IR shield removed to show parts.
Arranged from left to right: FSR pad, OLED display, servo motor. As more pressure is applied to the pad, the displayed percentage increases and the servo arm moves accordingly.
Schematic

Code
- <span class="com">/*
- * Project 1 - double transducer
- *
- * Implements a double transducer: pressure input from an FSR is transduced </span><br><span class="com"> * to IR output, the level of which
- * is read with an IR receiver and transduced to the movement of a servo </span><br><span class="com"> * motor serving as an analog display.
- * An OLED display also shows the relative percentage of pressure direct </span><br><span class="com"> * from the FSR pressure input.
- *
- * A basic smoothing algorithm is implemented twice to reduce jitter in OLED </span><br><span class="com"> * display output and servo motor
- * movement.
- *
- * Smoothing implementation adapted from David A. Mellis & Tom Igoe's
- * example at http://www.arduino.cc/en/Tutorial/Smoothing.
- *
- * I2C display implementation adapted from Limor Fried/Ladyada for
- * Adafruit Industries.
- */</span><span class="pln">
- </span><span class="com">#include</span><span class="pln"> </span><span class="str"><SPI.h></span><span class="pln">
- </span><span class="com">#include</span><span class="pln"> </span><span class="str"><Wire.h></span><span class="pln">
- </span><span class="com">#include</span><span class="pln"> </span><span class="str"><Adafruit_GFX.h></span><span class="pln">
- </span><span class="com">#include</span><span class="pln"> </span><span class="str"><Adafruit_SSD1306.h></span><span class="pln">
- </span><span class="com">#define</span><span class="pln"> SCREEN_WIDTH </span><span class="lit">128</span><span class="pln"> </span><span class="com">// OLED display width, in pixels</span><span class="pln">
- </span><span class="com">#define</span><span class="pln"> SCREEN_HEIGHT </span><span class="lit">64</span><span class="pln"> </span><span class="com">// OLED display height, in pixels</span><span class="pln">
- </span><span class="com">// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)</span><span class="pln">
- </span><span class="com">#define</span><span class="pln"> OLED_RESET </span><span class="lit">4</span><span class="pln"> </span><span class="com">// Reset pin # (or -1 if sharing Arduino reset pin)</span><span class="pln">
- </span><span class="typ">Adafruit_SSD1306</span><span class="pln"> display</span><span class="pun">(</span><span class="pln">SCREEN_WIDTH</span><span class="pun">,</span><span class="pln"> SCREEN_HEIGHT</span><span class="pun">,</span><span class="pln"> </span><span class="pun">&</span><span class="typ">Wire</span><span class="pun">,</span><span class="pln"> OLED_RESET</span><span class="pun">);</span><span class="pln">
- </span><span class="com">#include</span><span class="pln"> </span><span class="str"><Servo.h></span><span class="pln">
- </span><span class="com">// pin assignments</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> PRESSURE_PIN </span><span class="pun">=</span><span class="pln"> A0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> IR_TRANSMIT </span><span class="pun">=</span><span class="pln"> </span><span class="lit">3</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> IR_RECEIVE </span><span class="pun">=</span><span class="pln"> A1</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> MOTOR_PIN </span><span class="pun">=</span><span class="pln"> </span><span class="lit">9</span><span class="pun">;</span><span class="pln">
- </span><span class="typ">Servo</span><span class="pln"> motor1</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> force</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> ir_received</span><span class="pun">;</span><span class="pln">
- </span><span class="com">// constants for sensor inputs and outputs</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> PRESSURE_MIN </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> PRESSURE_MAX </span><span class="pun">=</span><span class="pln"> </span><span class="lit">1023</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> LED_MIN </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> LED_MAX </span><span class="pun">=</span><span class="pln"> </span><span class="lit">255</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> MOTOR_MIN </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> MOTOR_MAX </span><span class="pun">=</span><span class="pln"> </span><span class="lit">180</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> IR_RECEIVE_MIN </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> IR_RECEIVE_MAX </span><span class="pun">=</span><span class="pln"> </span><span class="lit">1023</span><span class="pun">;</span><span class="pln">
- </span><span class="com">// setup for pressure display smoothing</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> pressureNumReadings </span><span class="pun">=</span><span class="pln"> </span><span class="lit">15</span><span class="pun">;</span><span class="pln"> </span><span class="com">// number of pressure readings over which to average</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> pressureReadings</span><span class="pun">[</span><span class="pln">pressureNumReadings</span><span class="pun">];</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> pressureReadIndex </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> pressureTotal </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> pressureAverage </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="com">// setup for motor smoothing</span><span class="pln">
- </span><span class="kwd">const</span><span class="pln"> </span><span class="kwd">int</span><span class="pln"> motorNumReadings </span><span class="pun">=</span><span class="pln"> </span><span class="lit">10</span><span class="pun">;</span><span class="pln"> </span><span class="com">// number of motor inputs over which to average</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> motorReadings</span><span class="pun">[</span><span class="pln">motorNumReadings</span><span class="pun">];</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> motorReadIndex </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> motorTotal </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">int</span><span class="pln"> motorAverage </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="typ">String</span><span class="pln"> percentage</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">void</span><span class="pln"> setup</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- </span><span class="com">// put your setup code here, to run once:</span><span class="pln">
- pinMode</span><span class="pun">(</span><span class="pln">IR_TRANSMIT</span><span class="pun">,</span><span class="pln"> OUTPUT</span><span class="pun">);</span><span class="pln">
- pinMode</span><span class="pun">(</span><span class="pln">IR_RECEIVE</span><span class="pun">,</span><span class="pln"> INPUT</span><span class="pun">);</span><span class="pln">
- motor1</span><span class="pun">.</span><span class="pln">attach</span><span class="pun">(</span><span class="pln">MOTOR_PIN</span><span class="pun">);</span><span class="pln">
- motor1</span><span class="pun">.</span><span class="pln">write</span><span class="pun">(</span><span class="lit">0</span><span class="pun">);</span><span class="pln">
- </span><span class="com">// for motor smoothing; array setup</span><span class="pln">
- </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">int</span><span class="pln"> thisMotorReading </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> thisMotorReading </span><span class="pun"><</span><span class="pln"> motorNumReadings</span><span class="pun">;</span><span class="pln"> thisMotorReading</span><span class="pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- motorReadings</span><span class="pun">[</span><span class="pln">thisMotorReading</span><span class="pun">]</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="com">// for pressure display smoothing; array setup</span><span class="pln">
- </span><span class="kwd">for</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">int</span><span class="pln"> thisPressureReading </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> thisPressureReading </span><span class="pun"><</span><span class="pln"> pressureNumReadings</span><span class="pun">;</span><span class="pln"> thisPressureReading</span><span class="pun">++)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- pressureReadings</span><span class="pun">[</span><span class="pln">thisPressureReading</span><span class="pun">]</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="typ">Serial</span><span class="pun">.</span><span class="kwd">begin</span><span class="pun">(</span><span class="lit">9600</span><span class="pun">);</span><span class="pln">
- </span><span class="com">// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally</span><span class="pln">
- </span><span class="kwd">if</span><span class="pun">(!</span><span class="pln">display</span><span class="pun">.</span><span class="kwd">begin</span><span class="pun">(</span><span class="pln">SSD1306_SWITCHCAPVCC</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0x3C</span><span class="pun">))</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> </span><span class="com">// Address 0x3C for 128x64</span><span class="pln">
- </span><span class="typ">Serial</span><span class="pun">.</span><span class="pln">println</span><span class="pun">(</span><span class="pln">F</span><span class="pun">(</span><span class="str">"SSD1306 allocation failed"</span><span class="pun">));</span><span class="pln">
- </span><span class="kwd">for</span><span class="pun">(;;);</span><span class="pln"> </span><span class="com">// Don't proceed, loop forever</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="kwd">void</span><span class="pln"> loop</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- </span><span class="com">// put your main code here, to run repeatedly:</span><span class="pln">
- force </span><span class="pun">=</span><span class="pln"> analogRead</span><span class="pun">(</span><span class="pln">PRESSURE_PIN</span><span class="pun">);</span><span class="pln"> </span><span class="com">// reading pressure level from FSR</span><span class="pln">
- ir_received </span><span class="pun">=</span><span class="pln"> analogRead</span><span class="pun">(</span><span class="pln">IR_RECEIVE</span><span class="pun">);</span><span class="pln">
- </span><span class="com">// IR LED transmits brightness according to pressure level on FSR</span><span class="pln">
- analogWrite</span><span class="pun">(</span><span class="pln">IR_TRANSMIT</span><span class="pun">,</span><span class="pln"> map</span><span class="pun">(</span><span class="pln">force</span><span class="pun">,</span><span class="pln"> PRESSURE_MIN</span><span class="pun">,</span><span class="pln"> PRESSURE_MAX</span><span class="pun">,</span><span class="pln"> LED_MIN</span><span class="pun">,</span><span class="pln"> LED_MAX</span><span class="pun">));</span><span class="pln">
- ir_received </span><span class="pun">=</span><span class="pln"> analogRead</span><span class="pun">(</span><span class="pln">IR_RECEIVE</span><span class="pun">);</span><span class="pln"> </span><span class="com">// IR receiver receives IR from IR LED relative to transmit brightness</span><span class="pln">
- </span><span class="com">// smoothing to decrease jerking of servo motor - constant running average over 10 readings</span><span class="pln">
- motorTotal </span><span class="pun">=</span><span class="pln"> motorTotal </span><span class="pun">-</span><span class="pln"> motorReadings</span><span class="pun">[</span><span class="pln">motorReadIndex</span><span class="pun">];</span><span class="pln">
- motorReadings</span><span class="pun">[</span><span class="pln">motorReadIndex</span><span class="pun">]</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> map</span><span class="pun">(</span><span class="pln">ir_received</span><span class="pun">,</span><span class="pln"> IR_RECEIVE_MIN</span><span class="pun">,</span><span class="pln"> IR_RECEIVE_MAX</span><span class="pun">,</span><span class="pln"> MOTOR_MIN</span><span class="pun">,</span><span class="pln"> MOTOR_MAX</span><span class="pun">);</span><span class="pln"> </span><span class="com">// mapping IR receiver range to motor movement range</span><span class="pln">
- motorTotal </span><span class="pun">=</span><span class="pln"> motorTotal </span><span class="pun">+</span><span class="pln"> motorReadings</span><span class="pun">[</span><span class="pln">motorReadIndex</span><span class="pun">];</span><span class="pln">
- motorReadIndex </span><span class="pun">=</span><span class="pln"> motorReadIndex </span><span class="pun">+</span><span class="pln"> </span><span class="lit">1</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">motorReadIndex </span><span class="pun">>=</span><span class="pln"> motorNumReadings</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- motorReadIndex </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="com">// smoothing for display of pressure percentage on OLED panel - constant running average over 15 readings</span><span class="pln">
- pressureTotal </span><span class="pun">=</span><span class="pln"> pressureTotal </span><span class="pun">-</span><span class="pln"> pressureReadings</span><span class="pun">[</span><span class="pln">pressureReadIndex</span><span class="pun">];</span><span class="pln">
- pressureReadings</span><span class="pun">[</span><span class="pln">pressureReadIndex</span><span class="pun">]</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> map</span><span class="pun">(</span><span class="pln">force</span><span class="pun">,</span><span class="pln"> PRESSURE_MIN</span><span class="pun">,</span><span class="pln"> PRESSURE_MAX</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> </span><span class="lit">100</span><span class="pun">);</span><span class="pln"> </span><span class="com">// displaying pressure as percentage by mapping pressure readings</span><span class="pln">
- pressureTotal </span><span class="pun">=</span><span class="pln"> pressureTotal </span><span class="pun">+</span><span class="pln"> pressureReadings</span><span class="pun">[</span><span class="pln">pressureReadIndex</span><span class="pun">];</span><span class="pln">
- pressureReadIndex </span><span class="pun">=</span><span class="pln"> pressureReadIndex </span><span class="pun">+</span><span class="pln"> </span><span class="lit">1</span><span class="pun">;</span><span class="pln">
- </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">pressureReadIndex </span><span class="pun">>=</span><span class="pln"> pressureNumReadings</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- pressureReadIndex </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="com">// calculating average values for motor and OLED display output</span><span class="pln">
- motorAverage </span><span class="pun">=</span><span class="pln"> motorTotal </span><span class="pun">/</span><span class="pln"> motorNumReadings</span><span class="pun">;</span><span class="pln">
- pressureAverage </span><span class="pun">=</span><span class="pln"> pressureTotal </span><span class="pun">/</span><span class="pln"> pressureNumReadings</span><span class="pun">;</span><span class="pln">
- delay</span><span class="pun">(</span><span class="lit">15</span><span class="pun">);</span><span class="pln">
- motor1</span><span class="pun">.</span><span class="pln">write</span><span class="pun">(</span><span class="pln">motorAverage</span><span class="pun">);</span><span class="pln">
- percentage </span><span class="pun">=</span><span class="pln"> </span><span class="typ">String</span><span class="pun">(</span><span class="pln">pressureAverage</span><span class="pun">);</span><span class="pln">
- </span><span class="typ">Serial</span><span class="pun">.</span><span class="pln">println</span><span class="pun">(</span><span class="pln">percentage</span><span class="pun">);</span><span class="pln">
- testdrawchar</span><span class="pun">();</span><span class="pln"> </span><span class="com">// calls display function to show relative pressure as percentage on OLED display</span><span class="pln">
- </span><span class="pun">}</span><span class="pln">
- </span><span class="com">// display function to show relative pressure as precentage on OLED display</span><span class="pln">
- </span><span class="kwd">void</span><span class="pln"> testdrawchar</span><span class="pun">(</span><span class="kwd">void</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">clearDisplay</span><span class="pun">();</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">setTextSize</span><span class="pun">(</span><span class="lit">1</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">setTextColor</span><span class="pun">(</span><span class="pln">WHITE</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">setCursor</span><span class="pun">(</span><span class="lit">0</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">println</span><span class="pun">(</span><span class="str">"Pressure at: "</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">setTextSize</span><span class="pun">(</span><span class="lit">2</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">setTextColor</span><span class="pun">(</span><span class="pln">WHITE</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">setCursor</span><span class="pun">(</span><span class="lit">0</span><span class="pun">,</span><span class="pln"> </span><span class="lit">24</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">println</span><span class="pun">(</span><span class="pln">percentage </span><span class="pun">+</span><span class="pln"> </span><span class="str">"%"</span><span class="pun">);</span><span class="pln">
- display</span><span class="pun">.</span><span class="pln">display</span><span class="pun">();</span><span class="pln">
- </span><span class="pun">}</span>
Discussion
Yael~
I worked alone during the in class work period. At first I struggled a lot, especially due to being intimidated by how much I had to do on my own. I managed to get through the work session using Dan’s help as well as the internet. The use of many new parts at the same time was confusing and difficult for me, I ended up tackling it by integrating each new component separately. Some of the components were difficult because the rules for use contradicted previously learned material, such as the IF receiver – the longer pin had to be connected to ground. In the future I hope to expand my library of components and different tools that I will be able to use in more complex projects as well as my studio projects.
Ian:
Day 1 (4 hours)
When the project was handed off to me after the in-class work session, there were issues that had to be troubleshooted and corrected. First, while pressure readings from the FSR were being displayed in Serial output, since the IR receiver circuit lacked a resistor, values were all over the place and thus the servo motor (which derives it position from the amount of IR light received) was moving in an erratic, seemingly-random manner. Additionally, I altered the lines in code that accounted for the amount of IR light emitted from the LED to use analogWrite so that brightness would vary when plugged into a PWM pin on the Arduino. I also rewired the components on the board and to the Arduino so that the IR components would directly face each other. After some trial and error resulting in this setup, the next thing to tackle was constructing the code to be well-optimized for the application.
In theory, pressure values off the FSR can be directly applied to servo motor output using the map() function . However, given the requirement of a “double transducer,” the intermediate step of IR transmit and receive inevitably adds noise to the output – undesirable if one’s goal is to transduce one value to another. The first method applied to reduce noise was to shield the rearranged IR components with a cardboard tube, whose inside face I coated in black ink – the objective being to block as much interference from outside the system as possible. Secondly, I adapted Mellis and Igoe’s basic smoothing algorithm such that a running average of 10 IR receiver readings is written to change the servo’s position. Although this did not eliminate all jitter in the motor’s movement, it greatly reduced it to an acceptable (non-annoying) level. The number of values over which to average for was chosen as a balance between output stability and responsiveness (more values to average = more input lag).
Day 2 (1.5 hours)
As a “for-fun” bonus, a 128×64 OLED display was added to the project to display live pressure values as a percentage; the harder the FSR is pressed, the greater the percentage. Implementing an I2C digital display for the first time in a project presented a bit of a challenge since many implementations exist and are often specialized towards specific display components. Fortunately, I was able to ascertain and adapt the necessary function from the Adafruit I2C library in order to display text. Like the servo motor output, the displayed pressure percentage was also smoothed over a running average of 15 values (determined to be the best of both stability and responsiveness). Adding the display followed a sort of theme with the project as a whole – taking advantage of FOSS resources to wire all the components as well as integrate them in code.
Days 3 & 4 (2.5 hours)
After the project was completed and presented in class, I photographed it using a lighting cube in my design studio, post-processed the images in Lightroom, and made a wiring diagram in Illustrator describing the electronics. Given more time, possible refinements include soldering components together and creating a housing to yield a higher degree of refinement. An intriguing extension includes testing different, more advanced smoothing algorithms in order to remove any discernible jitter in the outputs.
Comments are closed.