Page 2 of 2

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Thu Nov 26, 2015 1:00 am
by danjperron
What about my sugestion using the serial port in PPP to link your 4 Pis together ?

It is even possible to link all Pi in daisy chain but I won't recommand it since one bad link and nothing works.

But it is possible to power up a switch which is link to each module.
A module is a set of 4 Pis . like the next picture.
4Pis.jpg
1 Module of 4 Pis
4Pis.jpg (40.27 KiB) Viewed 4440 times
This way The First Pi will sense that the switch is ON and could transfer the image for the three other PIs.

And like I said it is just a question of IP forward and rerouting packet.

You only use a switch connection on the FIrst one of the four PI.

If you brave, not using a switch at all, daisy chain all the module using the last PI to the first one in the next module on and on. But I don't think it will be fast enough to transfer 400 images. Better use a switch that you power up with a Pi when you want to transfer images.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Thu Nov 26, 2015 4:18 pm
by genetix
danjperron wrote:What about my sugestion using the serial port in PPP to link your 4 Pis together ?

It is even possible to link all Pi in daisy chain but I won't recommand it since one bad link and nothing works.

But it is possible to power up a switch which is link to each module.
A module is a set of 4 Pis . like the next picture.
The attachment 4Pis.jpg is no longer available
This way The First Pi will sense that the switch is ON and could transfer the image for the three other PIs.

And like I said it is just a question of IP forward and rerouting packet.

You only use a switch connection on the FIrst one of the four PI.

If you brave, not using a switch at all, daisy chain all the module using the last PI to the first one in the next module on and on. But I don't think it will be fast enough to transfer 400 images. Better use a switch that you power up with a Pi when you want to transfer images.
This idea sound plausible and I think I will investigate it.

I have another idea that might work, but let me know if you think its worth pursuing.

I could get 4 "Male RJ45 Ethernet to Female USB 2.0 adapter" to connect to all Pi's, then I could connect the those 4 adapters to 4 Male to Male Type A USB connectors into the "server" Pi. Then I could use another "Male RJ45 Ethernet to Female USB 2.0 adapter" in the "Server" Pi which a 64 GB USB drive is attached to store all the photos.

Is this possible to go from ethernet to USB for data transfer?

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Thu Nov 26, 2015 4:47 pm
by danjperron
This could work but you will ending more power consumption.

How far each 4 Pis module are away of each others?

The other solution and the simplest is to have only 1 Pi and 2X 10 ports USB HUB. They are less than $10US.

All the webcams could be connected to the hub , 8 on each hub, and one memory stick to a free USB port. Then you have some free usb, less power consume and only one Pi to deal with. I know that I tried 6 webcams and it was working.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Thu Nov 26, 2015 5:06 pm
by DougieLawson
genetix wrote:
Is this possible to go from ethernet to USB for data transfer?
No. USB is all about hosts and slaves. The USB stick is a slave device, the ethernet to USB is a slave device.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Thu Nov 26, 2015 5:52 pm
by danjperron
oops I didn't saw the Ethernet to usb device.

At the cost of the pi and the Usb to ethernet dongle. It will be easier to just buy an router with an usb adapter. My router has an usb dongle that I could attach an usb stick or HDD. It works well with the Pi.


I still think that the 2x10 usb port is the best solution.

Get rid of 3 Pis, some spare USB port to connect a memory stick, ethernet cable could be use to connect all the modules together.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 1:28 am
by genetix
DougieLawson wrote:
genetix wrote:
Is this possible to go from ethernet to USB for data transfer?
No. USB is all about hosts and slaves. The USB stick is a slave device, the ethernet to USB is a slave device.
Could you clarify a little more for a novice?

The 4 Raspberry Pi's during the process of taking pictures with 16 cameras uses 5.73 Watt hours, but the most low power consumption ethernet switchboard uses 3.5 Watts, which is the lowest powered 4 way board I could find.

It seems like a lot of wattage for just a switchboard compared to the complexity of a Raspberry Pi.

