Tiny Tim 2
Let's face it, I've been a total slacker when it comes to building robots (I can hear the distant voice of fritsl mumbling something about never finishing my robot projects and yada yada :-)). Well this robot has - despite some design flaws - landed pretty well on its feet and is on the way to becoming a contestant in the annual DTU Robocup robot competition which was the event that inspired me to build robots in the first place. I've competed in this event before but with robots suffering from either my lack of electronics wisdom or from my slacking. This year the competition will take place in late March so no time for slacking.
For now the robot doesn't really do anything that would captivate an audience (only when it's driving towards the cat), so I've deferred from uploading any video for now, but here's a description and some images of it so far:
- Body is built from LEGO Technic using two powerful motors from the 8287-1 set and using two quadrature encoders from the Robotics Invention System period of LEGO MINDSTORMS.
- Power source is a 7.2 V Li-ION 1100 mAh battery.
- PCB is homemade and designed using CadSoft's Eagle software and using iron-on transfering to the copper and etching in Ferric chloride.
- The two H-bridges used in the design are of this design.
- A Sharp distance sensor is used for measuring distance to obstacles in front of the robot.
- There are two Atmel tiny26 micro-controllers on the board: one is for measuring analog values related to line detection and distance and the other is for behaviour control and motor control (including reading of encoders).
- The software for both the tiny26 chips is written in C using vim and avr-gcc.
At this moment the robot can measure its speed and regulate its motors to keep a desired speed. This means that when the robot goes uphill (as it will have to in the competition) it will recognise that its speed has dropped and will increase motor power and vice versa when it goes downhill. The regulation is currently nothing more than: if speed is faster than desired then decrease motor power with a constant amount. This works well enough for the competion but eventually it would be more desirable to have something like PID-regulation on the speed.
Currently I'm working on getting the I2C communication between the two micro-controllers working. The tiny26 hardware support for I2C is limited so it will be a mix of using the universal serial interface that it has and handling the protocol in software.
Originally I was planning for the PCB on the robot to contain two I2C slaves (motor driver and sensor reader) and then adding another PCB containing the I2C master that would be working as a controller and putting up a UI to interact with, but that will have to wait to until after this year's competition.