Chip-dat/Allegro-DAT/ACS712-dat/ACS712-dat.md
... ...
@@ -6,7 +6,7 @@
6 6
7 7
- [[SVC1000-dat]] - [[SVC1002-dat]] - [[SVC1004-dat]] - [[ACS712-dat]]
8 8
9
-
9
+- [[VRMS-dat]] - [[ACS712-dat]]
10 10
11 11
12 12
[legacy wiki page](https://w.electrodragon.com/w/ACS712)
... ...
@@ -32,4 +32,6 @@ with 2.1 kVRMS Voltage Isolation and a Low-Resistance Current Conductor
32 32
33 33
## ref
34 34
35
-- datasheet - [[ACS712-DS.pdf]]
... ...
\ No newline at end of file
0
+- datasheet - [[ACS712-DS.pdf]]
1
+
2
+- [[cross-chip-dat]] - [[CC6902-dat]] - [[ACS712-dat]]
... ...
\ No newline at end of file
Chip-dat/cross-chip-dat/CC6902-dat/2026-07-17-18-50-29.png
... ...
Binary files /dev/null and b/Chip-dat/cross-chip-dat/CC6902-dat/2026-07-17-18-50-29.png differ
Chip-dat/cross-chip-dat/CC6902-dat/2026-07-17-18-53-26.png
... ...
Binary files /dev/null and b/Chip-dat/cross-chip-dat/CC6902-dat/2026-07-17-18-53-26.png differ
Chip-dat/cross-chip-dat/CC6902-dat/CC6902-dat.md
... ...
@@ -0,0 +1,31 @@
1
+
2
+
3
+# CC6902-dat
4
+
5
+- [[cross-chip-dat]] - [[CC6902-dat]] - [[ACS712-dat]]
6
+
7
+CC6902 是一款高性能单端输出的线性电流传感器,可以更为有效的为交流(AC)或者直流(DC)电流检测方案,广泛应用于工业,消费
8
+类及通信类设备。
9
+
10
+
11
+CC6902 内部集成了一颗高精度,低噪声的线性霍尔电路和一根低阻抗的主电流导线。当采样电流流经主电流导线,其产生的磁场在霍尔
12
+电路上感应出相应的电信号,经过信号处理电路输出电压信号,使得产品更易于使用。线性霍尔电路采用先进的 BiCMOS 制程生产,包含了
13
+高灵敏度霍尔传感器,霍尔信号预放大器,高精度的霍尔温度补偿单元,振荡器,动态失调消除电路和放大器输出模块。在无磁场的情况下,
14
+静态输出为 50%VCC。
15
+
16
+
17
+在电源电压 5V 条件下,OUT 可以在 0.2~4.8V 之间随磁场线性变化,线性度可达 0.4%。CC6902 内部集成的动态失调消除电路使 IC 的灵
18
+敏度不受外界压力和 IC 封装应力的影响。
19
+
20
+
21
+## APP SCH
22
+
23
+![](2026-07-17-18-50-29.png)
24
+
25
+
26
+## SCH
27
+
28
+![](2026-07-17-18-53-26.png)
29
+
30
+## ref
31
+
Chip-dat/cross-chip-dat/cross-chip-dat.md
... ...
@@ -0,0 +1,7 @@
1
+
2
+# cross-chip-dat
3
+
4
+- [[cross-chip-dat]] - [[CC6902-dat]]
5
+
6
+
7
+## ref
... ...
\ No newline at end of file
Sensor-dat/sensor-power-dat/sensor-current-dat/sensor-current-dat.md
... ...
@@ -2,7 +2,7 @@
2 2
# current-sensor-dat.md
3 3
4 4
5
-
5
+- [[VRMS-dat]] - [[voltage-dat]]
6 6
7 7
- [[fab-tools-dat]] - [[meter-dat]]
8 8
... ...
@@ -30,7 +30,7 @@
30 30
- Original CC6904 SO-10A SOP-8 Single-chip Hall effect current sensor, isolation voltage 2kV
31 31
32 32
33
-
33
+Yes, the ACS712 output can be read directly by a microcontroller (MCU) Analog-to-Digital Converter (ADC).
34 34
35 35
36 36
app-dat/power-bank-dat/2026-07-17-18-48-17.png
... ...
Binary files /dev/null and b/app-dat/power-bank-dat/2026-07-17-18-48-17.png differ
app-dat/power-bank-dat/power-bank-dat.md
... ...
@@ -156,7 +156,11 @@ HOLTEK合泰电源总控单片机。== HT45SC428
156 156
![](2026-06-13-19-06-20.png)
157 157
158 158
159
+## SCH
159 160
161
+power bank sleep preventer
162
+
163
+![](2026-07-17-18-48-17.png)
160 164
161 165
## ref
162 166
power-dat/voltage-dat/VRMS-dat/VRMS-dat.md
... ...
@@ -0,0 +1,60 @@
1
+
2
+
3
+
4
+# VRMS-dat
5
+
6
+- [[VRMS-dat]] - [[ACS712-dat]]
7
+
8
+- [[VRMS-dat]] - [[voltage-dat]] - [[current-dat]] - [[sensor-current-dat]]
9
+
10
+
11
+Yes, the ACS712 can absolutely measure AC current. Because it uses a Hall-effect sensor to detect the magnetic field generated by the current passing through the internal copper conduction path, it tracks both positive and negative half-cycles of an AC wave perfectly.
12
+
13
+However, because AC current constantly changes direction and magnitude (typically a 50Hz or 60Hz sine wave), reading it with an MCU ADC requires a different approach than reading DC.
14
+
15
+Here is how it behaves and how to handle it:
16
+
17
+## 1. The AC Waveform Output
18
+When measuring AC, the ACS712 output voltage will mirror the AC waveform, riding on top of the $2.5\text{ V}$ baseline:
19
+
20
+* **No current:** A flat line at exactly $2.5\text{ V}$.
21
+* **AC current flowing:** A sine wave oscillating above and below $2.5\text{ V}$. For example, if the peak current causes a $0.5\text{ V}$ swing, the output voltage will swing between $3.0\text{ V}$ (positive peak) and $2.0\text{ V}$ (negative peak).
22
+
23
+If you simply take a single random ADC read, you will just get a snapshot of a single point on that sine wave, which is useless for calculating power consumption.
24
+
25
+---
26
+
27
+## 2. How to Read AC with your ADC
28
+To get a meaningful measurement (like RMS current), your microcontroller needs to sample the waveform rapidly over a set period (usually covering at least one or two full AC cycles).
29
+
30
+1. **Sample Rapidly Over a Time Window**
31
+ Loop and read the ADC as fast as possible for a specific duration—usually $20\text{ ms}$ (for a 50Hz wave) or $16.7\text{ ms}$ (for a 60Hz wave) to capture at least one full cycle.
32
+
33
+2. **Find the Peak-to-Peak Voltage**
34
+ Track the absolute maximum value ($V_{max}$) and the absolute minimum value ($V_{min}$) recorded during that sampling window. Subtract them to find the total peak-to-peak voltage:
35
+ $$V_{pp} = V_{max} - V_{min}$$
36
+
37
+3. **Calculate Peak Voltage**
38
+ Divide the peak-to-peak voltage by 2 to get the peak amplitude relative to the zero-current baseline:
39
+ $$V_{peak} = \frac{V_{pp}}{2}$$
40
+
41
+4. **Convert Voltage to RMS Voltage**
42
+ For a pure sinusoidal wave, calculate the Root Mean Square (RMS) voltage by multiplying the peak voltage by $0.707$ (which is $1 / \sqrt{2}$):
43
+ $$V_{rms} = V_{peak} \times 0.707$$
44
+
45
+5. **Calculate RMS Current**
46
+ Divide the calculated $V_{rms}$ by your specific sensor model's sensitivity (e.g., $0.185\text{ V/A}$ for the 5A model) to get the true AC RMS current:
47
+ $$I_{rms} = \frac{V_{rms}}{\text{Sensitivity}}$$
48
+
49
+
50
+## 3. Alternative Method: True RMS Calculation
51
+If your AC load isn't a perfect sine wave (e.g., switching power supplies, dimmed lights), the peak-to-peak shortcut above will be inaccurate. In those cases, you need to calculate the mathematical **True RMS** directly in code:
52
+
53
+1. Take a sample and subtract the $2.5\text{ V}$ offset to get the instantaneous voltage delta.
54
+2. Square that delta value ($V_{delta}^2$) and add it to a running total.
55
+3. Repeat this for a few hundred samples over a full cycle.
56
+4. Divide the running total by the number of samples taken (finding the average/mean).
57
+5. Take the square root of that mean to get $V_{rms}$, then divide by the sensor sensitivity.
58
+
59
+
60
+## ref
... ...
\ No newline at end of file
power-dat/voltage-dat/voltage-dat.md
... ...
@@ -2,7 +2,7 @@
2 2
# voltage-dat
3 3
4 4
5
-
5
+- [[VRMS-dat]] - [[voltage-dat]]
6 6
7 7
- [[voltage-dat]] - [[voltage-interverter-dat]] - [[voltage-divider-dat]] - [[voltage-reference-dat]]
8 8