Lego Micro Robots

0 views
Skip to first unread message

Ottavia Delamar

unread,
Aug 3, 2024, 11:48:42 AM8/3/24
to ndestuvibudd

Boys are predictable. As a general rule of thumb, we tend to like guns, robots, pirates and swords. When you combine all of these elements together into one single entity, the results are spectacular and you can be damn sure that our little man-hearts enter into a state of euphoric adolescent joy.

I really liked the assortment of parts in the set, especially the large number of transparent red 21 bricks used in the micro manager. The pearl gold elements such as the binoculars and telescope are also welcome additions to my parts pool.

The BASIC Stamp from Parallax is a popular introductory miniature computer for learning the basics of electronics and computer programming. By themsleves, however, the BASIC Stamps cannot control motors, which are crucial to robotics and many other projects that require motion. LEGO is famous for its construction blocks, and it has lately been introducing many robot-themed sets. In this project, we demonstrate how you can use the Pololu micro dual serial motor controller to control a simple LEGO robot with a BASIC Stamp.

In its initial configuration, this robot behaves very similarly to the obstacle-avoiding robot from project 1: this robot drives forward until it hits an obstacle; when it does, it backs up, turns, and resumes its forward motion. In future projects, we will use this project as a foundation for more complex and interesting robots.

Because the details of the mechanical design are not particularly interesting, we will not cover the assembly of the LEGO chassis. Instead, we will focus on how to use the micro motor controller with the BASIC Stamp II. This sample project should, therefore, serve as a reference for anyone wanting to use a BASIC Stamp to control a small, differential-drive robot (a type of robot, which, like a bulldozer or tank, has independent drive wheels or treads on its two sides).

Here are the essential parts you will need if you want to build a similar robot. Except for the LEGO chassis, these items are available either from Pololu or from most electronic component distributors.

To use the LEGO motors in you own project, you need to get leads that you can connect to your own electronics. One possibility is to cut a regular LEGO cable in half and solder on male header pins onto the cut wires. This will give you the two necessary connectors at the expense of one LEGO cable.

(In this section, we go over the major features of the program. For more details, view the entire program (3k bs2).Note that the pin numbers used in the program correspond to the schematic diagram in section 3, above.)

The first value,MC_SOUT, specifies the serial output pin to use, which is P10 in our example.The second argument, 32, specifies the settings for the serial output; we use32 because it specifies the baud rate to be 19,200, which is the maximum rate atwhich the motor controller can receive. The four values in square bracketsare the values sent out over the serial line.

The first two values sent to the motor controller arealways hex 80 (128 in decimal) and 0, which let the motor controller know thatit is being issued a command. The third value specifies the motor numberand direction. To help prevent mistakes with this third parameter, we defined constants for forward and backward for our two motors at the beginningof our program:

(Of course, which constant gets assigned which number depends on how yourrobot is wired up and what you call forward and reverse or left and right.)The final parameter in the 4-byte sequence is the speed at which the motorshould run, where 0 stops the motor and 127 (7F hex) is full speed.

The main loop of the program is rather simple since the robotdoes not do much. For simplicity, we use the pause instruction to determine the time that the robot backs up or turns,but the BASIC Stamp could potentially be doing something more usefulduring that time.

This project shows how easy it is to use the Pololu micro motor controller with a BASIC Stamp II. While the robot we built is certainly very simple, it is still a fun project that is especially appropriate as a first robot. Since the motor controller only requires two I/O lines, there is plenty of room for expansion. If you are ready to tackle a new project, you might try adding on our IR beacon to allow the robot to run away from another robot.

Mindstorms kits allow users to build creations that interact with the physical world. All Mindstorms kits consist of a selection of Lego Elements, a "Smart Brick" (internally known as a programmable brick or "pbrick"), which serves as the "brain" for a Mindstorms machine. Each set also include a couple of attachments for the smart brick (such as motors and sensors) and programming software. Unlike conventional Lego sets, Mindstorms kits do not have a main model to build. Sample builds are included with each version of Mindstorms, but the kit is open-ended with the intent of the user creating and programming their own designs.

In addition to at-home use, Mindstorms products are popularly used in schools and in robotics competitions such as the FIRST Lego League. Versions of Mindstorms kits specifically intended for use in educational settings are sold by Lego Education.

Children are the target audience of Lego Mindstorms, but a significant number of Mindstorms hobbyists are adults. Adult hobbyists have developed a large number of alternative programming languages and operating systems for the smart brick allowing for more complex functions.

