arduino-libraries / RTCZero

RTC Library for SAMD21 based boards
http://arduino.cc/en/Reference/RTC
GNU Lesser General Public License v2.1
77 stars 78 forks source link

Time delay when measuring higher current (with current transformers) from ADC #43

Open Oretoh opened 5 years ago

Oretoh commented 5 years ago

My board is an MKR WAN 1300. So I have an issue where a delay of the RTC happens when using a library called Emonlib with their specifications. The issues happens when currents read have higher values, but only in constructs/system that use a certain current transformer sensor SCT-013-000 (whereas the main difference for other sensors is that it requires a burden resistor). Other constructs/systems that use a SCT-013-100 (built-in burden resistor) remain fine even after high currents are being passed.

The other difference is that in SCT-013-000 i have to use analogReadResolution(9) to get decent values while with SCT-013-100 I require analogReadResolution(12).

I am powering the current Transformers (CT) with Vcc (3.3V) so the voltage values cannot be bigger than that following the specifications here .

Obviously, there is something going on with the voltages but I assume (due to the analogReadResolution values) that the fault lies on the one pulling less voltage to create a measure.

The sensor also measures three phases so using the specification on the website mentioned above I copied the same specification three times over and the output + burden of the 3 CT connect to ADCs 1, 2 and 3 in the board

My question here is, can low voltages on ADCs cause this issues, or, should I move my outputs to ADCs 0, 5 and 6, since on the tech specs of the board external interrupts are defined also at A1 and A2?