You could try a simple photo prox sensor with gain/threshold setting. The AutomationDIrect sensors we use let you "teach" the background and foreground light levels. If you are lucky, your black and green may be different enough in reflectance to give you your trigger. May not work, though, as the green and red may be too similar. I wonder if a simple colored lens in front of the sensor head would let you distinguish. Maybe two prox, one with a red lens and one without. So you can detect if you have an object, and if it isn't red.
Or check out this A-D color sensor: https://www.automationdirect.com/adc/shopping/catalog/sensors_-z-_encoders/photoelectric_sensors/color_sensors/opt2023 Might be as expensive as what you are looking at. -- Ralph ________________________________________ From: andrew beck [andrewbeck0...@gmail.com] Sent: Wednesday, May 11, 2022 4:29 PM To: Enhanced Machine Controller (EMC) Subject: [Emc-users] OT but built on linuxcnc machines:) affordable color sensor for project (24v model) CAUTION: This email originated from outside the Walla Walla University email system. hey guys i am sure there is lots of experience here i am looking for a color sensor to sense when a red color chip goes past on a conveyor normally the chips are just green and black. they can be colored in with a red marker if they are faulty and then we want this sensor to detect them. currently i am getting prices back at 500 bucks nzd each and i need 4 of them which seems a bit pricey lol considering at the other end of the price point i can get a arduino option for 8 dollars but it is not so plug and play. and is only 5v and needs a chip too i think. i want something that can be connected with a PLC to have a simple trigger on or off . you guys got any ideas? regards Andrew _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&data=05%7C01%7Cralph.stirling%40wallawalla.edu%7C623cba8cd3a84e80f78c08da33a624e9%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637879085923275017%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xV11y4M4hLPeCN%2BwiMJb%2Fit4STGjUP5ZA5T1PDIVaZs%3D&reserved=0 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users