Current measuring circuit for oscilloscope (diy current probe) - Page 1
Forum section: electronics / projects

author: Mike540
author_rank: Newbie
timestamp: July 31, 2025, 03:02:20 pm
content: I'm building a pcb with various current sensors that I can plug into an oscilloscope. Loosely based onhttps://www.st.com/resource/en/design_tip/dt0006-a-low-cost-current-sensor-for-design-work-stmicroelectronics.pdfand some other sources.One sensor I wanted to try out is a current sense amplifier. My question is, is it theoretically okay to connect everything as depicted below? Am I not breaking any rules about where you can connect an oscilloscope's ground, or how the current sense amp has to return the input bias currents to the 24V power brick?I previously planned to connect the minus node of the 24V power brick powering the motor, to the minus node of the 5V USB battery powering the current sense amplifier (the AD8411A's datasheet pg2 shows it like this), but then, if I connect the oscilloscope ground to that minus node, my output signal would be upshifted 2.5V. And if, in that configuration, I connect the oscilloscope ground to the 2.5V rail splitter output, I can't connect a normal voltage probe's ground clip to any other node at the same time(?).

author: UnijunctionTransistor
author_rank: Frequent Contributor
timestamp: July 31, 2025, 03:15:31 pm
content: Definitely you require to add galvanic isolation between the current sensing element and the scope.There are many ways to achieve this, the optimal solution being compromises between performance, complexity and cost.Personally, I would replace the shunt resistor with a hall-cell based sensor.But that is only me. I am sure there will be many more opinions.EDIT; the LEM current sensor in your linked app note is precisely a hall-cell device.

author: SCSKITS
author_rank: Regular Contributor
timestamp: July 31, 2025, 07:04:28 pm
content: Take a look at the AMC1200. It is an optically isolated current monitor that needs a sense resistor and a few other parts on the HV (24V) side and provides a gain of 8 and a ground referenced output for an ADC. Input and output are optically isolated..

author: Mike540
author_rank: Newbie
timestamp: August 01, 2025, 09:30:00 am
content: Quote from: UnijunctionTransistor on July 31, 2025, 03:15:31 pmI have a position for a CKSR 6-NP and a ACS724 on the PCB. I'll be testing out those first. I added a position for a current sense amplifier because I wasn't sure if I would need more sensitivity, or if magnetic interference would be a problem with the hall effect sensors.But, why is galvanic isolation required and not merely optional? Is anything bad theoretically likely to happen if I run that circuit as depicted, with the oscilloscope earth node, the rail splitter's output node, and the minus terminal of the 24V brick (which I presume is galvanically isolated within the brick), all connected together?Quote from: SCSKITS on July 31, 2025, 07:04:28 pmLooks okay... Bit borderline on the rise time. I think the signal I want to track is going to rise in about 6us. Not pin compatible with what's on the first batch of boards, so it'll have to wait.

author: UnijunctionTransistor
author_rank: Frequent Contributor
timestamp: August 01, 2025, 02:01:06 pm
content: Ok, in this particular instance, since you are only using 24 volts, AND ASSUMING that said supply is a fully floating battery, your proposal could be satisfactory.Power supply bricks though, although isolated, could have dozens of pF across transformer windings and common mode filters, which could provide a low impedance path at the switching frequency.You asked for comments, I have provided them in good faith and to the best of my experience. Whether your proposal is satisfactory or not, you would have to test it. Prove your hypothesis.

author: Mike540
author_rank: Newbie
timestamp: August 01, 2025, 03:16:21 pm
content: Hm... At this stage, I'm satisfied that I'm unlikely to damage the scope with this, and I'll start with the hall effect sensors anyway. Back in 1-2 weeks when I get parts. Thanks.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 01, 2025, 05:31:54 pm
content: Quote from: UnijunctionTransistor on July 31, 2025, 03:15:31 pmWhy?I don't see a need for this. As shown, it's a stepper motor being fed from an already isolated 24V power brick.For the rest, it's just an opamp used in a differential amplifier configuration. The circuit topology is very similar to the "high voltage differential probes" as commercially sold for oscilloscopes.Quote from: Mike540 on July 31, 2025, 03:02:20 pmAs long as your 24V power brick itself is isolated (I.e, it's secondary 24V is not connected to earth) then there is no danger for the oscilloscope. When you are in doubt, you can connect a fuse in series with the scope GND lead.I also don't see any problem with the opamp bias currents. They have a DC path to their own power supply.In the commercial circuits, the inputs of the differential probe are used without an additional (hard) connection between the circuit you're measuring, and your measuring equipment. This introduces a lot of common mode noise, and common mode noise suppression is one of the main design goals of such probes.You probably do have a problem with the common mode voltage on the opamp inputs. Your differential amplifier is amplifying 50x, and the inputs of the opamp have a common mode swing of (1- 1/50) = 95% of the 24V power supply.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 01, 2025, 06:00:58 pm
content: Quote from: UnijunctionTransistor on August 01, 2025, 02:01:06 pmWho cares about a few pF?If your 24V brick is of decent quality, then the secondary is safe to touch.Normally the outside of the BNC's of your scope is connected really hard to the earth pin of the mains power plug. I just did a test:Unplug my scope (Rigol DS1052E)Connect a DC power supply between the BNC and the earth pin.Put 1A of current though it.Measure the voltage drop from the BNC shell to the earth pin.I measured 1.8mV. So a resistance of 1.8m Ohm. With a normal scope, the BNC connection to the earth plug is designed to handle the full mains power current. It is designed so that in case of a short between the mains power and the shell of the BNC, the mains fuses in your house blow (and the GFI, or whatever is first, or both).If you make a mistake then it's most likely that your scope probes vaporise first, but without damage to the rest of the scope. Your scope probes are not designed to handle 16A, but the connection between the BNC of the scope and the earth pin probably is designed to do just that.Just have a look at a teardown of any scope. The BNC plugs are usually directly connected to the steel chassis of the scope, and the earth pin is also connected with a relatively thick wire to the same metal frame.If there is too much leakage over the 24V power supply, then the GFI or RCD will trip.

