While developing visual positioning system for small robotic arm I needed to measure its performance. To do that I had to be able to introduce controlled and measurable disturbances to the system.
I came up with solution based on small table moved by a stepper motor. Control unit receives commands from PC (that runs a dedicated application). Control application also receives data from robotic arm, so it's possible to create performance plots (see Gallery below).
I decided to use as many ready-made components as possible and print remaining custom parts on a 3D printer. Extruded aluminium profiles were chosen to build the frame. 3D printed plate with holes for robot's base servo mounting is moving thanks to linear bearings that slide on rods attached to the frame.
Stepper motor is mounted to the frame using ready-made mount, motor axis' movement is passed to the table by timing belt. I also had to design and print a case for the electronics.
Printed parts: endstop mount, frame legs, belt tensioner mount and main table.
To shorten development process I used Arduino Nano, A4988 driver module and ready-made enstop with added Schmitt trigger RC filtering. Components were assembled on a perfboard. The device is powered from external 12V power supply.
Two pieces of software had to be developed: one for embedded system and the other for PC.
The embedded system software was developed using Arduino libraries/framework. Its task is to receive commands from control application, interpret them and act accordingly (move to position with set velocity, homing) and notify the PC about table's current position.
Thanks to using A4988 driver, controlling the stepper motor is easy (just send one pulse to the driver). I also used external interrupt (from endstop) to detect accidental collisions (occuring after missing a few step) and stop the motor.
The PC control application enables the user to control the linear drive (homing, move to position, set speed, random movement mode) and to log the data. Additionally the app can receive data from robotic arm (displacement error of head's postion), merge it with table's current position and display that information to the user.