Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 50
61  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: August 13, 2013, 01:44:22 pm
I hope to have a look tonight. Any idea how much the above references would influence the measurements of loads with a power factor of one? The two loads I tested both should be 1 as one is a light bulb, the other a toaster. Now the latter features relay/contactor and both also enjoyed a Killawatt being in the measurement circuit but I doubt the killawatt nor the contactor would have meaningful impacts on the measurements.

What was also very interesting is how much 'fuzzier' the current signal was. Far more noise there than on the voltage signal.
62  Topics / Science and Measurement / Re: Question re: phase lag on energy measurements on: August 13, 2013, 08:55:26 am
Good question, Pito. I thought the impedance of mains is assumed to be very, very low. IIRC, the house has a 400 Ampere service feed @ 240VAC and the outlet is fed by 12AWG wire (@ 120VAC through a 15A circuit breaker). So I'd like to think that the impedance would be low. However, that jogs a memory. We did some past measurements here with high-powered microwaves that had a nasty tendency to depress the line voltage out of spec re: the test procedure. Only measuring at the panel worked (i.e. stay within 1% of the stated line voltage even with a 1800W load attached).

I will re-measure right at the panel and see if that influences the results. Thanks for the suggestion!
63  Using Arduino / General Electronics / Re: PCB Impedance Question on: August 13, 2013, 06:46:21 am
Lots of things to consider at higher frequencies! Ran into this issue with a GPRS board I made... had to go to a thinner FRP design than usual (1mm vs. 1.6mm thickness) to accommodate the microstrip requirements of the cell phone antenna. Also consider grounding and EMI carefully - I tried and appear to have succeeded. It took a while, but the board has a almost continuous ground plane except for things like the SPI pin headers, for example.
64  Topics / Science and Measurement / Re: Datalogger powerdown between logging to save power on: August 12, 2013, 10:05:27 pm
I'd look into making use of the sleep mode as much as possible. Also, consider switching to a slower clock in case your data logging operations don't need all 16MHz of Arduino happiness.  Here are some basics, then there is a sleep library, two alternative libraries, and some good advice.
65  Topics / Science and Measurement / Question re: phase lag on energy measurements on: August 12, 2013, 08:58:12 pm
Hi guys and gals,

I hooked up the front end of my ADC to my oscilloscope and measured something interesting. Specifically, there appears to be a variable phase lag between the transformer for the voltage signal (ERA 0.08VA) and the current transformer (CR Magnetics CR8348-2500-N) as a function of load. Voltage always is lagging current.

The phase lag ranges from ~ 1.32ms at a 40W load to 0.722ms lag with a 1340W load. Both loads have unitary gain, i.e. a 40W light bulb and a toaster. Is this normal?
66  Using Arduino / Sensors / Re: 240 Volts ac variable voltage measurement on: August 11, 2013, 03:10:00 pm
I don't want a non-linear response from a transformer, accuracy is important to me. 

Interesting proposition that is not born out by my experiments, BTW. Using a small 0.08VA transformer, a 16-bit front end, and appropriate resistors, caps, etc. results in a linear R^2 of 0.999989 line fit. Measured from 10VAC to 130VAC using a variac and a Fluke 87 DMM. Seems pretty linear to me. The key here appears to be to keep the transformer as lightly loaded as possible, I've got over 50K in resistance across the secondaries, so the current flow is very low.
67  Using Arduino / Project Guidance / Re: Realistic Limitations on 1-Wire and a Atmel 328P? on: August 06, 2013, 03:14:57 pm
Thank you, sir.

Didn't know of the sizeof function!
68  Using Arduino / Project Guidance / Re: Realistic Limitations on 1-Wire and a Atmel 328P? on: August 05, 2013, 11:29:59 pm
Hi Nick and thanks for the response - you are correct, one could read individually and then send each entry. However, I was hoping to bundle multiple device readings into one transmission. On top of that, I wonder how much RAM each instantiation of the One-Wire library will absorb (sort of fixed overhead, if you will).
69  Using Arduino / Project Guidance / Realistic Limitations on 1-Wire and a Atmel 328P? on: August 05, 2013, 04:23:40 pm

I wonder what the practical limits are re: 1-Wire and the Atmel 328P processor. As I understand it, multiple instances of 1-Wire can be invoked, i.e. more than 1 pin can host 1-wire sensors at once. Since every string of 1-wire sensors can have up to 127 sensors, even a few pins being dedicated to 1-wire would lead to hundreds of sensors that would have to be read.

Due to the 2kB limit on SRAM on the 328P, I'd expect fully loaded 'strings' of daisy-chained one-wire sensors to be potentially problematic. Does anyone have experience with large numbers of DS18B20 sensors sharing a bus on a Arduino? Did you ever run out of SRAM or how did you resolve any conflicts you may have had?

