6

I have a very strange problem with my RPi. Whenever I tried to run two webcams simultaneously, RPi restarts itself. A few months back I can run two webcams simultaneously without such a problem (same cameras and RPi). I used this PSU.

Input voltage: AC 100-240V 50/60Hz Output: DC 5.0V, 2400mA (2.4A).

With single webcam, RPi works fine.

What is the problem with RPi? How to correct this?

Naseeb Gill
  • 199
  • 2
  • 6

5 Answers5

9

No one is mentioning that the Maximum total USB peripheral current draw on a rpi 3b+ is 1.2A (power requirements) Having said that your current psu is enough. If the cameras are indeed drawing more than 600mA each (which I really find it hard to believe, unless they are dodgy) you should start exploring the option of a powered usb hub.

papatrexas
  • 511
  • 1
  • 3
  • 12
4

In the absence of any quantitative observations, the community can only guess. What is the current rating for the power supply? Perhaps a power supply with more current can solve the problem if the cameras need more current than what is available.

If only one attached camera does not cause a reset, then, the current (amperage) is in all likeliness the problem.

You can measure the current draw of the one and two cameras with an ammeter (example from eBay):

enter image description here

And determine if you have enough current for:

  1. the rPi
  2. camera 1
  3. camera 2

If you try this approach, let us know the measurements and the outcome.

Update:

The OP has indicated a 2400 mA supply, however:

Typically, the model B uses between 700-1000mA depending on what peripherals are connected; the model A can use as little as 500mA with no peripherals attached. The maximum power the Raspberry Pi can use is 1 Amp. If you need to connect a USB device that will take the power requirements above 1 Amp, then you must connect it to an externally-powered USB hub.

The OP has not identified the pi model: when he provides the measurements, of the three devices, then the problem can be diagnosed and corrective action can be taken.

gatorback
  • 637
  • 1
  • 6
  • 21
2

RPi is also sensitive to voltage at any time below 5V. In addition to quality - this is one reason the official supplies are also about 5.19V.

Even RPi without USB peripherals but under heavy load can pull enough current to "brown out" (to the RPi) the voltage below 5.0 V. A spontaneous reboot is more a sign of voltage supply drops as the RPi will throttle cpu to manage cpu temps.

So an RPi will pretty much keep running unless voltage drops. And they're pretty sensitive to that.

The USB meter shown above should also be used to read the voltage and ensure it stays always greater or equal to 5V. With both cams and all app / cam / whatever processing.

Remember also that while RPi has a max USB of 1.2A that doesn't mean you can fully load an RPi (cpu) AND 1.2A USB without upgrading the supply.

Note also that 3A isn't "dangerous" per-se. Amps don't push. Volts push. Amps are drawn based on volts and load. So a 3A supply should be fine.

Offhand though go to the official site(s) and see what the draw is maxed cpu only, test that, and add in your 1.2A for USB, and that would be your minimum. See what max spec is (should be on some sheet on web) also.

1

Here's a quote from a reply that Logitech gave regarding the power consumption of their webcams:

[On] C310, power consumption can be anything from 50mA idle to all 500mA for streaming video.

It's quite typical for USB 2.0 devices to aim at always being under the 500mA power budget, which is a maximum that a fully compliant device can draw. So I think it's quite unlikely that you exceed the 1.2A allowance of RPi's USB ports (which, when exceeded, should result in a disconnect, not a reboot), or 2.4A limit on the total current (RPi 3B+ should not consume more than 1A even at full load).

You should try to remember what changed since "a few months ago" when everything worked. Maybe this power supply is new, and it's not as good as the spec claims (or simply defective)? Maybe you got a new USB cable which is not good enough. If the hardware didn't change, try to downgrade to an older Raspbian image and don't upgrade right away. Maybe there's a regression introduced in the webcam's driver or firmware. Keep in mind that Logitech webcams don't officially support Linux.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
0

Always have multiple known good quality power supplies, and good cables (high current rated, and preferably short) , and try several of them first.

Also know that power supplies which worked perfectly for year(s) can an do go bad -- they still look like they work in majority in cases, but at higher load their voltage drops below 4.75V even for a shor time, and RaspberryPi reboots or some parts of it fail.

That happened to me recently, raspberry pi would sometimes lose ethernet connection until manual power cycle (reboot didn't help). With multimeter, I've measured the voltage between TP1/TP2 test contacts while being at 4.9V most of the time, sometimes dropping as far down as 4.60V. Issue was power supply (rated at 2.4A which was working fine for two years and nobody touched it before things started happening). New power supply fixed it immediately.

Alternatively, it may be that one of your cameras is faulty and is driving more current that it should. If that is the case, and you have (or can borrow) third one, you can test them in pairs (A+B, A+C, B+C) to isolate the faulty one.

If all of that fails, if you can get/borrow extra raspberry pi and/or sdcard, you can try to isolate if problem is in one of them.

Matija Nalis
  • 101
  • 3