[Question] Precision Voltage and Current Measurment ways for E-Load - Page 1
Forum section: electronics / projects

author: IamSynthetiC
author_rank: Regular Contributor
timestamp: June 07, 2020, 07:20:50 pm
content: Greetings,I have recently received an Electronic Load Kit from eBay, very standard stuff as eBay electronic loads go. But, in the past few days i have been trying to design an arduino centered controler with en external precision ADC and DAC mounted on a custom-build-pcb aruino mega. it is a big project all-around, and as it is still at its infant stages, any ideas are free to be as "destructive" as they need to be.The features i want to implement are the following:Temprature Monitoring.Fan speed control.Interfacing and Data-logging.Precise Voltage and Current measurment.Software controled CV,CP,CR Modes.Varius safety features.Before i describe my problem, i need to point out thati am a beginer, and i need to be treated as such. (google has allready filled my mind with fancy electronic terms and words that i do not understand, i feel like i had enough).My problem lies in the voltage and current measurment area. I want the load to receive voltages up to 30-40 Volts and perhaps 10 Amps (unlikely, i know).I do not want to simply linearly scale the input to the ADC, as i feel it is "lazy" and lowers the resolution.I have found and article named"Optimize High-Voltage Measurements withSelf-Adjusting Attenuator", and theSelf-Adjusting Attenuatorimmediately cought my attention, as it seems to be everything i need.link to article:https://www.electronicdesign.com/technologies/test-measurement/article/21801410/optimize-highvoltage-measurements-with-selfadjusting-attenuatorAllas, i have been googling the word Attenuator for the whole evening and i get nothing.I have though about replicating the schematic, but the voltages and currents seem (to my undestanding) too much for the comparators, and the OpAmps. Wouldnt they just break? . And wouldnt such a design affect the current measurment ? (or the current measurment, would affect the voltage ?)Pplus, all this talk about the impedance of the load completely goes over my head.)So, to conclude. Is the self-adjusting attenuator a good idea? Is there any other good and reliable way toaccuratelymeasure voltage and current?Thanks for you time.Have a good day.

author: MasterT
author_rank: Frequent Contributor
timestamp: June 07, 2020, 10:28:30 pm
content: I think, the correct name is "folding adc architecture". Idea was around since 1956, according to Analog Device:https://www.analog.com/media/en/training-seminars/tutorials/MT-025.pdfNot really good, since it's just extending existing ADC resolution by 3 more bits, same time linearity of the analog circuitry has to be better than LSB, or 0.01% with arduino 10-bits internal ADC. Easier to use 18-24 bits SigmaDelta external converter and common Resistive Divider.

author: IamSynthetiC
author_rank: Regular Contributor
timestamp: June 08, 2020, 12:20:13 am
content: Thanks for the info. Folding ADC architecture does show more results on google, plus the link you provided is filled with information. I am going to to read more into them tomorrow.Regarding the ADC, i forgot to mention i had already selected the TI ADS1262IPW Precision, 32-bit, ΔΣ ADC .( why 32bits? for further experimentation).32-Bits are more than enough to measure voltages accurately accros the range of 0-50 V, therefore i'll have to aggree that a simple voltage divider is the simpest solution.But i can not help but feel that it is an inelegant solution (even if it isnt). I feel like some of the resolution will be wasted, and while there is plenty of it to waste, i would like to have to option of preserving it with smaller ADC's.Also, wouldnt a voltage divider change its behavior with a variable load ?

author: MasterT
author_rank: Frequent Contributor
timestamp: June 08, 2020, 12:51:30 am
content: Not sure I understand a question. Voltage divider scales input range to norm acceptable by ADC. Be realistic, resistive divider is usually most accurate part, well after calibration. There are more things susceptible to errors, voltage reference, interference, temperature etc.How precise voltage measurements needs to be? Microvolts at 40V level?

author: IamSynthetiC
author_rank: Regular Contributor
timestamp: June 08, 2020, 09:20:05 am
content: I was talking about this :am i missing something ? (link is :http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html)As for the resolution, i really dont need microvolt range, millivolts are fine. I am asking though, for ways i can use the hole spectrum of an ADC for a set signal, outside of this project, for when using an arduino 10-Bit ADC for example.For the voltage measurment i'll stick with the voltage divider as you have suggested.For the current measurment, i am aware of two options.Some integrated sensorShuntI have worked with integrated sensors before on the arduino. I used an INA226 (CJMCU-226) module and it was extremely precise and accurate downt to the millivolts.The code however explained that the sensor is old and can take a measurment every 2-3 seconds or so. I tried taking data from it every 1 second but they would always arrive after 1.3 to 2 seconds. Data rate will play a major role in the software controlled modes, therefore i scrapped the idea of using this. Are there any other alternatives ?*EDIT: The INA226 Datasheet clearly states that Convertion and Averaging times can be scaled from ms down to μs, so clearly i need to do some more research on the library i used to set these times.As for the shunt method, it seems like a more complicated circuit based on a very simple principle. I have never worked closely with amplifiers before and i dont really know what to expect. I am waiting on some LM386 (audio amp), LM324N (Quad OpAmp) and LM393P (Dif-Comparator) ICs to play around with.But until then, aren't these sensors/modules based on the same principle as the standaloen shunt? and if so, what are the advantages of building my own circuit, when i can get a specialized and optimized one for my type need ?

