SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Scott216
#129144
Right now I can tolerate a lot of error. At first I only want my program to be able to determine 3 things about the motor I'm monitoring. Is it off (0 amps in CT), is it running normally (about 7 amps in CT) is it stalled (about 50 amps in CT). In the future I may want more accuracy so I can tell if my motor is working harder then normal, but I also have some pressure transducers, so I'll probably just use those to answer that question. If I didn't mention it earlier, this motor is a 1.5HP 230 volt motor for a pool pump. I'm also measuring two pressure transducers (4-20mA converted to 1-5 V with resistor) and two thermocouples. I'm using Analog Devices AD8495ARMZ to convert the thermocouple output to a linear DC voltage. The power supply I have is 12 VDC. The Xbee will be plugged into a Xbee Simple Board (http://microcontrollershop.com/product_ ... ts_id=2366) that can accept a 12 volt input and has a built in voltage regulator that converts the 12 volt to 3.3 volts for the Xbee. So I can supply an op amp with 12 volts if necessary. The Xbee is transmitting the data to an Arduino, which is where all the math and logic will be. The Arduino will also send the data to pachube.com and maybe a Google Docs spreadsheet. There won't be any PC involved.
By Scott216
#129149
Mee_n_Mac wrote:
Scott216 wrote: BTW is this a one off prototype thing or are you going to have a PCB made ?
No, I'm not making a PCB board. I'll just solder it up on a prototype board.
By jremington
#129154
Here is the circuit that I used to measure AC current draw by a hot tub. It is a precision rectifier with a gain of about 40. It converts the negative peaks output by a CoilCraft CS60-050 current sensor into a DC voltage of about 0-5 over a range of about 0 - 50 amps, with linearity and precision of about 0.1 amp. CoilCraft used to give out free samples of their current sensor transformers, perhaps they still do. You need a bipolar power supply, minimum +/-5 volts for this circuit. I used a +5 volt power supply and added an ICL7660 DC converter chip to produce -5 V.

Jim

Image
By Mee_n_Mac
#129168
jremington wrote:Here is the circuit that I used to measure AC current draw by a hot tub. It is a precision rectifier with a gain of about 40. It converts the negative peaks output by a CoilCraft CS60-050 current sensor into a DC voltage of about 0-5 over a range of about 0 - 50 amps, with linearity and precision of about 0.1 amp. CoilCraft used to give out free samples of their current sensor transformers, perhaps they still do. You need a bipolar power supply, minimum +/-5 volts for this circuit. I used a +5 volt power supply and added an ICL7660 DC converter chip to produce -5 V.

Jim
A thing of beauty ! So all the OP needs to do is increase the 1.5K to ~3.1K (I think*) and regulate his 12V supply down to something reasonable (why not 5V) and use the same DC/DC chip to get his -V rail. Using split supplies sure solves some problems.

* so check my math. The average value of a half-wave rectified waveform is Vpeak * 1/pi. His CT outputs 0.333 V RMS @ 50 A RMS in. He wants ~3 V DC out @ 50 A RMS. So :