While originally conceptualized and launched as a tool to support educational constructivism, Mindstorms has become the first home robotics kit available to a wide audience. It has developed a community of adult hobbyists and hackers as well as students and general Lego enthusiasts following the product's launch in 1998. In October 2022, The Lego Group announced that it would discontinue the Lego Mindstorms line while continuing to support the Scratch-based SPIKE controller.[2]

The Robotics Invention System (RIS) was the flagship product of the first generation of the Lego Mindstorms line. It is a commercialization of technology produced by the MIT Media Lab in collaboration with the LEGO group. The RIS featured the programmable Robotic Command eXplorer (RCX) microcontroller, as well as 9V Lego-compatible motors and sensors and a selection of Lego parts. The original RIS was launched fall of 1998. It was replaced by a second version, RIS 1.5, in the summer of 1999; and a third version, RIS 2.0, in 2001.

The RCX is based on the 8-bit Renesas H8/300 microcontroller, including 32 KB of ROM for low-level IO functions, along with 32 KB of RAM to store high-level firmware and user programs. The RCX is programmed by uploading a program using a dedicated infrared interface. After the user uploads a program, the RCX can run it on its own without the need for computer access. Programs may make use of three sensor input ports and three 9 V output ports, in addition to the IR interface, enabling several RCX bricks to communicate. A built-in LCD can display the battery level, the status of the input/output ports, which program is selected or running, and other information.[15]

Version 1.0 RCX bricks feature a power adapter jack in addition to batteries. In version 2.0 (as well as later 1.0s included in the RIS 1.5), the power adapter jack was removed. Power adapter-equipped RCX bricks were popular for stationary robotics projects (such as robot arms) or for controlling Lego model trains. In the latter context, the RCX might be programmed with Digital Command Control (DCC) software to operate multiple wired trains.

The IR interface on the RCX is able to communicate with Spybots, Scout Bricks, Lego Trains, and the NXT (using a third-party infrared link sensor). The RCX 1.0 IR receiver carrier frequency is 38.5 kHz, while the RCX 2.0 IR carrier frequency is 76 kHz. Both versions can transmit on either frequency. The RCX communicates with a computer using a Serial or USB IR tower. As the RCX is discontinued, support for the interface is limited on more recent operating systems than Windows XP.

All RCX versions have a unique number printed on them, which could be registered on the now-defunct Lego Mindstorms RCX website. This was necessary to obtain technical support. The first RCX produced is marked "000001," and was on display at the Mindstorms 10th Anniversary event.[16]

The Lego RCX was available in new sets from 1998 (Lego Set 9719: Robotics Invention System 1.0) through 2003 (Lego Set 9786: Robo Technology Set, with USB cable). The original RCX 1.0 worked with existing Lego power supply products from the Lego Train theme, Lego Product 70931: Electric Train Speed Regulator 9V Power Adaptor for 120v 60 Hz - US version (Years: 1991 thru 2004), Lego Product 70938: Electric Train Speed Regulator 9V Power Adaptor for 230v 50 Hz - European version (Years: 1991 thru 1996). Both of these products converted wall power to 12VAC, through a coaxial power connector (also called a "barrel connector"), 5.5 mm outside, 2.1 mm inside. These were sometimes sold alone and sometimes available as part of other sets such as Lego Set 4563: Load N' Haul Railroad (Year: 1991) and Lego Set 10132: Motorized Hogwarts Express (Year: 2004).[17][18][19][20][21][22]

The Robotics Discovery Set was a more affordable and simpler package than the Robotics Invention Set. Instead of being based on the RCX, it had its own programmable brick called the Scout. An even simpler version of the Scout would be featured in two Star-Wars-themed Mindstorms sets.

Lego also released a blue computer called the Scout, which has 2 sensor ports, 2 motor ports (plus one extra if linked with a Micro Scout using a fiber-optic cable), and a built-in light sensor, but no PC interface. It comes with the Robotics Discovery Set. The Scout can be programmed from a collection of built-in program combinations. In order to program the Scout, a user must enable "power mode" on it. The Scout can store one program.

The Scout is based on a Toshiba microcontroller with 32 KB of ROM and 1 KB of RAM, where about 400 bytes are available for user programs. Due to the extremely limited amount of RAM, many predefined subroutines were provided in ROM. The Scout only supports passive external sensors, which means that only touch, temperature and other unpowered sensors can be used. The analog-to-digital converters used in the Scout only have a resolution of 8 bits, in contrast to the 10-bit converters of the RCX.[23]

c80f0f1006
Reply all
Reply to author
Forward
0 new messages