Sunday, March 2, 2014

Parts arriving, Sprocket Modification, Chassis Rail Modification - Andrew Baden

The parts ordered from VEX Robotics including wheels, sprockets, bearings, and collars were received today.  When the parts were being confirmed, some parts were not correct. 

New Parts from VEX Robotics
The sprockets we ordered were not the size we needed.  We will have to adjust sprockets on hand and modify them for our cause.  To get these sprockets to work with what we need, all we have to do is drill three holes into the existing sprockets to attach them to our wheel/chain assembly.  In the picture below, the sprocket on the right is the sprocket being modified, and the series of sprockets on the left are secured to the other sprocket to allow us to drill out the proper holes for attaching the existing sprockets to the wheel assembly.

Sprocket Assembly to Drill in Drill Press
To allow the motor chains from falling off their sprockets, we are creating a slot in the chassis rails to allow the motors on each side to be adjustable, so they can eliminate any slack present in the assembly.

Chassis Rail with Slotted Drawing






Compass and Line Sensor Programming- Matt Mannino

The orders came in finally and I was able to start working on programming the Pololu LSM303 Compass Sensor.  I used an example program from Pololu using their specific library for the LSM303.  I was getting stable values for the heading.  I also started on the line sensing programming using the QRD1114 light sensors.  The light sensor is for predetermined boundaries where the robot is going to operate in using tape.

QRD1114 Wiring for Arduino


Value Readings from QRD1114 Light Sensor

Heading Value Readings from LSM303 Compass Sensor



LSM303 Pinouts


     5V  ->  VIN
    GND  ->  GND
    SDA  ->  SDA
    SCL  ->  SCL








QRD1114 Test
int sensorPin = 0; //A0

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  int val = analogRead(sensorPin);
  Serial.println(val);

  delay(100);


}


LSM303 Compass Heading

#include <Wire.h>
#include <LSM303.h>

LSM303 compass;

void setup()
{
  Serial.begin(9600);
  Wire.begin();
  compass.init();
  compass.enableDefault();

  compass.m_min = (LSM303::vector<int16_t>){-32767, -32767, -32767};
  compass.m_max = (LSM303::vector<int16_t>){+32767, +32767, +32767};
}

void loop()
{
  compass.read();

  float heading = compass.heading();

  Serial.println(heading);
  delay(100);

}