Show Posts
Pages: 1 [2] 3 4 ... 48
16  Community / Bar Sport / Re: Your latest purchase on: December 03, 2013, 10:13:51 am
I was very naughty and finally bought a standalone oscilloscope, the Owen SDS7102 for $365 with a free case over at Saelig. Still looking for a reasonably-priced signal generator whose output frequencies do not have to exceed 60Hz. All the stuff they have there is either way over spec or not standalone.
17  Using Arduino / LEDs and Multiplexing / Sharing a GPS PPS signal consistently... on: December 02, 2013, 05:44:46 pm
Hi guys,

I have what may be a tricky question regarding multiplexing / sharing a PPS signal among many boards at once. Here is some background:

I am currently rolling a board that incorporates a CFS206 RTC crystal whose frequency changes as a function of temperature. Some preliminary testing seems to suggest that I can achieve a very high correlation between the offset / error in real life vs. a open loop correction formula. The board uses a HTU21 sensor to determine the temperature and a slowly-rising board temperature and a GPS' PPS signal, followed by an on-board least-squares formula to determine the factors in the quadratic equation. The factors are then written to EEPROM.

The correlation is pretty good from about freezing to 40*C - R^2 is slightly above 0.999 and hence the PPM error in this very limited sample is very low - about 0.2PPM on any particular sample and 0.03PPM cumulative over the course of 2 hours of sampling. However, promising these preliminary results, it's not practical to hook up an individual GPS receiver to every board just for the PPS signal. So, what is the best approach to sharing a PPS signal among many boards?  Ideally, I'd have a whole bunch of the boards inside an enclosure that can be temperature controlled while the GPS receiver is outside the box, pulsing away.

The current receiver module is a UP501 from Fasttrax, which is powerful enough to drive a LED high every time it pulses. But I'm open to alternatives, ideally ones that operate at 3.3V to be compatible with the CPU. Ideally, nice clean interrupts can then measure the MCU clock and the RTC clock errors as a function of changing temperatures inside the box.
18  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: September 21, 2013, 05:09:13 pm
Optically isolated measurements re: the voltage signal are an attractive option. The main issue as I see it is that the number of potentially 'hot' components goes up considerably. The transformer, fuse, switch-mode power supply, etc. are all explicitly UL-listed, which should allow me some day to get the whole assembly listed quite easily.

One attractive alternative to the above is the Avago series of precision opto's. Very linear. But the circuits required to make it all work are extensive, making for a much larger PCB than I would like.

Another option is to simply run the resistors straight into the ADC and then use the ADUM5401 series from Analog to provide power and a safe SPI bus interface. If I had to ditch the transformer, I would prefer this solution for its simplicity even if it means adding yet another 3.3V power supply to the design (one for the Analog, the other for the digital power supply of the MCP3911).
19  Using Arduino / Sensors / Re: Question regarding burden resistors on Current Transformers... on: September 08, 2013, 12:43:36 pm
Hi DC and thanks again!

For some reason I thought I would have to have each resistor be able to handle a 250v working voltage safely - so they tended to be 1w models.

Fwiw, the output from the transformer is pretty good, despite its 0.08va size.  I need to compare the sinusoidal curves to references in the scope but so far it looks like I could use constant plus a multiplier to predict voltage to an R^2 of 0,9992 when just reading averages off my fluke. I plan on sampling data with a yokogawa wt310 later this week to see how well it does when comparing sampling sets with each other. I expect the Yoko to be a step above the fluke or the kilawatt.

I would be very happy if I can continue to use the voltage transformer since i would then not have to worry about using a adum5xxx series chip to isolate the adc from the rest of the circuit.
20  Development / Other Software Development / Re: faster printing of floats by divmod10() and others on: September 04, 2013, 02:44:15 pm
Hi Rob,

Yeah, I saw the assembly code and my heart sank - can't use it in the Teensy! However, I am psyched to hear that Paul may be incorporating it into the Teensy IDE... makes sense too given how many bits a 32-bit processor can handle/accumulate/etc.

As for double, I am curious why it was implemented at all if it simply defaults to float precision. I would have simply left it out.

