Categories

# RMIS-1 Power Calculations Guide – Voltages and Current

WIKI:

RMIS (Remote Monitoring IoT System) features four independent and isolated channels, each of which can monitor both DC voltage and current.

When all four input channels are used, it would result in eight readings (4 x current and 4 x voltages), being provided in real-time.  The current measured is also positive and negative, so RMIS can monitor both charging and discharging DC currents in each channel.  This makes it ideal for battery monitoring, solar and wind charging etc. • Voltage Sensing.
• The input voltage, for each channel, is monitored on the positive (+), side to board common ground (0V or power negative), via a separate potential voltage divider and then fed into an ADC (MCP3008), convertor input, which is subsequently read by the ESP8266.
• The potential voltage divider is intentionally made high impedance so not to load the input.
• The default resistor values (1M / 210K both 1% High Power Anti-Surge), are calculated to allow for maximum of circa 30V (giving ~ 5V output to the ADC).  The resistors could obviously be easily changed to allow for higher voltages to be measured.
• Unwanted inputs can be left floating.
• Current Sensing.
• The current, for each channel, is monitored via a separate ACS712-30A per channel, which then feeds into an ADC (MCP3008), convertor input, which is subsequently read by the ESP8266.
• This device is available in a range of currents v resolutions.  In order that a wide current range is monitored in RMIS, and allow for higher continuous currents (with headroom), four 30A versions are fitted as standard, so providing maximum of -30A to +30A current range, with a sensitivity of 66mV/A.  In practice, this provides a comfortable headroom and thus the ideal maximum continuous current range is +/-15 to 20A.
• The higher the current, the less accurate the reading, as linearity cannot be guaranteed.  This can easily be resolved in code by adjusting the calculation factor at given ranges, as described below.
• Unwanted inputs can be left floating. Note

The MCP3008 ADC is an 8 channel, 10-bit Analog to Digital (A/D) converter with on-board sample and hold circuitry.  It can sample at a theoretical maximum of 200 kHz, although driving this from an ESP8266 could be less at around 2kHz, or lower,, which is absolutely fine.  This sampling is also dependent on such things like clock frequencies, code efficiencies, internal resolution, linearity performance, operating voltage and other tasks running etc. To increase flexibility, a 0R resistor (R1 in the schematic example), enables the optional disconnection/separation of the current and voltage sensing for each individual channel.  Once the resistor is removed, the related channel input terminals are then totally isolated and can be used for low voltage AC and DC current measurements.  You could equally then use the provided test point as a separate means to input a voltage for DC measuring, independent on the current source voltage.

Although resistors used on RMIS are typically 1% tolerance, it is inevitable that some slight variations in readings will be found between channel inputs, current monitors and the ADC itself. This applies more noticeable at the extreme maximums.

A single separate voltage monitor is provided to the ESP8266 ADC (A0).  This samples the DC input voltage to the board itself and can be useful for monitoring the main DC supply voltage (a separate formula is used for this).  Note the RMIS has a maximum input voltage to the board power terminals of 15V, governed by the on-board voltage regulators. The on-board digital temperature sensor, MCP9808 (located next to the ACS712 current monitors), can be used to monitor the PCB temperature, for example, in the event of continuous high current monitoring.

Calculations Guide

The voltage and current values in each channel have a small formula which simply divides the raw ADC reading by a factor and then calculates the output value in something meaningful, in order to display or publish.  This ‘factor’ typically use in the formulas could vary slightly per channel and thus can be easily used to calibrate if more precision is required.  Example basic formulas are shown below.

Sampling and Multi-Sampling

Averaging a range of samples would provide better results and would be the ideal to include in your code, especially for current monitoring.  This is simply reading a number of samples over a short given time and then dividing the result by the number of reads.

Sample rate is the rate at which a DC voltage signal on the input is sampled by an ADC.  As an example, most Digital Multimeter’s (DMM), for DC measurements, provide an average value displayed from sampling around 150Hz, where more expensive meters may sample 400Hz and much more.  This all depends on the required accuracy and requirements.  A realistic number of samples read and averaged could be 250.  The more sampled read, the longer it will take to revolve around all channels and report, so a balance is made.

Using a DC electronic load and voltage meter, each channel has been measured on a RMIS at varying load currents and voltages – the resulting tables are an example of the ‘raw’ readings.  You may use this as a guide benchmark, or create your own depending on your end requirements.

Current is measured in both directions, so charge and discharge as an example.  A positive value from the current sensor is produced, 0 to 5V (raw value of 0 to 1024), thus no current provides an output of midway 2.5V (raw value around 1024 / 2 = 512).  For this reason, the current formula removes 512 from the raw value to gain a positive or negative current value.

The below are example outputs from each channel, for both different current and voltages.  These values are a single read and not averaging, which would increase accuracy.

Voltage (Single Sampling Examples)

Input
Voltage
V
(At PCB + terminal)
Measured
Value
(May vary pending Tolerances)
X
Example
Factor
Calculated
Voltage
Example

(RAW * X) / 1024 )
0071.50
57371.55.1
1014471.510.05
1217171.511.94
13.819871.513.83
1521671.515.08
2028771.520.04
2535771.524.93
3042971.529.95
3549071.534.21
4054271.537.84

Current (Single Sampling Examples)

ChannelMeasured Current
A
(High Side
Measured
Value
(May vary pending Tolerances)
X
Example
Factor
Calculated
Current
Example

(Raw - 512) / X)
1050911-0.27
11523111
12534112
13550113.45
14556114
15566114.91
110619119.73
1156781115.09
1207331120.09
1257901125.27
1308541131.09
------------------------------
2051013.9-0.14
2152613.91.01
2253613.91.73
2355013.92.73
2456613.93.88
2558013.94.89
21064913.99.86
21571813.914.82
22079013.920
22585813.924.89
23093013.930.07
------------------------------
3050913.9-0.22
3152113.90.65
3253613.91.73
3355013.92.73
3456513.93.81
3557913.94.82
31064813.99.78
31571813.914.82
32078913.919.93
32585813.924.89
33093013.930.07
------------------------------
4051513.90.22
4152713.91.08
4254013.92.01
4355413.93.02
4456713.93.96
4558113.94.96
41064913.99.86
41571713.914.75
42078513.919.64
42585313.924.53
43091913.929.28
This site uses User Verification plugin to reduce spam. See how your comment data is processed.