Trying to make an autoswitching uCurrent - Page 1
Forum section: electronics / projects

author: MarkBng
author_rank: Newbie
timestamp: May 03, 2024, 09:10:01 am
content: Hi,First I want to make my compliment to David. What a great device is the ucurrent. I want use his ucurrent measurement device to make a cheap uWatt meter to measure the power of IoT devices. So there is a voltage in, probably a chip bead and capacitors to have a clean output power. Focus will be to measure the endurance of the battery for instance of LoRa devices.The device is powered by battery or an external power supply. Maybe both. Not sure about that yet, but I will use a power supply in the beginning. Optional things are USB, SD card or ethernet to make it possible to log the power usage over a certain time. I want to make a cheap device that can measure this power.But first I am looking for a good way to make the current autoswitching.The current uses 3 shunt resistors/3 branches to measure the current:10k Ohm for nA range10 Ohm for uA range0.01 Ohm for mA and A rangeThe 3 branches will be controlled by a micro controller and this micro controller will also measure the current with integrated ADCs.My problem are these branches. I will use probably use Nets to switch between these branches. I have attached the schematic of the branches.So my problem is the 10k branch. If I disable the other branches (VGS=0) the leakage current through branch 2 and branch 3 must be very low(low IDSS). The shunt of branch 1 is 10k. But the leakage through branch 2 or 3 must be in the order of pico Amps to still have a good nA range. Is that possible? I think I should especially look for a N-FET with a very low IDSS. Which FET do you recommend? The max current is probably 2A. The max voltage of the FET is 60V (VDSmax). Do you recommend having all Nets the same or should I choose for a different N-FET for the high current branch (0.01 Ohm/2A max)? But this FET must have a low IDSS as well. The bigger currents, up to 2A will be measured by the 0.01 shunt and will be measured after the first op amp (10x). Op amps will be powered by 3.5V, so the 100x output will not cause any problems with the ADC inputs.I will probably use op amps with an enable to select the right shunt voltage that will be amplified. Op amp multiplexer (with TLV9062S).How about this IDSS? If the 10k shunt is active and the IDSS is 50nA, will there be a loss of 100nA through the other 2 branches or is that not the case because most current will go through the lower resistant 10k? I know, that's not a low value, but is it relative small against the hopefully much higher resistance of the other branches?I know that there are some challenges.... How to switch between the branches without interrupting the power and how to have still a good measurement. That's not easy.Thanks in advance for your help.Best regards,Mark

author: Terry Bites
author_rank: Super Contributor
timestamp: May 03, 2024, 02:16:56 pm
content: Use latching relays

author: Sensorcat
author_rank: Regular Contributor
timestamp: May 03, 2024, 08:02:22 pm
content: Indeed not easy (All measurement instruments show undefined behaviour for a short period of time during transition between ranges.)! And do you really need it for the application you describe?IoT devices usually have different modes with much different power consumption from mode to mode, but not during each of the modes. So you need different measurement ranges for the different modes, but not to monitor power during a period with a fixed mode. A possible pedestrian solution:Find out about the modes your device has.Identify the percentage of time in each mode.Measure the power in each mode, using a fixed range.Integrate for average power, total charge over time, battery life.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 04, 2024, 03:47:37 am
content: Use active I/V conversion (opamp) with all 3 resistors in series, lowest value going to the input side. The two lower ranges are bypassed with back to back diodes. Then use a mux to select which point to tap off from. Or use 3 separate ADCs and have the software determine which reading to use.