author: MasterT
author_rank: Frequent Contributor
timestamp: June 08, 2020, 12:44:50 pm
content: To avoid errors introduced by loading divider, use a buffer OPA, arduino Mega has internal, plus it has optional differential configuration for inputs.Can't comment on INA226, I played with ACS712 - galvanic isolation great advantage, safe to measure anything AC, DC, high side/ high voltage. There are many kind off, ACS758, with different ranges 5-10-20 Amps, search hall current sensor.Where did you get ADS1262IPW? I wish to have one, $350 evaluation board from TI ?

author: IamSynthetiC
author_rank: Regular Contributor
timestamp: June 08, 2020, 01:23:59 pm
content: I found it on LCSC as standalone, i planed to copy the Layout Example to the letter, but i do want to have a look at the evaluation board. What does it do?What is it for? Who is it for ? Is it worth it ?As for the current sensor, i think i am now presented with 2 paths:1.)Now that i know the INA226 can perhaps be faster, i can use that sensor only. I (again) forgot to mention, this sensor communicates with the arduino through SPI, and reports both Voltage aswell as Current and Power. Therefore i can drop the whole "external ADC" idea and move on to the rest. This is the preferable option as the arduino ADC can handle the temprature sensors (i assume).2.)I can continue as planned (ADC and all) by using the hall sensor. The ACS lineup seems very intresting, i think i will order one or two regardless of the INA225 results, so i can test their accuracy and stability. My primary concern is whether they will be able to drive to other modes (CV,CP,CR) sufficiently well (with low enough noise and deviations down to a milivolt perhaps). I'll have to do the math.

author: MasterT
author_rank: Frequent Contributor
timestamp: June 08, 2020, 01:46:55 pm
content: I'm not advising eval board, 32-bits adc for beginners is wrong choice.Internal adc with PGA (arduino Mega) brings you close to 18-bits (10-bits adc and 200x PGA). Plus, there is a MUX, for measuring both current - voltage inputs, fast conversion rate - 1000x faster than external module, and switchable reference voltage.Problem with a library, likely atmega data sheet has to be read thoroughly.

author: IamSynthetiC
author_rank: Regular Contributor
timestamp: June 09, 2020, 07:23:04 pm
content: I took the time to conduct some experiments with the INA226.The library i used was indead the problem, i used the INA-Master library as it offerede all the possibl configurations for any INA device (though few were tested by the developer, the INA226 fortunately was). I gave it some reasonable seetings (in the middle, beetwing accuracy and speed), and started the expirement.I had the device measuring the current and voltage going to a small blue LED from my power supply, and had my two multimeters monitoring those two aswell.The code itsellf was as simple as possible, to not load the arduino with extra code, with only a serial connection to a PC where i would extract the data from.Right away, the INA226 seems to need 9-10 ms to make a measurment, which i believe it is fast anough for my purposes, but for some loads its should be faster.The voltages where exremely accurate and consistent. My Keithley gave me a Median of 2.99578V where the INA226 gave a 2.99678, which is a ~0.002V diference.The standard deviations where too very close, both sitting at ~0.002.So the INA226 seems to agree with the Keithly so far on my power supply's regulation.The results for the currents were not as good . It is important to mention that an HP3457A was doing a High-Side current measuring and its results were 13.896322 +- 0.02mA while the INA226 gave 0.16000 +- 0.005A (or 160 +- 5 mA which is about 10-plus times more than expected. This deviates from the HP about ~291 times.I will test this further when i get the chance.Also the resolution was 1.25mV and 0.2mA which are both good enough.Any thoughs ?I have placed the order for an ACS hull sensor and I will test it also when it arrives. I'll post my results then

author: IamSynthetiC
author_rank: Regular Contributor
timestamp: June 13, 2020, 09:37:54 pm
content: GreetingsI experimented again with the INA226, and ultimately decided to drop the module, as with a loaded arduino code it took about ~100ms to report any values. That is too slow for my needs.I have taken the time to design a PCB to see whether i can fit everything on it. I have fitted almost everything, but i now dont know where to place the ADC (and where to make the voltage measurment), as i am worried about noise from the switching power supply, the coils of the relays, the digital lines of the arduino etc. Where should i place it? Where is the place with the least noise? Any special way to route it? Can i shield or filted the noise somehow ?I have attached bellow pictures of my PCB.some details :The Electronic load is not on this board. It is on another board whitch will be underneath this one.The Switchin Mosfets for the load will beunderneathand along the top of the PCB (inside the green rectangle).Keep in mind the board is nor ready yet, but feel free to point out any ideas, or mistakes you see (there will probably be alot of them).Thank you very much and have a good day.