Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
checkpoint
  • Loading branch information
rickkas7 committed May 12, 2025
commit 56e6edc9e0baa9ae4be4ba4620111ec4be70a74c
4 changes: 4 additions & 0 deletions config/sitemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -9721,6 +9721,10 @@
"reference/device-os/libraries/n/NFC_UICR_RK.md": {
"hash": "36a001fb0db71f23921ab242277114b287234eb8d1f7a0387fd91f6a8890e6c8",
"date": "2025-05-01"
},
"hardware/community/input-protection.md": {
"hash": "40af93904cce7e7bc72b6fd9cea81e870f6c50a015cf0949912b1c188d6dd987",
"date": "2025-05-05"
}
}
}
54 changes: 54 additions & 0 deletions generated/api-service.json
Original file line number Diff line number Diff line change
Expand Up @@ -13080,6 +13080,12 @@
"group": "Success 200",
"type": "String",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.id",
"isArray": false,
"description": "<p>Product Unique ID</p>"
Expand All @@ -13088,6 +13094,12 @@
"group": "Success 200",
"type": "Number",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.product_id",
"isArray": false,
"description": "<p>Product Firmware ID</p>"
Expand All @@ -13096,6 +13108,12 @@
"group": "Success 200",
"type": "String",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.name",
"isArray": false,
"description": "<p>Product Name</p>"
Expand All @@ -13104,6 +13122,12 @@
"group": "Success 200",
"type": "String",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.slug",
"isArray": false,
"description": "<p>URL compatible version of name</p>"
Expand All @@ -13112,6 +13136,12 @@
"group": "Success 200",
"type": "String",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.description",
"isArray": false,
"description": ""
Expand All @@ -13120,6 +13150,12 @@
"group": "Success 200",
"type": "Number",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.platform_id",
"isArray": false,
"description": "<p>Product Platform ID</p>"
Expand All @@ -13128,6 +13164,12 @@
"group": "Success 200",
"type": "String",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.organization",
"isArray": false,
"description": "<p>Organization Unique ID</p>"
Expand All @@ -13136,6 +13178,12 @@
"group": "Success 200",
"type": "Boolean",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.requires_activation_codes",
"isArray": false,
"description": ""
Expand All @@ -13144,6 +13192,12 @@
"group": "Success 200",
"type": "String",
"optional": false,
"parentNode": {
"path": "product",
"field": "product",
"type": "Object",
"isArray": false
},
"field": "product.device_protection",
"isArray": false,
"description": "<p>The set device protection status of the devices in this product</p>"
Expand Down
994 changes: 994 additions & 0 deletions src/assets/files/hardware-community/input-protection/InputBlock.dbl

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions src/content/hardware/community/input-protection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Input protection
columns: two
layout: commonTwo.hbs
description: Input protection
---

# {{title}}

Most Particle devices have a 3.3V limit on digital and analog inputs. When connecting to external sensors, it's important to make sure:

- The voltage is in the required range
- The Particle device is protected against transient voltages

One common solution is to use a rail-to-rail TVS (transient voltage suppressor) with Zener diode.

The examples here use a Diodes Inc. [D1213A-02SOL-7](https://www.digikey.com/en/products/detail/diodes-incorporated/D1213A-02SOL-7/3340437)
(TVS DIODE 3.3VWM 10VC SOT233). They're US$ 0.20 in single quantities and significantly less expensive in larger quantities. This version is in the SOT-23-3 package
but there are variations in several common surface mount packages.

This chip isn't available in PTH packages for breadboards, but if you want to prototype a design in a breadboard, you can
easily search for "SOT-23-3 breakout" and find items such as this one [from Amazon](https://www.amazon.com/Chironal-Double-Side-SOT23-3-Adapter-Converter/dp/B07MQBF2DD/ref=sr_1_3) which is 50 pieces for US$ 9.49. The SOT-23-3 is intended to be reflow soldered, but the pins are far enough apart that you can
solder it by hand with a soldering iron fairly easily.

## Example circuits

### Voltage divider (5V)

One common situation is interfacing a 5V signal to 3.3V GPIO. A common solution, especially for analog signals, is a voltage divider:

![5V divider](/assets/images/hardware-community/input-protection/div5.png)

These resistors values do not exactly match 5 VDC to 3.3V (4095 on the ADC), but are close and use common off-the-shelf resistor values.

Because resistors in series add together, you could make this will three common 10K resistors, as well.

![5V divider](/assets/images/hardware-community/input-protection/div5b.png)


### Voltage divider (12V)

This is a voltage divider for a 12 VDC signal, 27K on the high side, and 10K on the low side.

![12V voltage divider](/assets/images/hardware-community/input-protection/div12.png)

These resistors values do not exactly match 12 VDC to 3.3V (4095 on the ADC), but are close and use common off-the-shelf resistor values.

### 3.3V TVS

In the simplest case, a 3.3V analog or digital signal, you can use it like this:

![IN4](/assets/images/hardware-community/input-protection/in4.png)

- The input signal is `IN4` in this example.
- It connects to `A0` though and analog or digital input can be used.
- The 100&ohm; resistor protects against excessive current through the diode.
- If the input voltage is negative, the diode shunts it to ground, protecting the MCU.
- If the input signal is slightly more than 3.3V, the diode shunts it to 3V3, protecting the MCU.
- If the input signal is very large, including ESD, the Zener diode stops the highest voltages, leaving the small differential to the rail-to-rail diodes.

### 5V TVS

You can also attach a voltage divider to the input of the TVS:

![IN4](/assets/images/hardware-community/input-protection/div5tvs.png)

- The voltage divider works the same as [Voltage divider (5V)](#voltage-divider-5v-), above.
- Instead of the 100&ohm; R20 in [3.3V TVS](#3-3v-tvs), above, the high side of the voltage divider (R19) limits the input current.

### Input block

One technique that I like is to use this universal input block on my circuits. If I might want to change the voltage or other characteristics
of the input in the future, I can just rework the board to change the resistors and not have to spin a new board.

#### 3.3V Input block

This circuit is electrically the same as [3.3V TVS](#3-3v-tvs).

![IN1](/assets/images/hardware-community/input-protection/in1.png)

The layout on a circuit board looks like this:

![IN1](/assets/images/hardware-community/input-protection/in1-board.png)
4 changes: 4 additions & 0 deletions src/content/hardware/newMenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@
{
"dir": "monitor-one-modbus",
"title": "Monitor One getting started with Modbus"
},
{
"dir": "input-protection",
"title": "Input protection"
}
]
}
Expand Down