Forums

small (3A) AC current measurement

Started by Luis Perez November 25, 2011
Hi guys,

I'm trying to measure resistance, current, and voltage of a resistor
(heater) connected to a 0-24V @ 3A transformer.

The heater's consumption is actually 2A max., and I'd be controlling
it with a triac driven with an 8-bit micro, which I'd also use to get
the above readings and send them to the host.

This is my initial layout:

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BziRtOXljuLhOTRlZDVhYTgtMWI4ZC00ZjQ0LWIxMzQtM2M1YTBiMTk1NDlm&hl=en_US

As the transformer only has 0-24V output, and I'm using the usual op-
amps + shunt configuration, my main worry is that what I've done is
actually electrically safe.

Also, any other comments are also very welcome, including suggestions
as per the op-amps (part) to use, about the layou itself, etc.

This is the "pseudo-code" I more or less have in mind for it:

http://pastebin.com/X9QeJWgg

Cheers,

Luis Perez wrote:
> Hi guys, > > I'm trying to measure resistance, current, and voltage of a resistor > (heater) connected to a 0-24V @ 3A transformer. > > The heater's consumption is actually 2A max., and I'd be controlling > it with a triac driven with an 8-bit micro, which I'd also use to get > the above readings and send them to the host. > > This is my initial layout: > > https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BziRtOXljuLhOTRlZDVhYTgtMWI4ZC00ZjQ0LWIxMzQtM2M1YTBiMTk1NDlm&hl=en_US > > As the transformer only has 0-24V output, and I'm using the usual op- > amps + shunt configuration, my main worry is that what I've done is > actually electrically safe. >
If "N" means the neutral wire and not protective earth then no, it is not safe. In pretty much all jurisdictions I've dealt with it isn't allowed unless the whole thing is fully isolated per their requirements. It says "Earth Ground" at the transformers so it must be connected to PE, not N. Also, the schematic doesn't say whether the two kinds of ground are connected and where. So the dividers at the opamp inputs can be floating which wouldn't be cool. Put some values on the resistors so we can all see whether it's ballpark accurate. Usually large values for the dividers and then a low-ohms shunt won't be so stellar for accuracy. Can you ground one side of T16's output? That would make life a ton easier.
> Also, any other comments are also very welcome, including suggestions > as per the op-amps (part) to use, about the layou itself, etc. >
The triac might need a snubber. Depends on the type.
> This is the "pseudo-code" I more or less have in mind for it: > > http://pastebin.com/X9QeJWgg >
I'll leave that to the code gurus :-) -- Regards, Joerg http://www.analogconsultants.com/
Hi Joerg,

