I am trying to read an analog signal from an Arduino board through LabVIEW.

The sensor is an infrared phototransistor, which I have connected in reverse bias (20k resistor) to an Arduino pro mini analog input. The power and ground for the sensor are taken from the Arduino. The Arduino is then connected through an FTDI breakout board to a COM port, which I am reading through LabVIEW. I am able to view the signal on a waveform chart, but it is incredibly noisy. Instead of a single line of data proportional to the light received by the sensor, it looks like the chart is "colored in" completely underneath the signal.

Previously, I read the sensor data directly from a DAQ card without any additional circuitry and got a great signal. Do I need to add something, like a capacitor, externally to remove this noise? I am a mechanical engineering student, so I'm learning as I go with the electrical side.

  • 2
    \$\begingroup\$ Can you post a schematic? \$\endgroup\$ – Hair_of_the_Dog Nov 26 '12 at 19:36
  • \$\begingroup\$ Consider using the internal reference (1V) for stable reading and attenuation of the signal if needed. \$\endgroup\$ – user43200 May 21 '14 at 20:18

Does your arduino use the +5V provided by the USB as power and as reference for the A/D? IME it is very unstable, varying for instance between 4.5V and 5.5V. You could try to use a wall-wart + 7805 instead.

  • \$\begingroup\$ when you say "unstable", do you mean "different on different installations", or "drifts between 4.5 and 5.5 at frequencies high enough to cause these problems"? You, of course, need to handle Vusb correctly, but I haven't heard of Arduinos making Vusb oscillate. \$\endgroup\$ – Scott Seidman Nov 27 '12 at 13:25
  • \$\begingroup\$ I meant the 5V of a system varying, probably due to disk and CPU activity. Has nothing to do with connecting an Arduino. Note that the 5V has little direct use on a modern PC, most circuits run at 3V3 or lower, hence some variation won't affect the PC. \$\endgroup\$ – Wouter van Ooijen Nov 27 '12 at 14:29

Preferentially, step one is to LOOK AT the signal that you're collecting with an oscilloscope, if that's possible. Figure out if this noise is really there, and if so, is it there in both situations for sampling.

Next, examine the sample rates in your two situations, and make sure that they are similar. If you were sampling too slow with the DAQ card, you could have aliased your noise down to lower frequencies.

After that, you can start looking at decoupling capacitors, your grounding scheme...and possibly analog buffering. There's probably an order of magnitude or more of difference between the input impedance of the arduino A/D vs the DAQ card (with the DAQ being better), so even if all else is perfect, you might be looking at two very different circuits just because of this. Circuit diagrams would help a good deal.

  • \$\begingroup\$ In fact, check out your signal size using both strategies. I wouldn't be surprised if it were less than half on the Arduino platform because of low input impedance (probably less than the 20k resistor you're using, so your noise might just LOOK twice as big! An analog buffer like a voltage follower using an op amp might help here. \$\endgroup\$ – Scott Seidman Nov 26 '12 at 21:03

It's a bit like trying to fly a kite. If you imagine the signal as only a single line it will fly all over the place. If you have two lines you can control the flight without it wandering all over the place.

Now look at all the paths connected to power ground and signal and try to keep them close together like a pair of kite strings. Instead of a tail, we use capacitors across supply + ground near the part for low impedance or shielding of the signal with twisted pair or coax. If you can supply the power from the PC as well you might avoid the stray hum.

Now Infrared sensors are are also sensitive to 60Hz lights so a test of stray light sources might be useful. Since light emission is inversely squared proportional to the distance, you may also have to consider these factors of emitter power and distance. Daylight blocking filters are recommended and included as black plastic on some parts.

Without any engineering technical details from you, I can only give you fuzzy analogies of signal shielding and ground noise from separate sources and using close wire pairs instead of a single path to guide the signal.

If your system is powered by a floating charger chances are you don't actually have a ground connection. If this is the case, you can suppress a lot of stray noise by connecting the case to ground. This low impedance shunts the stray electric fields caused by magnetic and Switched mode power connected cables that may only be shielded on the AC side.

Consider the VGA port fastening screw and/or the Arduino supply to ground such as your LCD monitor VGA port ground screw or simply connect the laptop to a grounded LCD monitor via the grounded video cable.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.