RS-485 vs Ethernet for a large automation system network

strantor

Joined Oct 3, 2010
6,875
I appreciate your comment. I actually had a glimpse at a PLC based solution. But since I havent used PLC in my life neither I have any knowledge about it, I thought I might use something that I am more comfortable with.

Since the price is not a major problem for this project, I could easily switch to PLC solution and try out few things there and see how it works..

Could you help me imagine how the complete system would look like if I used PLC solution.

The way I currently Imagine the system is I have lets say 10 boxes to control. Each esp8266 module is connected to one of the boxes. ESP8266 measures the sensor values and toggles the light to signal the operator which box to take item from.. So this is a basic idea on how it all works. Obviously raspberry pi is doing more things such as running a database ,webserver, telling each esp8266 what to do and etc.

Could you help me imagine how the complete system would look like if I used PLC solution. I mean give some hardware examples on which components could be used since I have no experience or knowledge about PLCS.
I would be happy to make suggestions but would need more information. What are the sensors? what are these 10 boxes? What's inside them? Can you give a description of the system, what it's actually supposed to do? What is in your database? What is the webserver for? Keep in mind I have no background on your project, you speak of taking items from boxes, that's the only hint I have, and I don't know what it means.
 

Irving

Joined Jan 30, 2016
5,159
While I don't disagree with the statements about PLC's I'm not convinced they would necessarily be the optimum solution for the OP's requirement, since we don't have a full appreciation of it.

PLCs are not cheap and have a significant learning curve of their own. I've used them over many years and I've rolled my own, mission-critical, systems and trained others on maintaining them. I've even developed, under contract, a bespoke replacement for an existing PLC setup.

The big problem, IMHO, with PLC, is they need, by their nature, to be all things to all people. So for many requirements they are massively expensive overkill. Even a baby one with 4 inputs/4 outputs is ~£200/$230

And still needs a stupidly priced proprietary development platform to use it...
 

strantor

Joined Oct 3, 2010
6,875
While I don't disagree with the statements about PLC's I'm not convinced they would necessarily be the optimum solution for the OP's requirement, since we don't have a full appreciation of it.

PLCs are not cheap and have a significant learning curve of their own. I've used them over many years and I've rolled my own, mission-critical, systems and trained others on maintaining them. I've even developed, under contract, a bespoke replacement for an existing PLC setup.

The big problem, IMHO, with PLC, is they need, by their nature, to be all things to all people. So for many requirements they are massively expensive overkill. Even a baby one with 4 inputs/4 outputs is ~£200/$230

And still needs a stupidly priced proprietary development platform to use it...
I would have fully agreed with you years ago but things have changed, and are changing as we speak. Right now you can get a Click PLC from AutomationDirect for 69USD with free software.
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
I am so glad I am having help from so many good people here!

Okay let me tell you more about my system.

So the system is PICK TO LIGHT which intends to help packing and warehouse operation.
1595336702225.png

This is a prototype of a 1 box that I have built using ESP8266 module. It has a panasonic cx-421 sensor connected to it to detect when a person puts his hand inside.


The basic working principle is as following;

Operator scans a unique item barcode that is engraved(Keep in mind that an "Item" could be a set of items). Using this barcode, I need to look up information about this particular item in the database ( How many "individual items this barcode consists of" , how many individual items each I need to put in a box and etc) - all that information is stored in MAIN server database. I have a raspberry PI which has a local MYSQL database which just hold information about what items are currently stored in each box, that way, when a operator scans a code and I need which Item i need to take from the box, I can compare the main database to my local database to find which box has a certain Item in it.

so for example, when operators scans a code, lets say I need to take:
1 item from BOX1
3 items from BOX3
2 items from BOX2

so the green LEDS will light up in order and guide operator to take items from boxes1,2 and 3 and NOT any other box!!


20200716_151617.jpg

Final system could look something like that:
1595337229308.png

I have found a lot of information about pick to light systems here:
https://www.bannerengineering.com/sg/en/products/lighting-and-indicators/pick-to-light.html#all
they sell great sensors and devices that I can use for pick to light system


One think I do not understand the most, is how the system could look like hardware wise if I use PLC.

So if I understand correctly, I would use PLC instead of my main controll board ( which is currently Raspberry PI).

How would I replace the ESP8266 remote devices in PLC solution?

Can i create a mysql server with PLC like I have done with raspberry pi?
 

Irving

