Author Topic: AC RMS to DC conversion, AD737 chip  (Read 12430 times)

0 Members and 1 Guest are viewing this topic.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
AC RMS to DC conversion, AD737 chip
« on: October 01, 2010, 11:43:14 PM »
It's 0030 here and i'm ready for bed. Maybe I'll figure this out in the morning, but I figure i'll ask for help now.

I've been trying to get a AD737 chip working. to convert up to 1V AC (from a AC current clamp) to something an ADC can read. IE, i want to use a microcontroller to read the power consumption of my Apt off the mains.

I've tried a few different sample circuits from the datasheet but no avail. I need to to be operating off a single 5V source, so it needs an offset (I'm assuming). Figure 28 seems to be the best configuration, hard set with a 2V input range. But i can't seem to adapt that for a uC use.

Any thought on how a circuit for this should look? I'm probably missing something obvious.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: AC RMS to DC conversion, AD737 chip
« Reply #1 on: October 02, 2010, 06:20:56 AM »
Hi,

You don't describe in what way it don't work?
Did you try running it at eg. 6V..7V, just to see if that changes anything?
Did you include the opamp as shown in fig. 29?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #2 on: October 02, 2010, 10:13:34 AM »
I am getting lots of noise with no AC input, and not much of a response when I do give it an input.

My understanding is figure 29 is using the Op-Amp to scale up the DC output to the same gain the AC input was attenuated. Is that correct?


Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #3 on: October 02, 2010, 02:16:48 PM »
Had the best result with this.



although the output is not linear, but it is stable.

I think I need to add a scale factor adjust similar to Figure 30. What I really need to do is sit down and really understand this chip.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #4 on: October 02, 2010, 10:15:50 PM »
Here's input AC vs output DC.



X axis is RMS AC input, Y is DC ouput, all in V. That looks awfully like I'm entering the saturation region of a BJT, so I think the next step is to try and scale the output down similar to Figure 30.
I know Vin is 0 to 200mV range, but really can't find the limits of the output. Do I assume it's the same?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: AC RMS to DC conversion, AD737 chip
« Reply #5 on: October 03, 2010, 09:58:51 AM »
Hi,

I am getting lots of noise with no AC input, and not much of a response when I do give it an input.
Did you try it with a higher supply voltage or what?


My understanding is figure 29 is using the Op-Amp to scale up the DC output to the same gain the AC input was attenuated. Is that correct?
Take a second look at fig. 28 and 29. The input in particular and the inverting opamp.
It's not just to scale it.
But first of all, try a higher supply voltage, just to rule out that the low voltage may be causing it.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #6 on: October 03, 2010, 11:20:14 AM »
I'm on out the the ms. most of today so I'll have to look at the data sheet when I get back. I'm curious why you think it's a low voltage problem. I'm running at the spec voltage and got rid of the noise.
« Last Edit: October 03, 2010, 11:21:49 AM by madsci1016 »

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #7 on: October 03, 2010, 01:18:54 PM »
Take a second look at fig. 28 and 29. The input in particular and the inverting opamp.
It's not just to scale it.

I see it's also used reference the output to 2.5Volts, and invert it. Is that you are referring too? There's also an RC filter.
« Last Edit: October 03, 2010, 01:57:09 PM by madsci1016 »

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #8 on: October 03, 2010, 02:54:02 PM »
Using a 9V battery:



First of all, thank you for the suggestion.

Second, why did you suggest it?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: AC RMS to DC conversion, AD737 chip
« Reply #9 on: October 03, 2010, 03:10:15 PM »
Hi,

Second, why did you suggest it?
Since you were close to the lower supply limit, I just thought it was best to either rule it out or not and it was much too easy to not do.

Did it take care of the noise?
If so, a supply booster may be all that's needed - with the very modest current consumption in mind, the best solution is probably a diode pump doubler, which will be around somewhat less than twice the input.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #10 on: October 03, 2010, 03:20:18 PM »
There is some slight noise, but I don't know if that's noise in the circuit, or actual fluctuations in my apartment's power consumption read via current transformer (that's what I have been using for my tests. A function generator is not something I own currently. The different data points achieved by turning on more and more burners on my oven.) Either way, I might just have some averaging done in code to help reduce it.

I plan to power off a 9-12v wall wart, so I could just have two regulators, 5V and 9V.

I was hoping to keep the circuit as minimal as possible, but if I want any sort of good resolution, it looks like I'm going to have to add the external opamp.

