Skip to content

Commit

Permalink
Merge pull request #21 from virtual-labs/dev
Browse files Browse the repository at this point in the history
updated
  • Loading branch information
dsnvlab authored Sep 27, 2024
2 parents 247af18 + 62d553b commit a8cd77b
Show file tree
Hide file tree
Showing 11 changed files with 207 additions and 83 deletions.
13 changes: 7 additions & 6 deletions experiment/aim.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Aim
Understand operation of different types of loadcell.
Design of Load cell and its characterization.

## Objective
- Understand operation of loadcell
- Configuration of Load cell
- Validate stress and strain for change in pressure.
- Design signal conditioning for loadcell
- Evaluate output voltage
- Understand operation of load cell
- Configuration of load cell
- Validate stress and strain for change in pressure.
- Design signal conditioning for load cell.
- Observe performance of designed load cell.



2 changes: 1 addition & 1 deletion experiment/pretest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"difficulty": "beginner"
},
{
"question": "In which unit is force typically measured by a load cell?",
"question": "What is the unit of force measured by load cell?",
"answers": {
"a": "Newtons (N)",
"b": "Volts (V)",
Expand Down
2 changes: 1 addition & 1 deletion experiment/procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Configuration :
- Select the configuration parameters.
- Calculate area and enter its value if the value is correct, click on Configure. If the entered value is incorrect then formula followed by correct answer will be displayed after 3 attempts.
- If column type load cell selected then, calculate area and enter its value if the value is correct, click on Configure. If the entered value is incorrect then formula followed by correct answer will be displayed after 3 attempts.
- Click on Next Level.

### Construction of Wheatstone bridge:-
Expand Down
12 changes: 8 additions & 4 deletions experiment/simulation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/loadCellType.css">
<link rel="stylesheet" href="css/analysis.css">




</head>

<style>
Expand All @@ -26,7 +30,7 @@
}
</style>

<body >
<body style="padding: 0px 0px 0px 0px;">

<header>
<img class="COEPLogo" src='images/COEPlogo.png' />
Expand All @@ -46,7 +50,7 @@
</div>

<div class="col-sm-4">
<select class="form-control" id="typeCell" name="sellist1">
<select class="form-control" id="typeCell" name="sellist1" style="margin-bottom:10px;">
<option value="0">--- Select type of load cell --- </option>
<option value="15">Column type load cell</option>
<option value="25" >Cantilever beam type load cell</option>
Expand All @@ -55,11 +59,11 @@
</div>

<div class="col-sm-2">
<button type="button" id="delete-btn" class="btn" data-dismiss="modal" style="margin-top:-1px;" hidden>Delete Selected</button>
<button type="button" id="delete-btn" class="btn" data-dismiss="modal" style="margin-top:-1px;margin-bottom:10px;" hidden>Delete Selected</button>
</div>

<div class="col-sm-2">
<button type="button" id="validateCon" class="btn-info" data-dismiss="modal" data-toggle="modal" data-target="#myModal" style="margin-top:-1px;" hidden>Validate Connection</button>
<button type="button" id="validateCon" class="btn-info" data-dismiss="modal" data-toggle="modal" data-target="#myModal" style="margin-top:-1px;margin-bottom:10px;" hidden>Validate Connection</button>
</div>

</div>
Expand Down
37 changes: 23 additions & 14 deletions experiment/simulation/src/calculation.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ function columnType(){

+'</div>'
+ '<div class="col-sm-3" id="labelSelected">'
+'<label class="labelstyle" style="margin-left:10px;"> <center>Area : '+areaSelect+'</center> </label>'
+'<label class="labelstyle" style="margin-left:10px;"> <center>Area : '+areaSelect+' sq mm</center> </label>'
+'</div>'

+ '<div class="col-sm-3" id="labelSelected">'
+'<label class="labelstyle" style="margin-left:10px;"> <center>Modulus : 2.07 &times 10 &#x2075 </center> </label>'
+'<label class="labelstyle" style="margin-left:10px;"> <center>Modulus : 2.07 &times 10 &#x2075 (N/mm<sup>2</sup>)</center> </label>'
+'</div>'

+ '<div class="col-sm-3" id="labelSelected">'
+'<label class="labelstyle" style="margin-left:10px;"><center>Poison Ratio : '+poisonSelect+'</center> </label>'
+'<label class="labelstyle" style="margin-left:10px;"><center>Poisson'+"'"+'s Ratio : '+poisonSelect+'</center> </label>'
+'</div>'
+ '<div class="col-sm-1">'

Expand Down Expand Up @@ -113,6 +113,7 @@ function columnType(){
var axialC = 0;
var arrWeight = [];
$("#submit_load1").click(function(){
$("body").css("padding","0px 0px 0px 0px");
id1 = 1;
id2 = 1;
axial=$("#text1").val();
Expand All @@ -126,7 +127,7 @@ function columnType(){
}else{
if(ax1 >=1000 && ax1<=10000)
{
if(ax1%2==0){
if(Number.isInteger(ax1)){
const index = arrWeight.indexOf(ax1);
arrWeight.push(ax1);
var hasDuplicate = arrWeight.some((ax1, i) => arrWeight.indexOf(ax1) !== i);
Expand Down Expand Up @@ -179,6 +180,7 @@ function columnType(){
var axConvert = 0;

$("#submit_load2").click(function(){
$("body").css("padding","0px 0px 0px 0px");
text2 = $("#text2").val();

if(text2==""){
Expand Down Expand Up @@ -229,10 +231,10 @@ function columnType(){

} else if (id1 == 4) {

$(".modal-header").html("Error Message");
$(".modal-header").html("Formula");
$(".modal-header").css("background","#23435c");
$("#btnModal").removeClass("btn-success").addClass("btn-danger");
$("#MsgModal").html("<b> Formula : Axial Strain = P / AE where,<br> P = Applied load, A = area and E = Young's Modulus");
$("#MsgModal").html("<b> Axial Strain = P / A &times; E where,<br> P = Applied load, A = area and E = Young's Modulus");
wrongAxialCnt++;
// alert("formula :Axial Strain = P / AE");

Expand Down Expand Up @@ -283,6 +285,7 @@ function columnType(){
var transCal1 = 0;
var transCal12 = 0;
$("#submit_load3").click(function(){
$("body").css("padding","0px 0px 0px 0px");
pos = parseFloat(poisonSelect);
trans=$("#text1").val();
text3 = $("#text3").val();
Expand Down Expand Up @@ -352,10 +355,10 @@ function columnType(){

} else if (id2 == 4) {

$(".modal-header").html("Error Message");
$(".modal-header").html("Formula");
$(".modal-header").css("background","#23435c");
$("#btnModal").removeClass("btn-success").addClass("btn-danger");
$("#MsgModal").html("<b>Formula : Transverse Strain = -P &times; Pos / AE where, <br> Pos = Poison's Ratio</b>");
$("#MsgModal").html("<b>Transverse Strain = (-P &times; &nu;) / (A &times; E) where, <br> &nu; = Poisson's Ratio</b>");
wrongTransCnt++;
// alert("formula : Transverse Strain = -P*Pos / AE");

Expand Down Expand Up @@ -415,6 +418,7 @@ function columnType(){
});

$("#nextReading").click(function(){
$("body").css("padding","0px 0px 0px 0px");
$("#nextReading").prop('hidden',true);
if(itr<=5){
$("#text1").prop('disabled',false);
Expand Down Expand Up @@ -461,7 +465,7 @@ function columnType(){


$("#nextLevel").click(function(){

$("body").css("padding","0px 0px 0px 0px");
addFun();
tableReading(masterJson);
})
Expand Down Expand Up @@ -562,6 +566,7 @@ function cantilever(){


$("#submit_load1").click(function(){
$("body").css("padding","0px 0px 0px 0px");
id1 = 1;
id2 = 1;
tensile=$("#text1").val();
Expand All @@ -576,7 +581,7 @@ function cantilever(){
}else{
if(tx1 >=10 && tx1<=100)
{
if(ax1%2==0){
if(Number.isInteger(tx1)){
const index = arrWeight.indexOf(tx1);
arrWeight.push(tx1);
var hasDuplicate = arrWeight.some((tx1, i) => arrWeight.indexOf(tx1) !== i);
Expand Down Expand Up @@ -630,6 +635,7 @@ function cantilever(){
var finalDiv,finalVal, finalAns;

$("#submit_load2").click(function(){
$("body").css("padding","0px 0px 0px 0px");
var tenStrain = $("#text2").val();

if(tenStrain==""){
Expand Down Expand Up @@ -659,10 +665,10 @@ $("#submit_load2").click(function(){
wrongAxialCnt++;
}
}else if (id1 == 4){
$(".modal-header").html("Error Message");
$(".modal-header").html("Formula");
$(".modal-header").css("background","#23435c");
$("#btnModal").removeClass("btn-success").addClass("btn-danger");
$("#MsgModal").html("<b>Formula : Tensile Strain = 6 &times; P<sub>x</sub> / Ewh &times; h</b>");
$("#MsgModal").html("<b>Tensile Strain = 6 &times; P<sub>x</sub> / Ewh<sub>2</sub><br>where, Px = Applied load, E = young's modulus, w = width and h = height.</b>");
wrongAxialCnt++;
// alert("formula :Tensile Strain = 6.Px / Ewh*h");

Expand Down Expand Up @@ -692,6 +698,7 @@ $("#submit_load2").click(function(){
var compresEnter;

$("#submit_load3").click(function(){
$("body").css("padding","0px 0px 0px 0px");
compresVal = -finalAns;
compresEnter = $("#text3").val();

Expand Down Expand Up @@ -734,10 +741,10 @@ $("#submit_load3").click(function(){
}
}else if (id2 == 4){

$(".modal-header").html("Error Message");
$(".modal-header").html("Formula");
$(".modal-header").css("background","#23435c");
$("#btnModal").removeClass("btn-success").addClass("btn-danger");
$("#MsgModal").html("<b>Formula : Tensile Strain = -6 &times; P<sub>x</sub> / Ewh &times; h</b>");
$("#MsgModal").html("<b> Comressive Strain = -6 &times; P<sub>x</sub> / Ewh<sup>2</sup>where, Px = Applied load, E = young's modulus, w = width and h = height. </b>");
wrongTransCnt++;
// alert("formula :Tensile Strain = -6.Px / Ewh*h");

Expand Down Expand Up @@ -774,6 +781,7 @@ $("#submit_load3").click(function(){
});

$("#nextReading").click(function(){
$("body").css("padding","0px 0px 0px 0px");
id1 =1;
id2 = 1;
$("#text1").prop('disabled',false);
Expand All @@ -791,6 +799,7 @@ $("#submit_load3").click(function(){


$("#nextLevel").click(function(){
$("body").css("padding","0px 0px 0px 0px");
addFun();
tableWheatStone();

Expand Down
6 changes: 3 additions & 3 deletions experiment/simulation/src/canteleverConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var width = $(window).width();
.attr({'stroke':'#000','stroke-width': 2});


var l1Txt = paper.text((x+50-widDiv-20+(lenVal/2)),(y-20-widDiv-24-8),"L : "+lenVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});
var l1Txt = paper.text((x+50-widDiv-20+(lenVal/2)),(y-20-widDiv-24-8),"L : "+lVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});



Expand Down Expand Up @@ -247,7 +247,7 @@ var width = $(window).width();
.attr({'stroke':'#000','stroke-width': 2});


var l1Txt = paper.text((x+50-widDiv-20+(lenVal/2)),(y-20-widDiv-24-8),"L : "+lenVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});
var l1Txt = paper.text((x+50-widDiv-20+(lenVal/2)),(y-20-widDiv-24-8),"L : "+lVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});

var l2Txt = paper.text((x+50-widDiv+lenVal+50),(y+250-20-widDiv-250+widDiv),"W : "+widVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});

Expand Down Expand Up @@ -381,7 +381,7 @@ var width = $(window).width();
.attr({'stroke':'#000','stroke-width': 2});


var l1Txt = paper.text((x+50-widDiv-20+(lenVal/2)),(y-20-widDiv-24-8),"L : "+lenVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});
var l1Txt = paper.text((x+50-widDiv-20+(lenVal/2)),(y-20-widDiv-24-8),"L : "+lVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});

var l2Txt = paper.text((x+50-widDiv+lenVal+50),(y+250-20-widDiv-250+widDiv),"W : "+widVal+" mm").attr({'font-weight': 'bold','font-size':'14px','stroke':'#f20515'});

Expand Down
13 changes: 9 additions & 4 deletions experiment/simulation/src/configLoadCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function columnTypeConfig(){

+'<div class="row">'
+'<div class="col-sm-6">'
+'<label class="labelstyle">Select Poisons Ratio: </label>'
+'<label class="labelstyle">Select Poisson'+"'"+'s Ratio: </label>'
+'</div>'

+'<div class="col-sm-6">'
Expand Down Expand Up @@ -176,7 +176,7 @@ function columnTypeConfig(){
var mulPower = 0;

$("#checkArea").click(function() {

$("body").css("padding","0px 0px 0px 0px");
areaSelect = parseFloat($("#areaSel").val());
diam = parseInt($("#diaSel").val());
modSelelect = parseInt($("#modSel").val());
Expand Down Expand Up @@ -254,7 +254,7 @@ function columnTypeConfig(){
} else if (id == 4) {

// alert("formula :Axial Strain = P / AE");
$(".modal-header").html("Error Message");
$(".modal-header").html("Formula");
$(".modal-header").css("background","#23435c");
$("#btnModal").removeClass("btn-success").addClass("btn-danger");
$("#MsgModal").html("<b>Formula : Area = &prod;&times; r <sup>2</sup> </b>");
Expand Down Expand Up @@ -322,7 +322,7 @@ function columnTypeConfig(){
});

$("#checkConfg").click(function() {

$("body").css("padding","0px 0px 0px 0px");
// $("#modelMsg").html("<b class='boldTextGreen'>Configured Successfully</b>");
// $("body").css("padding","0px 0px 0px 0px");

Expand Down Expand Up @@ -375,8 +375,10 @@ function columnTypeConfig(){
});

$("#nextLevelForConfig").click(function() {
$("body").css("padding","0px 0px 0px 0px");
// if(flgSec==1){
wheatStoneCon();

// columnType();
// }else{
// $("#modelMsg").html("<b class='boldTextRed'>Select appropriate values</b>");
Expand Down Expand Up @@ -548,6 +550,7 @@ function cantileverConfig(){
});

$("#checkConfgCanti").click(function() {
$("body").css("padding","0px 0px 0px 0px");
// if(lengthVal==0 || widthVal==0 || heightVal==0 || modSelcantiVal==0){
// $("#modelMsg").html("<b class='boldTextRed'>Select Appropriate Values</b>");
// $("body").css("padding","0px 0px 0px 0px");
Expand Down Expand Up @@ -588,12 +591,14 @@ function cantileverConfig(){
});

$("#nextPage1").click(function() {
$("body").css("padding","0px 0px 0px 0px");
if(cantiFlg == 1){

}
});

$("#nextLevelForConfigCanti").click(function() {
$("body").css("padding","0px 0px 0px 0px");
wheatStoneCon();
// cantilever();
});
Expand Down
Loading

0 comments on commit a8cd77b

Please sign in to comment.