Go Down

Topic: Some networking fun: 28 arduinos linked in a network (Read 4011 times) previous topic - next topic

RyanF121

Hi, I am new to the arduino platform.  I have been using a Lego Mindstorms NXT with the software that comes with it and have some experience in batch programming.  My dad co-ownes a manufacturing company and wants me to design a system for him that can take the data from a switch (SPST and closes when cycles) that counts how many times the machine cycles and put it into a Microsoft Excel spreadsheet with each machine having its own count display.  We have a price limit of about $5000-$8000 and want a system that can be expanded upon to around 30 machines easily.  The arduino was my natural choice since I have heard of it being used in many projects.

The first thing I want to do is decide what interface to use.  I do NOT want to have a few arduino megas that are monitoring multiple machines.  It would take out the part of adding to the size easily.  I have thought of using XBee modules on some fios, ethernet connection to a large hub dedicated to the arduinos, and coaxial connections.  Connecting the Rx and Tx pins together is not an option as the area this will have to cover is a rectangle of about 1000yd by 300yd.  Standard RF circuits are also out of the question as they would be interfered by the large 200hp motors and the large collection of other noisy goods. (both physically and RF)

My plans are to first decide a parts list, make a hello world demonstrating that this is possible, and finally buy the rest of the parts to make it possible.  You will know when I buy them as stocks of one arduino or another will drop dramatically.

Just remember when you respond, I do not know much about the programming language and am still learning it.  I plan to buy two arduinos tomorrow, a couple ethernet shields, and an xbee set.  And just out of curiosity, what is the record of the most arduinos connected into a network like the one I'm planing on?

Coding Badly

Quote
Standard RF circuits are also out of the question as they would be interfered by the large 200hp motors and the large collection of other noisy goods. (both physically and RF)


You do understand that XBee is a radio.  It may work but you should probably have a plan B.

For the physical connection... RS-485 (RS-422) is generally used in industrial environments.  Ethernet is usually a reasonable choice.  CANBUS is an excellent choice.

RyanF121

#2
Nov 17, 2012, 06:21 am Last Edit: Nov 17, 2012, 07:20 am by RyanF121 Reason: 1
I figured that since the Xbee runs in the ghz range it would be less susceptible to RF interference by motors.  Can I get a small list of pros and cons of each of the three connection types you posted?  Oh and btw my dad also wants the data to be live on the spreadsheet.  I am not sure if that is possible.  Does anybody know?

Boffin1

Some fairly inexpensive radio transceivers  (  RFM22B or the SIM20 433 MHz,  or the 2.4 GHz RFD21733 )  can be connected as a mesh with multiroutes, aknowledge, and autoresend.

I get 500m from the SIM20 outdoors, but it might be better using the 2.4 GHz   does WiFi work OK in the factory ?  its basically the same frequency.
With my mobile phone I can call people and talk to them -  how smart can you get ?

Graynomad

Quote
Connecting the Rx and Tx pins together is not an option as the area this will have to cover is a rectangle of about 1000yd by 300yd

That's not a problem depending on speed and network topology, use RS-485 as has been mentioned. It's specifically designed for such environments.

I'll leave those who know about wireless to argue for that.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

PeterH


Oh and btw my dad also wants the data to be live on the spreadsheet.


What is the spreadsheet for? I mean, what calculations is it performing and what is being done with the results?

Although you've specified that the results must be displayed in a spreadsheet, use of a spreadsheet is a solution not a requirement; the fact you're also asking for 'live' updates make me suspect the spreadsheet is not actually suitable for you. What is the actual requirement here?

Do you  want a tabular display of the counters in some order? Over some period? Any of that user-defined? Charts of the rate of change or absolute values over time? The real requirements will imply the most appropriate way to store and present the data, and it may not be a spreadsheet.
I only provide help via the forum - please do not contact me for private consultancy.

Graynomad

Quote
And just out of curiosity, what is the record of the most arduinos connected into a network like the one I'm planing on?

