Show Posts
Pages: 1 ... 36 37 [38] 39 40 ... 50
556  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?
557  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.
558  Using Arduino / Sensors / Re: Measuring High Voltage DC? on: February 29, 2012, 09:20:30 am
Take a look at 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.
559  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 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.
560  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...
561  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!
562  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

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.
563  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.
564  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.
565  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.
566  Topics / Science and Measurement / Re: Communicating with RS485 devices on: February 25, 2012, 01:51:05 pm

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.
567  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.
568  Using Arduino / General Electronics / Re: technique for neat smd components? on: February 24, 2012, 09:29:35 am
Correct, hot air systems are great for replacing components or working small sections at a time. But if you have any interest in getting things done quickly, the stencil approach is hard to beat. Plus, there is usually little to no rework after the fact because the solder paste amount is always right (ie no bridges to be removed). I guess it comes down to how much you value your time.
569  Using Arduino / General Electronics / Re: ADC aquisition hipotesis? on: February 24, 2012, 09:03:02 am
Check out the the section at that describes their hardware setup. Their approach uses a Biasing circuit that results in a positive-only signal for the unipolar ADC in the atmega chip.

There is a similar circuit that I explored in this forum that used a coupling capacitor to remove any dc signal components from the AC signal and then biased it sufficiently to remain positive.
570  Using Arduino / General Electronics / Re: technique for neat smd components? on: February 22, 2012, 07:43:21 pm
I order stencils from pololu. I find the prices quite attractive. A $40 toaster oven from amazon does the rest. Techni-tool and other places offer solder-paste with and without lead. My understanding is that leaded paste is more forgiving but the fumes may or may not be bad for you.

I simply pre-heat the oven, then put the board in on high heat (toaster setting) with the board suspended in the middle of the oven cavity. When the solder paste turns shiny and liquifies, I turn off the heat, wait a bit, then pull the oven door open and allow the board to cool down. Has worked great and the stencils are a lot faster than tack-soldering.

Another issue with tack soldering small SMD components is the conductivity of the part - you may need to be really quick to prevent the heat transfer through the part from softening the solder connection on the other end of the component. I tried, and I gave up - 0805 - sized components were simply too much of a challenge for me. I suppose if I had a narrower tip and thinner solder, it might have worked better but with some of the solder landings underneath the components, solder paste is the way to go IMO.

Last but not least, another way to use solder paste minus a toaster oven or skillet on a  hot plate is to use the paste (you can even apply it without a stencil by using a fine tip and a plunger) and then a hot air gun to melt and solidify the solder paste.
Pages: 1 ... 36 37 [38] 39 40 ... 50