And yes, I worked with long long until I hit a wall of sorts... one of my projects involved a least squares solver for 16 Bit ADC error minimization. Worked like a charm in Excel but numbers with 25 digits couldn't be handled by a 2^64 capable variable (i.e. can't handle anything bigger than 1.84e+19). Hence the use of the BigNumbers library (Thank you, Mr. Gammon!).

Given my knowledge re: libraries, etc. I'll simply continue using BigNumbers then for these sorts of jobs. All the more advisable since Mr. Gammon and Stoffregen have implemented BigNumbers on the Teensy as well.
21  Development / Other Software Development / Re: faster printing of floats by divmod10() and others on: September 04, 2013, 09:57:17 am
Hi Rob,

Thanks for your updates to print, I have been using bignumbers as a substitute.

Just wondering, is your fix going to become part of the default IDE?

Also, how hard would it be to implement longer 'standard' numbers in the  IDE? I am interested in int128, for example. For that matter, it would be great if double was in fact a double float...
22  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: September 04, 2013, 09:47:39 am
Hey, that's awesome news. I had no idea that Rob had updated print to allow longer numbers. I wish this was part of the default IDE.
23  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: September 02, 2013, 03:31:09 pm
Hi Pito,

You are correct, 2^64 numbers are supported on the math side of the IDE, but try printing one.

My comment re: the Teensy 3 is that the IDE apparently has not caught up with the numbers that a 32 bit MCU will easily handle, etc. Hence my use of the big number library since it also allows me to print big numbers for debugging purposes.
24  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: September 02, 2013, 07:47:39 am
Hi DC,

Well, put it this way - I'd love to be able to use a 16-bit number in order to differentiate this unit from the other stuff out there - like openenergymonitor, kill-a-watt, etc. The ADC can actually deliver a 24-bit output but I consider that resolution to be somewhat questionable in terms of what the upstream signal conditioning can handle, my ham-fisted attempts at PCB design smiley-mr-green, the ADC itself (MCP3911) and so on. So I stick to 16 bits. But summing squared 16-bit results does trend towards very big numbers!
25  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: September 01, 2013, 08:32:43 pm
1. Are you sure that your toaster is a pure resistive load? Many modern toasters include electronics to do timing etc. and the small amount of current taken to feed the electronics could be leading or lagging the voltage.

Interesting thought. It never occurred to me that even a very small non-resistive component could have a measurable impact. I noted a similar lag however with an incandescent 40W lamp and a simple on/off switch.

2. Have you tried looking at the mains voltage directly with the oscilloscope, to see how much lead/lag the voltage transformer introduces?

Whoa... I don't think I'm comfortable to stick a oscilloscope probe into a mains outlet, even with a voltage divider circuit, etc... call me a ninny but my oscilloscope is PC-based and I'd be afraid the computer would turn into molten slag rather quickly in my hands...

3. Do the voltages you get on the transformer secondaries look like good sinusoids? Can you see any variation of waveshape with load?

The oscilloscope suggests that the curves are pretty good. However, one thing I noticed is that the usual approach of using sum(V^2) followed by a sqrt operation to determine Vrms is fraught with trouble when you start with a 16-bit ADC, take 1.4ksps, etc. Even the teensy 3 (a 32-bit platform) seems to require the use of the big numbers library to make it work because the Arduino 1.0x environment seems to continue to use 8-bit referenced variables (i.e. a long on a 32-bit ARM is not a 128 bit number).
26  Using Arduino / Sensors / How close is too close? on: August 18, 2013, 11:06:25 pm
Having finished a couple of oscilloscope measurements, I wonder if anyone has run into a similar issue before. Specifically, I have a current transformer (CR Magnetics 8348-2500-N) and a small transformer (2000:1) mounted fairly close on a PCB. The intended use is power measurements. Both devices feed a differential signal into a MCP3911, a analog front end meant for power measurements.

Today's oscilloscope readings on the analog pins in question were a bit worrying, as the pair of pins dedicated to current showed a sinusoidal differential voltage even with no load attached (i.e. probe of oscilloscope to CH1+, and GND of probe to CH1-). When comparing the output of one leg of the CT relative to AGND instead of the other leg, only noise was apparent.