I haven't done it yet but I'm planning a project that will do 254 Arduinos over (theoretically) 300km (wired).

Not sure how the heck I'll test it.  XD

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Boffin1

#7
Nov 17, 2012, 04:25 pm Last Edit: Nov 17, 2012, 04:28 pm by Boffin1 Reason: 1
Quote
I'm planning a project that will do 254 Arduinos over (theoretically) 300km


Solenoid released puffs of smoke from  BBQ's  ?   It worked for the Souix !

Seriously though, has anyone modulated laser pointers?  and what range is possible?   Of course there would be environmental interference from rain and mist, but I have a specific project I want to test sometime.
With my mobile phone I can call people and talk to them -  how smart can you get ?

RyanF121

#8
Nov 17, 2012, 06:53 pm Last Edit: Nov 17, 2012, 06:55 pm by RyanF121 Reason: 1
Thanks for the responses.

Some fairly inexpensive radio transceivers  (  RFM22B or the SIM20 433 MHz,  or the 2.4 GHz RFD21733 )  can be connected as a mesh with multiroutes, aknowledge, and autoresend.

I get 500m from the SIM20 outdoors, but it might be better using the 2.4 GHz   does WiFi work OK in the factory ?  its basically the same frequency.

A standard RF circuit will not work in the environment I plan to implement.  Have you seen the inside of your standard cereal factory?  Think of all the motors that drive the lines and multiply their HP by around 30-600 and you get what I'm working in.  The factory manufactures puzzles so we have a large amount of motors and controls running an this will be the first arduino ever present in the factory.  Almost all the systems there are industrial-grade PLC's from Allem Bradley or Mitsubishi.

What is the spreadsheet for? I mean, what calculations is it performing and what is being done with the results?

Although you've specified that the results must be displayed in a spreadsheet, use of a spreadsheet is a solution not a requirement; the fact you're also asking for 'live' updates make me suspect the spreadsheet is not actually suitable for you. What is the actual requirement here?

Do you  want a tabular display of the counters in some order? Over some period? Any of that user-defined? Charts of the rate of change or absolute values over time? The real requirements will imply the most appropriate way to store and present the data, and it may not be a spreadsheet.

My dad wants it in spreadsheet because that's what his employees know how to manipulate.  He wants it to be user friendly.  I told him repeatedly that Spreadsheet isn't designed for this stuff, especially with it being live.  I'm thinking I will have to make a web interface that the arduinos link into with actual live data rather than programming a batch file to reopen a spreadsheet file every 5 minutes.  Just another thought, if I got a Mux shield linked to an arduino and connected that to the PC, would that be about ideal for something like this or would it be more of a hassle to do that?  I'm thinking of how hard it will be to integrate all the connections from the different arduinos to one page.


Seriously though, has anyone modulated laser pointers?  and what range is possible?   Of course there would be environmental interference from rain and mist, but I have a specific project I want to test sometime.

Lazer pointers have been modulated before with an extremely simple circuit containing an op-amp and an audio transformer connected to the lazer.  I tried it with some success.  It would have been better if I had an op-amp though.  The range was fairly limited since I couldn't keep it aimed correctly for more than 10 minutes.  I have heard of some people using small telescopes with a photoresistor/photodiode connected to the eyepiece.  They would take a light bulb like you would find in a scrolling billboard with the light grids and turn it on and off with amps designed for speakers.  They were successful at transmitting audio with a half-decent quality of sound.

And a side note, my dad is going by Radioshack to get an arduino for me to start learning.  I already have a breadboard so no issues there.

zoomkat

Quote
A standard RF circuit will not work in the environment I plan to implement.  Have you seen the inside of your standard cereal factory?  Think of all the motors that drive the lines and multiply their HP by around 30-600 and you get what I'm working in.  The factory manufactures puzzles so we have a large amount of motors and controls running an this will be the first arduino ever present in the factory.  Almost all the systems there are industrial-grade PLC's from Allem Bradley or Mitsubishi.