On 26 nov, 00:10, Joerg <inva...@invalid.invalid> wrote:
> Luis Perez wrote: > > Hi guys, > > > I'm trying to measure resistance, current, and voltage of a resistor > > (heater) connected to a 0-24V @ 3A transformer. > > > The heater's consumption is actually 2A max., and I'd be controlling > > it with a triac driven with an 8-bit micro, which I'd also use to get > > the above readings and send them to the host. > > > This is my initial layout: > > >https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0Bz... > > > As the transformer only has 0-24V output, and I'm using the usual op- > > amps + shunt configuration, my main worry is that what I've done is > > actually electrically safe. > > If "N" means the neutral wire and not protective earth then no, it is > not safe. In pretty much all jurisdictions I've dealt with it isn't > allowed unless the whole thing is fully isolated per their requirements. > It says "Earth Ground" at the transformers so it must be connected to > PE, not N.
Sure. "Earth Ground" is the actual iron core.
> > Also, the schematic doesn't say whether the two kinds of ground are > connected and where. So the dividers at the opamp inputs can be floating > which wouldn't be cool. >
My fault as well. I did draw that in a rush. "N" is actually protective earth from mains, but the question behind it was how would one procceed when a center-tapped secondary is not available, yet a ground reference is needed. I guessed I should not be using the one given by the rectifier + lm7805, not that using chassis ground looked any better, but I'm now thinking that if T20 weren't present at all, I should just hook a rectifier hanging off T16's secondary even if it's just to get a ground reference. Am I right here?
> Put some values on the resistors so we can all see whether it's ballpark > accurate. Usually large values for the dividers and then a low-ohms > shunt won't be so stellar for accuracy.
Well it's just an inital layout, not even parts have been selected, but I was thinking just in what's needed to scale (24 * 1.414) down to +2.5V, and -2.5V for the other input (or whatever else the selected part's datasheet can stand. (Guess input-range amplitude, doesn't affect op-amp's precission). I've zero experience in the analog field, though, so that on it's own needs more research. I'm reading the art of electronics, among others for this. As per the shunt, will be a hand-wound piece of wire giving me very low ohmic value at the required wattage, 0.01 or the like, or a coil, which I've also been employed in other circuits for this same purpose.
> > Can you ground one side of T16's output? That would make life a ton easier. > > > Also, any other comments are also very welcome, including suggestions > > as per the op-amps (part) to use, about the layou itself, etc. > > The triac might need a snubber. Depends on the type. >
Thanks. It also seems that I need to struggle with R154, and perhaps add another resistor at the triac's gate, as it will somehow related to the quadrants the triac will open. I've seen triacs designed for opening at specific quadrants (like nxp's bt136), and others that can open "anywhere", or at least their datasheets mention (Igt) at each quadrant (like ST's TLC86B), which is another one I've got at hand. I do know triac's will close on their own at zero crossing.
> > This is the "pseudo-code" I more or less have in mind for it: > > >http://pastebin.com/X9QeJWgg > > I'll leave that to the code gurus :-) >
No probs. But in general, does the circuit makes sense to you? I basically open the triac when the wave goes from 0 to +ve, and while it's open, for a cycle I read maximum positive and negative peaks before the shunt, and only max. positive peak after it. This way I can know voltage and current, and then can use ohm's law to find out resistance of the heating element. I'm using peaks instead of RMS because I guess is what I should use for this calculation. Another idea I had in mind is placing a similar circuit behind the triac, such that when I turn the triac off, I still can use a mosfet or other to let 5 volts DC or so through the heater and be able to monitor how it's resistance drops. This would be for both, allowing me to keep a constant temperature more precisely, and monitoring how the resistance drops back to room temperature according to different environmental conditions. But for now I'm more concerned with getting the initial circuit working. Can't wait to see voltage, current and resistance on my laptop's screen in "real time". It's gonna be quite an achievement! hehe. Regards,
> -- > Regards, Joerg > > http://www.analogconsultants.com/
In article <e616fe83-3348-4c7f-8cf6-bc86df0bb7f9
@l24g2000yqm.googlegroups.com>, lp.guanche@gmail.com says...
> > Hi guys, > > I'm trying to measure resistance, current, and voltage of a resistor > (heater) connected to a 0-24V @ 3A transformer. > > The heater's consumption is actually 2A max., and I'd be controlling > it with a triac driven with an 8-bit micro, which I'd also use to get > the above readings and send them to the host. > > This is my initial layout: > > https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BziRtOXljuLhOTRlZDVhYTgtMWI4ZC00ZjQ0LWIxMzQtM2M1YTBiMTk1NDlm&hl=en_US > > As the transformer only has 0-24V output, and I'm using the usual op- > amps + shunt configuration, my main worry is that what I've done is > actually electrically safe. > > Also, any other comments are also very welcome, including suggestions > as per the op-amps (part) to use, about the layou itself, etc. > > This is the "pseudo-code" I more or less have in mind for it: > > http://pastebin.com/X9QeJWgg > > Cheers,
The way you have your opamps they will operate with no feedback and thus work more like voltage comparators with their outputs saturated at either VCC or GND. Not so useful for feeding into an A/D converter. -- Michael Karas Carousel Design Solutions http://www.carousel-design.com
Luis Perez wrote:
> Hi Joerg, > > On 26 nov, 00:10, Joerg <inva...@invalid.invalid> wrote: >> Luis Perez wrote: >>> Hi guys, >>> I'm trying to measure resistance, current, and voltage of a resistor >>> (heater) connected to a 0-24V @ 3A transformer. >>> The heater's consumption is actually 2A max., and I'd be controlling >>> it with a triac driven with an 8-bit micro, which I'd also use to get >>> the above readings and send them to the host. >>> This is my initial layout: >>> https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0Bz... >>> As the transformer only has 0-24V output, and I'm using the usual op- >>> amps + shunt configuration, my main worry is that what I've done is >>> actually electrically safe. >> If "N" means the neutral wire and not protective earth then no, it is >> not safe. In pretty much all jurisdictions I've dealt with it isn't >> allowed unless the whole thing is fully isolated per their requirements. >> It says "Earth Ground" at the transformers so it must be connected to >> PE, not N. > > Sure. "Earth Ground" is the actual iron core. > >> Also, the schematic doesn't say whether the two kinds of ground are >> connected and where. So the dividers at the opamp inputs can be floating >> which wouldn't be cool. >> > > My fault as well. I did draw that in a rush. >
Could be worse. The ones I draw in a rush are often readble to only one person. Me ...
> "N" is actually protective earth from mains, but the question behind > it was how would one procceed when a center-tapped secondary is not > available, yet a ground reference is needed. >
Unless it is the standard in your country for some strange reason I would not call that "N" :-)
> I guessed I should not be using the one given by the rectifier + > lm7805, not that using chassis ground looked any better, but I'm now > thinking that if T20 weren't present at all, I should just hook a > rectifier hanging off T16's secondary even if it's just to get a > ground reference. Am I right here? >
If you keep T20. You could connect the bottom (anodes) of the rectifier to the top of T16. If you don't keep T20 but supply it from T16 you could use single-diode rectification and then ground one side of T20. Keep in mind that many opamps such as the LM324 can operate all the way to their negative supply pin with the inputs, actaully even to 300mV below that. Very practical for shunt measurements. Also, opamps don't necessarily need a regulated supply if this doesn't have to become a scientific instrument.
>> Put some values on the resistors so we can all see whether it's ballpark >> accurate. Usually large values for the dividers and then a low-ohms >> shunt won't be so stellar for accuracy. > > Well it's just an inital layout, not even parts have been selected, > but I was thinking just in what's needed to scale (24 * 1.414) down to > +2.5V, and -2.5V for the other input (or whatever else the selected > part's datasheet can stand. (Guess input-range amplitude, doesn't > affect op-amp's precission). > > I've zero experience in the analog field, though, so that on it's own > needs more research. I'm reading the art of electronics, among others > for this. >
Michael is right, your opamps do not amplify but only compare because tere is no feedback on U64 and U72. Read up on differential amplifiers, that shows how it's done if you must have it differentially. But if you ground one side of T26 you may not need that.
> As per the shunt, will be a hand-wound piece of wire giving me very > low ohmic value at the required wattage, 0.01 or the like, or a coil, > which I've also been employed in other circuits for this same purpose. > >> Can you ground one side of T16's output? That would make life a ton easier. >> >>> Also, any other comments are also very welcome, including suggestions >>> as per the op-amps (part) to use, about the layou itself, etc. >> The triac might need a snubber. Depends on the type. >> > > Thanks. It also seems that I need to struggle with R154, and perhaps > add another resistor at the triac's gate, as it will somehow related > to the quadrants the triac will open. >
And right now you have D4's gate shorted but I guess you've caught that already :-)
> I've seen triacs designed for opening at specific quadrants (like > nxp's bt136), and others that can open "anywhere", or at least their > datasheets mention (Igt) at each quadrant (like ST's TLC86B), which is > another one I've got at hand. > > I do know triac's will close on their own at zero crossing. >
The datasheet also says whether they need a snubber, usually. Not sure about low voltage triacs though, I mostly use big ones.
>>> This is the "pseudo-code" I more or less have in mind for it: >>> http://pastebin.com/X9QeJWgg >> I'll leave that to the code gurus :-) >> > > No probs. But in general, does the circuit makes sense to you? >
Except for the issues menioned above, yes. The whole grounding and supply thing needs some redesign. And you have to get the triac out of the equation. You may also need a driver for U60, not sure how much muscle your MCU port pins have.
> I basically open the triac when the wave goes from 0 to +ve, and > while it's open, for a cycle I read maximum positive and negative > peaks before the shunt, and only max. positive peak after it. >
With "open" you mean "conducting"? Remember that it triggers a little later in the half wave, needs to get above the trigger current threshold first.
> This way I can know voltage and current, and then can use ohm's law to > find out resistance of the heating element. I'm using peaks instead of > RMS because I guess is what I should use for this calculation. > > Another idea I had in mind is placing a similar circuit behind the > triac, such that when I turn the triac off, I still can use a mosfet > or other to let 5 volts DC or so through the heater and be able to > monitor how it's resistance drops. >
Nah, measuring around the peak of a half wave sould be fine ... but: You need to measure the voltage only across the load (or load plus shunt because the shunt can be calculated out), not across the load plus the triac like you have it now. A triac is not an ideal zero ohms switch. If you ground T16 on one side this becomes easy.
> This would be for both, allowing me to keep a constant temperature > more precisely, and monitoring how the resistance drops back to room > temperature according to different environmental conditions. But for > now I'm more concerned with getting the initial circuit working. > > Can't wait to see voltage, current and resistance on my laptop's > screen in "real time". It's gonna be quite an achievement! hehe. >
Well, good luck :-) -- Regards, Joerg http://www.analogconsultants.com/
On Nov 25, 11:27=A0pm, Luis Perez <lp.guan...@gmail.com> wrote:

