IEC60063 standard E-series for R, C, L. Given a value, returns the nearest E standard value
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples/EseriesTest
src
LICENSE
README.md
keywords.txt
library.properties
license

README.md

IEC60063

Arduino library.
Given a value returns the E-series nearest value.
Example: 123 ohm nearest E24 value is "120R".
Example: 23E-9 Farad nearest E12 value is "22n".
Standard values for R, L and C are defined by IEC60063.
This library implements E3 to E192.
Code is Arduino-portable so should work in any Arduino compatible platform. Tested on Arduino Uno (AtMega328), ESP8266, ESP32 and STM32 (BluePill).

Installation

Download the ZIP archive (https://github.com/microentropie/Arduino-Libraries click on IEC60063.zip then click on the Download button)
Open the Arduino IDE and choose Sketch -> Include Library -> Add .ZIP Library... and select the downloaded file.

Code Examples

Library contains this example:

  • EseriesTest: Report (to Serial) E-series values from some non standard values.

Documentation

Please change Exx with the relevant serie:
float ExxValue(float r);
given a non standard value, returns the nearest Exx value as a float number.
Example:

#include <IEC60063_Exx.h>
float rE = ExxValue(123);
Serial.print(rE); 
// sends 100 to serial, if Exx is E6

Please change Exx with the relevant serie:
char *ExxFormattedValue(char *buf, int len, float r, char unitTypeChar = 'R');
given a non standard value, returns the nearest Exx value as a string.
Example:

#include <IEC60063_Exx.h>
char buf[ExxBufSize];

Serial.print(ExxFormattedValue(buf, sizeof(buf), 123, 'R')); 
// sends "100R" to serial, if Exx is E6

License

Copyright © 2017-2018 Stefano Di Paolo The MIT License (MIT). A copy of the license is enclosed (see license file), or you can read it here: https://en.wikipedia.org/wiki/MIT_License