author: UnijunctionTransistor
author_rank: Frequent Contributor
timestamp: August 01, 2025, 10:24:31 pm
content: I am going to repeat myself;You asked for comments, I have provided them ingood faithand to the best of my knowledge, which is not infinite. If the comment doesn’t apply to the situation, then fine. I am not making a profit from it.There is a reason I initially advocated isolation, and it wasn’t because of a shock hazard.

author: SCSKITS
author_rank: Regular Contributor
timestamp: August 17, 2025, 08:11:38 pm
content: Agree, simple and easy to design. Used this part to measure current in test rigs.

author: Mike540
author_rank: Newbie
timestamp: August 26, 2025, 02:23:16 pm
content: Finally got through testing all the current sensors I got.Used an A4988 stepper driver to drive a 25Hz current waveform through a stepper motor.I've just been attaching the oscilloscope's voltage probe to the circuit output for now instead of soldering on the BNC connector.Used 0.12 Ohm sense resistors with the current sense amplifiers.AD8411Abandwidth 2.7MHz, CMRR 96dbGain 50V/V, shunt resistor 0.12 Ohms -> = 0.12V/A, *50 = 6V/A~400mA pk -> 2.4V pkCan see staircase waveform from 1/16 microstepping.Can make out chopper waveform as depicted in A4988 driver's datasheet.Triggered while voltage scale set to higher sensitivity. Chopper waveform quite noisy.Different capture.INA240A1DRbandwidth 400kHz, CMRR 93dBGain 20V/V, shunt resistor 0.12 Ohms -> = 0.12/A, *20 = 2.4V/A~1A pk -> 2.4V pkCan see staircase waveform from 1/16 microstepping.Can just make out chopper waveform with oscilloscope ERES function (some sort of moving average).Aside, I encountered a few reasons to not use a USB battery for this.- micro usb connector too fragile- voltage maybe not that accurate (~5.13V measured)- battery bank turns itself off after 20s or so of insufficient loadShould probably just try a 9V battery with a better regulator. LP2950 looked good.The pcb is a mess of pads I just jumped with wire fragments to connect and power the different sensors one at a time.Might try some analog multiplexer instead if I order another set of boards.

author: Mike540
author_rank: Newbie
timestamp: August 26, 2025, 03:04:56 pm
content: Also tried probing both sides of a 1 Ohm 10W resistor and using the oscilloscope's math function to subtract them.Also tried a 1 Ohm 0.25W (or so) resistor, but it wasn't any better.2-voltage-probe subtractionUsing TMC2209 driver, ~1A pk.Yellow, Magenta = voltage either side of shunt resistor. Cyan = index pulse. No staircase because this driver interpolates to 1/256 microsteps.There's something at around the expected chopper frequency, but the wave doesn't have the expected shape, and it's mostly only visible with the ERES function (moving average?).Using A4988 driver.Staircase waveform visible.Something at expected chopper frequency visible, but again, it's not quite the expected shape, and it's mostly the ERES function doing a lot of work.

author: Mike540
author_rank: Newbie
timestamp: August 26, 2025, 03:28:11 pm
content: Hall effect sensors.CKSR 6-NP417mV/A sensitivity, bandwidth 300kHz.Using TMC2209 driver.Can at least measure the overall waveform. No staircase because TMC2209 driver uses 1/256 microstepping.No discernable signal at expected chopper frequency with this sensor.Odd noise ~20mV at around 450kHz, even with zero current. There's <10mV of noise on the power pin at these frequencies.Not sure if this is just the limit of what the sensor is capable of, or if my circuit needs better layout or more decoupling capacitance (see schematic/pcb files above).ACS724LLCTR-2P5AB-T800mV/A sensitivity, bandwidth 120kHz.Using A4988 driver.Overall waveform. Staircase just visible.No visible signal at expected chopper frequency.CC6920SO400mV/A sensitivity, bandwidth 250kHz.Using A4988 driver.Overall waveform. Staircase just visible.No visible signal at expected chopper frequency.