Problem using long USB cable

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?

1 Like

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?

1 Like

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.

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.

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?

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:

1 Like

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.

Hi, I am wondering if you have found a solution to your problem?

I am having some problems with powering a Sparkfun Photon Weather shield in a home made station over a 10m (33ft) run of 3 core outdoor garden style cabling. I am getting random rain gauge readings when on the wired power source. On a battery and solar power source the rain gauge is fine. The power cable is routed with some satellite and TV antenna coax cabling on the way to the weather station.

I am currently assuming it is RF noise causing some fluctuation in the voltage which the rain sensor is interpreting as rain sensor movement.

I have put on a couple of RF chokes on the line like these - https://goo.gl/images/o2shRw - but this does not work.

I am now looking to replace the cable with some ethernet CAT6 cable to see is this stops the noise…if this is the real issue.

Setup:
Sparkfun Photon Weather Shield
Sparkfun Photon battery shield - power source is connected on the battery shield.
Power pack - 5v 2.0mA

thanks
Anthony

You should measure the actual voltage near the weather station and also add some capacitors to filter out high frequency (100nF) and for buffering (100µF) for quick current demands.

Maybe this would help to go along with what @bko PS he suggested.

Thanks ScruffR, Voltage at the Photon end is 5.18v down from around 5.25v.

Where in the voltage line would you suggest placing the capacitors? Transformer end or Photon end of the line?

Also I assume the capacitors are place across the positive and negative cables and not in line?

Thanks
Anthony

The caps need to be placed as close to the Photon as possible and as you say between Vin and GND.

Note that this can cause problems. Using a small resistor in series with the capacitor will help damp overshoot, but things like this push you into sketchy territory unless you know what you’re doing.

https://docs.particle.io/datasheets/wi-fi/photon-datasheet/#power

1 Like

Yup, that’s another reason for the 100µF mentioned above - but the extra Zener wouldn’t be a bad thing either.

HEng, thanks. It’s official I am in sketchy territory, hence seeking advise. :slight_smile:

what type of resistor would be recommended?

The referenced application note should give you an idea of what the issues are.

On the device side that long wire is like a thin straw, so you need a reservoir to draw on without introducing these additional issues.

The solution may require some experimentation with an oscilloscope.

Hi, I have added the following caps at the photon end of the line but this is not working as the rain sensor errors are still happening.

https://www.jaycar.com.au/100uf-16vdc-low-esr-electrolytic-capacitor/p/RE6310
https://www.jaycar.com.au/100nf-100vdc-polyester-capacitor/p/RG5125

…and replace the power cable with cat 6e twisted pair ethernet.

Any other tips?

thanks
Anthony

Find an oscilloscope and use it to help you figure out whether your issues are with the power. They’re quite cheap these days. Rigols are great for the price.

1 Like