Any other suggestions?

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 1:43 am
by ame
I still recommend the USB hub approach. In each box, one Pi, one or two USB hubs, 16 cameras, one USB wifi dongle (or wired Ethernet to the Pi's Ethernet port).

Before your "expert" graduated, did he outline the plan of what he intended to do to finish the project? Can't you continue to follow the plan?

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 1:53 am
by genetix
ame wrote:I still recommend the USB hub approach. In each box, one Pi, one or two USB hubs, 16 cameras, one USB wifi dongle (or wired Ethernet to the Pi's Ethernet port).

Before your "expert" graduated, did he outline the plan of what he intended to do to finish the project? Can't you continue to follow the plan?
The box is already modified and completely weatherproof. If this was an indoor task I would go that route, but I can't compromise the integrity of trying to manipulate our design.

The initial plan was to download 1 camera at a time into a laptop, using 3 people with 4 laptops each totaling 12 laptops, but it still takes way too long. I guess they didn't plan ahead enough. This is a novel system that has never been designed before on this scale so we are adjusting as necessary.

Sometimes running a lot of pilot tests cannot see unforeseen circumstances, since the pilot was with 16 cameras and not hundreds.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 10:23 am
by DougieLawson
genetix wrote:
DougieLawson wrote:
genetix wrote:
Is this possible to go from ethernet to USB for data transfer?
No. USB is all about hosts and slaves. The USB stick is a slave device, the ethernet to USB is a slave device.
Could you clarify a little more for a novice?
If you have two USB devices lets assume one is a computer the other is keyboard. The computer is the host, the keyboard is the slave. Or the computer is the host and your USB hard disk drive is the slave.

You can ONLY connect a slave device to a hub or a host. A hub is a special slave device and needs an upstream host.

Connecting two slave devices does nothing. That would be like connecting a USB hard disk drive to your USB keyboard.

Connecting two host devices does nothing, that's like wiring two Raspberries together with a straight USB-A to USB-A cable. [Note: there's an exception for USB OTG devices.]

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 12:05 pm
by danjperron
but the most low power consumption ethernet switchboard uses 3.5 Watts
I check with my clamp meter and I got 0.2A on my Tenda G1005D 5ports gigabit switch (all ports connected with data running) Ok it uses a 9V supply but there is a good chance that it has a build-in regulator to convert it to 5V. So 9V * 0.2A = 1.8W


My previous question is not answered ! How far away each modules are between each others ?

You still have some manual manipulation! Extract the data from the memory stick.

This is were I will put a 24 Port swicth to collect all the data from all the camera. But since we don't have all the parameters, we don't know if it is a option.

The other option will be to install a wifi dongle and transfer the data when somebody is near the instrument with a wifi device.
This way there is no manual manipulation.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 3:59 pm
by genetix
danjperron wrote:
but the most low power consumption ethernet switchboard uses 3.5 Watts
I check with my clamp meter and I got 0.2A on my Tenda G1005D 5ports gigabit switch (all ports connected with data running) Ok it uses a 9V supply but there is a good chance that it has a build-in regulator to convert it to 5V. So 9V * 0.2A = 1.8W


My previous question is not answered ! How far away each modules are between each others ?

You still have some manual manipulation! Extract the data from the memory stick.

This is were I will put a 24 Port swicth to collect all the data from all the camera. But since we don't have all the parameters, we don't know if it is a option.

The other option will be to install a wifi dongle and transfer the data when somebody is near the instrument with a wifi device.
This way there is no manual manipulation.

Each Raspberry Pi is about 3 inches from each other in a black weatherproofed hardcase box thats about 13 wide x 12 inches deep and about 14 inches tall.

Currently we pull the data from the SD card on the cameras and not the Pi's.

The largest problem is data management because each camera assigns a DSCN # to each photo and when your downloading 24000 pictures a day this increases the amount of error substantially so we had to write a program that recognizes a unique identifier, in this case is the serial number of the camera. Then after the download program recognizes that, it creates a folder for the camera # (i.e. program recognizes 20402402 as serial, creates a folder 404 for camera #404) and populates those within that folder, with a timestamp as the file name from the metadata used from EXIF.

We use 12 V power adapters to power our R Pi's, FYI

Also could you measure the power consumption with no data running cross that switch trying to simulate when the 4 Pi's are sleeping before they turn back on the take pictures.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 5:10 pm
by danjperron
Also could you measure the power consumption with no data running cross that switch trying to simulate when the 4 Pi's are sleeping before they turn back on the take pictures.
I will check it tonight. But in reality one of the pi could power it down with a mosfet.

My question is still not answer?

Each module have 4 Pis with 16 cameras. This I know and I wont use a switch there because you could simply use my PPP serial method.

My problem is the module has a hole. How far others modules like this one are together? This is were you should use a switch to connect them all together. A simple 24 port swicth should be able to connect all the modules together.


This gives you a possibility of 22 modules of 4 pis with 16 cameras. In theory up to 22*16 =352 cameras.

I left two ports open on the swicth , one for a NAS and one for an external connection.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Fri Nov 27, 2015 10:49 pm
by ame
Wait, you are using actual cameras? With SD cards? Not USB webcams?

So, in each box you have 16 cameras and 4 Pis. You take the cards out of the camera images when it's time to collect photos.

What is the Pi for?

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Sat Nov 28, 2015 12:46 am
by genetix
danjperron wrote:
Also could you measure the power consumption with no data running cross that switch trying to simulate when the 4 Pi's are sleeping before they turn back on the take pictures.
I will check it tonight. But in reality one of the pi could power it down with a mosfet.

My question is still not answer?

Each module have 4 Pis with 16 cameras. This I know and I wont use a switch there because you could simply use my PPP serial method.

My problem is the module has a hole. How far others modules like this one are together? This is were you should use a switch to connect them all together. A simple 24 port swicth should be able to connect all the modules together.


This gives you a possibility of 22 modules of 4 pis with 16 cameras. In theory up to 22*16 =352 cameras.

I left two ports open on the swicth , one for a NAS and one for an external connection.

Each module (battery box) is about 20 feet away in one direction 30-40 feet in the other direction. So maximum of 40 feet. Its how the field is laid out.

I have 30 modules actually.

The Pi's turn on independent of one another and turn off too also, I don't know if the PPP method would work.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Sat Nov 28, 2015 12:49 am
by genetix
ame wrote:Wait, you are using actual cameras? With SD cards? Not USB webcams?

So, in each box you have 16 cameras and 4 Pis. You take the cards out of the camera images when it's time to collect photos.

What is the Pi for?
I use actual cameras 20 megapixels, I need high resolution images. I don't take out the SD cards, I just plug in the USB that is connected to the camera and I have a program written on the computer that takes images off the SD card in the camera, so I don't have to open the case because it is fully waterproofed.

The Pi is to turn on the cameras, tell the cameras to focus, snap the image

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Sat Nov 28, 2015 12:53 am
by ame
How is the Pi connected to the camera?

If it's using USB then do you have to disconnect the Pi to be able to download the images?

Is the camera a Canon, by any chance?

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Sat Nov 28, 2015 3:47 am
by danjperron
Also could you measure the power consumption with no data running cross that switch trying to simulate when the 4 Pi's are sleeping before they turn back on the take pictures.
Around 60ma when the PIs are power off.

My clamp meter is around +- 20 ma at that level.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Sat Nov 28, 2015 3:54 am
by genetix
ame wrote:How is the Pi connected to the camera?

If it's using USB then do you have to disconnect the Pi to be able to download the images?

Is the camera a Canon, by any chance?
Pi is connected to camera via 15 foot USB 2.0 cable

Just unplug the 15 ft cable and plug it into the computers USB port

No it is not a Canon

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Sat Nov 28, 2015 4:06 am
by ame
It would have been much easier if you gave a clear description of what you have, where it is located, and how it is interconnected, instead of having us play Twenty Questions to tease it out of you.

Where are the cameras? In a weathertight box? Four cables 15 feet long connect the cameras to a Pi. The Pi schedules the taking of the photos, every 10 minutes or so. To get the photos you unplug the cable at the Pi end and plug it into a laptop. Right?

Where are the Pis?

So far your setup sounds quite impractical and poorly conceived and executed. At least, that's my impression based on the limited information I have read so far. Please prove me wrong.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Wed Dec 16, 2015 9:06 am
by karrika
This is the perfect solution imho. The cameras are already connected through the USB's. So instead of connecting your laptop via USB to fetch the data you fetch it through Ethernet from the last Pi in the chain. It could even have a large SD card to cache the pics.
danjperron wrote: A module is a set of 4 Pis . like the next picture.
4Pis.jpg
This way The First Pi will sense that the switch is ON and could transfer the image for the three other PIs.

Re: 4 Pis connected to 1 "server" Pi via Ethernet

Posted: Wed Dec 16, 2015 9:44 am
by metRo_
If you don't want to change the project design I think add a ethernet switch and another RPi is your way, http://www.tp-link.pt/products/details/ ... ifications (1.48W at maximum). You don't even need to have it all the time on, you can turn on it every 10 minutes per example, download the images and turn off the switch using a relay.

What are the size of each image and what are the time between photos?

PS: tell us the frequency of the photos, size and what you don't/can't change on your today system.