add pcb design & fixed

This commit is contained in:
Muhammad Izza Alfiansyah 2024-06-05 11:42:35 +07:00
parent 1c0d2a8269
commit 22be370e99
7 changed files with 20 additions and 12 deletions

View File

@ -356,11 +356,12 @@ float getKadarGas() {
// konversi tegangan ke persen berdasarkan rumus yang telah ditentukan
float getPersentaseKadarGas(float voltase) {
float m = 6.0 / (1.49 / 0.81);
float b = -m * 0.81;
float m = 6.0 / (1.49 / 0.33);
float b = -m * 0.33;
float persentase = m * voltase + b;
// float persentase = 0.2043 * pow(voltase, 2.0) + 0.0611 * voltase - 0.0249;
float hasil = constrain(persentase * 100, 0, 100);
// float persentase = 0.2043 * pow(voltase, 2.0) + 0.0611 * voltase - 0.0249;
// float hasil = constrain(persentase * 100, 0, 100);
return hasil;
}
@ -512,13 +513,15 @@ void cekKematangan() {
void cekKegagalan() {
int lamaJam = getLamaJamFermentasi();
float regresiKadarGas = 0.0025 * pow(lamaJam, 2.0) - 0.0397 * lamaJam - 0.1222;
float nilaiPerempat = regresiKadarGas / 4.0;
// = -0,000006 * (x * x) + (0,0013 * x) + 0,002;
float regresiKadarGas = -0.000006 * pow(lamaJam, 2.0) + 0.0013 * lamaJam + 0.002;
regresiKadarGas = regresiKadarGas * 100;
float nilaiPertiga = regresiKadarGas / 3.0;
if (lamaJam > 12) {
// jika kadar gas tidak naik secara signifikan
// if (persentaseKadarGas > (regresiKadarGas + nilaiPerempat) || persentaseKadarGas < (regresiKadarGas - nilaiPerempat)) {
if (persentaseKadarGas < (regresiKadarGas - nilaiPerempat)) {
// if (persentaseKadarGas > (regresiKadarGas + nilaiPertiga) || persentaseKadarGas < (regresiKadarGas - nilaiPertiga)) {
if (persentaseKadarGas < (regresiKadarGas - nilaiPertiga)) {
status = "Gagal";
insertHistory(false);
}

View File

@ -358,12 +358,17 @@ float getKadarGas() {
// konversi tegangan ke persen berdasarkan rumus yang telah ditentukan
float getPersentaseKadarGas(float voltase) {
float m = 6.0 / (1.49 / 0.81);
float b = -m * 0.81;
float persentase = m * voltase + b;
// float persentase = 0.2043 * pow(voltase, 2.0) + 0.0611 * voltase - 0.0249;
// float m = 6.0 / (1.49 / 0.33);
// float b = -m * 0.33;
// float persentase = m * voltase + b;
// float hasil = constrain(persentase, 0, 100);
float persentase = 0.0526 * voltase - 0.0174;
float hasil = constrain(persentase * 100, 0, 100);
// float persentase = 0.2043 * pow(voltase, 2.0) + 0.0611 * voltase - 0.0249;
// float hasil = constrain(persentase * 100, 0, 100);
return hasil;
}

BIN
pcb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

2
printpcb.pdf Normal file
View File

@ -0,0 +1,2 @@
04/06/24 11.42 /Users/izzaalfiansyah/Documents/EAGLE/projects/fermonitor/schematic.brd

2
printpcbmirror.pdf Normal file
View File

@ -0,0 +1,2 @@
04/06/24 15.42 mirrored /Users/izzaalfiansyah/Documents/EAGLE/projects/fermonitor/schematic.brd

2
printpcbv2.pdf Normal file
View File

@ -0,0 +1,2 @@
04/06/24 13.57 /Users/izzaalfiansyah/Documents/EAGLE/projects/fermonitor/schematic.brd

View File

@ -147,7 +147,7 @@ export default function (props: JSX.HTMLAttributes<HTMLDivElement>) {
<div class="text-xl font-medium uppercase">
<span class="text-primary">Ferm</span>onitor
</div>
<A href={canNavigate() ? "/pengaturan" : "/"}>
<A href="/pengaturan">
<SettingIcon class="w-6 h-6" />
</A>
</nav>