Joined Jan 30, 2016
5,159
I would have fully agreed with you years ago but things have changed, and are changing as we speak. Right now you can get a Click PLC from AutomationDirect for 69USD with free software.
Fair comment, I wasn't aware of that supplier, though the client's I dealt with would insist on a 'big name' player.

I note an Ethernet plc is £130, but move to an analog input and its £187, so 69 was a bit disingenuous. :) (the 'baby' one i mentioned above was Ethernet + 1 analog + 3 digital channels)
 

Irving

Joined Jan 30, 2016
5,159
It has a panasonic cx-421 sensor connected to it to detect when a person puts his hand inside.
You are detecting the hand to verify the box visited, and not the # of items picked from the box?

Is there an ESP8266 per collection of boxes or per box in a unit? How many boxes per unit?
How many units?
 

strantor

Joined Oct 3, 2010
6,875
I am so glad I am having help from so many good people here!

Okay let me tell you more about my system.

So the system is PICK TO LIGHT which intends to help packing and warehouse operation.
View attachment 212678
Ah, ok. This is a bit different than I had imagined. I am used to working with Automation systems that control machinery which can kill people if they malfunction, and cost thousands of dollars per hour or per day if they go down. So PLC is always my first choice. What you are doing is more suited to what you are using. I have little experience with your type of application, so I don't think I can provide much help in doing it with a PLC. PLCs can interface with (and host) databases and the advanced ones can host a web server as well, but I have not done much of that, and when I strayed into that before, it quickly became apparent that it was not something well within the wheelhouse of PLCs, and better suited to computers. The databases that PLCs host are pretty rudimentary; tables of data. When you get into SQL now you're talking about custom queries and advanced functions that are difficult to do with PLCs. Much better to use a computer.

I think what you're doing is just fine. Forget I said anything. Except maybe your Raspberry PI operations should be transitioned onto a real server at some point if the system grows large enough to justify it.
 

strantor

Joined Oct 3, 2010
6,875
Fair comment, I wasn't aware of that supplier, though the client's I dealt with would insist on a 'big name' player.

I note an Ethernet plc is £130, but move to an analog input and its £187, so 69 was a bit disingenuous. :) (the 'baby' one i mentioned above was Ethernet + 1 analog + 3 digital channels)
Some of the big players are transitioning (being forced by the market to transition, finally) away from the [expensive hardware + expensive software + expensive proprietary programming cable] model too. Most of them now offer entry-level PLCs for cheap, with free software and USB programming port. At the enterprise level though, they are giving less ground. For example with Rockwell (Allen Bradley) I don't think the option exists anymore to purchase their $12k bug-ridden horrible software. They now aim to keep you on a leash in perpetuity with a $4500/yr software subscription, complete with (FREE!) (forced) weekly updates and bug fixes which introduce new bugs, making for an ever-changing landscape of angst. I hate them and everything they stand for. But if that's what the client demands... then I will let them pay my software subscription.
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
You are detecting the hand to verify the box visited, and not the # of items picked from the box?

Is there an ESP8266 per collection of boxes or per box in a unit? How many boxes per unit?
How many units?
I am detecting both. To verify visited box and the number of items picked as well. Raspberry pi will send signal to each remote device saying that the sensor needs to trigger 3 times. That will mean 3 items picked form that box

I have esp8266 per each box
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Some of the big players are transitioning (being forced by the market to transition, finally) away from the [expensive hardware + expensive software + expensive proprietary programming cable] model too. Most of them now offer entry-level PLCs for cheap, with free software and USB programming port. At the enterprise level though, they are giving less ground. For example with Rockwell (Allen Bradley) I don't think the option exists anymore to purchase their $12k bug-ridden horrible software. They now aim to keep you on a leash in perpetuity with a $4500/yr software subscription, complete with (FREE!) (forced) weekly updates and bug fixes which introduce new bugs, making for an ever-changing landscape of angst. I hate them and everything they stand for. But if that's what the client demands... then I will let them pay my software subscription.
Fair enough. I will continue working on i t and keep updated here
 

djsfantasi

Joined Apr 11, 2010
9,237
I am detecting both. To verify visited box and the number of items picked as well. Raspberry pi will send signal to each remote device saying that the sensor needs to trigger 3 times. That will mean 3 items picked form that box

I have esp8266 per each box
Just curious. I could probably reach into the box one time and grab three items. Or I could grab four and need to put one back.

In these scenarios, your sensor would return one or two and the items that were needed was three. There isn’t a relationship between the number of reaches you sensed and the items picked.

