Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +976 -19
- prompts.txt +4 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: gray
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: drawer-circuit
|
| 3 |
+
emoji: π³
|
| 4 |
colorFrom: gray
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,976 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Editable Drawer Release Mechanism Schematic</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@keyframes pulse {
|
| 11 |
+
0%, 100% { opacity: 1; }
|
| 12 |
+
50% { opacity: 0.5; }
|
| 13 |
+
}
|
| 14 |
+
@keyframes slideOpen {
|
| 15 |
+
0% { transform: translateX(0); }
|
| 16 |
+
100% { transform: translateX(50px); }
|
| 17 |
+
}
|
| 18 |
+
@keyframes slideClose {
|
| 19 |
+
0% { transform: translateX(50px); }
|
| 20 |
+
100% { transform: translateX(0); }
|
| 21 |
+
}
|
| 22 |
+
@keyframes solenoidActivate {
|
| 23 |
+
0%, 100% { transform: translateY(0); background-color: #6b7280; }
|
| 24 |
+
50% { transform: translateY(-10px); background-color: #3b82f6; }
|
| 25 |
+
}
|
| 26 |
+
@keyframes currentFlow {
|
| 27 |
+
0% { stroke-dashoffset: 100; }
|
| 28 |
+
100% { stroke-dashoffset: 0; }
|
| 29 |
+
}
|
| 30 |
+
.pulse-animation {
|
| 31 |
+
animation: pulse 2s infinite;
|
| 32 |
+
}
|
| 33 |
+
.drawer-open {
|
| 34 |
+
animation: slideOpen 0.5s forwards;
|
| 35 |
+
}
|
| 36 |
+
.drawer-close {
|
| 37 |
+
animation: slideClose 0.5s forwards;
|
| 38 |
+
}
|
| 39 |
+
.solenoid-activate {
|
| 40 |
+
animation: solenoidActivate 0.5s;
|
| 41 |
+
}
|
| 42 |
+
.wire {
|
| 43 |
+
position: absolute;
|
| 44 |
+
background-color: #6b7280;
|
| 45 |
+
z-index: -1;
|
| 46 |
+
}
|
| 47 |
+
.power-wire {
|
| 48 |
+
background-color: #ef4444;
|
| 49 |
+
}
|
| 50 |
+
.ground-wire {
|
| 51 |
+
background-color: #64748b;
|
| 52 |
+
}
|
| 53 |
+
.signal-wire {
|
| 54 |
+
background-color: #3b82f6;
|
| 55 |
+
}
|
| 56 |
+
.component-highlight {
|
| 57 |
+
transition: all 0.3s ease;
|
| 58 |
+
cursor: move;
|
| 59 |
+
user-select: none;
|
| 60 |
+
}
|
| 61 |
+
.component-highlight:hover {
|
| 62 |
+
transform: scale(1.05);
|
| 63 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 64 |
+
}
|
| 65 |
+
.tooltip {
|
| 66 |
+
position: absolute;
|
| 67 |
+
visibility: hidden;
|
| 68 |
+
background-color: #1f2937;
|
| 69 |
+
color: white;
|
| 70 |
+
text-align: center;
|
| 71 |
+
border-radius: 6px;
|
| 72 |
+
padding: 5px 10px;
|
| 73 |
+
z-index: 1;
|
| 74 |
+
bottom: 125%;
|
| 75 |
+
left: 50%;
|
| 76 |
+
transform: translateX(-50%);
|
| 77 |
+
opacity: 0;
|
| 78 |
+
transition: opacity 0.3s;
|
| 79 |
+
font-size: 0.8rem;
|
| 80 |
+
white-space: nowrap;
|
| 81 |
+
}
|
| 82 |
+
.has-tooltip:hover .tooltip {
|
| 83 |
+
visibility: visible;
|
| 84 |
+
opacity: 1;
|
| 85 |
+
}
|
| 86 |
+
.schematic-label {
|
| 87 |
+
position: absolute;
|
| 88 |
+
font-size: 0.7rem;
|
| 89 |
+
color: #334155;
|
| 90 |
+
font-family: monospace;
|
| 91 |
+
font-weight: bold;
|
| 92 |
+
}
|
| 93 |
+
.voltage-label {
|
| 94 |
+
position: absolute;
|
| 95 |
+
font-size: 0.6rem;
|
| 96 |
+
color: #ef4444;
|
| 97 |
+
font-family: monospace;
|
| 98 |
+
background: white;
|
| 99 |
+
padding: 0 2px;
|
| 100 |
+
border: 1px solid #e5e7eb;
|
| 101 |
+
border-radius: 2px;
|
| 102 |
+
}
|
| 103 |
+
.current-path {
|
| 104 |
+
stroke: #3b82f6;
|
| 105 |
+
stroke-width: 3;
|
| 106 |
+
stroke-dasharray: 10,5;
|
| 107 |
+
fill: none;
|
| 108 |
+
animation: currentFlow 2s linear infinite;
|
| 109 |
+
}
|
| 110 |
+
.schematic-grid {
|
| 111 |
+
background-image:
|
| 112 |
+
linear-gradient(#e5e7eb 1px, transparent 1px),
|
| 113 |
+
linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
|
| 114 |
+
background-size: 20px 20px;
|
| 115 |
+
}
|
| 116 |
+
.section-title {
|
| 117 |
+
position: absolute;
|
| 118 |
+
background-color: #3b82f6;
|
| 119 |
+
color: white;
|
| 120 |
+
padding: 2px 8px;
|
| 121 |
+
border-radius: 4px;
|
| 122 |
+
font-size: 0.7rem;
|
| 123 |
+
font-weight: bold;
|
| 124 |
+
z-index: 10;
|
| 125 |
+
}
|
| 126 |
+
.junction-dot {
|
| 127 |
+
position: absolute;
|
| 128 |
+
width: 6px;
|
| 129 |
+
height: 6px;
|
| 130 |
+
border-radius: 50%;
|
| 131 |
+
background-color: #334155;
|
| 132 |
+
z-index: 1;
|
| 133 |
+
}
|
| 134 |
+
.power-rail {
|
| 135 |
+
position: absolute;
|
| 136 |
+
height: 2px;
|
| 137 |
+
background-color: #ef4444;
|
| 138 |
+
z-index: -1;
|
| 139 |
+
}
|
| 140 |
+
.ground-rail {
|
| 141 |
+
position: absolute;
|
| 142 |
+
height: 2px;
|
| 143 |
+
background-color: #64748b;
|
| 144 |
+
z-index: -1;
|
| 145 |
+
}
|
| 146 |
+
.signal-rail {
|
| 147 |
+
position: absolute;
|
| 148 |
+
height: 2px;
|
| 149 |
+
background-color: #3b82f6;
|
| 150 |
+
z-index: -1;
|
| 151 |
+
}
|
| 152 |
+
.component-pin {
|
| 153 |
+
position: absolute;
|
| 154 |
+
width: 8px;
|
| 155 |
+
height: 8px;
|
| 156 |
+
border-radius: 50%;
|
| 157 |
+
background-color: #334155;
|
| 158 |
+
z-index: 2;
|
| 159 |
+
}
|
| 160 |
+
.bom-table {
|
| 161 |
+
width: 100%;
|
| 162 |
+
border-collapse: collapse;
|
| 163 |
+
font-size: 0.8rem;
|
| 164 |
+
}
|
| 165 |
+
.bom-table th, .bom-table td {
|
| 166 |
+
border: 1px solid #e5e7eb;
|
| 167 |
+
padding: 4px 8px;
|
| 168 |
+
text-align: left;
|
| 169 |
+
}
|
| 170 |
+
.bom-table th {
|
| 171 |
+
background-color: #f3f4f6;
|
| 172 |
+
}
|
| 173 |
+
.edit-mode-btn {
|
| 174 |
+
transition: all 0.3s ease;
|
| 175 |
+
}
|
| 176 |
+
.edit-mode-btn.active {
|
| 177 |
+
background-color: #3b82f6;
|
| 178 |
+
color: white;
|
| 179 |
+
}
|
| 180 |
+
.connection-point {
|
| 181 |
+
position: absolute;
|
| 182 |
+
width: 12px;
|
| 183 |
+
height: 12px;
|
| 184 |
+
border-radius: 50%;
|
| 185 |
+
background-color: rgba(59, 130, 246, 0.5);
|
| 186 |
+
z-index: 5;
|
| 187 |
+
cursor: pointer;
|
| 188 |
+
}
|
| 189 |
+
.connection-line {
|
| 190 |
+
position: absolute;
|
| 191 |
+
background-color: #3b82f6;
|
| 192 |
+
height: 2px;
|
| 193 |
+
transform-origin: left center;
|
| 194 |
+
z-index: 4;
|
| 195 |
+
}
|
| 196 |
+
.connection-handle {
|
| 197 |
+
position: absolute;
|
| 198 |
+
width: 8px;
|
| 199 |
+
height: 8px;
|
| 200 |
+
border-radius: 50%;
|
| 201 |
+
background-color: #3b82f6;
|
| 202 |
+
z-index: 6;
|
| 203 |
+
cursor: move;
|
| 204 |
+
}
|
| 205 |
+
</style>
|
| 206 |
+
</head>
|
| 207 |
+
<body class="bg-gray-100 min-h-screen flex flex-col items-center py-8">
|
| 208 |
+
<div class="max-w-6xl w-full px-4">
|
| 209 |
+
<div class="flex justify-between items-center mb-4">
|
| 210 |
+
<div>
|
| 211 |
+
<h1 class="text-3xl font-bold text-gray-800">Editable Drawer Release Mechanism</h1>
|
| 212 |
+
<p class="text-gray-600">Drag components to rearrange, click to edit connections</p>
|
| 213 |
+
</div>
|
| 214 |
+
<div class="text-right">
|
| 215 |
+
<div class="text-sm text-gray-500">Revision: 1.3</div>
|
| 216 |
+
<div class="text-sm text-gray-500">Date: <span id="currentDate"></span></div>
|
| 217 |
+
<div class="text-sm text-gray-500">Drawn by: <span contenteditable="true">Engineering Team</span></div>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<div class="bg-white rounded-xl shadow-lg p-6 mb-8">
|
| 222 |
+
<div class="flex flex-wrap justify-between items-center mb-6">
|
| 223 |
+
<h2 class="text-xl font-semibold text-gray-800">Interactive Schematic Diagram</h2>
|
| 224 |
+
<div class="flex space-x-2">
|
| 225 |
+
<button id="editModeBtn" class="edit-mode-btn px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition">
|
| 226 |
+
<i class="fas fa-edit mr-2"></i>Edit Mode
|
| 227 |
+
</button>
|
| 228 |
+
<button id="resetBtn" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition">
|
| 229 |
+
<i class="fas fa-redo mr-2"></i>Reset
|
| 230 |
+
</button>
|
| 231 |
+
<button id="triggerBtn" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
|
| 232 |
+
<i class="fas fa-bolt mr-2"></i>Trigger Release
|
| 233 |
+
</button>
|
| 234 |
+
<button id="showCurrentBtn" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition">
|
| 235 |
+
<i class="fas fa-project-diagram mr-2"></i>Show Current Flow
|
| 236 |
+
</button>
|
| 237 |
+
<button id="saveLayoutBtn" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition">
|
| 238 |
+
<i class="fas fa-save mr-2"></i>Save Layout
|
| 239 |
+
</button>
|
| 240 |
+
</div>
|
| 241 |
+
</div>
|
| 242 |
+
|
| 243 |
+
<div id="schematicContainer" class="relative border-2 border-gray-300 rounded-lg p-6 bg-gray-50 schematic-grid" style="height: 700px;">
|
| 244 |
+
<!-- Section Titles (editable) -->
|
| 245 |
+
<div class="section-title draggable" style="left: 50px; top: 30px;" contenteditable="true">POWER SUPPLY</div>
|
| 246 |
+
<div class="section-title draggable" style="left: 350px; top: 30px;" contenteditable="true">CONTROL CIRCUIT</div>
|
| 247 |
+
<div class="section-title draggable" style="left: 650px; top: 30px;" contenteditable="true">LOAD CIRCUIT</div>
|
| 248 |
+
<div class="section-title draggable" style="left: 250px; top: 450px;" contenteditable="true">MECHANICAL SYSTEM</div>
|
| 249 |
+
|
| 250 |
+
<!-- Power Rails -->
|
| 251 |
+
<div class="power-rail" style="width: 700px; top: 100px;"></div>
|
| 252 |
+
<div class="ground-rail" style="width: 700px; top: 130px;"></div>
|
| 253 |
+
<div class="power-rail" style="width: 200px; top: 200px; left: 100px;"></div>
|
| 254 |
+
<div class="ground-rail" style="width: 200px; top: 230px; left: 100px;"></div>
|
| 255 |
+
<div class="power-rail" style="width: 150px; top: 300px; left: 100px;"></div>
|
| 256 |
+
<div class="power-rail" style="width: 150px; top: 380px; left: 100px;"></div>
|
| 257 |
+
<div class="signal-rail" style="width: 100px; top: 320px; left: 240px;"></div>
|
| 258 |
+
|
| 259 |
+
<!-- Power Supply Section -->
|
| 260 |
+
<div id="battery" class="absolute w-20 h-10 bg-green-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 80px; top: 160px;">
|
| 261 |
+
<div class="w-18 h-8 bg-green-400 rounded flex items-center justify-center">
|
| 262 |
+
<span class="text-xs font-bold text-white">LiPo</span>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="tooltip">3.7V LiPo Battery (1000-2000mAh)</div>
|
| 265 |
+
<div class="voltage-label" style="right: -30px; top: 12px;">3.7V</div>
|
| 266 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">BAT1</div>
|
| 267 |
+
<div class="component-pin connection-source" data-connection="positive" style="right: -4px; top: 12px;"></div>
|
| 268 |
+
<div class="component-pin connection-source" data-connection="negative" style="right: -4px; top: 32px;"></div>
|
| 269 |
+
</div>
|
| 270 |
+
|
| 271 |
+
<div id="charger" class="absolute w-28 h-14 bg-blue-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 80px; top: 220px;">
|
| 272 |
+
<div class="w-26 h-12 bg-blue-400 rounded flex items-center justify-center">
|
| 273 |
+
<span class="text-xs font-bold text-white">TP4056</span>
|
| 274 |
+
</div>
|
| 275 |
+
<div class="tooltip">TP4056 Charging Module with battery protection</div>
|
| 276 |
+
<div class="voltage-label" style="right: -30px; top: 24px;">3.7V</div>
|
| 277 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">U1</div>
|
| 278 |
+
<div class="component-pin connection-source" data-connection="vcc" style="right: -4px; top: 14px;"></div>
|
| 279 |
+
<div class="component-pin connection-source" data-connection="gnd" style="right: -4px; top: 34px;"></div>
|
| 280 |
+
<div class="component-pin connection-source" data-connection="out" style="right: -4px; top: 54px;"></div>
|
| 281 |
+
</div>
|
| 282 |
+
|
| 283 |
+
<div id="booster" class="absolute w-28 h-14 bg-purple-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 80px; top: 300px;">
|
| 284 |
+
<div class="w-26 h-12 bg-purple-400 rounded flex items-center justify-center">
|
| 285 |
+
<span class="text-xs font-bold text-white">MT3608</span>
|
| 286 |
+
</div>
|
| 287 |
+
<div class="tooltip">Step-up DC/DC Converter (3.7V to 12V @ 2A)</div>
|
| 288 |
+
<div class="voltage-label" style="right: -40px; top: 24px;">12V</div>
|
| 289 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">U2</div>
|
| 290 |
+
<div class="component-pin connection-source" data-connection="in" style="right: -4px; top: 14px;"></div>
|
| 291 |
+
<div class="component-pin connection-source" data-connection="gnd" style="right: -4px; top: 34px;"></div>
|
| 292 |
+
<div class="component-pin connection-source" data-connection="out" style="right: -4px; top: 54px;"></div>
|
| 293 |
+
</div>
|
| 294 |
+
|
| 295 |
+
<div id="regulator" class="absolute w-28 h-14 bg-red-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 80px; top: 380px;">
|
| 296 |
+
<div class="w-26 h-12 bg-red-400 rounded flex items-center justify-center">
|
| 297 |
+
<span class="text-xs font-bold text-white">AMS1117</span>
|
| 298 |
+
</div>
|
| 299 |
+
<div class="tooltip">3.3V LDO Regulator for ESP-01</div>
|
| 300 |
+
<div class="voltage-label" style="right: -40px; top: 24px;">3.3V</div>
|
| 301 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">U3</div>
|
| 302 |
+
<div class="component-pin connection-source" data-connection="in" style="right: -4px; top: 14px;"></div>
|
| 303 |
+
<div class="component-pin connection-source" data-connection="gnd" style="right: -4px; top: 34px;"></div>
|
| 304 |
+
<div class="component-pin connection-source" data-connection="out" style="right: -4px; top: 54px;"></div>
|
| 305 |
+
</div>
|
| 306 |
+
|
| 307 |
+
<!-- Control Section -->
|
| 308 |
+
<div id="esp" class="absolute w-28 h-20 bg-gray-700 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 300px; top: 160px;">
|
| 309 |
+
<div class="w-26 h-18 bg-gray-600 rounded flex flex-col items-center justify-center p-1">
|
| 310 |
+
<span class="text-xs font-bold text-white">ESP-01</span>
|
| 311 |
+
<div class="flex mt-1">
|
| 312 |
+
<div class="w-2 h-2 rounded-full bg-green-500 mx-1"></div>
|
| 313 |
+
<div class="w-2 h-2 rounded-full bg-yellow-500 mx-1"></div>
|
| 314 |
+
<div class="w-2 h-2 rounded-full bg-red-500 mx-1"></div>
|
| 315 |
+
<div class="w-2 h-2 rounded-full bg-blue-500 mx-1"></div>
|
| 316 |
+
</div>
|
| 317 |
+
</div>
|
| 318 |
+
<div class="tooltip">ESP-01 WiFi Module with GPIO control</div>
|
| 319 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">U4</div>
|
| 320 |
+
<div class="component-pin connection-source" data-connection="vcc" style="right: -4px; top: 14px;"></div>
|
| 321 |
+
<div class="component-pin connection-source" data-connection="gnd" style="right: -4px; top: 34px;"></div>
|
| 322 |
+
<div class="component-pin connection-source" data-connection="gpio0" style="right: -4px; top: 54px;"></div>
|
| 323 |
+
<div class="component-pin connection-source" data-connection="gpio2" style="right: -4px; top: 74px;"></div>
|
| 324 |
+
</div>
|
| 325 |
+
|
| 326 |
+
<div id="mosfet" class="absolute w-24 h-18 bg-yellow-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 300px; top: 300px;">
|
| 327 |
+
<div class="w-22 h-16 bg-yellow-400 rounded flex flex-col items-center justify-center">
|
| 328 |
+
<span class="text-xs font-bold">AO3400</span>
|
| 329 |
+
<div class="flex mt-1">
|
| 330 |
+
<div class="w-3 h-1 bg-gray-800 mx-1"></div>
|
| 331 |
+
<div class="w-3 h-1 bg-gray-800 mx-1"></div>
|
| 332 |
+
<div class="w-3 h-1 bg-gray-800 mx-1"></div>
|
| 333 |
+
</div>
|
| 334 |
+
</div>
|
| 335 |
+
<div class="tooltip">N-Channel MOSFET (30V, 5.7A) with flyback diode</div>
|
| 336 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">Q1</div>
|
| 337 |
+
<div class="component-pin connection-source" data-connection="gate" style="right: -4px; top: 14px;"></div>
|
| 338 |
+
<div class="component-pin connection-source" data-connection="source" style="right: -4px; top: 34px;"></div>
|
| 339 |
+
<div class="component-pin connection-source" data-connection="drain" style="right: -4px; top: 54px;"></div>
|
| 340 |
+
</div>
|
| 341 |
+
|
| 342 |
+
<div id="resistor" class="absolute w-16 h-8 bg-orange-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 300px; top: 400px;">
|
| 343 |
+
<div class="w-14 h-6 bg-orange-400 rounded">
|
| 344 |
+
<div class="h-full w-full flex items-center justify-center">
|
| 345 |
+
<div class="w-1 h-1 bg-black mx-1"></div>
|
| 346 |
+
<div class="w-1 h-1 bg-black mx-1"></div>
|
| 347 |
+
<div class="w-1 h-1 bg-black mx-1"></div>
|
| 348 |
+
</div>
|
| 349 |
+
</div>
|
| 350 |
+
<div class="tooltip">220Ξ© current limiting resistor</div>
|
| 351 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">R1</div>
|
| 352 |
+
<div class="component-pin connection-source" data-connection="a" style="right: -4px; top: 12px;"></div>
|
| 353 |
+
<div class="component-pin connection-source" data-connection="b" style="left: -4px; top: 12px;"></div>
|
| 354 |
+
</div>
|
| 355 |
+
|
| 356 |
+
<!-- Load Section -->
|
| 357 |
+
<div id="solenoid" class="absolute w-28 h-16 bg-gray-500 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 600px; top: 160px;">
|
| 358 |
+
<div class="w-26 h-14 bg-gray-400 rounded flex items-center justify-center">
|
| 359 |
+
<span class="text-xs font-bold text-white">SOLENOID</span>
|
| 360 |
+
</div>
|
| 361 |
+
<div class="tooltip">12V Pull-Type Solenoid (500mA, 5N holding force)</div>
|
| 362 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">L1</div>
|
| 363 |
+
<div class="voltage-label" style="right: -40px; top: 28px;">12V</div>
|
| 364 |
+
<div class="component-pin connection-source" data-connection="positive" style="right: -4px; top: 24px;"></div>
|
| 365 |
+
<div class="component-pin connection-source" data-connection="negative" style="right: -4px; top: 44px;"></div>
|
| 366 |
+
</div>
|
| 367 |
+
|
| 368 |
+
<div id="diode" class="absolute w-16 h-8 bg-blue-300 rounded flex items-center justify-center component-highlight has-tooltip draggable" style="left: 600px; top: 300px;">
|
| 369 |
+
<div class="w-14 h-6 bg-blue-200 rounded flex items-center justify-center">
|
| 370 |
+
<span class="text-xs font-bold">1N4007</span>
|
| 371 |
+
</div>
|
| 372 |
+
<div class="tooltip">Flyback diode for solenoid protection</div>
|
| 373 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">D1</div>
|
| 374 |
+
<div class="component-pin connection-source" data-connection="anode" style="right: -4px; top: 12px;"></div>
|
| 375 |
+
<div class="component-pin connection-source" data-connection="cathode" style="left: -4px; top: 12px;"></div>
|
| 376 |
+
</div>
|
| 377 |
+
|
| 378 |
+
<!-- Mechanical Section -->
|
| 379 |
+
<div id="drawerCabinet" class="absolute draggable" style="left: 250px; top: 480px;">
|
| 380 |
+
<!-- Drawer Cabinet -->
|
| 381 |
+
<div class="w-64 h-48 bg-amber-200 border-2 border-amber-700 rounded">
|
| 382 |
+
<!-- Drawer Front -->
|
| 383 |
+
<div id="drawer" class="absolute bottom-0 left-0 w-full h-16 bg-amber-600 border-t-2 border-amber-700 rounded-b flex items-center justify-center cursor-pointer transition-all duration-300">
|
| 384 |
+
<div class="w-4 h-4 rounded-full bg-amber-800"></div>
|
| 385 |
+
</div>
|
| 386 |
+
</div>
|
| 387 |
+
|
| 388 |
+
<!-- Spring Latch -->
|
| 389 |
+
<div id="latch" class="absolute left-64 top-24 w-12 h-12 bg-gray-400 rounded-full flex items-center justify-center component-highlight has-tooltip">
|
| 390 |
+
<div class="w-10 h-10 rounded-full bg-gray-300 flex items-center justify-center">
|
| 391 |
+
<div class="w-6 h-6 rounded-full bg-gray-200"></div>
|
| 392 |
+
</div>
|
| 393 |
+
<div class="tooltip">Push-to-Open Spring Latch Mechanism</div>
|
| 394 |
+
<div class="schematic-label" style="left: 0; bottom: -20px;">M1</div>
|
| 395 |
+
</div>
|
| 396 |
+
</div>
|
| 397 |
+
|
| 398 |
+
<!-- Wiring -->
|
| 399 |
+
<!-- Power Distribution -->
|
| 400 |
+
<div class="wire power-wire" style="width: 2px; height: 400px; left: 120px; top: 60px;"></div>
|
| 401 |
+
<div class="wire ground-wire" style="width: 2px; height: 400px; left: 150px; top: 60px;"></div>
|
| 402 |
+
|
| 403 |
+
<!-- Battery to Charger -->
|
| 404 |
+
<div class="wire power-wire" style="width: 40px; height: 2px; left: 100px; top: 80px;"></div>
|
| 405 |
+
<div class="wire ground-wire" style="width: 40px; height: 2px; left: 100px; top: 110px;"></div>
|
| 406 |
+
|
| 407 |
+
<!-- Charger to Booster -->
|
| 408 |
+
<div class="wire power-wire" style="width: 40px; height: 2px; left: 100px; top: 160px;"></div>
|
| 409 |
+
<div class="wire ground-wire" style="width: 40px; height: 2px; left: 100px; top: 190px;"></div>
|
| 410 |
+
|
| 411 |
+
<!-- Booster to Regulator -->
|
| 412 |
+
<div class="wire power-wire" style="width: 40px; height: 2px; left: 100px; top: 240px;"></div>
|
| 413 |
+
<div class="wire ground-wire" style="width: 40px; height: 2px; left: 100px; top: 270px;"></div>
|
| 414 |
+
|
| 415 |
+
<!-- Booster to Solenoid -->
|
| 416 |
+
<div class="wire power-wire" style="width: 180px; height: 2px; left: 120px; top: 320px;"></div>
|
| 417 |
+
|
| 418 |
+
<!-- Regulator to ESP -->
|
| 419 |
+
<div class="wire power-wire" style="width: 40px; height: 2px; left: 120px; top: 400px;"></div>
|
| 420 |
+
<div class="wire ground-wire" style="width: 40px; height: 2px; left: 150px; top: 430px;"></div>
|
| 421 |
+
|
| 422 |
+
<!-- ESP to MOSFET -->
|
| 423 |
+
<div class="wire signal-wire" style="width: 100px; height: 2px; left: 240px; top: 340px;"></div>
|
| 424 |
+
|
| 425 |
+
<!-- MOSFET to Solenoid -->
|
| 426 |
+
<div class="wire power-wire" style="width: 100px; height: 2px; left: 240px; top: 400px;"></div>
|
| 427 |
+
|
| 428 |
+
<!-- Ground Connections -->
|
| 429 |
+
<div class="wire ground-wire" style="width: 300px; height: 2px; left: 150px; top: 460px;"></div>
|
| 430 |
+
|
| 431 |
+
<!-- Junction Dots -->
|
| 432 |
+
<div class="junction-dot" style="left: 120px; top: 100px;"></div>
|
| 433 |
+
<div class="junction-dot" style="left: 120px; top: 130px;"></div>
|
| 434 |
+
<div class="junction-dot" style="left: 120px; top: 320px;"></div>
|
| 435 |
+
<div class="junction-dot" style="left: 340px; top: 320px;"></div>
|
| 436 |
+
<div class="junction-dot" style="left: 340px; top: 340px;"></div>
|
| 437 |
+
<div class="junction-dot" style="left: 340px; top: 400px;"></div>
|
| 438 |
+
<div class="junction-dot" style="left: 340px; top: 460px;"></div>
|
| 439 |
+
|
| 440 |
+
<!-- Current Flow Animation -->
|
| 441 |
+
<svg id="currentFlow" width="100%" height="100%" class="absolute top-0 left-0 pointer-events-none" style="display: none;">
|
| 442 |
+
<!-- Power Path -->
|
| 443 |
+
<path class="current-path" d="M100,80 L120,80 L120,320 L340,320 L340,340" />
|
| 444 |
+
<!-- Control Path -->
|
| 445 |
+
<path class="current-path" d="M120,400 L240,400 L240,340 L340,340" style="animation-delay: 0.5s;" />
|
| 446 |
+
<!-- Ground Return -->
|
| 447 |
+
<path class="current-path" d="M340,340 L340,460 L150,460 L150,110 L100,110" style="animation-delay: 1s;" />
|
| 448 |
+
</svg>
|
| 449 |
+
|
| 450 |
+
<!-- Voltage Labels -->
|
| 451 |
+
<div class="voltage-label" style="left: 200px; top: 80px;">3.7V</div>
|
| 452 |
+
<div class="voltage-label" style="left: 200px; top: 160px;">3.7V</div>
|
| 453 |
+
<div class="voltage-label" style="left: 200px; top: 240px;">12V</div>
|
| 454 |
+
<div class="voltage-label" style="left: 200px; top: 320px;">12V</div>
|
| 455 |
+
<div class="voltage-label" style="left: 200px; top: 400px;">3.3V</div>
|
| 456 |
+
|
| 457 |
+
<!-- Status Indicator -->
|
| 458 |
+
<div id="statusIndicator" class="absolute right-8 bottom-8 w-32 h-32 rounded-full bg-gray-200 border-4 border-gray-300 flex items-center justify-center">
|
| 459 |
+
<div class="text-center">
|
| 460 |
+
<div class="text-lg font-semibold">Status</div>
|
| 461 |
+
<div id="statusText" class="text-sm mt-1">Drawer Locked</div>
|
| 462 |
+
<div id="statusLed" class="w-6 h-6 rounded-full bg-red-500 mx-auto mt-2 shadow-inner"></div>
|
| 463 |
+
<div class="text-xs mt-2">Current: <span id="currentDraw">0</span>mA</div>
|
| 464 |
+
</div>
|
| 465 |
+
</div>
|
| 466 |
+
|
| 467 |
+
<!-- Legend -->
|
| 468 |
+
<div class="absolute right-8 top-60 bg-white p-3 rounded-lg border border-gray-300 shadow-sm text-xs">
|
| 469 |
+
<div class="font-bold mb-2 text-center border-b pb-1">SCHEMATIC LEGEND</div>
|
| 470 |
+
<div class="grid grid-cols-2 gap-2">
|
| 471 |
+
<div class="flex items-center">
|
| 472 |
+
<div class="w-4 h-2 bg-red-500 mr-2"></div>
|
| 473 |
+
<span>Power (VCC)</span>
|
| 474 |
+
</div>
|
| 475 |
+
<div class="flex items-center">
|
| 476 |
+
<div class="w-4 h-2 bg-blue-500 mr-2"></div>
|
| 477 |
+
<span>Signal</span>
|
| 478 |
+
</div>
|
| 479 |
+
<div class="flex items-center">
|
| 480 |
+
<div class="w-4 h-2 bg-gray-500 mr-2"></div>
|
| 481 |
+
<span>Ground (GND)</span>
|
| 482 |
+
</div>
|
| 483 |
+
<div class="flex items-center">
|
| 484 |
+
<div class="w-4 h-4 rounded-full bg-gray-400 mr-2"></div>
|
| 485 |
+
<span>Junction</span>
|
| 486 |
+
</div>
|
| 487 |
+
<div class="flex items-center">
|
| 488 |
+
<div class="w-4 h-4 rounded-full bg-black mr-2"></div>
|
| 489 |
+
<span>Component Pin</span>
|
| 490 |
+
</div>
|
| 491 |
+
<div class="flex items-center">
|
| 492 |
+
<div class="w-4 h-4 rounded-full bg-blue-300 mr-2"></div>
|
| 493 |
+
<span>Diode</span>
|
| 494 |
+
</div>
|
| 495 |
+
</div>
|
| 496 |
+
</div>
|
| 497 |
+
</div>
|
| 498 |
+
</div>
|
| 499 |
+
|
| 500 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 501 |
+
<div class="bg-white rounded-xl shadow-lg p-6">
|
| 502 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Technical Specifications</h2>
|
| 503 |
+
<div class="grid grid-cols-2 gap-4 text-sm">
|
| 504 |
+
<div class="bg-gray-50 p-3 rounded">
|
| 505 |
+
<div class="font-semibold text-gray-700">Power Supply</div>
|
| 506 |
+
<ul class="mt-2 space-y-1 text-gray-600">
|
| 507 |
+
<li>Input: 5V USB or 3.7V LiPo</li>
|
| 508 |
+
<li>Battery: 1000-2000mAh</li>
|
| 509 |
+
<li>Charger: TP4056 with protection</li>
|
| 510 |
+
<li>12V Boost: MT3608 (2A max)</li>
|
| 511 |
+
<li>3.3V LDO: AMS1117 (800mA)</li>
|
| 512 |
+
</ul>
|
| 513 |
+
</div>
|
| 514 |
+
<div class="bg-gray-50 p-3 rounded">
|
| 515 |
+
<div class="font-semibold text-gray-700">Control Circuit</div>
|
| 516 |
+
<ul class="mt-2 space-y-1 text-gray-600">
|
| 517 |
+
<li>MCU: ESP-01 (ESP8266)</li>
|
| 518 |
+
<li>WiFi: 802.11 b/g/n</li>
|
| 519 |
+
<li>GPIO: 2x usable</li>
|
| 520 |
+
<li>Switch: AO3400 MOSFET</li>
|
| 521 |
+
<li>Current: 220Ξ© resistor</li>
|
| 522 |
+
</ul>
|
| 523 |
+
</div>
|
| 524 |
+
<div class="bg-gray-50 p-3 rounded">
|
| 525 |
+
<div class="font-semibold text-gray-700">Load Circuit</div>
|
| 526 |
+
<ul class="mt-2 space-y-1 text-gray-600">
|
| 527 |
+
<li>Solenoid: 12V, 500mA</li>
|
| 528 |
+
<li>Actuation: 250ms pulse</li>
|
| 529 |
+
<li>Protection: 1N4007 diode</li>
|
| 530 |
+
<li>Force: ~5N (500g)</li>
|
| 531 |
+
<li>Stroke: 5-10mm</li>
|
| 532 |
+
</ul>
|
| 533 |
+
</div>
|
| 534 |
+
<div class="bg-gray-50 p-3 rounded">
|
| 535 |
+
<div class="font-semibold text-gray-700">Mechanical</div>
|
| 536 |
+
<ul class="mt-2 space-y-1 text-gray-600">
|
| 537 |
+
<li>Latch: Push-to-open type</li>
|
| 538 |
+
<li>Spring force: ~3N return</li>
|
| 539 |
+
<li>Drawer travel: 2-5cm</li>
|
| 540 |
+
<li>Mounting: Internal</li>
|
| 541 |
+
<li>Cycle life: 10,000+</li>
|
| 542 |
+
</ul>
|
| 543 |
+
</div>
|
| 544 |
+
</div>
|
| 545 |
+
|
| 546 |
+
<h2 class="text-xl font-semibold text-gray-800 mt-6 mb-4">Bill of Materials</h2>
|
| 547 |
+
<table class="bom-table">
|
| 548 |
+
<thead>
|
| 549 |
+
<tr>
|
| 550 |
+
<th>Ref</th>
|
| 551 |
+
<th>Component</th>
|
| 552 |
+
<th>Value</th>
|
| 553 |
+
<th>Qty</th>
|
| 554 |
+
<th>Notes</th>
|
| 555 |
+
</tr>
|
| 556 |
+
</thead>
|
| 557 |
+
<tbody>
|
| 558 |
+
<tr>
|
| 559 |
+
<td>BAT1</td>
|
| 560 |
+
<td>LiPo Battery</td>
|
| 561 |
+
<td>3.7V, 1000mAh</td>
|
| 562 |
+
<td>1</td>
|
| 563 |
+
<td>With JST connector</td>
|
| 564 |
+
</tr>
|
| 565 |
+
<tr>
|
| 566 |
+
<td>U1</td>
|
| 567 |
+
<td>Charging Module</td>
|
| 568 |
+
<td>TP4056</td>
|
| 569 |
+
<td>1</td>
|
| 570 |
+
<td>With protection</td>
|
| 571 |
+
</tr>
|
| 572 |
+
<tr>
|
| 573 |
+
<td>U2</td>
|
| 574 |
+
<td>Boost Converter</td>
|
| 575 |
+
<td>MT3608</td>
|
| 576 |
+
<td>1</td>
|
| 577 |
+
<td>3.7V to 12V</td>
|
| 578 |
+
</tr>
|
| 579 |
+
<tr>
|
| 580 |
+
<td>U3</td>
|
| 581 |
+
<td>Voltage Regulator</td>
|
| 582 |
+
<td>AMS1117-3.3</td>
|
| 583 |
+
<td>1</td>
|
| 584 |
+
<td>3.3V LDO</td>
|
| 585 |
+
</tr>
|
| 586 |
+
<tr>
|
| 587 |
+
<td>U4</td>
|
| 588 |
+
<td>WiFi Module</td>
|
| 589 |
+
<td>ESP-01</td>
|
| 590 |
+
<td>1</td>
|
| 591 |
+
<td>ESP8266 based</td>
|
| 592 |
+
</tr>
|
| 593 |
+
<tr>
|
| 594 |
+
<td>Q1</td>
|
| 595 |
+
<td>MOSFET</td>
|
| 596 |
+
<td>AO3400</td>
|
| 597 |
+
<td>1</td>
|
| 598 |
+
<td>N-Channel</td>
|
| 599 |
+
</tr>
|
| 600 |
+
<tr>
|
| 601 |
+
<td>R1</td>
|
| 602 |
+
<td>Resistor</td>
|
| 603 |
+
<td>220Ξ©</td>
|
| 604 |
+
<td>1</td>
|
| 605 |
+
<td>1/4W</td>
|
| 606 |
+
</tr>
|
| 607 |
+
<tr>
|
| 608 |
+
<td>D1</td>
|
| 609 |
+
<td>Diode</td>
|
| 610 |
+
<td>1N4007</td>
|
| 611 |
+
<td>1</td>
|
| 612 |
+
<td>Flyback protection</td>
|
| 613 |
+
</tr>
|
| 614 |
+
<tr>
|
| 615 |
+
<td>L1</td>
|
| 616 |
+
<td>Solenoid</td>
|
| 617 |
+
<td>12V, 500mA</td>
|
| 618 |
+
<td>1</td>
|
| 619 |
+
<td>Pull-type</td>
|
| 620 |
+
</tr>
|
| 621 |
+
<tr>
|
| 622 |
+
<td>M1</td>
|
| 623 |
+
<td>Latch Mechanism</td>
|
| 624 |
+
<td>-</td>
|
| 625 |
+
<td>1</td>
|
| 626 |
+
<td>Spring-loaded</td>
|
| 627 |
+
</tr>
|
| 628 |
+
</tbody>
|
| 629 |
+
</table>
|
| 630 |
+
</div>
|
| 631 |
+
|
| 632 |
+
<div class="bg-white rounded-xl shadow-lg p-6">
|
| 633 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Schematic Notes</h2>
|
| 634 |
+
<div class="prose prose-sm text-gray-700">
|
| 635 |
+
<h3 class="text-lg font-medium">Design Considerations</h3>
|
| 636 |
+
<ul>
|
| 637 |
+
<li><strong>Power Isolation:</strong> Separate 12V and 3.3V power domains with proper regulation</li>
|
| 638 |
+
<li><strong>Current Handling:</strong> MT3608 boost converter rated for 2A continuous (solenoid draws 500mA peak)</li>
|
| 639 |
+
<li><strong>Flyback Protection:</strong> 1N4007 diode across solenoid to protect MOSFET from voltage spikes</li>
|
| 640 |
+
<li><strong>Current Limiting:</strong> 220Ξ© resistor between ESP GPIO and MOSFET gate</li>
|
| 641 |
+
<li><strong>Battery Protection:</strong> TP4056 includes overcharge/discharge protection</li>
|
| 642 |
+
</ul>
|
| 643 |
+
|
| 644 |
+
<h3 class="text-lg font-medium mt-4">Interactive Features</h3>
|
| 645 |
+
<ol>
|
| 646 |
+
<li>Drag and drop components to rearrange the schematic</li>
|
| 647 |
+
<li>Click "Edit Mode" to enable component movement</li>
|
| 648 |
+
<li>Click "Save Layout" to store your custom arrangement</li>
|
| 649 |
+
<li>Edit section titles directly on the schematic</li>
|
| 650 |
+
<li>Trigger the drawer mechanism to see animations</li>
|
| 651 |
+
<li>Show current flow to visualize circuit operation</li>
|
| 652 |
+
</ol>
|
| 653 |
+
|
| 654 |
+
<h3 class="text-lg font-medium mt-4">Connection Diagram</h3>
|
| 655 |
+
<div class="bg-gray-100 p-3 rounded text-xs font-mono">
|
| 656 |
+
<div>ESP-01 Connections:</div>
|
| 657 |
+
<div>GPIO0 β R1 β Q1 Gate</div>
|
| 658 |
+
<div>VCC β 3.3V Rail</div>
|
| 659 |
+
<div>GND β Ground Rail</div>
|
| 660 |
+
<div class="mt-2">MOSFET Connections:</div>
|
| 661 |
+
<div>Drain β Solenoid β 12V Rail</div>
|
| 662 |
+
<div>Source β Ground Rail</div>
|
| 663 |
+
</div>
|
| 664 |
+
</div>
|
| 665 |
+
</div>
|
| 666 |
+
</div>
|
| 667 |
+
</div>
|
| 668 |
+
|
| 669 |
+
<script>
|
| 670 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 671 |
+
const drawer = document.getElementById('drawer');
|
| 672 |
+
const latch = document.getElementById('latch');
|
| 673 |
+
const solenoid = document.getElementById('solenoid');
|
| 674 |
+
const triggerBtn = document.getElementById('triggerBtn');
|
| 675 |
+
const resetBtn = document.getElementById('resetBtn');
|
| 676 |
+
const showCurrentBtn = document.getElementById('showCurrentBtn');
|
| 677 |
+
const editModeBtn = document.getElementById('editModeBtn');
|
| 678 |
+
const saveLayoutBtn = document.getElementById('saveLayoutBtn');
|
| 679 |
+
const statusText = document.getElementById('statusText');
|
| 680 |
+
const statusLed = document.getElementById('statusLed');
|
| 681 |
+
const currentDraw = document.getElementById('currentDraw');
|
| 682 |
+
const currentFlow = document.getElementById('currentFlow');
|
| 683 |
+
const schematicContainer = document.getElementById('schematicContainer');
|
| 684 |
+
|
| 685 |
+
// Set current date
|
| 686 |
+
const today = new Date();
|
| 687 |
+
document.getElementById('currentDate').textContent = today.toLocaleDateString();
|
| 688 |
+
|
| 689 |
+
let isDrawerOpen = false;
|
| 690 |
+
let showCurrent = false;
|
| 691 |
+
let editMode = false;
|
| 692 |
+
let isDragging = false;
|
| 693 |
+
let currentDraggedElement = null;
|
| 694 |
+
let offsetX, offsetY;
|
| 695 |
+
|
| 696 |
+
// Initialize draggable components
|
| 697 |
+
const draggableComponents = document.querySelectorAll('.draggable');
|
| 698 |
+
|
| 699 |
+
// Make components draggable
|
| 700 |
+
function enableDrag() {
|
| 701 |
+
draggableComponents.forEach(component => {
|
| 702 |
+
component.addEventListener('mousedown', startDrag);
|
| 703 |
+
});
|
| 704 |
+
|
| 705 |
+
document.addEventListener('mousemove', drag);
|
| 706 |
+
document.addEventListener('mouseup', endDrag);
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
// Disable dragging
|
| 710 |
+
function disableDrag() {
|
| 711 |
+
draggableComponents.forEach(component => {
|
| 712 |
+
component.removeEventListener('mousedown', startDrag);
|
| 713 |
+
});
|
| 714 |
+
|
| 715 |
+
document.removeEventListener('mousemove', drag);
|
| 716 |
+
document.removeEventListener('mouseup', endDrag);
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
// Start dragging
|
| 720 |
+
function startDrag(e) {
|
| 721 |
+
if (!editMode) return;
|
| 722 |
+
|
| 723 |
+
// Don't drag if clicking on a pin or editable text
|
| 724 |
+
if (e.target.classList.contains('component-pin') ||
|
| 725 |
+
e.target.hasAttribute('contenteditable')) {
|
| 726 |
+
return;
|
| 727 |
+
}
|
| 728 |
+
|
| 729 |
+
isDragging = true;
|
| 730 |
+
currentDraggedElement = e.currentTarget;
|
| 731 |
+
|
| 732 |
+
// Calculate offset
|
| 733 |
+
const rect = currentDraggedElement.getBoundingClientRect();
|
| 734 |
+
offsetX = e.clientX - rect.left;
|
| 735 |
+
offsetY = e.clientY - rect.top;
|
| 736 |
+
|
| 737 |
+
// Bring to front
|
| 738 |
+
currentDraggedElement.style.zIndex = '100';
|
| 739 |
+
|
| 740 |
+
e.preventDefault();
|
| 741 |
+
}
|
| 742 |
+
|
| 743 |
+
// During drag
|
| 744 |
+
function drag(e) {
|
| 745 |
+
if (!isDragging || !currentDraggedElement) return;
|
| 746 |
+
|
| 747 |
+
// Calculate new position
|
| 748 |
+
const containerRect = schematicContainer.getBoundingClientRect();
|
| 749 |
+
let newX = e.clientX - containerRect.left - offsetX;
|
| 750 |
+
let newY = e.clientY - containerRect.top - offsetY;
|
| 751 |
+
|
| 752 |
+
// Constrain to container
|
| 753 |
+
newX = Math.max(0, Math.min(newX, containerRect.width - currentDraggedElement.offsetWidth));
|
| 754 |
+
newY = Math.max(0, Math.min(newY, containerRect.height - currentDraggedElement.offsetHeight));
|
| 755 |
+
|
| 756 |
+
// Apply new position
|
| 757 |
+
currentDraggedElement.style.left = `${newX}px`;
|
| 758 |
+
currentDraggedElement.style.top = `${newY}px`;
|
| 759 |
+
|
| 760 |
+
// Update wires would go here in a more advanced implementation
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
// End drag
|
| 764 |
+
function endDrag() {
|
| 765 |
+
if (!isDragging || !currentDraggedElement) return;
|
| 766 |
+
|
| 767 |
+
isDragging = false;
|
| 768 |
+
currentDraggedElement.style.zIndex = '';
|
| 769 |
+
currentDraggedElement = null;
|
| 770 |
+
}
|
| 771 |
+
|
| 772 |
+
// Click drawer to close it
|
| 773 |
+
drawer.addEventListener('click', function() {
|
| 774 |
+
if(isDrawerOpen) {
|
| 775 |
+
drawer.classList.remove('drawer-open');
|
| 776 |
+
drawer.classList.add('drawer-close');
|
| 777 |
+
isDrawerOpen = false;
|
| 778 |
+
updateStatus();
|
| 779 |
+
}
|
| 780 |
+
});
|
| 781 |
+
|
| 782 |
+
// Trigger button to open drawer
|
| 783 |
+
triggerBtn.addEventListener('click', function() {
|
| 784 |
+
if(!isDrawerOpen) {
|
| 785 |
+
// Show current flow if enabled
|
| 786 |
+
if(showCurrent) {
|
| 787 |
+
currentFlow.style.display = 'block';
|
| 788 |
+
}
|
| 789 |
+
|
| 790 |
+
// Animate current draw
|
| 791 |
+
animateCurrentDraw(500);
|
| 792 |
+
|
| 793 |
+
// Activate solenoid
|
| 794 |
+
solenoid.classList.add('solenoid-activate');
|
| 795 |
+
|
| 796 |
+
// After a delay, open the drawer
|
| 797 |
+
setTimeout(() => {
|
| 798 |
+
drawer.classList.remove('drawer-close');
|
| 799 |
+
drawer.classList.add('drawer-open');
|
| 800 |
+
isDrawerOpen = true;
|
| 801 |
+
updateStatus();
|
| 802 |
+
|
| 803 |
+
// Hide current flow after animation
|
| 804 |
+
setTimeout(() => {
|
| 805 |
+
if(showCurrent) {
|
| 806 |
+
currentFlow.style.display = 'none';
|
| 807 |
+
}
|
| 808 |
+
}, 1000);
|
| 809 |
+
}, 500);
|
| 810 |
+
|
| 811 |
+
// Remove solenoid activation after animation
|
| 812 |
+
setTimeout(() => {
|
| 813 |
+
solenoid.classList.remove('solenoid-activate');
|
| 814 |
+
animateCurrentDraw(0);
|
| 815 |
+
}, 1000);
|
| 816 |
+
}
|
| 817 |
+
});
|
| 818 |
+
|
| 819 |
+
// Reset button
|
| 820 |
+
resetBtn.addEventListener('click', function() {
|
| 821 |
+
drawer.classList.remove('drawer-open', 'drawer-close');
|
| 822 |
+
isDrawerOpen = false;
|
| 823 |
+
updateStatus();
|
| 824 |
+
currentFlow.style.display = 'none';
|
| 825 |
+
solenoid.classList.remove('solenoid-activate');
|
| 826 |
+
animateCurrentDraw(0);
|
| 827 |
+
|
| 828 |
+
// Reset component positions
|
| 829 |
+
resetComponentPositions();
|
| 830 |
+
});
|
| 831 |
+
|
| 832 |
+
// Toggle current flow display
|
| 833 |
+
showCurrentBtn.addEventListener('click', function() {
|
| 834 |
+
showCurrent = !showCurrent;
|
| 835 |
+
if(showCurrent) {
|
| 836 |
+
currentFlow.style.display = 'block';
|
| 837 |
+
showCurrentBtn.classList.add('bg-purple-700');
|
| 838 |
+
showCurrentBtn.classList.remove('bg-purple-600');
|
| 839 |
+
} else {
|
| 840 |
+
currentFlow.style.display = 'none';
|
| 841 |
+
showCurrentBtn.classList.remove('bg-purple-700');
|
| 842 |
+
showCurrentBtn.classList.add('bg-purple-600');
|
| 843 |
+
}
|
| 844 |
+
});
|
| 845 |
+
|
| 846 |
+
// Toggle edit mode
|
| 847 |
+
editModeBtn.addEventListener('click', function() {
|
| 848 |
+
editMode = !editMode;
|
| 849 |
+
if(editMode) {
|
| 850 |
+
editModeBtn.classList.add('active');
|
| 851 |
+
enableDrag();
|
| 852 |
+
} else {
|
| 853 |
+
editModeBtn.classList.remove('active');
|
| 854 |
+
disableDrag();
|
| 855 |
+
}
|
| 856 |
+
});
|
| 857 |
+
|
| 858 |
+
// Save layout
|
| 859 |
+
saveLayoutBtn.addEventListener('click', function() {
|
| 860 |
+
const positions = {};
|
| 861 |
+
draggableComponents.forEach(comp => {
|
| 862 |
+
positions[comp.id || comp.className] = {
|
| 863 |
+
left: comp.style.left,
|
| 864 |
+
top: comp.style.top
|
| 865 |
+
};
|
| 866 |
+
});
|
| 867 |
+
|
| 868 |
+
localStorage.setItem('schematicLayout', JSON.stringify(positions));
|
| 869 |
+
|
| 870 |
+
// Show saved notification
|
| 871 |
+
const notification = document.createElement('div');
|
| 872 |
+
notification.className = 'fixed bottom-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg shadow-lg';
|
| 873 |
+
notification.textContent = 'Layout saved!';
|
| 874 |
+
document.body.appendChild(notification);
|
| 875 |
+
|
| 876 |
+
setTimeout(() => {
|
| 877 |
+
notification.remove();
|
| 878 |
+
}, 2000);
|
| 879 |
+
});
|
| 880 |
+
|
| 881 |
+
// Load layout
|
| 882 |
+
function loadLayout() {
|
| 883 |
+
const savedLayout = localStorage.getItem('schematicLayout');
|
| 884 |
+
if (savedLayout) {
|
| 885 |
+
const positions = JSON.parse(savedLayout);
|
| 886 |
+
|
| 887 |
+
draggableComponents.forEach(comp => {
|
| 888 |
+
const id = comp.id || comp.className;
|
| 889 |
+
if (positions[id]) {
|
| 890 |
+
comp.style.left = positions[id].left;
|
| 891 |
+
comp.style.top = positions[id].top;
|
| 892 |
+
}
|
| 893 |
+
});
|
| 894 |
+
}
|
| 895 |
+
}
|
| 896 |
+
|
| 897 |
+
// Reset component positions
|
| 898 |
+
function resetComponentPositions() {
|
| 899 |
+
const defaultPositions = {
|
| 900 |
+
'battery': { left: '80px', top: '160px' },
|
| 901 |
+
'charger': { left: '80px', top: '220px' },
|
| 902 |
+
'booster': { left: '80px', top: '300px' },
|
| 903 |
+
'regulator': { left: '80px', top: '380px' },
|
| 904 |
+
'esp': { left: '300px', top: '160px' },
|
| 905 |
+
'mosfet': { left: '300px', top: '300px' },
|
| 906 |
+
'resistor': { left: '300px', top: '400px' },
|
| 907 |
+
'solenoid': { left: '600px', top: '160px' },
|
| 908 |
+
'diode': { left: '600px', top: '300px' },
|
| 909 |
+
'drawerCabinet': { left: '250px', top: '480px' }
|
| 910 |
+
};
|
| 911 |
+
|
| 912 |
+
draggableComponents.forEach(comp => {
|
| 913 |
+
const id = comp.id;
|
| 914 |
+
if (defaultPositions[id]) {
|
| 915 |
+
comp.style.left = defaultPositions[id].left;
|
| 916 |
+
comp.style.top = defaultPositions[id].top;
|
| 917 |
+
}
|
| 918 |
+
});
|
| 919 |
+
}
|
| 920 |
+
|
| 921 |
+
// Update status indicator
|
| 922 |
+
function updateStatus() {
|
| 923 |
+
if(isDrawerOpen) {
|
| 924 |
+
statusText.textContent = 'Drawer Open';
|
| 925 |
+
statusLed.classList.remove('bg-red-500');
|
| 926 |
+
statusLed.classList.add('bg-green-500');
|
| 927 |
+
} else {
|
| 928 |
+
statusText.textContent = 'Drawer Locked';
|
| 929 |
+
statusLed.classList.remove('bg-green-500');
|
| 930 |
+
statusLed.classList.add('bg-red-500');
|
| 931 |
+
}
|
| 932 |
+
}
|
| 933 |
+
|
| 934 |
+
// Animate current draw meter
|
| 935 |
+
function animateCurrentDraw(target) {
|
| 936 |
+
let current = 0;
|
| 937 |
+
const step = target / 20;
|
| 938 |
+
const interval = setInterval(() => {
|
| 939 |
+
if (Math.abs(current - target) < step) {
|
| 940 |
+
current = target;
|
| 941 |
+
clearInterval(interval);
|
| 942 |
+
} else if (current < target) {
|
| 943 |
+
current += step;
|
| 944 |
+
} else {
|
| 945 |
+
current -= step;
|
| 946 |
+
}
|
| 947 |
+
currentDraw.textContent = Math.round(current);
|
| 948 |
+
}, 20);
|
| 949 |
+
}
|
| 950 |
+
|
| 951 |
+
// Add hover effects to components
|
| 952 |
+
const components = document.querySelectorAll('.component-highlight');
|
| 953 |
+
components.forEach(comp => {
|
| 954 |
+
comp.addEventListener('mouseenter', function() {
|
| 955 |
+
const tooltip = this.querySelector('.tooltip');
|
| 956 |
+
if(tooltip) {
|
| 957 |
+
tooltip.style.visibility = 'visible';
|
| 958 |
+
tooltip.style.opacity = '1';
|
| 959 |
+
}
|
| 960 |
+
});
|
| 961 |
+
|
| 962 |
+
comp.addEventListener('mouseleave', function() {
|
| 963 |
+
const tooltip = this.querySelector('.tooltip');
|
| 964 |
+
if(tooltip) {
|
| 965 |
+
tooltip.style.visibility = 'hidden';
|
| 966 |
+
tooltip.style.opacity = '0';
|
| 967 |
+
}
|
| 968 |
+
});
|
| 969 |
+
});
|
| 970 |
+
|
| 971 |
+
// Initialize
|
| 972 |
+
loadLayout();
|
| 973 |
+
});
|
| 974 |
+
</script>
|
| 975 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 𧬠<a href="https://enzostvs-deepsite.hf.space?remix=LukasBe/drawer-circuit" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 976 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Create an interactive animated, schematics of the electronic system: β
Letβs Design This Mechanism π§© Goal ESP-01 triggers electric release Spring pops drawer open ~2β5 cm Human pushes drawer to close Latch clicks and holds drawer shut again (no need for motor or servo) π οΈ Component Design Component Function Notes π§² Solenoid or Lock Release Electrically unlocks the latch Pull-type solenoid, momentary π§ Spring Push Latch Holds drawer shut, pops it open when unlatched Found in kitchen cabinetry π LiPo + TP4056 Charger Powers everything + recharges 3.7V 1000β2000mAh β‘ Voltage Booster to 12V Drives solenoid from LiPo e.g., MT3608 step-up ποΈ N-MOSFET + Diode ESP-01 safe switching AO3400 + 1N4007 πΆ ESP-01 Module Wireless control (WiFi, ESP-NOW, etc.) Controls solenoid via GPIO π§° How It Works (Step-by-Step) Drawer is closed, spring latch is engaged. ESP-01 receives a signal (e.g., unlock command). ESP-01 sends HIGH to MOSFET gate, energizing solenoid for ~250 ms. Solenoid pulls latch, causing spring to eject the drawer outward. Drawer stays partially open (~5 cm). User pushes drawer shut β latch automatically catches and locks. π Updated Circuit Overview rust Copy Edit LiPo 3.7V Battery ββ> TP4056 charging board ββ> MT3608 boost converter β 12V for solenoid ββ> AMS1117-3.3V β ESP-01 ESP-01 GPIO0 --> Resistor (220Ξ©) --> Gate of MOSFET MOSFET Drain --> Solenoid GND Solenoid V+ --> 12V Flyback Diode across solenoid (e.g., 1N4007) π Recommended Components (Cheap & Readily Available) Component Search Term / Spec Solenoid mini 12V pull solenoid actuator or drawer unlock solenoid Spring latch push to open cabinet latch, touch latch spring pop open Battery LiPo 3.7V 1200mAh + TP4056 module Booster MT3608 step-up 3.7V to 12V boost converter MOSFET AO3400, IRLZ44N, or similar ESP ESP-01 + adapter board (for easier programming) π Physical Layout Tip Mount the solenoid close to the latch. Use a pull-solenoid to mechanically release the touch-latch. Use a robust spring (often included in latch) to ensure a good "pop." βοΈ Optional Additions Limit switch to detect door open/closed state LEDs or beeper to signal drawer opening or alert user Capacitor (470Β΅F+) to stabilize 12V boost during solenoid kick
|
| 2 |
+
As a electronics engineer, review the scematics logic and layout structure, and improve it to reach professional level,feel free to add wirings, annotation etc., to improve the quelity of the diagram.
|
| 3 |
+
As a professional technical drawer, review the diagram layout and organisation, identify problems, suggest improvements, and implement them.
|
| 4 |
+
Make the layout components (locations) editable by the user visually.
|