0.333 Vrms * 1.414 Vpeak/Vrms * 1/pi (Vave/Vpeak) * gain = 3 V DC. Gain (@ DC) = 20 = 62K/R? ; R? = 3.1K (which should be high enough not to futz with his CT's scale factor)
By Scott216
#129182
I'm beginning to get a sense for what the electrical engineers in my college went through :D The circuit from jremington looks pretty close to what I need. How should I wire up the ICL7660 DC converter chip to get the bi-polar voltages? I found a spec sheet for it, but it had quite a few different ways to wire it and I didn't know which applied to me..
By jremington
#129183
From the first page of the Maxim data sheet (they give free samples too):

Image

Use 10 uF caps. +5 V in -> -5 V out.

Incidentally, the gain on the amplifying precision rectifier is set by the feedback and input resistors, which can be chosen rather freely (62K/1.5K ~ 40).
By Scott216
#129202
fll-freak wrote:
Scott216 wrote:Where do I get the positive voltage output? Does that come from my own power supply, not the ICL7660?
Correct. The positive input to the chip should be the output of your regulated power supply.
What I meant was where do I get the voltage that goes to Pin 4 (V+) on the LM324. I have a 12 volt power supply. The Xbee breakout board I'm using has a little voltage regulator that will convert this to 3.3 volts for the xbee circuitry. I need 12 volts for my pressure sensors. They output a 4-20mA signal, but need 12 volts to operate. Can I take +12 v from my power supply and use that on V+ of the ICL7660? I think I read in the specs for teh ICL7660 that the max volts is 10. Maybe I need a 5v voltage regulator to bring the 12 volts down to 5 volts for your circuits. What do you recommend?

If the V+ and V- on the LM324 was 12 volts instead of 5, would the rest of the circuit be the same?
By Scott216
#129203
jremington wrote:From the first page of the Maxim data sheet (they give free samples too):

Incidentally, the gain on the amplifying precision rectifier is set by the feedback and input resistors, which can be chosen rather freely (62K/1.5K ~ 40).
When you say the gain is about 40, is this a multiplication factor (ie 40x) or is this a decibel gain? If it's decibel, what is the formula I would use to calculate the output voltage?

For my project, should I replace the 1.5k resistor with a 3.1k based on Mee_n_Mac's calculation?
By Mee_n_Mac
#129205
Scott216 wrote:What I meant was where do I get the voltage that goes to Pin 4 (V+) on the LM324. I have a 12 volt power supply. The Xbee breakout board I'm using has a little voltage regulator that will convert this to 3.3 volts for the xbee circuitry. I need 12 volts for my pressure sensors. They output a 4-20mA signal, but need 12 volts to operate. Can I take +12 v from my power supply and use that on V+ of the ICL7660? I think I read in the specs for teh ICL7660 that the max volts is 10. Maybe I need a 5v voltage regulator to bring the 12 volts down to 5 volts for your circuits. What do you recommend?

If the V+ and V- on the LM324 was 12 volts instead of 5, would the rest of the circuit be the same?
First choose an op-amp. SF sells an LM358 which should be good enough for your project. It's 2 op-amps in a single package, you only need the one to produce the half-wave rectifier above. It can run off of +/- 16V so using +/- 12V would work fine. What you'd then want is one of 2 possibilities. Either use a different voltage converter, like this one or regulate the +12V down to +5V and use the same converter used above (and run +/- 5V to the op-amp). Given you're only going to draw < 2 mA to run your circuit, and the former is out of stock, there's no real reason not to do the latter. It's 2 ICs vs one but has the added benefit that if something is goofy with the circuit, the Xbee could only ever "see" +/- 5V vs +/- 12V. I'm not sure how protected the Xbee A/D is.

No matter what supply voltages you use, the circuit as depicted above does not change.

FWIW if you already have the CT you could put it over the hot power line and use a DVM to measure the output voltage. Then add a 3K (or 10K) resistor across it's output terminals and re-measure to see how much/little the reading changes. This will verify the circuit will not change the CT's scale factor.
By Scott216
#129216
Mee_n_Mac wrote: Either use a different voltage converter, like this one or regulate the +12V down to +5V and use the same converter used above (and run +/- 5V to the op-amp). Given you're only going to draw < 2 mA to run your circuit, and the former is out of stock, there's no real reason not to do the latter. It's 2 ICs vs one but has the added benefit that if something is goofy with the circuit, the Xbee could only ever "see" +/- 5V vs +/- 12V. I'm not sure how protected the Xbee A/D is.
Thanks for the info. I think using the 5V regulator is the way to go. I might even have one laying around.
By Mee_n_Mac
#129221
One other problem to avoid ... oscillating unused op-amps. If you use 1 op-amp out of a dual or quad package, you need to do something with the other unused devices. This app note spells it out for you.

http://www.maxim-ic.com/app-notes/index.mvp/id/1957

Note that if you use +/- 5 V, then you don't need to add resistors per Figure 1 (below), simply tie the + input (of each) to ground and connect the output (of each) to it's respective - input.

"Two conditions are required to properly terminate an uncommitted op amp:
-The op amp inputs must be actively held within the input common-mode voltage range of the device.
-The op amp output must be set within the output voltage swing range of the device.

The circuit in Figure 1 satisfies both conditions.

If the circuit has dual supplies, ±3V for example, the two resistors are not necessary and simply grounding the non-inverting terminal is sufficient. Additionally, the non-inverting terminal can be connected to another voltage elsewhere in the circuit that is within the input common-mode voltage range of the device, thereby eliminating the need for the two resistors in Figure 1.
"

Image
By Scott216
#129268
Mee_n_Mac wrote:One other problem to avoid ... oscillating unused op-amps. If you use 1 op-amp out of a dual or quad package, you need to do something with the other unused devices. This app note spells it out for you.
http://www.maxim-ic.com/app-notes/index.mvp/id/1957
Thanks for letting me know about this. I never would have guessed I needed to do this. I'm curious, what type of problems does an oscillating op-amp cause?