CURRENT ISSUE Contests
Feature Article
|
|
Issue #212 March 2008
Robotics with Ada95
by Daniel Ramirez
Start | Why Use Ada95 For Robotics? | GNAT Ada95 Tools | Debugging Ada95 Applications | Ada95 Coding Style |Wireless Sensor Controller | Wireless Messages | The Glove In Action | XYZ Accelerometers | XBee-PRO Wireless UART | Controller Range | USB 2.0 Interface | Ethernet | The Kernel | Ada95 vs. Other Languages | Future Applications | Sources & PDF
XYZ ACCELEROMETERS
The MMA6260Q X/Y-axis and MMA1260D Z-axis accelerometers—which are used to obtain the glove’s relative orientation—enable you to move associated motors or servos by turning your wrist and adding three degrees of freedom (pitch, yaw, and roll) that can be mapped to servo or motor commands. The accelerometers are read with the 12-bit ADC. With this technology, you can use the Vex Power Glove for video games, input and telerobotics, and virtual reality experiments similar to those carried out in research labs.
An XYZ accelerometer provides the glove orientation (tilt) by measuring the XYZ angles relative to the Earth’s gravity vector (to ±1.5 G), which points to the center of the Earth. Although the dsPIC can run with a 3.3-V power supply, I also included a Microchip Technology MCP6S26 six-channel programmable gain amplifier (PGA) for signal conditioning in the design. The MCP6S26 scales the 3.3-V X/Y accelerometer readings to the 5 V required for the dsPIC’s ADC because everything else is 5-V based and the voltage reference for the ADC is 5 V. The Z accelerometer is fine because it already uses a 5-V supply. The ADC channels used for the accelerometers are AN12/RB12, AN13/RB13, and AN15/RB15.
The calibration data is saved to nonvolatile memory using Microchip Technology 24LC512 serial EEPROM. It can be retrieved later when it’s needed for scaling sensor readings and generating motor commands. A complete schematic diagram of the wireless sensor controller is posted on the Circuit Cellar FTP site.