Are USB ports connected to common controller or are they separate?
I am concerned about practical USB bandwidth.
How many USB web cams ( small frame format, no HD ) can I connect / run on the entire board?
Thanks
- DougieLawson
- Posts: 40466
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: USB ports bandwidth
Common LAN9514 controller (which also runs the ethernet). On an A, A+ and Zero there is no USB controller, there's just a single USB port driven from the BCM2835 SoC.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: USB ports bandwidth
Note the raspberry pi camera doesn't use USB bandwidth at all - and you can use two of them on the compute module...
You can use that in addition to USB webcams.
You can use that in addition to USB webcams.
Android app - Raspi Card Imager - download and image SD cards - No PC required !
Re: USB ports bandwidth
Thanks for reply, but that was not what I asked , sorry.
- RaTTuS
- Posts: 10681
- Joined: Tue Nov 29, 2011 11:12 am
- Location: North West UK
- Contact: Twitter YouTube
Re: USB ports bandwidth
480mbps is the max for the USB port
what do your cameras output ?
what are you wanting to do with the output of the cameras
the RPI camera is much better than most usb cameras [YMMV]
what do your cameras output ?
what are you wanting to do with the output of the cameras
the RPI camera is much better than most usb cameras [YMMV]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: USB ports bandwidth
All the four USB ports on the Pi B models are muxed on to a single USB port in to the SoC, so you are restricted to an overall bandwidth of about USB2 rates, which is usually about half of theoretical maximum once you take in to account overheads. Not only that but the ethernet is muxed on to the same port as well, so you need to take that in to account as well.
As someone above says, the Pi camera does not use USB and does not impact on the USB port at all.
As someone above says, the Pi camera does not use USB and does not impact on the USB port at all.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
-
- Posts: 13944
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: USB ports bandwidth
Depending on how you figure it, you may do a bit better than half.. My SSD read test (reading 3.2GB) using a Pi3B came in at 35MB/s. Just counting 8 bits per byte, with no added start/stop, parity, or other overhead, that would 260Mb/s. If you use the old serial line rule of thumb of 10 bits per byte transferred, it would 350Mb/s, or nearly 3/4 of theoretical maximum.jamesh wrote:All the four USB ports on the Pi B models are muxed on to a single USB port in to the SoC, so you are restricted to an overall bandwidth of about USB2 rates, which is usually about half of theoretical maximum once you take in to account overheads. Not only that but the ethernet is muxed on to the same port as well, so you need to take that in to account as well.
Re: USB ports bandwidth
Thanks for very compressive answers , appreciate that very much.
Small , tiny side note.
I am always puzzled why people need to know the actual application . usage / reason the question is posted. I always assume they are curious, but deep down it reminds me of people who repeat the spoken question not to clarify it, but to stall for time so they can figure out the answer.
To satisfy the curiosity - I am planning to have several cameras monitoring and controlling model railroad.
Look up "green wave" concept for further clarification.
Cheers
Small , tiny side note.
I am always puzzled why people need to know the actual application . usage / reason the question is posted. I always assume they are curious, but deep down it reminds me of people who repeat the spoken question not to clarify it, but to stall for time so they can figure out the answer.
To satisfy the curiosity - I am planning to have several cameras monitoring and controlling model railroad.
Look up "green wave" concept for further clarification.
Cheers
-
- Posts: 13944
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: USB ports bandwidth
Quite a bit of the "what project?" question revolves around potential alternate solutions to specific roadblocks. In your case, it appears to me that rather than worrying about how many cameras can be connected to a single Pi, you could deply as many Pis as it takes to support the number of cameras you are planning to use, possibly right down to one camera per Pi.julyjim wrote:Thanks for very compressive answers , appreciate that very much.
Small , tiny side note.
I am always puzzled why people need to know the actual application . usage / reason the question is posted. I always assume they are curious, but deep down it reminds me of people who repeat the spoken question not to clarify it, but to stall for time so they can figure out the answer.
To satisfy the curiosity - I am planning to have several cameras monitoring and controlling model railroad.
Look up "green wave" concept for further clarification.
Cheers
Re: USB ports bandwidth
If you want an answer to how many cameras you can use, you need to tell us the bandwidth each individual camera uses in your use case (which you haven't)
The pi has 480Mbps total. Divide that by the bitrate of your cameras (which will vary greatly depending on framesize, format and frame rate)
E.g. if you only wanted 1 frame per second,you could probably use 20+ cameras via a usb hub...
The pi has 480Mbps total. Divide that by the bitrate of your cameras (which will vary greatly depending on framesize, format and frame rate)
E.g. if you only wanted 1 frame per second,you could probably use 20+ cameras via a usb hub...
Android app - Raspi Card Imager - download and image SD cards - No PC required !
Re: USB ports bandwidth
According to the General Information bullet point 2 from the USB sticky thread in Troubleshooting, the hardware has a limit of 8 simultaneously active USB transactions. Since Ethernet counts for one, bandwidth considerations aside, that leaves at most 7 available for cameras.mikerr wrote:E.g. if you only wanted 1 frame per second,you could probably use 20+ cameras via a usb hub...
Green wave seems to be a real-time railway traffic management policy for optimizing rail traffic through open corridors that bottleneck a network. It sounds fun but difficult to implement in a model railroad setting.
Re: USB ports bandwidth
julyjim,
Curiosity is certainly a motivation for asking about the actual application.
But the main point is this: So many times it happens that someone pops up with a question like "Please tell me how to do X" or "I tried X and it did not work". After much time wasting toing and froing and debate we find out they never really wanted to do X at all. They thought X was a solution to what they really wanted to do and there are other better ways of doing it.
Just trying to be efficient.
No. A moments reflection would tell you that we have no need to repeat the question or stall for time before we answer. This is an internet forum. We can answer now or after an hour or next week or perhaps not at all.I am always puzzled why people need to know the actual application . usage / reason the question is posted. I always assume they are curious, but deep down it reminds me of people who repeat the spoken question not to clarify it, but to stall for time so they can figure out the answer.
Curiosity is certainly a motivation for asking about the actual application.
But the main point is this: So many times it happens that someone pops up with a question like "Please tell me how to do X" or "I tried X and it did not work". After much time wasting toing and froing and debate we find out they never really wanted to do X at all. They thought X was a solution to what they really wanted to do and there are other better ways of doing it.
Just trying to be efficient.
Memory in C++ is a leaky abstraction .
Re: USB ports bandwidth
It can remind you of whatever you want, but your guess is incorrect. And stalling for time in a non-realtime conversation is laughable. Everyone knows that we've all got google/stackoverflow/etc available to us at a second's notice. We could copy and paste a voluminous-but-perhaps-not-applicable-answer from somewhere in thirty seconds. So that's not the reason for asking for more information...julyjim wrote:Small , tiny side note.
I am always puzzled why people need to know the actual application . usage / reason the question is posted. I always assume they are curious, but deep down it reminds me of people who repeat the spoken question not to clarify it, but to stall for time so they can figure out the answer.
You are asking for help from a pool of developers and tinkerers with collectively an absolutely enormous amount of experience answering such questions, and many of us have found, over the years, that people often ask questions that are two or three steps down the path from what they really have in mind. That is, they had an original question/need in mind, and they made two or three assumptions from that, and they're now asking a question that may be going down some odd, really convoluted, possibly unworkable, path towards their goal. So, we want to answer the question as asked (if possible), but often want to know what the original goal was, if the question asked seems odd (or if we've seen a similar question raised in the past on the basis of an odd assumption), because we (collectively) may be able to suggest a much simpler solution that sidesteps the original (and possibly incorrect) assumptions. We are problem solvers. Sometimes it helps to know what the whole problem is, rather than just one small corner of it.
- RaTTuS
- Posts: 10681
- Joined: Tue Nov 29, 2011 11:12 am
- Location: North West UK
- Contact: Twitter YouTube
Re: USB ports bandwidth
why usb cams ?julyjim wrote:Thanks for very compressive answers , appreciate that very much.
Small , tiny side note.
I am always puzzled why people need to know the actual application . usage / reason the question is posted. I always assume they are curious, but deep down it reminds me of people who repeat the spoken question not to clarify it, but to stall for time so they can figure out the answer.
To satisfy the curiosity - I am planning to have several cameras monitoring and controlling model railroad.
Look up "green wave" concept for further clarification.
Cheers
which usb cams
post links to them all
they often have bad resolutions or do not compress the data in any useful way YMWV on how many you can stuff onto a USB chain
give use more useful info and we can help more , faster and with better info
what are you thinking of , have you though of using the foundation camera ?
multiple RPI's ?
a PI0 + camaera + network hat may be a better option , or PI2 or Pi3
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: USB ports bandwidth
+1 however we have no idea of budget or infrastructure. Yup we always have further questionsRaTTuS wrote: a PI0 + camaera + network hat may be a better option , or PI2 or Pi3

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
Re: USB ports bandwidth
Not sure on the continued accuracy of that - there's a note on this thread that says the "8 endpoints limit" is removed, and also someone successfully tested 13 devices:ejolson wrote:According to the General Information bullet point 2 from the USB sticky thread in Troubleshooting, the hardware has a limit of 8 simultaneously active USB transactions. Since Ethernet counts for one, bandwidth considerations aside, that leaves at most 7 available for cameras.
viewtopic.php?f=63&t=13917
..and for grins I started a new thread with some tests:
viewtopic.php?f=63&t=173343
Android app - Raspi Card Imager - download and image SD cards - No PC required !