Shop OBEX P1 Docs P2 Docs Learn Events
What is currently available for mobile to machine communication? — Parallax Forums

What is currently available for mobile to machine communication?

Hello Everyone

I am looking for the best ability of numerous users to send run-time parameters to a CNC machine, with their mobile phone.

I am currently thinking of creating a web based PERL script, which would generate a web page form for accepting various parameters. Upon submitting the form, with the required parameters, an acceptance page would tell the user that the parameters had been accepted, and the parameters would be added to a processing queue.

That part of the project sounds simple enough, but how can I use a mobile phone to acquire these parameters automatically and pass them onto a Propeller chip for processing?

Comments

  • Hi idbruce

    Have you ever heard about Simblee?

    https://simblee.com/

    Perhaps it can help.

    Henrique
  • If you have a web-page accessible by a mobile -smart- phone, for what you need the mobile phone to Propeller connection?

    Your question is unclear to me.

    There are sim-card modules out there allowing you to send and receive text-messages over a normal telephone connection, no web-server required. This way your CNC would have a phone number and react on SMS text messages, but that seems to be complicated because of the limited numbers of characters transferd per SMS.

    If the CNC and the connected Propeller(s) can access the Internet, it could poll a FTP server or the web-server itself for new "jobs". Your web-form would need to buffer the data in a database and deliver it when asked for by the CNC/Propeller, or simply save the form content (the job) on a FTP server, doing the buffering in the FTP file system.

    Please give more details of what you need.

    Mike
  • Thanks Henrique

    It was definitely worth looking at...
  • Mike

    Sorry I missed your post earlier when I was responding to Henrique....

    First off, let me establish that the CNC machine and the users will both be located at brand new commercial construction sites, with lots of steel and concrete, surrounding the work environment. Additionally, considering that the building will be brand new construction, it certainly will not be wired for internet access, and the CNC machine will need to relocate during advancement of construction.

    However, it has been a while since I have visited a construction site, and in these days, wifi internet access may be one of the first items they supply to the contractors.

    Anyhow, without access to the internet by hardwire or wifi, I was thinking that I could use a cellular phone or something similar to grab the machine parameters off the internet.

    In theory, construction will advance floor by floor, with the CNC machine centrally located on the floor where construction is currently ongoing, and with users (specific construction workers) basically surround the machine. As construction commences, the various users can request the service of the CNC machine, by visiting a web page and submitting an order, with the proper parameters.

    Essentially, any construction worker on location, who has a cellular phone, with good reception, could place an order with the machine, provided they have been granted permission, by the web site. So the question is, how does the CNC machine retrieve their order without wifi or hardwire access?
  • Heater.Heater. Posts: 21,230
    1) Run your website somewhere that any one in the world can access it. A server on Google cloud or Amazon AWS or Microsoft Azure or any of the hundreds of other options out there.

    Now anyone with a browser on a phone, tablet, PC, whatever can upload orders and whatever data to your server.

    2) Use a cellular connection from your CNC machine to the same server.

    There are many ways to do that. for example:

    Use a cellular module like this: https://www.sparkfun.com/products/retired/13120 or this https://www.sparkfun.com/products/14211 or this https://www.adafruit.com/product/1946 or a ton of others.

    Or use an industrial strength cellular router like one of these: https://www.digi.com/products/4g-lte (We use the Digi Transport lR-54 https://www.digi.com/products/cellular-solutions/cellular-routers/digi-transport-lr54, big and expensive but works a treat)

    Personally I would put a little computer with that in the machine room. Even just a Raspberry Pi. Now you can do whatever network connections you like back to your web server.

    From that little computer a serial link to your Propeller is how you monitor it's status and send it jobs.

    The hard part of all this is the software. Especially making it secure.






  • For the past six years, my CNC HMIs have been based on ruggedized tablets that communicate with the actual machine controller via Bluetooth. Works for me!

    Internet access isn't always straightforward in manufacturing plants as they tend to prevent general access. Even when the "IT guy" supposedly grants me access, I often encounter problems.

    I like the Simblee concept but have yet to grab one to play with.
  • Heater.Heater. Posts: 21,230
    That is why we go cellular. No fighting with local network admins and so on. Assuming there is even a local network.

    Around here it's really easy, cheap and reliable. Unlimited data connectivity, 4G speeds, less than 20 Euro a month.

    In the USA I found it a lot more difficult and expensive. Connectivity is bad and there are data caps. That is in San Jose. I can only imagine it's worse elsewhere.

    But still, we get a couple of 100KBytes per second through even after exceedings AT&Ts high speed data caps for the month.




  • Thanks Heater and Mickster

    In my case, considering there won't be much of an interface, except perhaps a four line LCD for information purposes, I believe cellular is the way to go.

    The question now is.... Using a cellular device, such as the one Heater suggested (https://www.sparkfun.com/products/14211), is it possible to retrieve a text file from the internet, containing run-time parameters, and send these parameters to a Propeller chip for processing?
  • Heater.Heater. Posts: 21,230
    I don't know anything much about the Particle system. It seems to be slow old GPRS only and depends on their cloud services.

    Personally I don't like such dependencies and would rather just use a 3G module/router than can be used to to connect to anywhere I like. Where I like being servers under my control.

    With a cellular router and a little computer, it is very easy to fetch text files from your web server. This can be done in a few lines of code in almost any programming language. And of course it's easy to connect that little computer to your Propeller over a serial link.

    Personally I would create the web server on the cloud server in Javascript running under node.js. Then the program on the computer in the machine shop would also be written in Javascript under node.js. That makes it dead easy to create a websocket connection between the two. With a websocket connection the server can push commands to the machine shop as and when required. It's also very easy to do do this securely using HTTPS from node.js.
  • Okay, let's see if I am envisioning this correctly....

    Cellular router (https://www.digi.com/products/cellular-solutions/cellular-routers/digi-transport-wr11-xt#specifications) connects to computer and provides the computer with the ability to connect to the internet.

    Programming done in PERL and C++ because it has been years since I have messed with JavaScript.

    Form on web server written in PERL, accepts user input.

    Program on computer written in C++, grabs job in queue, from the web server, perhaps does a little of the heavy work, before serially (over USB cable) passing run-time parameters to the Propeller, for machine operation.

    Does that sound right?
  • I live on these plant floors and I waste a lot of time, every day, having to run outside the plant to return missed calls due to a weak signal. I pride myself on instant response, 24/7.
  • Heater.Heater. Posts: 21,230
    edited 2018-02-03 20:57
    @idbruce,

    Yes. That is the suggestion. We have such systems running nicely. Sadly without the Propeller but other devices.

    Propeller <-> computer <-> Digi Transport <-internet-> Web server in Google Cloud Services<-internet->Users browser.

    Feel free to use C++ and Perl. We did. Experience is that it as order of magnitude easier to do this kind of thing in JS and node.js.

    If you hunt around you might find cellular modems that are cheaper than the Digi but it is quite a neat device. Dual SIM and Digi offer a remote manager service for it so that you can check it's status, tweak it's configuration and so on remotely.

    @Mickster

    I can believe that. But if there is no direct internet connection, no local LAN by cable or WIFI and there is no cellular coverage then what is one to do?
  • But if there is no direct internet connection, no local LAN by cable or WIFI and there is no cellular coverage then what is one to do?

    Morse code transmitted via two cups and a very long string
  • but it is quite a neat device

    The new machine will have a NEMA 1 6" x 6" x 72" wire trough to hold the necessary power supplies, stepper drivers, wiring, and Propeller boards. The Digi TransPort® WR11 XT will mount nicely to the back of this trough.
  • Heater. wrote: »

    @Mickster

    I can believe that. But if there is no direct internet connection, no local LAN by cable or WIFI and there is no cellular coverage then what is one to do?

    I have read Bruce's OP several times now because I often misinterpret the issue and even now, I find the question a bit cryptic.

    BUT the question in the title is regarding the communication between mobile devices and machine controls.

    BT works for me.
  • Mickster
    I have read Bruce's OP several times now because I often misinterpret the issue and even now, I find the question a bit cryptic.

    The title should have been: "What is currently available for cellular to machine communication?"

    Sorry about that... There have been many times that I have started a thread without yet properly defining the true problem or need. And many times, the discussion itself helps to define the real problem or need.

    Basically, I want many users to be able to supply my machine with run-time parameters, but I do not want to spend a fortune achieving this goal. A user could be on the same floor and as close as 10 feet away from the machine or a user could be on a different floor and as far as several hundred feet away from the machine.

    My initial thought was to create a bunch of wireless handheld devices to enable communication by a bunch of users, using BT or something comparable, but the cost of that would make my endeavor unattainable. Then I started thinking that most folks have a cellular phone and can access the internet, and a simple internet form could document the orders, obtain parameters, due some calculations, etc... The main problem then became getting the machine parameters from the internet and to the machine.

    Either way, I value your input.
  • Bruce,
    How about putting your WEB server on a RaspberryPi and having it be the wi-fi source. No requirement for any Internet connection. Users log into your connection like any wi-fi connection. You can change username/password for every project or even every floor of a project. If a printer can be a direct connect device, so could be a CNC machine. :smile:
    Jim
  • idbruceidbruce Posts: 6,197
    edited 2018-02-04 14:24
    RS_Jim

    After a little research, it seems possible, but I am fairly sure that it would require many, many hours of research to make it happen. The main benefit would be cutting out the reoccurring cost of the web server and the fees associated with a cellular router.

    However, I wonder how reliable connectivity would be.

    EDIT: but... I could just use one of my existing web sites for hosting the input, since I already pay for it.
  • Bruce,
    I believe a PI-ZeroW has the built in Wi-Fi (and Bluetooth ) that would act as your signal source. As Heater already mentioned, the scripts can be written in NodeJS on and run in the RPi. I don’t believe a lot of research is going to be required as a quick question on the RPi forum should give you an answer about the range of a barefoot Pi to a cell phone. Additional feature, you could use the Bluetooth to set username and password for each project/floor without requiring a computer, just use your cell phone as the setup terminal through your own secure connection. Or use one of the 8322(?) Wi-Fi devices I have seen reports of people using them in a range of 1 mile or more.
    Jim
  • Heater.Heater. Posts: 21,230
    It's all a bit ambiguous.

    10 years ago or so Nokia was pushing "M2M" solutions. Machine to Machine.

    Guess what? It was very much like what we are discussing here. Machine with computer connects via the cellular network to some server on the internet. Users talk to that machine via their internet connection to that server.

    Of course Nokia's plan at the time was that all the machines would connect to "gateway" servers that Nokia or cellular providers operated. For a fee of course.

    It's much the same plan that a lot of IoT systems are banking on today. Buy our IoT gadget, which only works with our software on our servers. For a fee of course.

    We can build our own. Put the server in Google cloud or Amazon or Azure. Have our machines connect to it via whatever cellular operator or whatever other means.

    Of course you can bring all that in house and run the server side on a Raspberry Pi or whatever other machine.

    Point is to keep control. The software is the same, on the machine, on the server, in the browser. We have freedom to deploy it wherever we like.










  • Bruce,
    The R-Pi forum is reporting free air range of a Pi0W of about a football field.
    Jim
  • RS_Jim

    IF (BIG word) my machine made it to the construction site of a skyscraper, that just would not cut it, but thanks for the heads up, because it would definitely work on smaller construction sites, without a bunch of concrete walls.

    I appreciate your effort and input.
  • You could try a long range Xbee if you don't want to use M2M
  • DigitalBob
    You could try a long range Xbee if you don't want to use M2M

    To be perfectly honest, I like Heater's suggestion the best, for several reasons.

    1. I imagine it will be the most dependable.
    2. I already have the knowledge to set it all up, except the cellular router.
    3. I think the cellular router will look very cool and professional attached to the machine :)

    Besides a couple of reoccurring costs, the only downside I see is the requirement of a PC to grab the queue item off the internet.

    How can I replace the PC?
  • Heater.Heater. Posts: 21,230
    My take on this as follows:

    1) We want to connect a thing to another thing. Machine to user, or machine to machine, or whatever.

    2) We want to do this across some unknown environment over some unknown distance that may be great.

    Today, the most general way to do that is using internet protocols. The IP stack. Be it UDP or TCP/IP or some higher level protocol like HTTP or MQTT or whatever.

    So, the best idea is to get whatever it is IP connected as soon as possible. After that it's communications can be transported over whatever medium. Be it WIFI, ethernet, cellular, the internet at large. Does not matter. Whatever fit's the circumstance.

    All this talk of Xbee or the WIFI range of a Raspberry Pi is beside the point. That is just one link. One hop in the chain from machine to user. May be useful and appropriate may not be.

    We might want to add another requirement to this: security.

    In which case the sooner we can get the communications channel into HTTPS or TLS the better. No matter if we are using a WIFI connection or cellular or Xbee.

  • Heater.Heater. Posts: 21,230
    idbruce,
    How can I replace the PC?
    Are you sure you want to?

    There are great advantages to having some intelligence at the remote end. It can generally monitor and restart things that fail. You can log into it and see what is going on. Tweak configurations. And so on.

    For example. Let's say your Propeller needs some new software to run. Easy do it via a propeller loader from that 'PC' you are talking over the internet.

    That need not be a PC. It could be something as small and cheap as a Raspberry Pi. There are many options.

    Of course you can get rid of that intelligence if you like. For example we have dumb devices sending data over RS 485 to a MOXA serial port server. Which sends those bytes over TCP/IP to a Digi Router. Which sends those bytes over a TCP/IP connection to our cloud servers. Now at the server we get those raw bytes the same as if we got them straight off the RS 485 serial connection.

    That's great and all. But sometimes I'd really like to talk to the MOXA unit. Which requires a TCP/IP connection....

  • Heater
    There are great advantages to having some intelligence at the remote end. It can generally monitor and restart things that fail. You can log into it and see what is going on. Tweak configurations. And so on.

    So true... Point well taken!
  • Heater.Heater. Posts: 21,230
    Despite what I said about the importance of intelligence at the remote end...

    The number one most important thing is a watchdog.

    Despite our best efforts, software, hardware and comms links do occasionally lock up and fail. We may never find out why they do.

    Often it's a fault, that can be cleared by power cycling the whole show.

    That is where the watchdog comes in.

    The watchdog should be the simplest most reliable thing we can devise that can detect failure and kick everything back to life.

    This starts to get important when the remote system is time consuming, expensive and or difficult to get to.






  • Well, in any event, you have the right idea regarding using a mobile device to supply data.

    The days of dedicated operator interfaces are numbered because we all carry one.

    I have too many experiences with megabuck production machinery being dead in the water because of a HMI failure.
  • There are great advantages to having some intelligence at the remote end. It can generally monitor and restart things that fail. You can log into it and see what is going on. Tweak configurations. And so on.

    Yup, I use Teamviewer and in the plants where I don't have a good enough signal strength to talk to the machine, I have them detach the tablet and bring it to an area where I do have signal. I check the error log and can also check to make sure that they haven't made a silly typo.
    If necessary, I can send modified firmware to the tablet and when the tablet is returned to the machine, the tablet transfers the new firmware to the machine controller.
Sign In or Register to comment.