Rasberry Pi and machine monitoring

Getonit

Pre-takeoff checklist
Joined
Apr 15, 2013
Messages
499
Display Name

Display name:
Mark
I have a small factory and I have about 10 machines (riveting, bending, punching, pressing) that I would like to monitor for cycles per shift. My machine integrator says this could be done with with Rasberry Pi machines.
All I would want to do it record a time/date stamp each time the operator performs an operation. If the file was put in a flat file format I could then massage the data in excel so I could see machine/operator productivity.

I am thinking I will just buy a starter kit and see what goes on with it.

I would have my machine integrator do it but he is expensive and booked for months.

Thanks,
Mark
 
I'm expensive and booked for months, but I have integrated my share of factory systems ;)

Got any slightly more specific specifics? I'm sure plenty of folks here would be happy to talk your ear off.
 
Chris,
I think this should be very simple.

I just need to count cycles. The machines all have a cylinder that when actuates does some function. I think a normally off switch which when momentarily turned On, by actuation of cylinder, writes a time-date stamp and machine # to a flat file. I could then massage data in Excel.

Again I don't see it being complex. With above info I could make a graph and make sure employees are working when they are supposed to be and making right number of parts per hour.

I used to be reasonably competent with technical things (ex-SAP ABAP developer) but since I have been promoted to management I have become dumber.....just kidding I don't care about details anymore. I just want it done.

Anyway I just bought a Pi starter kit and will see what goes on. I just need someone to lead me to get started as I read the technical details I don't know or care what they mean, but I will learn.

Thanks,

Mark
 
So, there is a voltage that changes every time a machine cycles? That would go to a digital input (with whatever voltage divider / op amp / whatever is necessary to keep the voltages in line)? How many machines?

Low level I/O is not the Raspberry Pi strong point - my students tend to use an Arduino if they want analog / digital I/O.
 
I have some folks that have been working on this for packaging operations. They're using light sensors along a powered conveyor. Every time a box breaks the light beam, it registers as one completed unit. The results are written to a database where we're using the data to measure productivity by line, job completion status, etc.. It's really unfortunate that the high-dollar 'build' software that manages the BOM, etc. can't manage anything on the output side of the operation. *sigh*
 
So, there is a voltage that changes every time a machine cycles? That would go to a digital input (with whatever voltage divider / op amp / whatever is necessary to keep the voltages in line)? How many machines?

Low level I/O is not the Raspberry Pi strong point - my students tend to use an Arduino if they want analog / digital I/O.

Having done projects with both, I'd definitely vote for the RPi. With one extra chip (like this one) you can have multi-channel analog to digital conversion, and unlike the Arduino which is extremely challenged mentally, the RPi is effectively a complete computer, which can run a nice and comfortable Linux flavor like Ubuntu (or Raspbian), where you can do your database and network communications, all without gasping for breath. And now with the advent of the $5 Pi-Zero, Arduino's days are numbered, IMO. I say that with sadness, since I've done a lot of projects with it and my accumulated know-how is now (yet again) useless.
 
The new Pi 2 is so capable I hesitate to mention it, but the BeagleBone Black was once a far better option than a Pi. Even the Pi 1B.

But the jump to 1 GHz Arm 7 puts the silly $35 Pi in that league and faster than most of my early computers costing thousands at MSRP.

Amazing little gadgets. Ten years ago I would have told you to make
up some cheap circuit boards through a hobbyist prototype house board maker and program up a Microchip PIC or an Atmel AVR.

But a complete Linux computer with GPIO header and an almost full non-crippled version of the OS on an SD card that runs faster than most of my early year's desktop machines in the form factor and size of the Pi?

That's a no-brainer. Mmm. Tasty
 
The PI is easy and fun especially if you've got some linux experience since it's really just a dumb linux box with some easy to get at io pins.
 
I just want it done.


There's lots of info online re: using PI and Arduino devices as simple PLCs. There are open source and cheap $$ projects for the devices, for the OPC to wire it together, and for backend collection / analytics. Look at CODESYS as an example.

I'll extend on your "I just want it done" with "...ensuring reliability, consistency, and durable enough for the shop floor". Not going to happen with a PI and/or Arduino.

For this, suggest you look at a small Kepware install for OPC, and some inexpensive PLC devices designed for the environment they will work in (dirt, dust, heat, etc). Spend a few more $$ and get something that works beyond hobbyist level.


Sent from my iPad using Tapatalk
 
Buy some empty boxes, paint them black and attach one to each machine and feel the operators they monitor the cycles. Problem solved and much cheaper.

:stirpot:
 
This is a side project for me to help insure that the managers make sure their guys work efficiently. All of the machines are dumb, mechanical linkages and limit switches for operational needs. I don't need any PLC level controls to run the machines. I was just looking at a way to verify quantity of cycles. It is not a particularly nasty work environment so that is not a concern.

Capt. Thorpe mentioned something that is of interest in putting this together. This high level process does not tie into the machines at all, I was just envisioning putting a limit switch at appropriate point which indicates a cycle is completed, which creates a log event on the computer. By my understanding I need to create a digital input, ON-OFF to a computer as that is what they work on. Is that a technical issue with the PI? I don't need any analog to digital converters as I don't care if they are at XX%. PI starter kits are being sold with pushbuttons, wouldn't an industrial microswitch be the same thing? Button is pushed, switch is closed creates a digital event? Correct?
 
This is a side project for me to help insure that the managers make sure their guys work efficiently. All of the machines are dumb, mechanical linkages and limit switches for operational needs. I don't need any PLC level controls to run the machines. I was just looking at a way to verify quantity of cycles. It is not a particularly nasty work environment so that is not a concern.

Capt. Thorpe mentioned something that is of interest in putting this together. This high level process does not tie into the machines at all, I was just envisioning putting a limit switch at appropriate point which indicates a cycle is completed, which creates a log event on the computer. By my understanding I need to create a digital input, ON-OFF to a computer as that is what they work on. Is that a technical issue with the PI? I don't need any analog to digital converters as I don't care if they are at XX%. PI starter kits are being sold with pushbuttons, wouldn't an industrial microswitch be the same thing? Button is pushed, switch is closed creates a digital event? Correct?

You are right. If all you need to sense is binary switches, open or closed, the naked rPi should be more than enough.
 
I've been meaning to try my hand at a pi project. I'm going to finally order the damn kit.

Seems like a counter should be easy enough. A network sender and network collector is only slightly harder. I'd get the wifi one provided it works around all of those machines. My last factory floor application required STP.

The closest Google hit I got was:

http://cs.smith.edu/dftwiki/index.php/Tutorial:_Interrupt-Driven_Event-Counter_on_the_Raspberry_Pi

but that is WAY too much work assuming your cycle time is pretty long. This interrupt service routine is designed to measure much, much shorter cycles. I figure your application probably doesn't even exceed 10 KHz ;)
 
Last edited:
Add one of these to a mechanical link:


sku_263031_3.jpg


There are versions that take a digital input and update.
 
Last edited:
Add one of these to a mechanical link ...
That's what was in my mind as I read this thread. The time spent to get an RPI lashup running will be far more than the aggregate few minutes it takes to maintain per-shift paper logs at each machine. Each operator simply logs his counter reading at the end of the shift.

Depending on your environment, that might even create a bit of competition from shift to shift. It's hard to say whether that would end up being good or bad. Counting operations is an easy thing to game.
 
Back
Top