Recent Changes - Search:

ENTER NEW DAILY DATA HERE:

PmWiki

pmwiki.org

edit SideBar

October6-Observations

We used three XBee shields to control two Elmo arms simultaneously. One XBee was a transmitter connected to a push button, transmitting a low normally, and a high when the push button was pressed. The other two XBees, when receiving a "high", began execution of a series of Elmo arm movements.

The arms began moving at the exact same time, but would end up out of sync after a few movements. Each Elmo was powered from its own 9V battery, so to eliminate the variable of batteries in different charge states, we removed the batteries and powered both Elmos from a benchtop power supply. Again, the arms began at the same time, but quickly went out of sync. This means that there are factors out of our control (friction, wide tolerance in mating of mechanical parts, wide tolerance in motor design, etc.) that prevent two Elmos from moving in sync, even given identical starting times, identical instructions, and identical power sources.

One solution is to execute only one movement at a time, then wait for another XBee transmission to proceed to the next movement.

One method for implementing this is to modify the Elmo receivers by adding the following:

  1. Insert a waitForNextCommand after each movement.
  2. Modify the moveArm function to include the following XBee communication:
    While arm is moving, repeatedly transmit a waitImMoving signal to the head XBee.
    When arm has reached target and stops moving, do not transmit anything.

The code for the head XBee transmitter, then, would work something like this:

  1. Wait for push-button signal to tell all the Elmos to begin their movements.
  2. Issue a proceedToNextMovement command.
  3. Listen for waitImMoving signals from all the soldier Elmos.
  4. When there is complete silence (i.e. no more waitImMoving transmissions being received), then issue another proceedToNextMovement command.

To connect the Elmo sensors to the Arduino:

Each Elmo sensor has a 5- or 6-pin female 2mm Molex connector on the end of a rainbow ribbon cable. For experimenting, we've been sticking 22AWG solid wire into the Molex connector. Even if we had the mating 2mm header to stick in the Molex connector, the pin spacing on the Arduino board (and on all breadboards) is 2.54mm. There are two solutions to this problem:

THE CHEAP (free) SOLUTION:
Cut off the stupid 2mm molex connectors, solder some new rainbow ribbon cable to extend the length of the sensor cables, tin the ends, and plug them directly into the Arduino/breadboard.

THE EXPENSIVE ($70) SOLUTION:
Use 2mm headers to connect the Molex connector to our own custom PCB. The custom PCB will have 2mm-pitch through-hole pads for the 2mm Molex header. Traces will connect these header pins to a set of 2.54mm-pitch socket pins. Jumper cables will connect the socket pins on our custom PCB to the socket pins on the Arduino. Since we're making a PCB, we'll include the circuit for the L293 motor driver chip, and a connector for power (with socket pins for jumpering the power out to the Arduino board).

Edit - History - Print - Recent Changes - Search
Page last modified on October 07, 2008, at 07:03 AM