I am wondering if my CT is picking up a signal from the voltage transformer, which is less than 1/2" away. The CT is at a right angle to the transformer, i.e. the axis that the current carrying wire is aligned with is parallel to the axis from low-to-high on the voltage transformer.

I presume that greater distance and rotating the CT by 90* would help? What minimum distance would you use between a 0.08VA transformer and a sensitive magnetic sensor like the CR Magnetics CT? I'd like to stick with the voltage transformer, if I can, to help with isolation from high voltages.
27  Using Arduino / Sensors / Re: Question regarding burden resistors on Current Transformers... on: August 15, 2013, 11:14:59 am
Hi and thanks for the suggestion... I may simply remove the burden resistor (single, connecting the two outputs) and start by splitting the burden resistor into two, using through hole resistors instead, terminating them on AGND. I did note a higher offset error on the current line than on the voltage input (i.e. less than one LSB on the voltage line vs. multiple on the current line). I presume that 'anchoring' the bias on AGND via a split burden resistor will help with that bias.

AFAIK, I did calculate the burden correctly - this is a CR8348-2500-N and the burden I have on it now is 63 Ohms. The max input into the ADC is +/- 0.6Vpeak, so I sized the max. output to be 0.6V assuming a 18Arms load. That corresponds to an R of 59 Ohms and the closest precision resistor I had on hand was a 63.4 Ohm model. The output seems to be OK vis-a-vis currents measured vs. output voltage.

A smaller burden resistor for the current transformer is a possibility since I have multiple gain settings to play with. The additional noise of Gain =2 vs. unitary gain on the input side is pretty negligible. I'll measure the primary resistance on the transformer and try your suggestion. That will require a higher-voltage resistor like a 1W flameproof model, right?
28  Using Arduino / General Electronics / Re: Apple Authentication Chip Dimensions on: August 15, 2013, 10:56:18 am
Might make more sense to try and source the hacked version from iphone5mod, et. al.
29  Using Arduino / Sensors / Re: Question regarding burden resistors on Current Transformers... on: August 15, 2013, 10:49:30 am
Hi DC42 and thanks again.

I measured the phase lag to be about 1.32ms between the current phase and the voltage phase using my oscilloscope. However, that is using a light, unitary PF load (i.e. 40W incandescent lamp). Under higher load (i.e. 1340W unitary PF toaster), the phase shifts decreases to 0.7ms. As mentioned over in the science section, these results have baffled me somewhat. Pito suggested this may have to do with the mains, something I need to follow up on by testing at the 400A power panel vs. in the kitchen.

Either way, either lag cannot be fixed using just the phase register in the MCP3911 since the lag is well outside the realm of the ADC phase register range (+/- 0.3ms with the current settings). As I see it, I have two options: adjust capacitors and resistors as you suggest (not that easy on a 0805 footprint) or accept the lag and simply use offset pairs of readings in the calculations (the ADC is sampling at about 1418 sps).

If my oscilloscope readings are correct, it might make sense to simply pair ampere reading (x-2) with voltage reading (x) to achieve a ~1.4ms correction and then use the phase register to correct the remaining 0.08ms. That is, assuming the light load phase lag is correct.  
30  Using Arduino / Sensors / Re: Question regarding burden resistors on Current Transformers... on: August 15, 2013, 08:42:12 am
Thanks DC42!

I presume that the common mode issue may also explain why Analog attaches Neutral directly to one  of their ADC inputs (see p. 5 of the application note for the AD7753) for the purpose of line voltage measurements. Another explanation is the benefit of fewer drop resistors being required...

My voltage sensing is done through a tiny 0.08VA EE20 transformer. Do you reckon that I should ground one of its outputs per the Analog recommendation? Currently, I have two parallel paths to the analog inputs, both featuring a 36k resistor in series and a RC filter (1k and 100nF). The Analog application note suggests dropping the second line and just keeping the two RC networks. Interesting! Presumably, I'd have to double the resistance of the remaining resistor under the circumstances.

Another option could be to use a transformer with a center tap on the secondary for analog ground. Then run two lines to the ADC as before, but this time with 2x resistance since the output voltage effectively doubled (2x6V vs. 1x6V output).
Pages: 1 [2] 3 4 ... 48