JoergS5 parallel five bar scara
-
@bondus I propose we search the reason. I must confess I did not fully understand the limit methods, I copied them from the Scara code. I hope you can live with the errors by limiting your print area. I will try to find the reason later, after I finish the build.
The encoder will be built with three ESP32-CAM (I will use the Z endstop with it also) and one STM32F7 board which communicates to Duet. I will encode the encoder printout with a binary pattern, such that + and - degree can be directly read. Something like the attached image, but rounded around the middle point.
The black bars left and right mark the ends, in the middle the first bit is + or -, the other bits calculate to the degree. -
@JoergS5, a binary encoded position encoder.
I wonder how you will make use of that with the Duet/RRF? What signals do you plan to send to the board? Conditional gcode would make it useful in a homing script.
-
@bondus Duet shall send a M260 over I2C to the ESP32 or STM32 board, the external board will set the steppers to the endstops, then sending ok back when finished. I am not sure how the external board moves the steppers (could be some crude rr_ commands, but should be easier).
-
@bondus I will try the Smuff way serial connection https://github.com/technik-gegg/SMuFF-Ifc to send and receive data.
The optical encoder is developing, if calculated correctly, 1/10 degree or a bit better is achievable (encoding with gray code: https://en.wikipedia.org/wiki/Gray_code ). -
In case someone wants to follow my optical encoder procedure: I've created a github repository here: https://github.com/JoergS5/OpticalEncoder with a first png gray code for printout and the java program to create it.
-
@JoergS5, you are remaking a classic old rotational encoder with gray coding.
With a powerful CPU and a high resolution linear sensor it must be possible to create a better pattern. Using a clever pattern, some image processing, error correction, viterbi, e.t.c. it must be possible to get far better resolution. The mechanical industry have a lot of old tech that needs to be renewed.To be useful in our case a 1/10 deg resolution of the arms is not good enough for positioning.
-
@joergs5. Do you have any datasheets on those linear sensors? It's quite an interesting problem
-
@bondus For precision, "I have an ace in my sleeve" (I hope Deepl translated this correctly ). The encoder is meant to find the position when the printer starts working: where am I roughly, and in which direction do I have to turn the steppers. For fine positioning, I will use a finer structure like opened old chips and a pattern recognition. That's the reason why I want to use STM32, for the needed processing power.
I wanted to use the ATM212 encoder which I bought, but it looses the absolute position information between the power offs, and it is not exact and depends on the speed of the movements.I will use simple cameras as linear sensors, like OV2640 and if this is not sufficient, I'll try OV5640. Line sensor were used in the first scanners, but I cannot find them to buy anymore.
-
@JoergS5, using a camera to read the patterns must limit the sampling frequency quite a lot, fps of cameras are normally not very high. But on the other hand you can potentially get very high resolution, there are a lot of pixels of input.
I worked with early CMOS sensors back in the '00s, even the 90s. You could do a lot of tricks such as just reading a few lines and get much higher "frame" rates. But things must have changed a lot since then
-
@bondus my first tests with ESP32-CAM were unsuccessful, I will need more research. If you have hints how I can improve the encoder, please tell me!
My current approach is:
- make the printout as big as possible, the resolution is better then. 30 cm diameter means maximum resolution at 600 dpi: 22231 dots, one dot means 1/60 degree. The dots could be subsampled by the camera. I thought about using a neuronal network solution.
- buy ArduCam OV2640 and OV5647, where the objective can be removed to go with macro focus. For OV5647 I will need a Raspberry Pi Zero W each. There is a breakout version of OV2640.
If resolution is too low, I will wait for the new sensor OV48B ! (a joke, main problem will not be the resolution, but the focus)