> Hi guys, > > I'm trying to measure resistance, current, and voltage of a resistor > (heater) connected to a 0-24V @ 3A transformer. > > The heater's consumption is actually 2A max., and I'd be controlling > it with a triac driven with an 8-bit micro, which I'd also use to get > the above readings and send them to the host. > > This is my initial layout: > > https://docs.google.com/viewer?a=3Dv&pid=3Dexplorer&chrome=3Dtrue&srcid=
=3D0Bz...
> > As the transformer only has 0-24V output, and I'm using the usual op- > amps + shunt configuration, my main worry is that what I've done is > actually electrically safe. > > Also, any other comments are also very welcome, including suggestions > as per the op-amps (part) to use, about the layou itself, etc. > > This is the "pseudo-code" I more or less have in mind for it: > > http://pastebin.com/X9QeJWgg > > Cheers,
If there's a safety issue I'm not seeing it, as long as you relabel 'N' as 'E'. Your 9v transformer gives about 13v dc, leaving Vreg to drop 8v. You might as well run them off the 24v psu. The whole arrangement of multiple opamps seems odd. Starting with a differential stage might make more sense, with both inputs divided down to lower v. NT
On 26 nov, 16:18, Joerg <inva...@invalid.invalid> wrote:
> Luis Perez wrote: > > Hi Joerg, > > > On 26 nov, 00:10, Joerg <inva...@invalid.invalid> wrote: > >> Luis Perez wrote: > >>> Hi guys, > >>> I'm trying to measure resistance, current, and voltage of a resistor > >>> (heater) connected to a 0-24V @ 3A transformer. > >>> The heater's consumption is actually 2A max., and I'd be controlling > >>> it with a triac driven with an 8-bit micro, which I'd also use to get > >>> the above readings and send them to the host. > >>> This is my initial layout: > >>>https://docs.google.com/viewer?a=3Dv&pid=3Dexplorer&chrome=3Dtrue&srci=
d=3D0Bz...
> >>> As the transformer only has 0-24V output, and I'm using the usual op- > >>> amps + shunt configuration, my main worry is that what I've done is > >>> actually electrically safe. > >> If "N" means the neutral wire and not protective earth then no, it is > >> not safe. In pretty much all jurisdictions I've dealt with it isn't > >> allowed unless the whole thing is fully isolated per their requirement=
s.
> >> It says "Earth Ground" at the transformers so it must be connected to > >> PE, not N. > > > Sure. "Earth Ground" is the actual iron core. > > >> Also, the schematic doesn't say whether the two kinds of ground are > >> connected and where. So the dividers at the opamp inputs can be floati=
ng
> >> which wouldn't be cool. > > > My fault as well. I did draw that in a rush. > > Could be worse. The ones I draw in a rush are often readble to only one > person. Me ... > > > "N" is actually protective earth from mains, but the question behind > > it was how would one procceed when a center-tapped secondary is not > > available, yet a ground reference is needed. > > Unless it is the standard in your country for some strange reason I > would not call that "N" :-)
Hehe, actually N has more to do with L1 or L2 than with earth, I don't really know why I used that, but I changed it already.
> > > I guessed I should not be using the one given by the rectifier + > > lm7805, not that using chassis ground looked any better, but I'm now > > thinking that if T20 weren't present at all, I should just hook a > > rectifier hanging off T16's secondary even if it's just to get a > > ground reference. Am I right here? > > If you keep T20. You could connect the bottom (anodes) of the rectifier > to the top of T16. If you don't keep T20 but supply it from T16 you > could use single-diode rectification and then ground one side of T20. >
Call me ignorant, but I don't use to mix circuit's ground and earth ground. The real intent was to have an isolated ground reference for the secondaries. My worry was using the lm7805's ground because perhaps by mixing ac and dc I would be pulling the 7805 (and eveything connected to it) to -24V. I'm actually done a mess with understanding of ground after this thread.
> Keep in mind that many opamps such as the LM324 can operate all the way > to their negative supply pin with the inputs, actaully even to 300mV > below that. Very practical for shunt measurements. > > Also, opamps don't necessarily need a regulated supply if this doesn't > have to become a scientific instrument. >
Thanks. Well, the max accuracy acheivable, the better. T16 is needed anyways because will be powering the mcu.
> >> Put some values on the resistors so we can all see whether it's ballpa=
rk
> >> accurate. Usually large values for the dividers and then a low-ohms > >> shunt won't be so stellar for accuracy. > > > Well it's just an inital layout, not even parts have been selected, > > but I was thinking just in what's needed to scale (24 * 1.414) down to > > +2.5V, and -2.5V for the other input (or whatever else the selected > > part's datasheet can stand. (Guess input-range amplitude, doesn't > > affect op-amp's precission). > > > I've zero experience in the analog field, though, so that on it's own > > needs more research. I'm reading the art of electronics, among others > > for this. > > Michael is right, your opamps do not amplify but only compare because > tere is no feedback on U64 and U72. Read up on differential amplifiers, > that shows how it's done if you must have it differentially. But if you > ground one side of T26 you may not need that. >
Yes, I got the initial idea very wrong it seems.
> > As per the shunt, will be a hand-wound piece of wire giving me very > > low ohmic value at the required wattage, 0.01 or the like, or a coil, > > which I've also been employed in other circuits for this same purpose. > > >> Can you ground one side of T16's output? That would make life a ton ea=
sier.
> > >>> Also, any other comments are also very welcome, including suggestions > >>> as per the op-amps (part) to use, about the layou itself, etc. > >> The triac might need a snubber. Depends on the type. > > > Thanks. It also seems that I need to struggle with R154, and perhaps > > add another resistor at the triac's gate, as it will somehow related > > to the quadrants the triac will open. > > And right now you have D4's gate shorted but I guess you've caught that > already :-) > > > I've seen triacs designed for opening at specific quadrants (like > > nxp's bt136), and others that can open "anywhere", or at least their > > datasheets mention (Igt) at each quadrant (like ST's TLC86B), which is > > another one I've got at hand. > > > I do know triac's will close on their own at zero crossing. > > The datasheet also says whether they need a snubber, usually. Not sure > about low voltage triacs though, I mostly use big ones. > > >>> This is the "pseudo-code" I more or less have in mind for it: > >>>http://pastebin.com/X9QeJWgg > >> I'll leave that to the code gurus :-) > > > No probs. But in general, does the circuit makes sense to you? > > Except for the issues menioned above, yes. The whole grounding and > supply thing needs some redesign. And you have to get the triac out of > the equation. > > You may also need a driver for U60, not sure how much muscle your MCU > port pins have.
Sure, it's just a led with a consumption of 20mA max.
> > > I basically open the triac when the wave goes from 0 to +ve, =A0and > > while it's open, for a cycle I read maximum positive and negative > > peaks before the shunt, and only max. positive peak after it. > > With "open" you mean "conducting"? Remember that it triggers a little > later in the half wave, needs to get above the trigger current threshold > first. > > > This way I can know voltage and current, and then can use ohm's law to > > find out resistance of the heating element. I'm using peaks instead of > > RMS because I guess is what I should use for this calculation. > > > Another idea I had in mind is placing a similar circuit behind the > > triac, such that when I turn the triac off, I still can use a mosfet > > or other to let 5 volts DC or so through the heater and be able to > > monitor how it's resistance drops. > > Nah, measuring around the peak of a half wave sould be fine ... but: > > You need to measure the voltage only across the load (or load plus shunt > because the shunt can be calculated out), not across the load plus the > triac like you have it now. A triac is not an ideal zero ohms switch. If > you ground T16 on one side this becomes easy. >
Nice, I didn't even think of meassuring only behind the shunt, but yes, the whole schematics were anything but well done. I've made another one: https://docs.google.com/viewer?a=3Dv&pid=3Dexplorer&chrome=3Dtrue&srcid=3D0= BziRtOXljuLhNTdhNWYwMTYtZGMxMS00N2RiLTlmZmYtMjY5ZmRmMDFmM2Y0&hl=3Des Was trying to simulate the circuit using gschem and ngspice, but there seems to be some weird directives on the lm324 models I found on the internet, cose ngspice says doesn't like them much. So I installed ltspice, simulated and tweaked it. I get a voltage swing between 100mV and 4,40V on the output, which is fine at least for get the thing going. The problem being ltspice has only linear technology's op-amps, so, either I study if models from other vendors can be used with it, or pick a part number close to an lm324 or something (I used a LT1014). Does it looks any better now?
> > This would be for both, allowing me to keep a constant temperature > > more precisely, and monitoring how the resistance drops back to room > > temperature according to different environmental conditions. But for > > now I'm more concerned with getting the initial circuit working. > > > Can't wait to see voltage, current and resistance on my laptop's > > screen in "real time". It's gonna be quite an achievement! hehe. > > Well, good luck :-) > > -- > Regards, Joerg > > http://www.analogconsultants.com/
On 26 nov, 13:01, Michael Karas <mka...@carousel-design.com> wrote:
> In article <e616fe83-3348-4c7f-8cf6-bc86df0bb7f9 > @l24g2000yqm.googlegroups.com>, lp.guan...@gmail.com says... > > > > > > > > > > > > > Hi guys, > > > I'm trying to measure resistance, current, and voltage of a resistor > > (heater) connected to a 0-24V @ 3A transformer. > > > The heater's consumption is actually 2A max., and I'd be controlling > > it with a triac driven with an 8-bit micro, which I'd also use to get > > the above readings and send them to the host. > > > This is my initial layout: > > >https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0Bz... > > > As the transformer only has 0-24V output, and I'm using the usual op- > > amps + shunt configuration, my main worry is that what I've done is > > actually electrically safe. > > > Also, any other comments are also very welcome, including suggestions > > as per the op-amps (part) to use, about the layou itself, etc. > > > This is the "pseudo-code" I more or less have in mind for it: > > >http://pastebin.com/X9QeJWgg > > > Cheers, > > The way you have your opamps they will operate with no feedback and thus > work more like voltage comparators with their outputs saturated at > either VCC or GND. Not so useful for feeding into an A/D converter. > > -- > > Michael Karas > Carousel Design Solutionshttp://www.carousel-design.com
Thanks, was just an initial (unsimulated) design, for someone with no idea on the subject. Regards,
On 26 nov, 19:09, NT <meow2...@care2.com> wrote:
> On Nov 25, 11:27=A0pm, Luis Perez <lp.guan...@gmail.com> wrote: > > > > > > > > > > > Hi guys, > > > I'm trying to measure resistance, current, and voltage of a resistor > > (heater) connected to a 0-24V @ 3A transformer. > > > The heater's consumption is actually 2A max., and I'd be controlling > > it with a triac driven with an 8-bit micro, which I'd also use to get > > the above readings and send them to the host. > > > This is my initial layout: > > >https://docs.google.com/viewer?a=3Dv&pid=3Dexplorer&chrome=3Dtrue&srcid=
=3D0Bz...
> > > As the transformer only has 0-24V output, and I'm using the usual op- > > amps + shunt configuration, my main worry is that what I've done is > > actually electrically safe. > > > Also, any other comments are also very welcome, including suggestions > > as per the op-amps (part) to use, about the layou itself, etc. > > > This is the "pseudo-code" I more or less have in mind for it: > > >http://pastebin.com/X9QeJWgg > > > Cheers, > > If there's a safety issue I'm not seeing it, as long as you relabel > 'N' as 'E'.
Thanks, done.
> Your 9v transformer gives about 13v dc, leaving Vreg to drop 8v. You > might as well run them off the 24v psu.
The maximum voltage the lm7805 accepts (as per it's spec) is 18V, but even if it worked, wouldn't it get too hot?
> The whole arrangement of multiple opamps seems odd. Starting with a > differential stage might make more sense, with both inputs divided > down to lower v. > > NT
On Nov 27, 4:54=A0pm, Luis Perez <lp.guan...@gmail.com> wrote:
> On 26 nov, 16:18, Joerg <inva...@invalid.invalid> wrote: > > > > > Luis Perez wrote: > > > Hi Joerg, > > > > On 26 nov, 00:10, Joerg <inva...@invalid.invalid> wrote: > > >> Luis Perez wrote: > > >>> Hi guys, > > >>> I'm trying to measure resistance, current, and voltage of a resisto=
r
> > >>> (heater) connected to a 0-24V @ 3A transformer. > > >>> The heater's consumption is actually 2A max., and I'd be controllin=
g
> > >>> it with a triac driven with an 8-bit micro, which I'd also use to g=
et
> > >>> the above readings and send them to the host. > > >>> This is my initial layout: > > >>>https://docs.google.com/viewer?a=3Dv&pid=3Dexplorer&chrome=3Dtrue&sr=
cid=3D0Bz...
> > >>> As the transformer only has 0-24V output, and I'm using the usual o=
p-
> > >>> amps + shunt configuration, my main worry is that what I've done is > > >>> actually electrically safe. > > >> If "N" means the neutral wire and not protective earth then no, it i=
s
> > >> not safe. In pretty much all jurisdictions I've dealt with it isn't > > >> allowed unless the whole thing is fully isolated per their requireme=
nts.
> > >> It says "Earth Ground" at the transformers so it must be connected t=
o
> > >> PE, not N. > > > > Sure. "Earth Ground" is the actual iron core. > > > >> Also, the schematic doesn't say whether the two kinds of ground are > > >> connected and where. So the dividers at the opamp inputs can be floa=
ting
> > >> which wouldn't be cool. > > > > My fault as well. I did draw that in a rush. > > > Could be worse. The ones I draw in a rush are often readble to only one > > person. Me ... > > > > "N" is actually protective earth from mains, but the question behind > > > it was how would one procceed when a center-tapped secondary is not > > > available, yet a ground reference is needed. > > > Unless it is the standard in your country for some strange reason I > > would not call that "N" :-) > > Hehe, actually N has more to do with L1 or L2 than with earth, I don't > really know why I used that, but I changed it already. > > > > > > I guessed I should not be using the one given by the rectifier + > > > lm7805, not that using chassis ground looked any better, but I'm now > > > thinking that if T20 weren't present at all, I should just hook a > > > rectifier hanging off T16's secondary even if it's just to get a > > > ground reference. Am I right here? > > > If you keep T20. You could connect the bottom (anodes) of the rectifier > > to the top of T16. If you don't keep T20 but supply it from T16 you > > could use single-diode rectification and then ground one side of T20. > > Call me ignorant, but I don't use to mix circuit's ground and earth > ground. The real intent was to have an isolated ground reference for > the secondaries. > > My worry was using the lm7805's ground because perhaps by mixing ac > and dc I would be pulling the 7805 (and eveything connected to it) to > -24V. I'm actually done a mess with understanding of ground after this > thread. > > > Keep in mind that many opamps such as the LM324 can operate all the way > > to their negative supply pin with the inputs, actaully even to 300mV > > below that. Very practical for shunt measurements. > > > Also, opamps don't necessarily need a regulated supply if this doesn't > > have to become a scientific instrument. > > Thanks. Well, the max accuracy acheivable, the better. T16 is needed > anyways because will be powering the mcu. > > > > > >> Put some values on the resistors so we can all see whether it's ball=
park
> > >> accurate. Usually large values for the dividers and then a low-ohms > > >> shunt won't be so stellar for accuracy. > > > > Well it's just an inital layout, not even parts have been selected, > > > but I was thinking just in what's needed to scale (24 * 1.414) down t=
o
> > > +2.5V, and -2.5V for the other input (or whatever else the selected > > > part's datasheet can stand. (Guess input-range amplitude, doesn't > > > affect op-amp's precission). > > > > I've zero experience in the analog field, though, so that on it's own > > > needs more research. I'm reading the art of electronics, among others > > > for this. > > > Michael is right, your opamps do not amplify but only compare because > > tere is no feedback on U64 and U72. Read up on differential amplifiers, > > that shows how it's done if you must have it differentially. But if you > > ground one side of T26 you may not need that. > > Yes, I got the initial idea very wrong it seems. > > > > > > As per the shunt, will be a hand-wound piece of wire giving me very > > > low ohmic value at the required wattage, 0.01 or the like, or a coil, > > > which I've also been employed in other circuits for this same purpose=
.
> > > >> Can you ground one side of T16's output? That would make life a ton =
easier.
> > > >>> Also, any other comments are also very welcome, including suggestio=
ns
> > >>> as per the op-amps (part) to use, about the layou itself, etc. > > >> The triac might need a snubber. Depends on the type. > > > > Thanks. It also seems that I need to struggle with R154, and perhaps > > > add another resistor at the triac's gate, as it will somehow related > > > to the quadrants the triac will open. > > > And right now you have D4's gate shorted but I guess you've caught that > > already :-) > > > > I've seen triacs designed for opening at specific quadrants (like > > > nxp's bt136), and others that can open "anywhere", or at least their > > > datasheets mention (Igt) at each quadrant (like ST's TLC86B), which i=
s
> > > another one I've got at hand. > > > > I do know triac's will close on their own at zero crossing. > > > The datasheet also says whether they need a snubber, usually. Not sure > > about low voltage triacs though, I mostly use big ones. > > > >>> This is the "pseudo-code" I more or less have in mind for it: > > >>>http://pastebin.com/X9QeJWgg > > >> I'll leave that to the code gurus :-) > > > > No probs. But in general, does the circuit makes sense to you? > > > Except for the issues menioned above, yes. The whole grounding and > > supply thing needs some redesign. And you have to get the triac out of > > the equation. > > > You may also need a driver for U60, not sure how much muscle your MCU > > port pins have. > > Sure, it's just a led with a consumption of 20mA max. > > > > > > > > I basically open the triac when the wave goes from 0 to +ve, =A0and > > > while it's open, for a cycle I read maximum positive and negative > > > peaks before the shunt, and only max. positive peak after it. > > > With "open" you mean "conducting"? Remember that it triggers a little > > later in the half wave, needs to get above the trigger current threshol=
d
> > first. > > > > This way I can know voltage and current, and then can use ohm's law t=
o
> > > find out resistance of the heating element. I'm using peaks instead o=
f
> > > RMS because I guess is what I should use for this calculation. > > > > Another idea I had in mind is placing a similar circuit behind the > > > triac, such that when I turn the triac off, I still can use a mosfet > > > or other to let 5 volts DC or so through the heater and be able to > > > monitor how it's resistance drops. > > > Nah, measuring around the peak of a half wave sould be fine ... but: > > > You need to measure the voltage only across the load (or load plus shun=
t
> > because the shunt can be calculated out), not across the load plus the > > triac like you have it now. A triac is not an ideal zero ohms switch. I=
f
> > you ground T16 on one side this becomes easy. > > Nice, I didn't even think of meassuring only behind the shunt, but > yes, the whole schematics were anything but well done. I've made > another one: > > https://docs.google.com/viewer?a=3Dv&pid=3Dexplorer&chrome=3Dtrue&srcid=
=3D0Bz...
> > Was trying to simulate the circuit using gschem and ngspice, but there > seems to be some weird directives on the lm324 models I found on the > internet, cose ngspice says doesn't like them much. > > So I installed ltspice, simulated and tweaked it. I get a voltage > swing between 100mV and 4,40V on the output, which is fine at least > for get the thing going. > > The problem being ltspice has only linear technology's op-amps, so, > either I study if models from other vendors can be used with it, or > pick a part number close to an lm324 or something (I used a LT1014). > > Does it looks any better now? > > > > This would be for both, allowing me to keep a constant temperature > > > more precisely, and monitoring how the resistance drops back to room > > > temperature according to different environmental conditions. But for > > > now I'm more concerned with getting the initial circuit working. > > > > Can't wait to see voltage, current and resistance on my laptop's > > > screen in "real time". It's gonna be quite an achievement! hehe. > > > Well, good luck :-)
You've got rid of the excess opamps, but T20 is redundant, and I reckon there's a diagram mistake with D4. Psu regulation isnt needed for the opamp(s). The 24v psu needs grounding, or the signal to the opamp will float all over the place. Once grounded, the 24v line will produce upto 24v x 1.414 x 1.2 =3D 41v. This is more than most opamps can handle, and is far outside the opamp psu lines. You're also not reading the psu voltage, which will vary IRL. Finally if you swap your ground and earth symbols they'll be correct. NT