Finding open space of lower case "e"

Good morning everyone.

I am considering this low cost vision solution to move a cartesian style gantry to a specific point.

The application requires stacking parts that resemble a lower case letter “e”

At first I thought circle detection would work, but what I really need is circle detection to find the part, and then an offset to the open blank space within the part itself.

Also, I need outputs of x/y to my PLC that will then handle the offset. Im not sure if the GPIO pins alone will handle this, or if I should consider the motor or servo shield. Pwm output is not nessisary as I just need to see x+ - & y+ -. I assume that I can just keep checking and sending a + - signal for each axis until the offset if lined up where I need it to be.

Any advice?


That will work. Pulses on the GPIO pins are fine. However, it will take a while to run the control loop then. An absolute output of error will be faster.

Thanks for the feedback. Are there example codes for absolute output of error? A video perhaps? What does the output look like, is it acomplished by gpio or bus?

Pulses are like a 1-bit error signal. So, it’s hard to transmit a large error value. If you output something like an analog value then your system can much more quickly converge.