Say what? What have you actually done to measure the RF noise in the factory? Most industrial motors are probably three phase squirrel cage induction types that may not produce much RF issues. What does the HP rating of a motor have to do with its potential RF production?
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

RyanF121

#10
Nov 17, 2012, 08:19 pm Last Edit: Nov 17, 2012, 08:30 pm by RyanF121 Reason: 1

Say what? What have you actually done to measure the RF noise in the factory? Most industrial motors are probably three phase squirrel cage induction types that may not produce much RF issues. What does the HP rating of a motor have to do with its potential RF production?

We have taken radios that are tuned to a good strong radio station and brought them inside the building and the signal degrades to the point you can barely hear the music over the static.  My point is that radio won't work in there.  There are too many metal structures in there that would block the radio signal.  We would get into issues of the signal getting blocked by the 2-ton presses and all the other things in between.

Update: arduinos bought from Fry's Electronics and my dad is getting the ethernet shields from Radioshack.

Graynomad

Well if you write off wireless that only leave Ethernet and RS-485.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Aqualize

#12
Nov 18, 2012, 03:24 am Last Edit: Nov 18, 2012, 03:32 am by Aqualize Reason: 1
I don't know anything about RS-485 (will start to read on wikipedia now) but I wrote some info if you would go the Ethernet way:

Would it be possible to use ethernet network? To skip any type of radio completely?
Switches for this would be cheap if you can get them 2nd hand. 10 Mbps (10Base-T) switches are so obsolete than there only value are the raw materials they are made of. But 10 Mbps would be more than enough for a network where Arduinos sends small data packets to some central machine.
But don't use ethernet hubs (switches are not hubs). It won't create separate collision domains and regarding the size of the plant you might actually hit the wall there (I don't remember the exact numbers). And all packets would bounce around to all Arduinos.
The actual cabling perhaps should be done by a professional network installer.
And for when the deployment takes place perhaps you should buy the Arduino Ethernet (without PoE) which will save you some money (and you only need one interface card for programming them).

The sink for all data I think should be a PC. For ethernet it will be piece of cake as PC:s have the network interface or can be extended with more if you need. I don't have much knowledge at all about xBee but I saw interfaces for PCs via USB are available. Don't put an Arduino as data collector.

And if you are forced into that option I think the easiest way is to produce a .csv file (comma-separated values) that excel can load.

Regarding the programming, well it is a lot different from batch files, don't assume it will help you.



Edit:
Okay so RS-485 is preferable used as a bus network and over large distances can not have so much speed. And it will be large distance if all the machines would be hooked up on a single long line.

The ethernet idea I proposed is to get a good stock of ethernet switches and place them around the factory, connect the switches in a line and have a star topology of cables out to Arduinos in the vicinity of the switch.

billroy

If I had to roll up data from 200+ devices, I'd use a Redis database (http://redis.io) to receive and stage the data.  Then it's easy to write small programs that can grab the data from the database and format it for spreadsheet and web display.

Any database would work, of course.  But if you go the Ethernet route, you can use the (free) Bitlash Redis client to make the Arduino part of the problem very simple.  Count pulses, report up the line to the server every N seconds.  It's a couple of lines of Bitlash.  This approach reduces the software problem to database reporting and format conversion.

Be sure to get a big bottle of aspirin for the practical problems that go with managing so many devices.  Consider staging a small pilot project with just one arduino, and then scale it to a dozen machines before you rewire the whole factory...

-br

Redis: http://redis.io
Bitlash: http://bitlash.net
Bitlash redis client: https://github.com/billroy/bitlash/blob/master/examples/BitlashRedisClient/BitlashRedisClient.pde


Graynomad

You can use RS-485 with nodes daisy-chained, with that topology you get 4000' for each link. Normally however it is used as a bus so the 4000-5000' is a max, and that's at ~100kbps.

I know nothing about Ethernet so won't argue for or agin it, except to say that it has to be more expensive I would think.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up