Industrial Robot Control

From Open Source Ecology
Jump to: navigation, search

I'm definitely game for trying to do 3D Printer workshops; I even have some venues in mind and would be willing to put this together. I can do a workshop at Dartmouth University as I know a few people that can help me arrange this and I can also do workshops at all of the various Makerspaces within 100 mile radius of me.

As far as FPGA:

Arduino works well for 3D Printing and many other semi-forgiving applications because you're primarily driving something and only somewhat reacting to feedback (temperature, end stops, etc).

Think walkie-talkie where you have to take turns speaking (microcontroller) vs. two-way communication like a cellphone where you can speak and listen at the same time (FPGA).

The difference between a 3D Printer, which has the movement pre-calculated / pre-determined, and a robot arm is that a robot arm has to re-calculate its trajectory and path all-the-time due to slippage and other environmental factors.

You need to be receiving position data from every joint (FPGA), processing each piece of data individually (FPGA), then processing it together (CPU) and then sending different commands to each motor to compensate for any problems and get back "on path" (FPGA).

The CPU / microcontroller can take the big picture state of the robot arm and come up with an overall big picture delta, but you need an FPGA to collect the data and then to split the overall delta into individual motor commands.

Since a microcontroller works sequentially, it would have to read each arm join position (one at a time), convert the sensor data into x,y,z (one at a time), compile it into a big picture to send to ROS or whatever software we're using to control the robot, then take the responses and sequentially send commands to each motor. Any sensor data that came in during this entire loop would have to be thrown away. If we're including any kind of computer vision into the mix then it could be a full second to do the entire loop from reading data from sensors, processing image, figuring out what changes to make, sending the commands to motors... a lot can happen with the arm in a second.

An FPGA can be receiving sensor feedback from all joints, processing this sensor data into x,y,z position and sending new motor commands to all motors at *literally* the same time, it can also do some of the computer vision processing (also, in real-time).

A CPU runs fast but it can only do one thing at a time. An FPGA runs at much lower cycles but it can do 100s or 1000s of things in parallel (basically for every cycle of an FPGA it runs your entire program from start to finish). The power consumption of an FPGA is significantly lower than a micro controller. The difference between CPU and FPGA can be astronomical the more parallelism you do (both in performance and in energy usage, an FPGA does in one cycle what the CPU would take millions of cycles to do).

Going back to the walkie-talkie example, imagine a CPU as a single channel walkie-talkie where you and the other person take turns talking for 5 minutes but you can talk really really fast, you just won't get any questions or feedback while you're talking, then it's the other persons turn, you both talk really fast but you can't really stay synchronized particularly well. An FPGA is where you talk a little bit slower but you can both talk at the same time and respond to questions and interruptions.

Because the concepts are so different there isn't much code re-use between CPUs and FPGAs. If we start writing software for micro controllers this will not be much help if we switch to FPGAs letter because not only are the languages completely different (Arduinos Sketches/C vs. Verilog) but you conceptually solve the problems differently, therefore porting code from one language to the other wouldn't even really make sense.

An FPGA is a circuit board in software. So programming an FPGA is akin designing a circuit (although they have a programming language, Verilog, to do it).

We can do the same things with a $9 FPGA using negligible amount of power in nanoseconds as it would take a $400 Intel i7 CPU to do with egg-cooking heat. That's transformative and disruptive.