Using Raspberry Pi for tool breakage detector?

g-coder05

Administrator
Staff member
Joined
Feb 8, 2021
Messages
687
Reaction score
529
Location
Capones Island Philippines
Website
machinistboard.com
Iv'e been interested in these little works of wonder for a while and constantly thinking of all the applications in a shop where it could be used. I was looking through their peripherals earlier and one they have a laser tripwire that would be super simple to make a tool breakage detector. I realize that most new purchases now people are opting for probing but with so many machines without probing this could be a nice little gadget for less than $100.

The way I am looking at it is since the computer is the size of a pack of a credit card I could make an enclosure with the laser sensor inside that clamps to the table. A macro could be written for after a certain amount of time an extra M-code could be sent via bluetooth to the Raspberry to activate the laser. Then have the tool come down and break the beam thus sending a signal back to the control via bluetooth, USB, or Ethernet to continue. Or, if the beam doesn't break the Raspberry would send a text to let the operator know a tool didn't break the beam after a set amount of seconds.

I know this is borderline hobbyists thing but could be useful in an industrial application. The computer is $35, laser is $3 and I could add the 1080 HD camera for $11 and the operator/programmer could also monitor whats going on while away from the machine over the wifi output.

My question is what would be the best way to send signals to the control?
 

Herding Cats

Hardplates
Joined
Feb 1, 2021
Messages
2,235
Reaction score
1,999
Location
Primary: State of Confusion Secondary: PA
Website
speartoolandmachine.com
High speed skip signal?

I guess I don't understand what the Pi would be needed for? I would think you would just write a automatic tool length measurement macro and have an if statement that if the new measurement was more than say .005" different than the current it would alarm or default to a redundant tool to rerun the last operation.

Both Bill and or Kevin could likely clarify my bodged attempt lol
 

Garwood

Well-known member
Joined
Apr 24, 2021
Messages
2,245
Reaction score
2,178
Location
Oregon
I am no expert here. I'm heavily involved in an open source project based on the Pi zero though. I am pretty familiar with it's capabilities and strong suits even though I don't have a clue how to code in Python.

RPi is pretty rad, but it is a computer. It has to boot up and run code, etc. The main benefit is they are incredibly cheap, very well supported and all the ancillary stuff is cheap and well proven as well.

The RPi's real capabilities lie in the graphic user interface realm. That's where the little buggers kick ass. At their core, they are basically the chipsets the android smartphones use to handle graphics.

For automation stuff sometimes an arduino is the best. Arduino is a microcontroller. It doesn't boot up, it just works.

My friend/biz partner has had raspberry Pi's and Arduinos handling some heavy automation jobs in continuous production since 2010.

The Pi Zero is $5 and the size of a stick of gum. It is astounding what that little thing can do. We've got it running a complex GUI, translating canbus @ 500khz, running a bunch of small programs and processing a dozen or so analog inputs at the same time. The only downside is the boot time. We solved that by just leaving it on. It draws almost nothing.
 

Garwood

Well-known member
Joined
Apr 24, 2021
Messages
2,245
Reaction score
2,178
Location
Oregon
Pi is just the brand name of the computer. I'm just trying to figure how to get the signal from the computer to the control.
View attachment 776
The Pi4 is way beyond the capability you need for any of this. The Pi4 is power hungry and makes a lot of heat. It is also the size of a credit card. That's really big nowadays when something the size of a thumbnail will do more than what you need.
 

Vancbiker

Administrator
Staff member
Joined
Mar 21, 2021
Messages
1,632
Reaction score
1,677
Location
Vancouver, Washington. USA
If the Pi thingy can output a discrete digital 24Vdc signal that's all you need. This would be input to the skip signal (probe) input on a Fanuc control. A simple macro in the control that tests position would be used to determine if the skip signal was made or not.
 

Garwood

Well-known member
Joined
Apr 24, 2021
Messages
2,245
Reaction score
2,178
Location
Oregon
I understand that, but what is the need for any computer board? I'm pretty sure it can all the written into the control
The reason to do something with the Pi is because it's so well supported. You can buy HATs and modules with incredible capabilities and they are dirt cheap because they sell a million of them a month worldwide.

The modules usually communicate with the pi using I2C protocol. It's not just a laser pointer. It's something made specifically for the Pi.

The real cool thing about anything Pi related is the open source aspect means you get full access to the nitty gritty details and you can tweak it for your purpose.
 

g-coder05

Administrator
Staff member
Joined
Feb 8, 2021
Messages
687
Reaction score
529
Location
Capones Island Philippines
Website
machinistboard.com
The Pi4 is way beyond the capability you need for any of this. The Pi4 is power hungry and makes a lot of heat. It is also the size of a credit card. That's really big nowadays when something the size of a thumbnail will do more than what you need.

Wow, I just looked at the Pi Zero and how can they possibly make that for $5? That would work perfect for what i'm thinking.


If the Pi thingy can output a discrete digital 24Vdc signal that's all you need. This would be input to the skip signal (probe) input on a Fanuc control. A simple macro in the control that tests position would be used to determine if the skip signal was made or not.
Perfect they make the 24V in 2-16 channels starting around $8
Screen Shot 2021-07-22 at 2.54.58 AM.png
 

