Article
Compass Sensor for Lego RCX
never get lost again
Mindstorms, the by now well-known series of robot construction materials from Lego, has already been the subject of several articles in Elektor Electronics. In 2000, we presented a series of five articles dealing with all the ins and outs of the RCX module, which is a microcontroller block with three sensor inputs and three outputs for controlling items such as motors and lamps. Following this came a light sensor, a proximity sensor and a sensor multiplexer, and recently a design for an I2C interface appeared in our magazine. This month it’s time for a compass sensor, which enables us to give our robots a sense of direction.If a robot has to travel through a space, this can be implemented in a variety of manners. The first option is to allow the robot to search out its own path. Proximity and contact sensors allow the robot to independently avoid obstacles in order to prevent damage and/or prevent the robot from ending up in a situation that it cannot get out of on its own. The Mindstorms package includes the sensors that we need for this approach.
Materials
Gerber file
CAM/CAD data for the PCB referred to in this article is available as a Gerber file. Elektor GREEN and GOLD members can exclusively download these files for free as part of their membership. Gerber files allow a PCB to be produced on an appropriate device available locally, or through an online PCB manufacturing service.
Elektor recommends the Elektor PCB Service service from its business partner Eurocircuits or AISLER as the best services for its own prototypes and volume production.
The use of our Gerber files is provided under a modified Creative Commons license. Creative Commons offers authors, scientists, educators and other creatives the freedom to handle their copyright in a more free way without losing their ownership.
PCB
Component list
Resistors:
R1 = 47kOhm
R2,R5-R8 = 100kOhm
R3 = 150kOhm
R4 = 220kOhm
Capacitors:
C1 = 22µ F 16V radial
Semiconductors:
D1-D6 = 1N4148
D7 = BAT85
IC1 = 74HCT4066
Miscellaneous:
Sensor1 = Pewatron 6945 (Pewatron AG, www.pewatron.com)
BT1 = 9V PP3 battery with clip-on lead
Lego connection cable (cut in two):
length 26.6cm, Lego order code 5311
length 9cm, Lego order code 5041
R1 = 47kOhm
R2,R5-R8 = 100kOhm
R3 = 150kOhm
R4 = 220kOhm
Capacitors:
C1 = 22µ F 16V radial
Semiconductors:
D1-D6 = 1N4148
D7 = BAT85
IC1 = 74HCT4066
Miscellaneous:
Sensor1 = Pewatron 6945 (Pewatron AG, www.pewatron.com)
BT1 = 9V PP3 battery with clip-on lead
Lego connection cable (cut in two):
length 26.6cm, Lego order code 5311
length 9cm, Lego order code 5041
Discussion (0 comments)