Nidarbot
Description
The first robot we built with Cerebot and LEGO pieces has two NXT motors connected directly to two wheels. The motors are driven through one HB2 PMOD. There is also a BlueTooth module connected to a serial port. The robot is powered from one 9V battery located at its bottom (however, for real operation, the robot needs a stronger power source for motors - it can be easily connected to VS terminal on the board).
Functionality
After reset, the robot prints the following menu on the terminal (serial port):
Nidarbot controller 1) forward 2) backward 3) spin left 4) spin right 5) set power (20) 6) exit
Then it expects your choice entered through the PC keyboard and further transmitted over BlueTooth to its serial port. The first four options will make the robot move in the given direction until any key is pressed. The fifth option allows to enter the power applied to the motors 0-20, and the last option exits.
Performance
The robot runs nicely and reliably. The movements are sometimes not completely even, and this is ether due to the wheels - the tires might need to be glued to avoid slipping on the wheel center, or they need to be replaced for another type, or, more likely just due to uneven geometry of the bottom. Our goal was to build a robot that moves, not yet a perfect one! Another important issue is to protect its cables and connectors. Even though they are placed on the back, the robot is vulnerable to attacks from the rear side. Pictures and/or videos see below. Now we need to add sensors and more interesting functionality to this robot!
New version
The new version of the robot has a active sensor module, which allows use of 4 LEGO sensors with Cerebot. (two such modules can be used at the same time). For instance we can easily add a bottom light sensor to create a simple line follower (see pictures and video linked below), or ultrasonic distance sensor to make it follow you, or another robot, or compass sensor to - combined with odometry store and transmit its trajectory to the computer.
Software
Robot was programmed in C using WinAVR and Procyon AVRlib. The following projects are available:
- Simple motor control with UART1 remote-control as described above nidarbot.zip
- Line follower using the active sensor module nidarbot_line_follow.zip
- Motor control using timers cerebot_motors.zip
See also
Page on building a robot with Cerebot & LEGO Mindstorms.
Pictures
Click here to see more pictures and a video.