Garwood

Well-known member
Joined
Apr 24, 2021
Messages
2,245
Reaction score
2,178
Location
Oregon
The first RPi project I was involved in was centered around a dead Intel wafer loading robot I bought for $30.

We used a Pi4 with a 7" touch screen for a basic GUI. It essentially had jog buttons and fill in the blank spaces. Worked exactly like a Haas indexer control where you fill in the blanks, only it did 3 axis simultaneous. It worked strictly in a teach mode. Just jog what you want it to do and it repeats or you could fill in the blanks using encoder counts to tweak movements in.

The pi communicated with an arduino that did the actual heavy lifting and controlled the servo drives/kept track of position in real time.
 

Mhajicek

Active member
Joined
Mar 2, 2021
Messages
364
Reaction score
222
Location
Maple Grove, MN
I suppose the Pi would be interpreting the signal strength from the laser detector and determining when to trip your skip signal. But that's something that could be handled with a transistor or two, a pot, and a couple resistors.
 

Garwood

Well-known member
Joined
Apr 24, 2021
Messages
2,245
Reaction score
2,178
Location
Oregon
...could be handled with a transistor or two, a pot, and a couple resistors.
Can you have a board made with just those components on it for less than the $5 you can buy the Pi zero for?

How does it communicate with a laser thingy that uses I2C?
 

g-coder05

Administrator
Staff member
Joined
Feb 8, 2021
Messages
687
Reaction score
529
Location
Capones Island Philippines
Website
machinistboard.com
Can you have a board made with just those components on it for less than the $5 you can buy the Pi zero for?
Thats what caught my attention. The first one I looked at was the 2GB gen 4 but when you said the Zero I couldn't fathom how they can make a Linux PC for $5 and have 2 micro USB, Micro HDMI, and 40 pin! It cost that much just to drive to Radio Shack. I was on their site a few minutes ago watching the Zero vid and the guy said they sell 30,000 a month but still....
 

lobust

Moderator
Staff member
Joined
Mar 17, 2021
Messages
926
Reaction score
903
Location
Orkney Islands, UK
Years ago I spent a lot of time interfacing arduinos into a couple of our older machines to perform various tasks. I made a programmable coolant nozzle that worked by reading the BCD position output from the tool changer to know which tool was in the magazine. I made a status monitor for one of our old turning centres that was interfaced into the cycle relays and had a little web server that displayed the spindle time efficiency and parts count and such like on an http page on our network.

I had lots of other plans that I never saw to fruition.

It was fun more than it was useful tbh.
 

Garwood

Well-known member
Joined
Apr 24, 2021
Messages
2,245
Reaction score
2,178
Location
Oregon
Thats what caught my attention. The first one I looked at was the 2GB gen 4 but when you said the Zero I couldn't fathom how they can make a Linux PC for $5 and have 2 micro USB, Micro HDMI, and 40 pin! It cost that much just to drive to Radio Shack. I was on their site a few minutes ago watching the Zero vid and the guy said they sell 30,000 a month but still....
The Pi zero also does composite video and Wifi/ bluetooth/BLE

Other thing is if you design a product around it you don't even need to buy them. You can sell a product and expect the customer to pop in their own pi and load the firmware they want.
 

Mhajicek

Active member
Joined
Mar 2, 2021
Messages
364
Reaction score
222
Location
Maple Grove, MN
Can you have a board made with just those components on it for less than the $5 you can buy the Pi zero for?

How does it communicate with a laser thingy that uses I2C?
I was thinking lower level than that. A laser pointer and a photoreceptor.
 

jz79

Active member
Joined
Mar 23, 2021
Messages
113
Reaction score
95
Location
Jurmala, Latvia
you might want to look at the ESP8266 chip based boards instead of the Pi, it has wifi and BT capability, fast enough to run as camera interface also, small enough to fit right into the enclosure of your detector, depending on the variety, they cost from 1.5~5$, the more "expensive" ones give you a small OLED display on the same board, ties up few i/o pins though, programming can be done via Arduino IDE

I use these for backup monitoring of ultra low temperature freezers at one of the places I work, and one is also in charge of the voltage/current control of the anodizing power supply, I think its in the 4th year now, hasn't caused any issues
 

g-coder05

Administrator
Staff member
Joined
Feb 8, 2021
Messages
687
Reaction score
529
Location
Capones Island Philippines
Website
machinistboard.com
Finally got a Raspberry Pi 4 8gb. Absolutely amazed at this little beast for $75.

WOR (windows on Raspberry) has a new release of Win 10 that’s only 4gb and over clocks from 1.5 to 2.4. I stuck Solidworks and Featurecam on a 256 SD micro and it is blistering fast.

It’s not as fast as my Macpro but for the money this is a cool little gadget to tinker with. And how can they produce the case and fan for $2?

792A5E4A-4213-4FBD-9848-D9395AAC190B.jpeg
2345A6F2-2C3B-4983-8B49-8471A6BE9B2D.jpeg
 
Top Bottom