Go Down

### Topic: AC Current Sensing Using A Shunt Resistor (Read 1 time)previous topic - next topic

#### super7800

##### Oct 23, 2019, 07:01 pmLast Edit: Nov 03, 2019, 08:37 pm by super7800
EDIT: the project has changed quite a bit. jump to post #9 for details.

hello all.

for a project i am doing i need to measure 4 current points using an arduino. i know that there exists premade solutions, such as the ACS712ELCTR-20A-T current sensor. however, i like to actually create circuits and try to understand them, rather than just using a off-the-shelf solution. also doing it this way will be cheaper.

so what i want to-do is have a circuit using a shunt resistor on the low-side (i.e. return current), and amplify it using an op amp. it will be a 24vac system, so a transformer isolates it from mains. also, the "drive" side of the design is completely isolated from the microcontroller side.

perhaps something like this:

i need roughphly 0-10A (7.5A theoretcal max), with resolution of +- 0.05A. i could live with +-0.1A resolution though.

there are lots of examples of this for dc:

TI example

other example

since this is for a diy jbc soldering station, i figured i might use the design they used.

here is a link to a gallery showing the jbc design and my interpretation of it. it looks nothing like other designs, so they might be doing something weird. Gallery

any help/ suggestions for designs are appreciated. i cant find anything specifically for ac online. thanks!

#### rtek1000

#1
##### Oct 23, 2019, 07:30 pm
Looks like waste of resources. Why not use a current transformer?

#### MarkT

#2
##### Oct 24, 2019, 02:20 am
You've given the opamp a negative rail voltage of 0V, so it cannot handle AC across the shunt.  You'd need a negative voltage supply to allow the opamp to handle negative voltages.  However the OPA335 will handle input voltages down to 0.1V below the negative rail, but not in a non-inverting amplifier circuit.

Using a shunt will break the isolation barrier between the 24Vac and microcontroller.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### super7800

#3
##### Oct 24, 2019, 03:31 pm
thanks for the responses so far!

@rtek1000 seems a bit overkill/ expensive? all components for this must (should) be smd. thanks for the suggestion though. i might look further into it.

@MarkT my bad, i should have specified more. the simplified schematic of my "drive side" can be seen below.

the op-amp schematic was not my own, but thanks for the input. i guess that one was only for DC, like so manny of the ones i've found online.

the shunt will not break the isolation. my bad for not providing details. the signal goes to a ADS1115IDGSR‎ ADC. then, the i2c signal from the ADC goes into a MAX14850ASE digital opto isolator. the microcontroler/ user assesable side is completely isolated from the "drive side". seperate power supply, grounds, and on the pcb about 1/2" physical seperation between the two sides.

since this is a soldering station based on jbc station, i got a picture of the PCB and copied their design to the best of my ability. would something like this work: click here for the gallery.

here is the "simplified" schematic for the drive-side. hope its clear.

if anyone sees problems with my design, please share. also, any suggestions for a current shunt circuit are greatly appreciated.

THANKS!

#### herbschwarz

#4
##### Oct 25, 2019, 04:01 am
The upper 453K resistor is the feedback resistor and should connect to
the OP07 pin 6 (output) instead of +5V. The other 453K resistor is
good connected to gnd.
Herb

#### super7800

#5
##### Oct 26, 2019, 07:14 pm
ok thanks! i was basing it off of a picture of how the jbc does it.

here is an updated schematic of my planned implementation:

thanks! any further problems/ suggestions for this are appreciated! thanks!

#### Wawa

#6
##### Oct 27, 2019, 12:44 am
You're feeding a ground-referred AC signal into the A/D (assume you mean A/D, not DAC) with that circuit.
A/Ds don't like negative voltages.
Could bias the pin mid-voltage by using a voltage divider to VCC to fix that.
Change 1k? to 10k, and add another 10k resistor between A/D pin and Aref of the A/D (5volt pin?).
Zero current now results in an A/D value of ~512, with deviations from that.

Hope you do understand that "curent flow" must be 'floating' (no galvanic connection).
If that's not possible, then read post#1 again.
Leo..

#### super7800

#7
##### Oct 28, 2019, 03:28 pm

could you explain further on
Quote
A/Ds don't like negative voltages.
Could bias the pin mid-voltage by using a voltage divider to VCC to fix that.

here is the "full" schematic of the system. note that the i2c bus is optically isolated from the micro-controller (the micro-controller/ user accessible side has completely separate transformer supply)