Skip to content

Commit 5b73115

Browse files
authored
update readme.md (#41)
- add badges to readme.md - minor edits
1 parent 508b286 commit 5b73115

File tree

6 files changed

+44
-23
lines changed

6 files changed

+44
-23
lines changed

ACS712.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: ACS712.cpp
33
// AUTHOR: Rob Tillaart, Pete Thompson
4-
// VERSION: 0.3.7
4+
// VERSION: 0.3.8
55
// DATE: 2020-08-02
66
// PURPOSE: ACS712 library - current measurement
77
// URL: https://github.com/RobTillaart/ACS712

ACS712.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: ACS712.h
44
// AUTHOR: Rob Tillaart, Pete Thompson
5-
// VERSION: 0.3.7
5+
// VERSION: 0.3.8
66
// DATE: 2020-08-02
77
// PURPOSE: ACS712 library - current measurement
88
// URL: https://github.com/RobTillaart/ACS712
@@ -13,7 +13,8 @@
1313

1414
#include "Arduino.h"
1515

16-
#define ACS712_LIB_VERSION (F("0.3.7"))
16+
17+
#define ACS712_LIB_VERSION (F("0.3.8"))
1718

1819

1920
// ACS712_FF_SINUS == 1.0/sqrt(2) == 0.5 * sqrt(2)

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.3.8] - 2023-09-19
10+
- add badges to readme.md
11+
- minor edits
12+
13+
914
## [0.3.7] - 2023-05-20
1015
- add example **estimateMidPointAC.ino** #37
1116
- update readme.md (sampling trick #38).
1217
- minor edits.
1318

14-
1519
## [0.3.6] - 2023-04-19
1620
- add **autoMidPointDC(cycles)** see issue #35
1721
- add rounding to **autoMidPoint()**

README.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
[![Arduino CI](https://github.com/RobTillaart/ACS712/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
33
[![Arduino-lint](https://github.com/RobTillaart/ACS712/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/ACS712/actions/workflows/arduino-lint.yml)
44
[![JSON check](https://github.com/RobTillaart/ACS712/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/ACS712/actions/workflows/jsoncheck.yml)
5+
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/ACS712.svg)](https://github.com/RobTillaart/ACS712/issues)
6+
57
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/ACS712/blob/master/LICENSE)
68
[![GitHub release](https://img.shields.io/github/release/RobTillaart/ACS712.svg?maxAge=3600)](https://github.com/RobTillaart/ACS712/releases)
9+
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/ACS712.svg)](https://registry.platformio.org/libraries/robtillaart/ACS712)
710

811

912
# ACS712
@@ -16,14 +19,17 @@ Library for the ACS712 Current Sensor - 5A, 20A, 30A and compatibles.
1619
The ACS712 is a chip to measure current, both AC or DC. The chip has an
1720
analogue output that provides a voltage that is linear with the current.
1821
The ACS712 library supports only a built in ADC by means of **analogRead()**.
19-
There are 4 core functions:
22+
23+
However since 0.3.4 there is an experimental **setADC()**.
24+
25+
The library has 4 core functions:
2026

2127
- **float mA_peak2peak(frequency = 50, cycles = 1)**
2228
- **float mA_DC(cycles = 1)**
2329
- **float mA_AC(frequency = 50, cycles = 1)**
2430
- **float mA_AC_sampling(frequency = 50, cycles = 1)**
2531

26-
The parameter cycles is used to do measure multiple cycles and average them.
32+
The parameter cycles is used to measure multiple cycles and average them.
2733

2834
To measure DC current a single **analogRead()** with conversion math is
2935
sufficient to get a value.
@@ -36,8 +42,10 @@ This factor depends heavily on the signal form, hence its name.
3642
For a perfect sinus the value is sqrt(2)/2 == 1/sqrt(2).
3743
See **Form factor** below.
3844

45+
For a 60 Hz environment the blocking is ~16.7 milliseconds, still pretty long.
46+
3947
The **mA_AC_sampling()** calculates the average of the sumSquared of many measurements.
40-
It should be used when the form factor is not known.
48+
This function should be used when the form factor is not known.
4149

4250
Note to make precise measurements, the power supply of both the ACS712 and the ADC of
4351
the processor should be as stable as possible.
@@ -59,8 +67,8 @@ mA LSB = (1000 * 5000 mV) / (maxADC * mVperA);
5967
```
6068

6169
Although no 16 bit ADC built in are known, it indicates what resolution
62-
could be obtained with such an ADC. It triggered the thought for supporting
63-
external ADC's with this library or a derived version. See future.
70+
could be obtained with such an ADC. It triggered the experimental supporting
71+
of external ADC's with this library.
6472

6573

6674
#### Tests
@@ -75,17 +83,16 @@ The library is at least confirmed to work with the following boards:
7583
| ESP32 | 3.3V | 4096 | #15
7684
| Promicro | 5.0V | 1024 | #15
7785

78-
Please let me know of other working platforms / processors.
79-
86+
Please let me know of other working platforms / processors (and failing ones!).
8087

8188

8289
## Compatibles
8390

8491
Robodyn has a breakout for the ACS758 - 50 A. - See resolution below.
8592
This sensor has versions up to 200 Amps, so use with care!
8693

87-
Allegromicro offers a lot of different current sensors, that might be compatible.
88-
These include bidirectional and unidirectional.
94+
Allegromicro offers a lot of different current sensors that might be compatible.
95+
These include bidirectional and unidirectional ones.
8996
The unidirectional seem to be for DC only.
9097

9198
https://www.allegromicro.com/en/products/sense/current-sensor-ics/current-sensors-innovations
@@ -215,7 +222,7 @@ The library does not support this yet.
215222

216223
#### Form factor
217224

218-
The form factor is also known as the crest factor.
225+
The form factor is also known as the **crest factor**.
219226
It is only used for signals measured with **mA_AC()**.
220227

221228
- **void setFormFactor(float formFactor = ACS712_FF_SINUS)** manually sets the form factor.
@@ -224,12 +231,12 @@ Must typical be between 0.0 and 1.0, see constants below.
224231

225232
The library has a number of predefined form factors:
226233

227-
| definition | value | approx | notes |
228-
|:---------------------|:--------------|:------:|:--------|
229-
| ACS712_FF_SQUARE | 1.0 | 1.000 | |
230-
| ACS712_FF_SINUS | 1.0 / sqrt(2) | 0.707 | default |
231-
| ACS712_FF_TRIANGLE | 1.0 / sqrt(3) | 0.577 | |
232-
| ACS712_FF_SAWTOOTH | 1.0 / sqrt(3) | 0.577 | |
234+
| definition | value | approx | notes |
235+
|:---------------------|:----------------|:--------:|:----------|
236+
| ACS712_FF_SQUARE | 1.0 | 1.000 |
237+
| ACS712_FF_SINUS | 1.0 / sqrt(2) | 0.707 | default |
238+
| ACS712_FF_TRIANGLE | 1.0 / sqrt(3) | 0.577 |
239+
| ACS712_FF_SAWTOOTH | 1.0 / sqrt(3) | 0.577 |
233240

234241
It is important to measure the current with a calibrated multimeter
235242
and determine / verify the form factor of the signal.
@@ -480,3 +487,12 @@ The examples show the basic working of the functions.
480487
- setADC() to support > 16 bit?
481488
- uint32_t performance penalty?
482489

490+
491+
## Support
492+
493+
If you appreciate my libraries, you can support the development and maintenance.
494+
Improve the quality of the libraries by providing issues and Pull Requests, or
495+
donate through PayPal or GitHub sponsors.
496+
497+
Thank you,
498+

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"type": "git",
2222
"url": "https://github.com/RobTillaart/ACS712.git"
2323
},
24-
"version": "0.3.7",
24+
"version": "0.3.8",
2525
"license": "MIT",
26-
"frameworks": "arduino",
26+
"frameworks": "*",
2727
"platforms": "*",
2828
"headers": "ACS712.h"
2929
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ACS712
2-
version=0.3.7
2+
version=0.3.8
33
author=Rob Tillaart <[email protected]>, Pete Thompson <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=ACS712 library for Arduino.

0 commit comments

Comments
 (0)