Having spent time learning Verilog and studying ant walking kinematics, I am getting closer to implementing servo control signals in an FPGA. I want to match the mechanical motion, timing, and stride of a hexapod robot to an ant. I have created matching animation “bones,” to slow motion footage of ants walking, and produces wave forms of the step loop. I want to translate these into values for servo rotation angles and describe it in an FPGA.
I built an armature rig in blender which matches the legs of an ant. I key framed this rig so the legs matched the footage of ants walking. This video is the render result. Having observed these results, I think an averaged loop could describe the general walking loop of an ant mechanism. In parts of the video without real ant backdrop, the walking loop is a selected average step of the ant.
Translating these patterns to servo motion requires the use of electronic timing signals with asymmetric wave forms. For instance, the middle coxa - femur joint angle is mostly flat but for one sharp pulse as the leg resets. Each leg has a slightly different pattern, but they all move simultaneously. I think I can describe these wave forms as counters in Verilog which will control servo pulse timing.
I have written Verilog code which animates a VGA “ant” using counting ramps for controlling the legs. So far, only one pattern, but it’s a start. Through learning to create this, I have also learned how to produce VGA signals and use analog inputs. Visit https://github.com/organicelectrics/hexapod to see some of the code I am playing around with. I like how VGA signals can be a kind of indicator display for other signals in the fpga.
If you are not familiar with Verilog, it is a language for FPGA design. It describes logic gates which become hardware gates and execute tasks in parallel and clock cycles. Here is a look at it’s style.
//This is a conceptual sample of verilog code module antrobot ( input [7:0] head_signals, output leg_1, leg_2, leg_3, leg_4, leg_5, leg_6); always @(posedge CLK) case (head_signals) 0:legs = halt; 1:legs = f_walk; 2:legs = f_trot; 3:legs =f_run; 4:legs = r_walk; 5:legs = stretch; 6:legs = crunch; 7:legs = clean; endcase //additional code to describe these states under development endmodule
I think FPGAs are ideal for robotics because of their parallelism and adaptability to controlling almost any device like motors, LEDs, or more complex digital signals. It is possible to create analog-esque motor-neuron connections with digital tool chains and very small IC hardware.
To continue this project requires a lot more time and also some budget for servos. I have built two hexapods now using the cheapest servos I can find, and they haven’t been very strong. To their credit though, most have survived and are still useful, just not strong enough to support a robot of this size.
The Monarch project earlier this year allowed me to provide much nicer servos to the piece. While using them, I realized what a good metal gear micro servo can do. Higher price brings greater torque and accurate construction. This is why most hexapod kits are close to $1000.
Perhaps I can find a donor or sponsor for this project. Currently everything I do is self funded, while a lot of the software is free, hardware is not.