As I continued working on my motion control rig I decided to move to a wireless connection and a different controller. To test this new setup I’ve built a rotary plate; which is a minimal setup of what is to come but checks all the boxes feature wise.
Details
I’ve put quite a lot of effort into the mechanical design of this rotary plate. My goal was to make it easy to assemble, compact and modular, so I don’t have to reprint the whole thing only to change one dimension. In total the design went through about ten iterations.
The first design was based on the same rockler bearings as my motion control rig. This didn’t really work because the bearings have a really rough surface as the manufacturer decided to paint the rings to hide the cheap material they used. Even the stronger steppers had problems with it when some weight was put on the plate and the uneven distribution of the bearing balls did the rest to make for a shaky experience.
My next design featured a planetary gearbox. I didn’t build this because there was no space to place the electronics and I wanted them inside the case so I only have to connect power to make it work.
After that I’ve spent a long time with a solution based on a 3d printed gearbox with one gear on the motor-shaft and an interior gear to move the platform. This setup created way too much friction to make it work with the small motor I wanted to use.
In the end I kept the setup but replaced the gears with a belt and pulley system.
On this design I tried very hard to hide the screw that is the center axis of the machine. I designed various contraptions that would hold the screw head from the underside of the plattform but settled for a far simpler solution. For the center axis I switched to a hex bolt with a hexagonal cutout in the top of the plate to transfer the rotation to the plate and the cutout is covered ... by a Sticker.
The electronics fit snugly on a 4 by 6 cm PCB in the bottom of the rotary plate. An ESP32 in the formfactor of a D1 mini is used as the brain for the operation and a DRV8266 drives the Nema 17 stepper motor. The Stepper has only 13Ncm but is very thin, which makes a compact setup. Also onboard is a buck converter which generates 5V for the ESP32 and the stepper driver from the 12V motor supply.
The whole thing can be assembled in about 20 minutes. It consists of 3 3D-Prints to which all Hardware is mounted.
The software on the controller is the ESP32 version of the grbl firmware. I configured a single axis in the firmware and to connect to it I used a telnet connection over wifi.
The belt and pulley system translates 16:40, which is a speed reduction by 2,5. Together with the 200 steps per revolution and 32 microsteps, one full rotation is divided into 16000 steps. By configuring grbl to use 44.444 steps per mm, one millimeter in grbl corresponds to one degree in rotation.
Demo
If we connect to the platform with putty via wifi we can interface grbl as if we had a serial connection to it. We can send for example single commands to instruct one rotation or access and modify the onboard settings.
To test the reliability of the connection I’ve created a google spreadsheet which lets me generate gcode sequences with a fixed time per command. To do this I set grbl to inverse feed rate mode via the G93 command. The feed rate of each following command will be interpreted as a time span instead of speed. To calculate the F number you divide 60 by the amount of time you want the command to take in seconds. While the time for each command is fixed, the distance increases which means an increase in speed. The function of the speed follows a bell curve with the maximum feed rate at the highest point.
This generated gcode is streamed via LaserGRBL over the telnet connection to the esp32. In my testing I have found that this setup is reliable up to about 30fps, which is more than enough for motion control. The quality of the wifi access...
Read more »