viewof productionVolume = Inputs.range([1000, 200000], {
value: 100000,
step: 1000,
label: "Production volume (units):"
})
viewof projectYears = Inputs.range([1, 10], {
value: 5,
step: 1,
label: "Product lifetime (years):"
})
// Technology costs (BOM, battery, cloud)
bleBOM = 1.50
wifiBOM = 2.80
nbiotBOM = 8.00
bleCloud = 0
wifiCloud = 0.50
nbiotCloud = 12
bleBattery = "CR2032 (12-18 months)"
wifiBattery = "500mAh LiPo (3-5 days)"
nbiotBattery = "AA cells (6-12 months)"
// Calculate total costs
bleTotalCost = productionVolume * (bleBOM + (bleCloud * projectYears))
wifiTotalCost = productionVolume * (wifiBOM + (wifiCloud * projectYears))
nbiotTotalCost = productionVolume * (nbiotBOM + (nbiotCloud * projectYears))
bleVsWifi = wifiTotalCost - bleTotalCost
bleVsNbiot = nbiotTotalCost - bleTotalCost
conn_fmt_currency = value => String.fromCharCode(36) + value.toLocaleString(undefined, {maximumFractionDigits: 2})
html`
<div style="background: #f8f9fa; border-left: 4px solid #3498DB; padding: 1.5rem; margin: 1rem 0; border-radius: 4px;">
<h4 style="color: #2C3E50; margin-top: 0;">Connectivity Technology Comparison</h4>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; margin-top: 1rem;">
<div style="background: #d4edda; padding: 0.9rem; border-radius: 4px; border: 1px solid #16A085;">
<strong style="display: block; color: #2C3E50; margin-bottom: 0.5rem;">BLE (recommended)</strong>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>BOM</span><strong>${conn_fmt_currency(bleBOM)}</strong></div>
<div><span style="color: #2C3E50;">Battery:</span> ${bleBattery}</div>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>Annual cloud</span><strong>${conn_fmt_currency(bleCloud)}</strong></div>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>Total</span><strong style="color: #16A085;">${conn_fmt_currency(bleTotalCost)}</strong></div>
</div>
<div style="background: white; padding: 0.9rem; border-radius: 4px; border: 1px solid #dee2e6;">
<strong style="display: block; color: #2C3E50; margin-bottom: 0.5rem;">Wi-Fi</strong>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>BOM</span><strong>${conn_fmt_currency(wifiBOM)}</strong></div>
<div><span style="color: #2C3E50;">Battery:</span> ${wifiBattery}</div>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>Annual cloud</span><strong>${conn_fmt_currency(wifiCloud)}</strong></div>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>Total</span><strong>${conn_fmt_currency(wifiTotalCost)}</strong></div>
</div>
<div style="background: white; padding: 0.9rem; border-radius: 4px; border: 1px solid #dee2e6;">
<strong style="display: block; color: #2C3E50; margin-bottom: 0.5rem;">NB-IoT</strong>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>BOM</span><strong>${conn_fmt_currency(nbiotBOM)}</strong></div>
<div><span style="color: #2C3E50;">Battery:</span> ${nbiotBattery}</div>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>Annual cloud</span><strong>${conn_fmt_currency(nbiotCloud)}</strong></div>
<div style="display: flex; justify-content: space-between; gap: 1rem;"><span>Total</span><strong>${conn_fmt_currency(nbiotTotalCost)}</strong></div>
</div>
</div>
<div style="margin-top: 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem;">
<div style="background: white; padding: 1rem; border-radius: 4px; border: 1px solid #dee2e6;">
<div style="color: #7F8C8D; font-size: 0.875rem; margin-bottom: 0.5rem;">Savings vs. Wi-Fi</div>
<div style="color: #16A085; font-size: 1.25rem; font-weight: 600;">${conn_fmt_currency(bleVsWifi)}</div>
<div style="color: #7F8C8D; font-size: 0.75rem; margin-top: 0.25rem;">
(${conn_fmt_currency(bleVsWifi / productionVolume)} per unit)
</div>
</div>
<div style="background: white; padding: 1rem; border-radius: 4px; border: 1px solid #dee2e6;">
<div style="color: #7F8C8D; font-size: 0.875rem; margin-bottom: 0.5rem;">Savings vs. NB-IoT</div>
<div style="color: #16A085; font-size: 1.25rem; font-weight: 600;">${conn_fmt_currency(bleVsNbiot)}</div>
<div style="color: #7F8C8D; font-size: 0.75rem; margin-top: 0.25rem;">
(${conn_fmt_currency(bleVsNbiot / productionVolume)} per unit)
</div>
</div>
</div>
<div style="margin-top: 1rem; padding: 1rem; background: #d1ecf1; border-radius: 4px; border-left: 4px solid #3498DB;">
<strong style="color: #2C3E50;">Why BLE Wins for Consumer IoT:</strong>
<ul style="margin: 0.5rem 0 0 1.25rem; color: #2C3E50;">
<li>No recurring connectivity fees (phone relays to cloud)</li>
<li>Multi-year battery life (no daily charging frustration)</li>
<li>${((bleVsNbiot / nbiotTotalCost) * 100).toFixed(0)}% cost savings vs. NB-IoT over ${projectYears} years</li>
<li>Simple pairing model (no SIM activation complexity)</li>
</ul>
</div>
</div>
`Interactive Connectivity Comparison
Interactive Connectivity Comparison
animation
iot
applications
Try Change Production volume (units):, then press Calculate total cost.
Observe After Calculate total cost, compare Total, Savings vs. Wi-Fi, and Savings vs. NB-IoT.
Explain Explain why Calculate total cost changes savings as product lifetime increases.
Technical boundaries. Total costs use fixed BOM and annual cloud costs multiplied by production volume. Battery descriptions do not add battery costs to the calculation.
Interactive Connectivity Comparison
Compare the total cost of different connectivity technologies for your IoT product over its lifetime.