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.
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!
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.
@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.
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
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..
A/Ds don't like negative voltages.
Could bias the pin mid-voltage by using a voltage divider to VCC to fix that.
the ADC im using has a "differential mode". could i use that? is this what your talking about? link
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)