My team and I have a college project whereby we need to build a piezoelectric sensor combining it with an Arduino board and output display. We must be able to calibrate the sensor device. Hence, we decided to build a piezoelectric scale with an output display and a led/buzzer if the weight is above a certain threshold.
The problem is, my team and I have no idea about coding or Arduino and really don't have much time to build this skillset (we are all working full time/with families).
As such, looking for someone who might be able to help us with the coding.
Some other things (which may or may not be important)
Design needs to use a breadboard
Device needs to be calibrate-able. I plan to use test weights maybe ~10-500g depending on what I can find online
Help will be required in the calibration of the device
Code and design needs to be demonstrated on Tinkercad (needs to be in the report)
We will procure the devices locally
I hope there is enough information here otherwise, please give a shout.
"piezoelectric sensor" for measuing weight is a really bad idea. You use piezo to detect small changing forces like the old picups of turntables. For weight you use a strain gauge - most popular items have a HX711 - just google for it.
+1 - you can create a basic weight measurement system using a piezoelectric sensor without an amplifier like the HX711. However, keep in mind that this approach may not be as accurate or sensitive as using a load cell with an amplifier...
You would just :
Connect one side of the piezoelectric sensor to the Arduino's analog input pin (e.g., A0).
Connect the other side of the sensor to the ground (GND) on the Arduino.
the code can trivially be
const byte piezoPin = A0; // Analog pin where the piezoelectric sensor is connected
float calibrationFactor = 500.0f; // Adjust this value for calibration
void setup() {
Serial.begin(115200);
}
void loop() {
float sensorValue = analogRead(piezoPin);
// Apply calibration factor to convert sensor value to weight
float weight = sensorValue / calibrationFactor; // some formula
Serial.print("Sensor Value: ");
Serial.print(sensorValue, 0);
Serial.print(" Weight: ");
Serial.print(weight);
Serial.println(" grams");
delay(1000);
}
the calibration can be manual ➜ in this case it involves determining the calibration factor (calibrationFactor) that relates the sensor reading to weight. You'll need a set of known weights for this process.
Place a known weight on the piezoelectric sensor.
Record the analog sensor reading displayed in the serial monitor.
Calculate the calibration factor by dividing the known weight by the sensor reading. Update the calibrationFactor value in your code with this result.
Repeat the calibration process with different known weights to improve accuracy.
using a piezoelectric sensor without an amplifier will result in limited sensitivity and accuracy. Additionally, factors like temperature and sensor quality can affect the accuracy of your measurements...