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.
PCB Schematic
Routed PCB
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):
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.
Connections Schematic
Touch Sensor 1 (Click on the image for seeing the video)
Connections Schematic
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.
When not bent
No deflection
When bent
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
#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);
}
#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
}