Problem using long USB cable


#1

I am powering my Photon and sensor through 10 ft micro USB cable connected to a wall plug. With this current setup, I see a lot of noise in the sensor readings. However, with a shorter cable, there is no noise. But the issue is that the long USB cable in my case is unavoidable. Is there an easy solution to this problem where I can keep using the long cable and eliminate the noise in the sensor?


#2

The simple answer is of course that you could pick up a 12ft extension cord at Home Depot for $2.50. Then you can use the short cable :wink:

If you could tell a little more about what sensor you are using, we could probably also help you more?


#3

I would look for a higher quality power supply. The Adafruit USB supplies are designed to output 5.25V instead of 5.0V to compensate for longer cables and other problems, for instance.


#4

Sure! I am using Parallax X-band Motion Sensor.

The idea of using the extension cord is great and I had initially thought about it but sadly it won’t be a potential solution due to the nature of the application.


#5

Thank you @bko! As per the description, the length of the cord is 6’ and I would require at least 10’ for my application. Unfortunately, adafruit does not have any cords that are more than 6’ in length. Do you know any other place I could find 5.25V adapters which are 10’ in length?


#6

Are you just needing to supply power or do you actually also need the USB communication?

If USB communication is not needed power the device via Vin and GND. This way you can go for any kind of cable and add some filtering nearer to the device.


Update:
Sorry I missed the topic title about the problems with long USB cables :flushed:


#7

Sounds like the USB cable is picking up stray RF (it is improperly functioning as a radio antenna). This is common for 10’ cables which are resonant around 27 mhz (the cb radio band). If this is the case, the easiest solution is to install an RF choke on the USB cable. A few tight loops of USB cable right before it plugs in might also work (tape the loops in place with electrical tape). You might also try a longer cable (12’) thats not resonant in a frequency spectrum that’s not as heavily used.