Skip to content

Input Devices

I never expected that I would make a sensor ever 🀯! This week was unbelievable! Using my learnings from last week, I designed sensors of my own 🎨, milled them out πŸ› οΈ, tested them πŸ”¬, and learned so much from the process πŸ“š. Most importantly, I worked on a flex sensor πŸ€Έβ€β™‚οΈ that will be used for my final project! πŸš€πŸ”₯

Sensor Board (yes! word play)

With reference to Jesal Sir's work I created this board that helps to isolate unwanted readings from the testing environment. It is basically a pull down system which acts as a filter to show only relevant sensor values.

Image PCB Schematic

Image Routed PCB

Image Final board

Group Assignment

This weeks group assignment was to probe an input device's analog levels and digital signals. So using the serial plotter in Arduino IDE, we tested the signals from an ultrasonic sensor. Firstly, we used a RP2040 breakout board that we had made in the previous week, then we used a HC-SR04 ultrasonic sensor to measure the signals from.

This was the test setup (Click on the image to see the video): Rainbow_Stick

Step Resopnse Sensors

I milled out copper plates to create step response sensors of my own. The first one I designed to look like the letter 'M' (my initial). The second one was an attempt to create a slider which didnt quite workout. I later realised I needed multiple reciever pins for it to work. So I just have a couple itterations of touch sensors. To bridge the gap I first tried using my finger, then I used tap water and finally settled on using a coin. You can see that in the documentation that whenever I press the coin down, the sensor registers the touch.

Image Connections Schematic

Touch Sensor 1

Touch Sensor 1 (Click on the image for seeing the video)

Image Connections Schematic

Touch Sensor 2

Touch Sensor 2 (Click on the image for seeing the video)

Flex Sesnor

The flex sensor plays an essential part in my final project. Using it I will trigger the plasma pulse from my Iron Man gauntlet. This week however I could not make it work. I am still debugging the code as well as the connections that I made. But essentialy the logic was to connect the A0/A1 Pin to one pin of the sensor and 3.3V pin to another end. And at the same time create a pull down resistor system at the A0/A1 pin which connects it to the ground.

Image When not bent Image No deflection

Image When bent Image No deflection registered

I am working on debugging this issue, I'll add updates as soon as I make a breakthrough!

Design files & Code

My breakout board
'M' Touch sensor
Variable Touch sensor

All these codes were written using ChatGPT and some manual debugging

Step Response Code
#define TOUCH_PIN1 A0 // TOuch Sensor 1 connected to D0
#define TOUCH_PIN2 A1 // TOuch Sensor 2 connected to D1

void setup() {
  Serial.begin(115200); // Start Serial Monitor
}

void loop () {
  int touchValue1 = analogRead(TOUCH_PIN1);
  int touchValue2 = analogRead(TOUCH_PIN2);

  Serial.print("Touch Sensor 1:");
  Serial.print(touchvalue1);
  Serial.print("Touch Sensor 2:");
  Serial.print(touchvalue2);

  delay(100);
}
Flex Sensor Code
#define FLEX_SENSOR_PIN A0 // Flex sensor connected to A0

void setup(){
  serial.begin(115200); // Start serial communication
  pinMode(FLEX_SENSOR_PIN, INPUT);
}

void loop(){
  int flexvalue + analogRead(FLEX_SENSOR_PIN); // Read Sensor

  Serial.print ("Flex Sensor value");
  Serial.println(flexValue); // Print value

  delay(200); // Delay for readability

}