They are optic two phase encoders with the amazing resolution of 30000 pulses per revolution. Actually 120000 distinct detectable angles per rev if I use all edges on the two phases outputs.
I decided to build a 3d probe that I can use to measure things.
I connected three encoders to an WeMos d1 mini, but it was too slow to even detect the pulses and the direction of rotation.
OK, I switched to an Arduino nano, that has a simpler architecture and no wifi drivers etc. The Arduino is easier to program for real time apps. Now it works well if I move the arms slowly. But thats not OK. I want to be free to move the arms as fast as needed to work efficiently.
So I have two options. One is to program an FPGA in VHDL or Verilog and connect it to d1 mini using SPI interface. But good small FPGA board are hard to find.
So before that I will try an ESP32, and use on of the cores entirely to process the pulses from the three encoders. I need to handle pulses down to around 1uS coming from three sources.
In my gadget store I found this:
I don't need the display, but could use it to show the coordinates.
So the first step on this adventure is to learn how to utilise the second core that is not used by default.
The board above can be found on Ebay, under a names like ESP-WROOM-32 ESP32 ESP-32 0.96" OLED Display WIFI-BT Arduino AP STA.
I could use my instruction from last year unchanged for this board. See How to use the DOIT ESP32 DEVKIT.
This board also has a 5V output that I hopefully can use to power the encoders.
No comments:
Post a Comment