Help detecting if a machine is running

I´m a newbie, having received an Arduino with a basic code (30 lines) which I then modified to do a lot more than the original task. So, I am a beginner, understanding basic principles. I am also an experienced computer / PLC programmer, but not good with the Arduino hardware, yet this project seems an easy one for someone who is fluent on any Arduino (if you are local to Cleveland, Ohio, I don't mind contacting and compensating you for a joint hands on startup).

Here is what I need and my ideas:

I work at a 3 football field long facility. We have about 30 machines we want to connect on this project.

The goal is to detect if the machine is ON or OFF.

The detection process will be simple: When an operator RUNS it, the operator will press an existing "GREEN / RUN" button at the machine. When the operator stops, the operator will press an existing "RED / STOP" button at the machine.

I plan on having each of these existing buttons also hardwired to an Arduino (UNO or MEGA... pls let me know) analog input pins.

The RUN button will send an analog signal (3.3V) to the Arduino's A1 (analog input 1) pin.

The STOP button will send an analog signal (3.3V) to the Arduino's A2 (analog input 2) pin.

When A1 goes HIGH (true, bit "1"), A2 will be LOW (false, bit "0"). In the Arduino's code, I will also start a logical timer ("timer1) when RUN is pressed, and set the "timer2" to ZERO

Similarly, when A2 goes HIGH (true, bit "1"), A1 will be LOW (false, bit "0"), and in the Arduino's code, I will start a logical timer ("timer2) when STOP is pressed, and set the "timer1" to ZERO

This part is "easy" for me. Now comes what I don't know and need help with:

How can I send "write" this info WIRELESSLY OVER a long distance (900 MHz / 2.4 GHz) to a computer listening somewhere?

What hardware do I need?
How do I wire / connect?
Code snipet so I can read and then go from there? (I am fluent on several languages... been around programming since 1972, and have programmed several PLCs)
What do I need at the desktop computer "listening" far away?

Note - All these machines are stand alones. None of them are connected to the web / internet. due to security reasons. Each machine will have its own Arduino mounted on its panel and I can easily provide the power to the arduino. The wiring to the A1 and A2 analogs is not an issue. Issue is where do I go from here?

Ultimately, what is needed is to know is if the machine is running, and for how long it is running, and similarly, if it is stopped / idle / not running, for how long it has been that way. This will enable us to remotely see what's going on and then take the necessary action (send support ... either maintenance, QC, supervisor, setup personnel, etc)

Thanks in advance for any help you can offer.

Best regards,
Andry

Please use a search engine first. You might be better off with an ESP32.

Please do not post in "Uncategorized". See the sticky topics in Uncategorized - Arduino Forum.

Topic moved to a more suitable location on the forum.

You can ask the moderator to move the post to the Jobs and Paid Collaborations forum section (use the flag button lower right)

Simple first observation….

Your initial strategy is monitoring the buttons - not the machine !
This is called “open-loop’

Better to test if there is any controlled OUTPUT of each machine that indicates that it’s actually running.. a tach pulse or a status light.

e,g. if a belt break after the run button is pressed, you’ll know if it’s stopped.

Another choice is the host going to poll each machine - say every second (my preference), or will they announce their status asynchronously ?

M!ore ideas but get started first.

What sort of controls exist now on the machines?

Without mentioning any of the other issues you may encounter an arduino board with onboard LoRa will work for the communications. They're pretty common and the example code will be enough to get you going. You'll need one at each end: one to read the signals and transmit, and one connected to your PC to get the data.

Most of those boards are ESP32-based. ESP32 also has built in wi-fi, which may also work over that distance in clear air (I can see my neighbors' networks from over 1/4 mile away) and you can also get ESP32 boards without LoRa. The benefit of this is that since it's wi-fi based, it can connect to any wi-fi network present in the plant already, or you can get a router and place it where both the PC and the ESP32 can "see" it if one doesn't already exist.

I'd try the plain wifi method first since it's simpler.

Sorry. As mentioned, I'm a newbie, unfamiliar with these details. What category will this work the best?

It's been switched to the Project Guidance section which seems appropriate.

There are only on/off switches that are not connected to PLCs. Some of these machines are over 35 years old. Some are DOS, some even prior to DOS. Some are Windows (95, 98, XP, 10), some are Unix. That's why the simplest, most uniform way to go about this is to derive a 3.3V control voltage off these switches (buttons, some momentary contact), and then have these signals come into an Arduino's A1, A2, etc then start a logical timer, and broadcast that info wirelessly to another computer where the data may be stored, manipulated, presented as a panel, etc.

As mentioned to another comment... there is a myriad on machines, all different OS. Buttons / switches are the way to go. The STOP button will be always pressed if the machine isn't running. Always - if a drill stops, a drive fails, a belt ruptures, the stop will be pressed. And that's simple enough; need not to sophisticate. I appreciate the heads up, though. Not the case here.

how far apart are the machines?
if within WiFi range of each other (say less than 10 metres) consider ESP32-WIFI-MESH

Then you only need to monitor the STOP button.

Thx, but without insulting... I think that any of us, computer guys, start by using search engines based on info at hand. Of course, that was my 1st route. I'm a newbie, but not that much clueless. Sometimes one needs to know what to search - didn't know of LoRa, or ESP32 prior to this forum, so that search wasn't done.

Machines are all over, spread within about 720 linear ft. Height is 24 ft, so there is plenty of clear space.

ESP-WiFi_MESH may be OK but it would be a lot of work to test it out

maybe simpler to go for LoRa - would recommend board which incorporates a microcontroller and a LoRa module, e.g. ttgo-lora32, Adafruit Feather 32u4 LoRa, TTGO-Beam, Hiltec LoRa 32, The Things UNO, etc
this saves the problems of level shifters, jumper wires which give poor connections and intermittent faults, etc

Can you provide a link on what you're specifically recommending? I've looked on ebay for Arduinos with onboard LoRa and there are too many variations. I'm not knowledgeble of these hardware. Thx, Andry

Please confirm that you have ACTUALLY tested this and the machines did not mind having their buttons modified!!!!!

This isn't an ESP32, but when instructing someone new to Arduino, I tend to point them at Adafruit because the tutorials and documentation are typically very high quality. This is an RP2040 board with a LoRa transceiver. It can be programmed using the arduino IDE or with CircuitPython.

They also have several other LoRa boards.

if considering LoRa check frequencies-by-country