« Last Edit: October 03, 2010, 03:24:06 PM by madsci1016 »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: AC RMS to DC conversion, AD737 chip
« Reply #11 on: October 03, 2010, 03:33:49 PM »
Hi,

The 160µA max. would be easily handled by a zener diode. Don't know how critical it is towards supply line ripple, but a resistor, zener and a cap would probably be enough - just calculate the dropper resistor to the few mA where the zener does the best regulation (get a datasheet for the zener).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #12 on: October 11, 2010, 03:07:28 PM »
Now, why do you think i'm getting something close to a 10x gain in my circuit? I don't see why I would be.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: AC RMS to DC conversion, AD737 chip
« Reply #13 on: October 14, 2010, 04:10:10 PM »
Hi,

Now, why do you think i'm getting something close to a 10x gain in my circuit? I don't see why I would be.
No idea, I don't know how your circuit looks  ;)

You could whip up a simple constant amplitude (perhaps with 2 or 3 switchable settings) test-generator for the purpose - it's so much easier to deal with a circuit when you have a known amplitude/frequency to rely on.

Been some days though, so perhaps you solved it already.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #14 on: October 14, 2010, 05:08:52 PM »
No idea, I don't know how your circuit looks  ;)

Hasn't changed from the circuit i posted above, other then 9V DC instead of 5.

Quote
You could whip up a simple constant amplitude (perhaps with 2 or 3 switchable settings) test-generator for the purpose - it's so much easier to deal with a circuit when you have a known amplitude/frequency to rely on.

I agree, but i've been lazy. I can grab a function generator from work, but keep forgetting.

Also, I've ordered a AD736 to see if it runs any better. Seem to be ok with 5V as VCC, but still has a slight gain. I think it has something to do with the values of the caps I'm using.

Offline whiskey_1

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: AC RMS to DC conversion, AD737 chip
« Reply #15 on: February 03, 2011, 08:16:27 AM »
Hi Bill,

How did you get on with the AD736? I am in the middle of a very similar project and having difficulty getting my AD736 to work properly. I am using a 9VDC supply and, like you, tried a number of the example circuits on the datasheet to no avail (my results sound similar to yours).

Thanks,
Toby
« Last Edit: February 03, 2011, 08:18:22 AM by whiskey_1 »

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: AC RMS to DC conversion, AD737 chip
« Reply #16 on: February 03, 2011, 08:36:48 AM »
Have you thought of precision rectification than an very specific IC?

An Op amp, a diode and maybe some resistors...
And you can do either full or half rectification... From what I can remember from your application we've been talking about full wave precision rectification would be more suited...

Anyways... your job... your try... I won't try insist this time... But some times... there is an a lot easier way to the problem than you might think....


Best Regards, Lefteris
Greece
For whom the interrupts toll...

Offline whiskey_1

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: AC RMS to DC conversion, AD737 chip
« Reply #17 on: February 03, 2011, 09:18:26 AM »
Hi,
Thanks for your suggestion. The set up I have is as follows:


So it does look as though the IC does fully rectify etc to get the DC value. The output I get at the moment is something like this:


except it pulsates from 1.5Vp-p to 2.0Vp-p

I have a signal generator on Vin generating 0.5Vp-p @50Hz.

Any ideas would be appreciated, I've been stuck on this for quite a while.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: AC RMS to DC conversion, AD737 chip
« Reply #18 on: February 03, 2011, 06:17:35 PM »
I did get it to work ok, but it was expensive and hard to use that I dropped it from my project.

If you are getting pulsing, try increasing Cav, as that is the capacitor that 'holds' the value while it is calculating RMS.

Other then that, I can't be much help.

This is the circuit I had btw, but I don't remember if it was for the AD736, or AD737. It was also before I switched to 9V.

(click for full size)


« Last Edit: February 03, 2011, 06:19:32 PM by madsci1016 »

Offline whiskey_1

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: AC RMS to DC conversion, AD737 chip
« Reply #19 on: February 04, 2011, 10:47:30 AM »
OK thanks. I tried your circuit with no luck.

Sorry if this is a stupid question but where you have ground on your diagram is that where the -ve pin on the 9V psu is supposed to go?

It is also confusing me why I get a 3.2V (p-p) sinusoidal waveform from a 9VDC psu on both the + and - pins... I think my understanding of the basics needs work!  :-\

 


data_list