Show Posts
Pages: 1 ... 36 37 [38] 39 40 ... 50
556  Using Arduino / General Electronics / Re: Power Supply Ground Question on: March 02, 2012, 09:41:44 am
I've seen in the ATMEL docs where people shut down parts of the chip to get cleaner ADC. I don't remember where but....
Was that related to sleep? I seem to recall the ADC having some sort of mode related to better precision after the chip waking up... That said, I doubt this is terribly relevant to an Arduino (noise that is) unless you use an op-amp to boost small signals. As is, the best resolution one can hope for from an Atmega 328P, 1284, 2560, etc. is about 1V/1024 or about 1mV. Under normal circumstances (i.e. AREF=5V), that rises to about 5mV.

16 bit ADCs offer 64 times the resolution, so there is much more opportunity for noise to be measured with them (i.e. 0.07mV resolution with a 5V range). Having read some more literature re: noise, etc. I now understand better why differential measurements are as popular as they are.
557  Using Arduino / General Electronics / Re: Power Supply Ground Question on: March 02, 2012, 06:29:36 am
Hi MarkT and thanks for the response.

As far as the Neutral to Ground question is concerned, I agree. For one, I could see how tying the two together could be really fun if someone mis-wired a outlet w/o a ground (i.e. reverse line and neutral) followed by the homeowner using one of those adapter plugs that "converts" a non-grounded outlet into a grounded one - naturally w/o first attaching the ground ring on the adapter to ground first. Any metal surfaces would be "hot" then.

Never mind the fun that would ensue if a dead short is inserted into an mis-wired but grounded outlet if the appliance had the ground and neutral line tied together. So I can see why one would not want to do that.

But coming back to the original question: Is it good design practice to ground a PCB to the AC mains ground or not? Sure, some components might be required to do it safely! But isn't it a good practice, especially if anything attached to the Arduino is grounded as well? From what I recall reading, quite a few power supplies create 'floating grounds' relative to the earth ground, potentials that can cause unhappiness if the arduino is exposed to earth ground (analog input pin, for example).

Additionally, fat16lib noted significant performance improvement re: his ADC after using an earth ground. I presume this has three reasons: 1) He's using a switch-mode power supply which likely has a bunch of harmonics/noise/etc. that older supplies based on linear regulators and transformers would not, if implemented properly. 2) His ADC is very sensitive. 3) His Arduino board power was floating relative to earth ground.
558  Using Arduino / General Electronics / Power Supply Ground Question on: March 01, 2012, 07:37:59 pm
In another forum, fat16lib brought up that he specifically bought a grounded power supply from Phihong to minimize the measurement error /noise he was observing on his 16bit ADC. He confirmed that the ground is a pass-through design, so now his circuit is grounded to the mains ground. He observed much less noise on the board, resulting in better measurements.

I too am putting together an ADC solution with 16 bit resolution though so far my on-board switchmode power supply the VOF6 from CUI, is installed as delivered, i.e. isolated. It only features two input pins, Line and Neutral, and two output pins, 5VDC and GND.

I don't know if there is a potential for my board to develop a ground loop going forward, but I thought it would be a good design practice to ground the PCB to earth in general. Thus, what are the downsides to grounding a PCB to earth? If one were to retrofit such a ground, would the best approach be to use a 2200pF, 2kV capacitor as suggested at Wikipedia? Would you fuse such a connection in case the outlet is hopelessly miswired or the AC ground develops a high potential for some other reason? Or perhaps use a very thin trace coupled with a 0805 fusible resistor with a low resistance for said connection?

