This Week
This week I finished assembling the stage, and wrote code for the steppers. The remaning assembly included: boring out larger holes in the aluminum belt clamps, sanding down said clamps, wiring together the limit switches, and setting up the electronics for the motor drivers. However, the bulk of my time was spent on the code. The code has a handful of key features I’ll list here:
- CLI (command line interface) to allow both a user and another arduino to directly and intuitively control the steppers. This includes reading (harder than you’d expect) the serial in a coherent way, parsing it, then issuing commands. This also included testing if it’s actually possible to communicate between arduinos via serial, which it is.
- Backend driver that converts stage x y coordinates into motor steps. This way the user can issue a simple command via serial “goto 100,200” and the stage will simply go to that coordinate. The stage is around 10000 by 7000 steps if I remember correctly. Doing some rough math, this results in an accuracy of 550mm / 10^4 ~ 0.055 mm/step = 55 microns per step.
- Homing code to measure how large the stage actually is, and what the backlash of the stage is. However, after implementing this, it appears it may not be necessary. I designed and build a stage that is so mechanically robust and rigid that the belt never slips, and thanks to steppers always moving the same amount per step, does not need calibration. A one time measurement of max stage size is sufficient. This drammatically reduces the wiring complexity as we don’t need to worry about extra wires from the limit switches getting in the way of the stage. However, because all of this code is already written, we may wire up the limit switches anyway as we need to cable route the charger’s main cable anyway.
- RPM and duty cycle interaction with the motors, so the user can specify a specific speed in rpm and a duty for the motors. I also found the reliable speed limits of the steppers, as going too high or too low results in skipped steps and stalling. The code to prevent the user from doing this is included. I also attempted to characterize the affect of duty cycle on the motors, but found no real trends. I think our motors and drivers are voltage limited with more than enough current. As such, increasing or decreasing the step duty didn’t have much of any affect.
Schedule
I believe we are on or ahead of schedule.
Next Week
- continue investingating motor noise, as I want to try and make them quieter if possible
- design and print cable snakes (the plastic bits that curl when retracting so cables don’t go where they shouldn’t: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fi.pinimg.com%2F736x%2F13%2Fe1%2F6d%2F13e16d2581e73d80b11334d2cfcf0be8.jpg&f=1&nofb=1&ipt=2cdc35dd0671c647f227f094dc2b7254c5a38bae43dffe73070423a5c53862e8&ipo=images)
- After printing the cable snakes, try once again to route the cables in such a way that they don’t shear or get torn out by the moving stage
- Work with Cal to allow his mega to move the steppers via the CLI