Devin's Final Double Transducer Board. First, it reads brightness values through a photoresistor and heat up the heating pad based on the brightness values, then the thermistor reads the temperature values of the heating pad and rotates the servo motor to push and pull the slide crank mechanism by 5 centimeters. (push further out as temperature increases and pulls further in as temperature decreases.
Zixin's final Double Transducer Board. It is a double transducer budild in Light - Temperature - Distance. When the light gets brighter, the heating pad starts heating and raising the temperature, the thermistor detached the temperature raising, and then the servo motor rotates to push the mechanism forward (a maximum of 5cm). When the light gets dark, the heating pad stops heating, and the servo motor turns to retract the mechanism (a maximum of 5 cm).
Devin's heating pad wrapping around the thermistor like a blanket
Devin's motor and slide crank mechanism
Devin's LCD display panel
Leaf's Photoresistor and connections
Leaf's Heating Pad and connections
Leaf's LCD Arduino and Bread Board Connections
Leaf's LCD display panel
Devin's Final Double Transducer Video. Shows the system working normally and then shows the system working with the skip the middle button.
Leaf's Final Double Transducer Video. The system working normally and then the system working with the skip the middle button.
Everything is powered by 5 volts from the flat black board and through the flat white rectangle. A small, round object with two legs and a squiggly line in the middle reads brightness and tells a flat black board. Flat black board tells yellow clear heat pad how bright, heat up more when bright, and heat less when dark. The little orange bulb wrapped by the heat pad tells the black board how hot the heat pad is. Blackboard tells the small blue motor to turn. Turn and push forward when hot, turn and pull backward when cold. All the numbers the blackboard sees show up on the screen.
Testing if Photoresistor is reading brightness and displaying on monitor
Testing if Thermistor is reading heat and displaying values on monitor
Testing LCD Display and Slide Crank Mechanism
Testing if skip the middle button skips middle step
Soldering the middle steps (the heating pad connections)
Testing the Heating pad after soldering process
When initially designing this double transistor, we took into account that the heating pad's heating process was not a problem, but the cooling process might be challenging. Indeed, during the practical implementation, the heating pad's inability to cool down quickly did cause some noise and required manual removal of the thermistor. Due to the limitations of the materials, we did not have any more electronic components that could quickly and efficiently cool down. If there were other options for components, it would make the movement smoother.
These electronic components and connections are less refined than I expected, and they are subject to more interference factors. Removing these interference factors and making the entire process smoother and more accurate is also a major undertaking. Making smooth electrical appliances is not an easy task.
Group 1 Double Transducer Project by Devin and Leaf
The code reads all the input values and drives output based on the input values in a loop, then displays all the values on an LCD Display
Arduino pin | role | description
-------------------------------------
A0 input Photoresistor
A1 input Thermistor
3 input Heat Pad
5 output Servo Motor
8 output Tactile Switch Button
SDA & SCL output LCD Display
#include <Wire.h> // Enables I2C communication
#include <Servo.h> // Library for controlling servo motors
#include <LiquidCrystal_I2C.h> // Library for I2C LCD display
LiquidCrystal_I2C screen(0x27, 16, 2); // Initialize LCD at I2C address 0x27, 16 columns x 2 rows
Servo gaugeMotor; // Create servo motor object
// Input and output variables
int photoVal, tempVal, buttonState;
int heatOutput, motorPosSkip, motorPos;
int brightnessPct, tempPct, heatPct, motorPct;
unsigned long quarterTimer = 0; // Timer for LCD refresh
// Pin configuration and initializations
void setup() {
pinMode(3, OUTPUT);
gaugeMotor.attach(5);
Wire.begin();
screen.init();
screen.backlight();
Serial.begin(9600); // Start serial communication for debugging
}
// Main loop: read sensors, compute outputs, update display, and control devices
void loop() {
readInputs();
driveOutputs();
lcdDisplay();
skipTheMiddle();
reportBack();
delay(100);
}
// Reads sensor and button inputs
void readInputs(){
buttonState = digitalRead(8);
photoVal = analogRead(A0);
tempVal = analogRead(A1);
}
// Maps sensor values to output control signals for heat and motor
void driveOutputs(){
heatOutput = map(brightnessPct, 0, 99, 0, 255);
motorPosSkip = map(photoVal, 0, 1023, 0, 90);
motorPos = map(tempVal, 400, 900, 10, 170);
}
// Sends sensor data to Serial Monitor for debugging
void reportBack(){
Serial.print("photoVal = ");
Serial.print(photoVal);
Serial.print(", tempVal = ");
Serial.print(tempVal);
Serial.print(", buttonVal = ");
Serial.println(buttonState);
}
// Converts raw sensor values to percentages and displays them on the LCD
void lcdDisplay(){
brightnessPct = map(photoVal, 200, 1023, 0, 99);
tempPct = map(tempVal, 500, 900, 0, 99);
heatPct = map(heatOutput, 0, 255, 0, 99);
motorPct = map(motorPos, 10, 170, 0, 99);
// Display brightness (i), heat output (m), temperature (#), motor rotation (o)
if((millis()-quarterTimer) >= 250){ // Refresh LCD every 250ms
screen.clear(); // clears numbers from screen
screen.home(); // Set cursor to top-left
screen.print("i:");
screen.print(brightnessPct);
screen.setCursor(6, 0);
screen.print("m:");
screen.print(heatPct);
screen.setCursor(8, 1);
screen.print(tempPct);
screen.setCursor(12, 1);
screen.print("o:");
screen.print(motorPct);
quarterTimer = millis(); // Reset timer
}
}
// Skip the middle step when button is held down
void skipTheMiddle(){
if (buttonState == HIGH) { // While button is pressed
gaugeMotor.write(motorPosSkip); // Move servo based on brightness
} else {
//heatpad
digitalWrite(3, heatOutput); // Activate heat pad with PWM
gaugeMotor.write(motorPos); // Move servo based on temperature
}
}