If the system required three accesses to pick three items, it will slow down your pickers. Not a desired side effect IMHO.
 

Irving

Joined Jan 30, 2016
5,159
Just curious. I could probably reach into the box one time and grab three items. Or I could grab four and need to put one back.

In these scenarios, your sensor would return one or two and the items that were needed was three. There isn’t a relationship between the number of reaches you sensed and the items picked.

If the system required three accesses to pick three items, it will slow down your pickers. Not a desired side effect IMHO.
My thoughts exactly...


If you'd shared this level of info at the start, I could have saved you a lot of effort...

50 boxes on one frame could easily be handled by a single microcontroller (albeit one with a bit more grunt than the 8266 perhaps), or possibly one per row; it certainly doesn't require a esp8266 per box, nor the complexity of a network...

Unless there's more to be revealed...?
 
Last edited:

Thread Starter

zazas321

Joined Nov 29, 2015
936
My thoughts exactly...


If you'd shared this level of info at the start, I could have saved you a lot of effort...

50 boxes on one frame could easily be handled by a single microcontroller (albeit one with a bit more grunt than the 8266 perhaps), or possibly one per row; it certainly doesn't require a esp8266 per box, nor the complexity of a network...

Unless there's more to be revealed...?
I thought its going to be simplest and most reliable to use one wifi modul per each box. That way, a module just need to worry about one box and not others. The final system will probably have 2 push buttons to confirm an item has been placed in a box and item removed from box, probably more than one sensor and an LED. That alone requires atlesst 5 digital inputs. 50 boxes or so would require 250 which would be quite hard to achieve i imagine.

I also like to have one module per box to make the system modular. If one box fails, i just replace unit and continue work.


Also, about the previously mentioned problem. An operator will have to take one item at a time. I understand that is a waste of time and inefficient, but I could not figure out a way to detect how many items has been taken out per single hand movement. I would assume it would reaquire quite a bit if additional hardware and software work. Fir example implementing weight sensor or simmillar. If you guys have a suggestion how to count that i will definately include it in my todo list
 

Irving

Joined Jan 30, 2016
5,159
Ah, i did wonder about that picture, it looked very professional for a prototype...

I don't see the problem in replicating the ramcoi system.

What you're doing will work!
 

djsfantasi

Joined Apr 11, 2010
9,237
Another option would be to use somethint like that:
https://www.ramcoi.com/banner/ptl110-series-pick-to-light
Display how many items need to take and I leave the operator responsible for taking the right number. I just use sensor to derect hand in the right box
That’s the best that I think you can accomplish. Counting removed items is very difficult.

If each item has a bar code, once they’re removed, they can be scanned to count. A little more efficient. But not ideal.
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
If you check on thr banner website ( one of the leading suppliers for pick to light system solutions).
https://www.bannerengineering.com/be/en/company/press-releases/ptl110-series-pick-to-light.html

They have all kinds of cool devices and sensors (expensive though).
Such as PTL110. I dont even think they are meant to be used with a normal microcontroller. I think in orfer to use most of those smart sensors you need a special controller unit that they sell. Am i right here?
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
A little update...

So I have been working with my remote esp8266 devices and raspberry PI server. As i probably mentioned above, I am using node-red on my raspberry PI which controlls majority of the system. It is sending MQTT commands and uploading data to database.


I have a question though, I am not sure if any of you have experience with node-red but since I have many MQTT topics and I handle most of them using raspberry PI, I am worried that at some point, when I have many devices, it wont be able to handle all the traffic.

When I need to update data on the database, I create a new MQTT topic and listen to it on rapsberry PI, when a remote device publishes something to that topic, Rapsberry PI receives a message and then updates the database. An alternative way would be instead of sending a message from a remote device to Raspberry PI, I could update the datase from the ESP8266 directly - that would reduce the total MQTT topics and reduce overall complexity of the system ( since all remote devices would be able to update the databae if they need to, I dont need to solely rely on raspberry PI to do EVERYTHING).

HOWEVER, the problem with that, even though I have all devices connected to the local network (same wifi), I cant access MYSQL database from my remote devices. I believe that is a default MYSQL setting - only the host can have access to the database. I would need to change config file somehow enable other remote devices to connect to mysql database and update data that way.

Can someone help me decide which way is more efficient and whether I should control everything from my Raspberry PI or relieve some stress from Raspberry and handle most database operations directly from remote devices
 

Attachments

Top