For that matter, is it good design practice to always tie the purported AC ground and Neutral lines together on a PCB or to leave them separate? While I should be able to do this (assuming the outlet is wired correctly), experience in the field has taught me otherwise.
559  Using Arduino / Sensors / Re: AC adapter for use with sensors on: March 01, 2012, 12:28:43 pm
This article from Wikipedia suggests using a 2,200pF, 2kV capacitor to couple the PCB GND to the 120V mains ground. Sound reasonable?
560  Using Arduino / Sensors / Re: AC adapter for use with sensors on: March 01, 2012, 09:47:38 am
The Phihong adapter arrived from Mouser.  It has a pass-through ground...Very low ripple and noise on a scope.
Great news. And now for a question that has been vexing me:
If you were designing a device to get power from an on-board switchmode power supply like the VOF6 from CUI, would you make a point of connecting a AC ground (assuming you're using a 3-wire AC cord) to the GND on the DC side of the power supply? Would you fuse such a connection in case the outlet is hopelessly miswired or the AC ground develops a high potential for some other reason? Or perhaps use a very thin trace coupled with a 0805 fusible resistor with a low resistance for said connection?

For that matter, is it good design practice to always tie the purported AC ground and Neutral lines together on a PCB or to leave them separate? While I should be able to do this (assuming the outlet is wired correctly), experience in the field has taught me otherwise.
561  Using Arduino / Sensors / Re: Measuring High Voltage DC? on: February 29, 2012, 09:20:30 am
Take a look at openenergymonitor.org. They have a nice tutorial re: AC measurement.

I'd avoid reading the output of a shunt directly. Instead, I'd go for something like the S22P series current sensors from Tamura. Isolated = good. Plus, the S22P puts out a always-positive signal centered around 2.5V, which is perfect for the Arduino because it uses a unipolar ADC.

As for reading voltage, few opto-isolators put out a linear signal, most are on/off, but they do exist. A carefully constructed voltage divider may be the way to go on the input side of the opto-isolator. But I would fuse that one very carefully given the potentials you are likely dealing with and I'd use a removable opto-isolator (i.e. DIP mount with a corresponding socket) to make opto-isolator replacement easy if you accidentally let the blue smoke out.
562  Using Arduino / Sensors / Re: non-arduino speed sensor on: February 29, 2012, 06:47:41 am
Yes, if the output is up to 12VDC, you will need to use a voltage divider to bring that down to a safe voltage. For standard resistor values, I'd consider something like a 10k and 6.8k resistor combination (which makes for 4.85vdc). But if you have a big set of resistors, you can do even better than that.

Place the two resistors in series, where one end of the 10K resistor goes to the pulse output of the GPS unit and the other end is attached to one of the digital pins on the arduino. Then attach one end of the 6.8K resistor to the same digital pin and the other end to GND. You have to share GND between the GPS sensor and the Arduino as well.

While ISRs have great value, I'd consider perfecting the code first before using an ISR. That minimizes your potential points of failure and code optimization (if an ISR will do that) can happen later.  Let me give you an example.

I have a power measurement board that samples two analog channels pretty much as fast as the ADC allows. This routine runs about 2x faster than the analog.read function allows because I'm addressing the ports and the ADC directly. None of the power measurement code uses a ISR because they gobble up 51 processing cycles every time they are invoked. At my sampling rate, the code would consume 510k cycles per second just to drop into an ISR... and the impact is measurable.

However, I do use an ISR to signal to the code that the time is up and that the previous set of power measurements has to be summarized and sent off to the main CPU (basically, the main CPU pulls a pin high on the measurement CPU and the ISR on the measurement CPU notices the rising edge). But that is one ISR being invoked every second, i.e. only 51 cycles per second lost or 1/10,000th of the above. So yes, ISRs are very useful but understand their costs and benefits before jumping in both feet. The more times a ISR has to be invoked, the greater the potential impact. That is why I only use the ISR as a signaling device.

If the main objective of your code is focused on measuring the pulses, it may make a lot more sense to not use an ISR, especially if the pulse trains are very fast (i.e. thousands per second). If, on the other hand, the pulse trains are slow (fewer than 1000 per second?) then using an ISR can be a great way to keep count of pulses while allowing the Arduino to focus on other things as well.
563  Using Arduino / Motors, Mechanics, and Power / Re: Bang bang bang on: February 29, 2012, 06:24:03 am
One investment you may want to consider is a programmer, which allows you to take 'virgin' Atmel Atmega chips and burn the bootloader onto them. Chips w/o a bootloader are usually more available than chips with one... and these sorts of programmers do not have to cost much more than $15 or so. Alternatively, a Arduino can act as a ISP as well - look up the info on this web-site on how to do it. Naturally, that requires one of your boards to still be functional...
564  Using Arduino / Motors, Mechanics, and Power / Re: Bang bang bang on: February 28, 2012, 03:21:31 pm
The good news is that the chip is removable... you bought the non-SMD version, right? Pre-programmed chips are about $5 a piece from vendors like modern devices or adafruit, if I remember right. Best of luck!
565  Using Arduino / Sensors / Re: Remote Weather Sensors on: February 27, 2012, 03:23:34 pm
I'd consider the DHT22 series of RH and temp sensors. Inexpensive ($10), uses a digital bus (so less sensitive to noise), and I hope the accuracy is good enough. There is a Arduino library for the DHT22, so interfacing with the thing is super easy. Sparkfun also sells barometric pressure sensors. Another great place for sensors and good advice /tutorials is adafruit.com.

Modern Device sells a solid-state wind-speed device that folk have successfully used. I use a simple in-speed cup unit that works great (hall effect sensor).

I have never worked with GPS sensors, can't help you there, sorry!

Instead of communicating via bluetooth, another approach worth thinking about is a real time clock like the Chronodot and a small SDHC or other flash device to write to. Time stamp each entry and you're good to go, with minimal chance of interference.

Think about the enclosure you're housing them in - otherwise irradiance may influence your measurements unduly.
566  Using Arduino / Sensors / Re: AC adapter for use with sensors on: February 27, 2012, 03:06:12 pm
I'd be interested to find out if the ground on that Phihong adapter is a pass-through or not. I.e. if you connect a ohm-meter to the outside metal contact of the barrel and the ground pin on the incoming power connector on the brick, do you get a low-resistance connection or not?

A somewhat related question is: Why do switchmode power supply manufacturers frequently eschew providing this sort of grounding? Is the floating voltage something you can ignore as long as the device is sufficiently insulated / the currents are sufficiently low?

I agree that being well-grounded is a good thing... many not so fond memories of older metal Apple laptops (like the titanium G4) giving me zaps continuously if I was well-grounded and only using a 2-prong adapter on the power brick. Switching a a grounded power cord always solved that problem.
567  Using Arduino / General Electronics / Re: I2C logic level converter 5V - 3,3V on: February 26, 2012, 01:09:26 pm
As others have noted, the resistor approach can work. However, I prefer using dedicated translator chips like the pca series for i2c or a ixb series for SPI level shifting. While resistor divider bridges usually work, it's chips like these that remove one more worry from the circuit. This is especially relevant with faster devices like some SD cards. 

Another approach (more chips) uses two 10k resistors and a BSS138 Fet to enable bidirectional. communications. See here. I've used this circuit in SPI communications but prefer the IXB approach - simpler to implement, uses less overall board space.
568  Using Arduino / General Electronics / Re: Soldering Irons on: February 26, 2012, 09:20:40 am
I agree that the Weller works! However, I would ditch the OEM sponge for tip cleaning and buy one of those inexpensive brass shaving-style tip cleaners.
569  Topics / Science and Measurement / Re: Communicating with RS485 devices on: February 25, 2012, 01:51:05 pm
Hi,

Connecting via RS485 is one thing, being able to communicate is quite another. Do you have the software specifications re: the communications bus? They may or may not be easy to discover. If not, I'd stay away from this project as a beginner.
570  Using Arduino / General Electronics / Re: technique for neat smd components? on: February 24, 2012, 02:26:09 pm
Well that and I don't think my parents would let me get anything like that, they'd kill me if they knew I soldered in the house as often as I do
Why? Fire risk? The only truly dangerous part IMO is the potential for lead and acid fumes to do their thing unless you use a fume hood to collect that stuff.
Pages: 1 ... 36 37 [38] 39 40 ... 50