How to Spend Rainy Holidays
I took a few days off, to get a a little bit of something different before the up-comming stressful weeks.
After a nice party with old friends I had to face the fact that the week would not be as nice and sunny as I had hoped. What else to to than to work a little bit on my Walker robot.
The software can now reliably control the servos, next I am going to get motion and inverse kinematic in place. I have started to implement a linear motion in integer arithmetic. Tricky.
And I spent some time drawing the force sensor for the feet. I have stripped the design down to one force sensor just measuring the force in the direction of the Tibia. The sensor changes resistance from 10MΩ down to 1kΩ. I have to check the range I am interested in, but these values should be easy to interface with the Arduino.
The components are again made of acrylic glass. They are milled out of raw blocks. They fit into the tibia leg tube with an diameter of 15mm. The piston with the axle pushes onto the sensor mounted into the holding block. I am planning to use bouncy balls as feet. Let’s look if this works.
Let’s Start
It Moves!
Finally I got the code fixed that talks to the servos. The first AX-12A is moving. The scope screen shows the serial communication on the servo bus. Now I am expanding the functions to be able to talk with the three servos of the test foot. At the moment two AX-12A and one MX-28.
This servo configuration might change in the future, a parcel with more servos is on it’s way.
Stripping Arduino from the Arduino
I had bought an Arduino for my Walker project, a Mega 2560 to have enough pins, memory and compute power. A nice piece of hardware, and easy to use with plenty of software, as I had heard.
I am not unexperienced with AVRs. Owning a bunch of SPI programmers and a JTAGICE3.
The first thing I realized was that the easy to use development environment only supports one source file. Well. And it’s rather minimalistic. I switched to real makefiles and Eclipse.
Then I found out that the standard libraries are mainly supporting a linear synchronous programming model without fancy timers and interrupt handlers. I did start to write my own libraries in plain C.
When I tried to plug an interrupt routine into USART1 I got errors because the default libraries did occupy all serial interrupts, not only the one of USART0 used for the USB connection. That’s understandable because the AVR isn’t made for hardware abstraction and dynamic configuration. I did remove all the Arduino C++ code and recycled an existing library for the console I/O.
Now I am happy with an Arduino using purely the hardware. A really nice piece. I bought a second one.