FWIW, I'm considering building a board with twelve 1-wire buses and wonder whether I should base it on a 328P or a 1284P. As conceived, I'm only planning on having one sensor per bus to make discovery as simple as possible (i.e. only one device to discover). Ideally, data would be processed into temperatures, humidity, etc. before being shipped out over a serial link. Ideally, all data would be shipped in one shot, i.e. using Easytransfer.
70  Using Arduino / Networking, Protocols, and Devices / Re: [SOLVED] SPI communication failure... anything obvious with the code? on: July 29, 2013, 03:50:23 pm
No, apparently, high currents are only produced in "beeper" mode. So, in general a DMM should be safe - but I would limit measurements for resistance to 'off-mode', i.e. an unpowered PCB.
71  Using Arduino / Networking, Protocols, and Devices / Re: [SOLVED] SPI communication failure... anything obvious with the code? on: July 29, 2013, 06:50:03 am
Just a follow-up, once I replaced the MCP3911 with a fresh chip, all was well.

72  Using Arduino / Networking, Protocols, and Devices / Re: [SOLVED] SD card SPI conflict on: July 29, 2013, 06:44:47 am
How details can come back to bite one in the rear end...

So, tracing the wires going into the SD card holder (and mind you, I chose the Hirose unit because it features exposed pads vs. the many models out there that hide their pads under the metal wrapper) I noted a anomaly. Wires were not where I expected them to be. Long story short, the library part I created for the Hirose had a switched pair of pads (correctly labeled but incorrect location) that lead to 3.3V being swapped with MISO. Yeah, there is a lot of egg on my face. Previous issues with other boards that I was never able to resolve probably came from this very simple little problem.

Anyhow, the MCP3911 team deserves a lot of credit for the analog front end it produced. It is a great chip and anyone contemplating energy measurements with an Arduino ought to consider using it. You get 24 bits of no missing codes, 16 ENOB if you turn on decimation to 2048s/s and so on. I ran a quick test of a tiny transformer output vs. the incoming voltage varying via a variac and the response was not only linear, it matched with a an R^2 of 0.999989 to a linear plot fit. That's pretty good. I have yet to test a current transformer but I doubt the results will be much different.

Anyhow, thank you Nick for your help!
73  Using Arduino / Networking, Protocols, and Devices / Re: SD card SPI conflict on: July 27, 2013, 05:21:13 pm
Hi Nick,

Thank you again for the link - you are correct, your library takes care of just about everything!

I'm at the point where I am going to declare that the Sandisk 2GB MicroSDHC and the MCP3911 simply cannot play nice, no matter how much I do to make them happier. Let me explain what I did to test the conditions, what conclusions I came to. I hope I'm wrong! [EDIT: I was wrong, see below]

So, to test the Teensy 3 by itself, I replicated the Teensy MicroSD shield using a sparkfun part I had. The breakout from Sparkfun does not feature the pullup resistor that Paul put on his breakout (3.3V to MISO) so I added one on the breadboard. Running the SDInfo example yielded a happy card, lots of information - this from the same SD card on the other board being terribly unhappy.

On the other board, I added the missing MISO pullup and another 10uF capacitance for VCC-GND, etc. all to no avail. I am going to double-check my previously-checked pinouts one more time. But if that passes, my next "test" will be to isolate the SD card carrier on the SPI bus (cut the traces continuing on to the MCP3911) and see if that does the trick. If the SD card works fine without the MCP3911 being on the hardware SPI bus, then my inclination will be to use your library for the MCP3911 while leaving the hardware SPI to the SD card.

Seem reasonable? Thank you again!
74  Using Arduino / Networking, Protocols, and Devices / Re: SD card SPI conflict on: July 27, 2013, 07:28:26 am
Hi Nick,

Thank you so much for your reply. I chose 100 Ohms for the series terminator based on the characteristic impedance that a 2.5" long 24mil-wide trace produces. All the other SPI lines were so short that they were going to be OK either way (i.e. less than 2"). Paul S. also recommended a 100 Ohm resistor for the CLK signal the Teensy 3 is producing for the MCP3911 to reduce potential for EMI issues.

Are conflicts between SD cards and other devices on an SPI bus so common that the cards need to be segregated? In the current incarnation, the idea was to log relevant data once a second to the SD card. The SPI bus is running at 8MHz (the maximum, allowed, it appears). The teensy may or may not be able to bit-bang at up to 12MHz because of the clock-divs that the teensy offers (the maximum frequency that a PWM pin can produce is 12MHz, as best as I can tell).

I am really reluctant to learn / implement how to bit bang, but there doesn't appear to be an alternative. I wonder why the SD card is answering / interfering when its CS-pin is held high by the MCU and features a (belts and suspenders) pull-up (10K) as well.
75  Using Arduino / Networking, Protocols, and Devices / Re: RS485 with attiny45/85 on: July 27, 2013, 05:28:46 am
All depends on your application. However, if the aim is to reliably and easily transfer data serially (or via rs485) then easy transfer is a huge time saver. 
Pages: 1 ... 3 4 [5] 6 7 ... 50