Reese9885
Posts: 5
Joined: Wed Apr 28, 2021 3:16 pm

Figuring out my setup needed

Mon May 10, 2021 6:49 pm

Okay guys this is what I'm trying to do I need to connect 3 sensors a display and a rfid reader as a group of devices , I need 12 of these groupings total to all connect to a raspberrypi for monitoring. Which would be my best setup? A pi with multiple expansion chips? But I think I'll still need more then 128 pins? Maybe? Or would it be better to run multiple zeros, wire a rj45 in and run them all to a switch to another controller pi and process the data? Also trying to do this the cheapest way possible. If I can run all with a singular pi,be awsome. but don't know I can run that many displays on a single unit,not counting all the sensors with them.

cleverca22
Posts: 3743
Joined: Sat Aug 18, 2012 2:33 pm

Re: Figuring out my setup needed

Mon May 10, 2021 6:58 pm

have you looked into the pico yet?

Reese9885
Posts: 5
Joined: Wed Apr 28, 2021 3:16 pm

Re: Figuring out my setup needed

Mon May 10, 2021 7:25 pm

cleverca22 wrote:
Mon May 10, 2021 6:58 pm
have you looked into the pico yet?
A little.. would I use one pico per setup/grouping of devices then connect the picos as a peripheral to a rasberry pi?

cleverca22
Posts: 3743
Joined: Sat Aug 18, 2012 2:33 pm

Re: Figuring out my setup needed

Mon May 10, 2021 7:40 pm

Reese9885 wrote:
Mon May 10, 2021 7:25 pm
cleverca22 wrote:
Mon May 10, 2021 6:58 pm
have you looked into the pico yet?
A little.. would I use one pico per setup/grouping of devices then connect the picos as a peripheral to a rasberry pi?
that could work, and would be cheaper then a pi0 to each

you may also be able to run several groups off one pico, depending on distances

User avatar
B.Goode
Posts: 12054
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Figuring out my setup needed

Mon May 10, 2021 7:59 pm

Reese9885 wrote:
Mon May 10, 2021 6:49 pm
Okay guys this is what I'm trying to do I need to connect 3 sensors a display and a rfid reader as a group of devices , I need 12 of these groupings total to all connect to a raspberrypi for monitoring. Which would be my best setup? A pi with multiple expansion chips? But I think I'll still need more then 128 pins? Maybe? Or would it be better to run multiple zeros, wire a rj45 in and run them all to a switch to another controller pi and process the data? Also trying to do this the cheapest way possible. If I can run all with a singular pi,be awsome. but don't know I can run that many displays on a single unit,not counting all the sensors with them.


" would it be better to run multiple zeros, wire a rj45 in and run them all to a switch"

Just to highlight what may already be obvious, which is that an RPiZero board does not have built-in cabled Ethernet, so you would need to factor in the cost, complexity and support implications of adding a usbEthernet 'dongle'.

Another approach might be to use the capability of an RPiZero to act as a usb Ethernet 'gadget' : https://github.com/thagrol/Guides/blob/ ... gadget.pdf
(You could potentially 'cascade' 4 Zeroes from a single 'Main' controller node that way.)

Reese9885
Posts: 5
Joined: Wed Apr 28, 2021 3:16 pm

Re: Figuring out my setup needed

Tue May 11, 2021 5:06 pm

B.Goode wrote:
Mon May 10, 2021 7:59 pm
Reese9885 wrote:
Mon May 10, 2021 6:49 pm
Another approach might be to use the capability of an RPiZero to act as a usb Ethernet 'gadget' : https://github.com/thagrol/Guides/blob/ ... gadget.pdf
(You could potentially 'cascade' 4 Zeroes from a single 'Main' controller node that way.)
From what I've read, the usb ethernet gadget won't work with a hub. which is what I would need to run more then 1 zero per grouping ... though I don't know what you mean by cascading them so could be missing something.

cleverca22
Posts: 3743
Joined: Sat Aug 18, 2012 2:33 pm

