SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Scott216
#129269
Mee_n_Mac & jremington,

This is off topic a bit, but since you guys really seem to know your stuff I thought I'd ask you - What software would you recommend for a beginner like me to draw schematics, I have both a PC and Mac. I don't need something that would convert it to a PCB. Also, if I wanted software that supported simulation, what would you recommend? Is the simulator function something that's only for more experienced circuit builders?

--Scott
By Mee_n_Mac
#129279
Scott216 wrote:Mee_n_Mac & jremington,

This is off topic a bit, but since you guys really seem to know your stuff I thought I'd ask you - What software would you recommend for a beginner like me to draw schematics, I have both a PC and Mac. I don't need something that would convert it to a PCB. Also, if I wanted software that supported simulation, what would you recommend? Is the simulator function something that's only for more experienced circuit builders?

--Scott
That's a real good question, worthy of it's own thread. I get to use the pro stuff we have at work so I'm not sure what's the best choice for the general hobbyist. Eagle seems to be the choice for schematic capture and PCB layout but for circuit simulation ... I don't know. Falstad (?) seems to have a few adherents and there's a zillion varieties of Spice. Depending on how much tinkering you do, sim programs can be very useful. You can "see" waveforms and find problems that you probably don't have the test equipment for to see and find in real life. Perhaps a little daunting to learn but worth it IMO. See if this link is useful ...

http://homepages.which.net/~paul.hills/ ... Spice.html


As for op-amps ... left improperly terminated then can add noise to adjacent (used) op-amps, put noise on the power supply and/or ground, and generally use power and thus create added heat, both undesireable.
By gmarsh
#129357
I've built systems in the past which measure AC current with a current transformer. Here's my method, using very few parts.

- Put one side of the current transformer at the ADC reference voltage / 2.
- Put the other side of the current transformer into an ADC channel.
- You might want to put a pair of back to back zeners across the current transformer for voltage limiting, so that current spikes/surges (eg, inrush when your motor starts up) don't zap anything.

Measure the ADC channel at a reasonably high rate (say, 500Hz-1KHz), take the absolute difference from half scale and perform RMS averaging; just square every sample, average it, and whenever you need to know the value, take the square root of the average.
By jremington
#129358
That is a good idea but one should point out that it does suffer from resolution. Assuming a 10-bit ADC and 5 V ADC reference, you get roughly 5 mV/bit from the ADC. The current transformers I've used have a peak (not rms) output of about 420 mV at 50 amps AC. So, the resolution for the simple circuit would be around 0.6 amps AC current (per bit). The situation is a bit better at 3.3 V ADC reference (0.4 amps AC/bit).

That resolution may be fine for the OP's original application but not if one wanted to make accurate power consumption measurements (as in my case).
By fll-freak
#129374
Solution is nice, but also goes against OP's initial request of only sampling once a second. Sampling at 500 to 1KHz was not on the table. For a slow sample rate, rectification and filtering in hardware was an absolute.
By gmarsh
#129410
Amplifying the input before the ADC, or using a really low ADC reference if you can, would fix the full scale range issue. And even though you might be measuring with a 10 bit ADC, you're repeatedly measuring a dynamic and noisy signal and averaging it. You can easily achieve 15-16 bits of resolution with enough oversampling.

I actually went with this solution for a precise AC power measurement application. RMS averaging, which is what I'm proposing here, is actually a lot more accurate than peak detection methods if there's a lot of noise present - noise/spikes will tend to 'kick' a peak detecting circuit and make it read high.

As for the "once/second" sampling rate, in my case I had an ADC interrupt running at a couple of KHz where I stuck the square-and-average function. A second "what's the current" function called by code would do the square root of the average and return the RMS current value. Don't know if that's feasible.
By Scott216
#140890
I built this circuit and used a MAX1044 to get the negative 5 volts for the LM324. It woks great. I have a CT that output 0 - 0.33 volts and it amplifies is nicely and the DC output is very smooth (per my oscilloscope). I decided to have my input go into an Arduino instead of an Xbee, so now I don't have the 3.3 volt limitation. I also terminated the 3 unused op-amps as suggested. Since I have +/-5v going to the LM324, I don't need the resistors to terminate them; I just grounded the + pin, and connected - to the output pin.

Image
BTW - this schematic is my first try at using Fritzing.

--Scott

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

Image
Also built circuit with circuits.io: http://123d.circuits.io/circuits/34245
Last edited by Scott216 on Sat Sep 14, 2013 7:39 pm, edited 1 time in total.