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
THE GLOVE IN ACTION
The Vex Power Glove features of a Microchip dsPIC30F6014-based wireless sensor controller that’s used to digitize the finger positions (flexible resistors) and the glove’s orientation. The XBee-PRO wireless UART and receiver Ada95 application are used to receive glove commands to control a prop, which can be either a laptop or an animation prop. It uses the XBee-PRO receiver and a Freescale Semiconductor MMA1260D Z-axis accelerometer to digitize the glove’s current orientation with three of the dsPIC’s ADC pins. The glove’s orientation is then transmitted back to the laptop (see Figure 1).
The dsPIC firmware digitizes the glove’s finger positions by reading the voltages across five flexible resistors whose resistances vary with the angle percent each finger is bent or flexed. Finger movements are digitized using the dsPIC’s 12-bit ADC, and the firmware processes and filters them.
The glove’s current orientation relative to the gravity vector is read from the attached Freescale Semiconductor MMA6260Q X/Y-axis accelerometer and the MMA1260D Z-axis accelerometer, which are also digitized by the 12-bit ADC to obtain the orientation angles. The 12-bit ADC is also used to read the pressure sensor attached to the index finger. The 12-bit reading from the ADC for any of the sensors is a value between 0 and 4,095, which can be scaled to PWM motor commands needed for animation.