Re: Figuring out my setup needed

Tue May 11, 2021 6:11 pm

the ethernet gadget works just fine on a hub

the pi0 just needs to be on the device side of the hub, because its acting as a usb device

User avatar
B.Goode
Posts: 12054
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Figuring out my setup needed

Tue May 11, 2021 8:42 pm

Reese9885 wrote:
Tue May 11, 2021 5:06 pm
B.Goode wrote:
Mon May 10, 2021 7:59 pm
Reese9885 wrote:
Mon May 10, 2021 6:49 pm
Another approach might be to use the capability of an RPiZero to act as a usb Ethernet 'gadget' : https://github.com/thagrol/Guides/blob/ ... gadget.pdf
(You could potentially 'cascade' 4 Zeroes from a single 'Main' controller node that way.)
From what I've read, the usb ethernet gadget won't work with a hub. which is what I would need to run more then 1 zero per grouping ... though I don't know what you mean by cascading them so could be missing something.
Most non-RPi 'grown-up' RPi boards have 4 usb ports. So in this possible model you would use 12 Zeroes and 3 others to control them. No external hubs needed.

Reese9885
Posts: 5
Joined: Wed Apr 28, 2021 3:16 pm

Re: Figuring out my setup needed

Tue May 11, 2021 8:45 pm

cleverca22 wrote:
Tue May 11, 2021 6:11 pm
the ethernet gadget works just fine on a hub

the pi0 just needs to be on the device side of the hub, because its acting as a usb device
Really? Literally says in chapter 3.3 under restrictions "Eithernet gadget can not be used with a usb hub" but ill give it a go if you say it can.

User avatar
B.Goode
Posts: 12054
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Figuring out my setup needed

Tue May 11, 2021 9:06 pm

Don't overlook the possible logistical difficulties of sourcing enough RPiZero boards for your project.

The same configuration (3x4) would also work with Picos.

ghp
Posts: 1963
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Figuring out my setup needed

Tue May 11, 2021 9:35 pm

RS485 would be another option. Using pico as local controller, isolated 485-adapters in either a PP or in a multidrop configuration. A 'central' pico could work as a hub / master, theoretically each PIO state machine as a serial sender/receiver could work with one 'segment'. Finally a pi interacting with this hub/master and collecting data.
More work to write the software compared to a ethernet design, I assume. Scalability, if needed, is also an argument for the ethernet side.
Cable lengths and fun factor are on the RS485 side, presumably. Depends on amount of data to be transmitted and latency allowed if RS485 has a chance.

drgeoff
Posts: 11916
Joined: Wed Jan 25, 2012 6:39 pm

Re: Figuring out my setup needed

Tue May 11, 2021 10:19 pm

Reese9885 wrote:
Tue May 11, 2021 8:45 pm
cleverca22 wrote:
Tue May 11, 2021 6:11 pm
the ethernet gadget works just fine on a hub

the pi0 just needs to be on the device side of the hub, because its acting as a usb device
Really? Literally says in chapter 3.3 under restrictions "Eithernet gadget can not be used with a usb hub" but ill give it a go if you say it can.
You cannot use a USB hub with a Zero(W) to have USB devices connected to the Zero(W) and operate in gadget mode.
Quis custodiet ipsos custodes?

cleverca22
Posts: 3743
Joined: Sat Aug 18, 2012 2:33 pm

Re: Figuring out my setup needed

Tue May 11, 2021 10:43 pm

drgeoff wrote:
Tue May 11, 2021 10:19 pm
You cannot use a USB hub with a Zero(W) to have USB devices connected to the Zero(W) and operate in gadget mode.
correct

if you put the HOST side of a hub onto the pi0, then it can only run in HOST mode, and connect to other DEVICES

but if you put it on the DEVICE side of the hub onto the pi0, it can only run in DEVICE mode (ethernet gadget), and connect to a single HOST

Return to “Automation, sensing and robotics”