My big build is coming up, but for now it's all about motion control.
With all my of encoder talk so far, one might wonder what I am trying to do with them. Early on as an automation engineer you learn that we don't often build robots like you might imagine, arms or humanoids for example, we usually build movement frames for specific tasks. For example if we want to be able to change out cutting tools off a rack, we don't make an arm that can reach the rack and the machine, at least not a very free moving one, it would usually be a rail or an arm that could just move to the positions needed. Well, I was looking at all of the movements needed to make espresso and coffee, fresh ground and with add-ins, and I was thinking, this won't be modular enough. Then I realized, this is for fun and to show people what you can do with a microcontroller. So, I'm building a robot arm. I know it might sound over complicated, and if I were building a commercial coffee machine it would have a set of features specified, and I would make the simplest possible set of movements to do each of the tasks needed. But I want to expand this over time, but still have it do as much as possible by the end of the contest.
So the question I've been working on is what to use to run this arm. There are lot's of options. Big, precise, industrial robots often use brushless AC servo motors with optical encoders or magnetic resolvers. These can move very quickly without worrying about losing track of their position, the equipment to drive, decode and control these servos costs in the 5 or 6 figures per axis. On the other end of the price spectrum you have hobby servos which usually use photometers for position, they cost a few dollars, and due to integrated control circuitry can be controlled with nothing but a PWM signal from a microcontroller. but they are not highly accurate, but can usually get within about 2º (that's from my experience, not a technical quote). Then of course you have the CNC hobbyists best friend, the stepper motor. I will admit, my fellow automation engineers do not like steppers, if we buy a gearbox and it comes with one attached my manager will take the stepper off, toss it and leave it (and I pull up quick to retrieve it). Their main reason is that in a process run by AI, in which the motion profile may change, steppers can miss steps and throw everything off. But that is in thinking of industrial production applications where you need to, for example, place 8 million chips between maintenance times without messing up and the system costs over a million dollars. Steppers are a great balance between price and reliability when you need to run processes at around 1 misstep every 4 hours, and don't want to pay 100 times as much to get that up to 1 misstep every 8 weeks.
I was considering making my own brushed DC servos, this would be a regular DC gear motor with a low cost encoder attached. The controller would then use a PID control scheme to compare the current position and speed with the target position and run the motor to the right spot. The PSoC 4 could actually handle this pretty well since it can read encoders in hardware, and it has sufficient processing power if programmed efficiently to run the PID loop, which is no easy task. But I'm thinking at this point I'll aim for something of a psudo stepper servo, a system which uses the open loop, processor easy positioning of a stepper, and uses lower end encoders to check that the position is matching up every once in a while, which can still be 100 times a second, just not the nearly real time rate needed for true PID servo control.
Sorry for the lack of technical or design data in this update. Soon I'll have all the parts I need to test my coordinated move code, and hopefully it will be of value to the community here.