Robomagellan 2012 Build Diary - Day 17

Days 1 - 7

http://buildsmartrobots.ning.com/profiles/blogs/robomagellan-2012-b...

Days 8 - 16

http://buildsmartrobots.ning.com/profiles/blogs/robomagellan-2012-b...

Robomagellan 2012 Build Diary - Day 17

 

 

I have a MaxBotix ultrasonic range sensor driver running on the MSP430G2553.  This driver supports both the analog and pulse outputs of the sensor.  The specific sensor used for the robot is the MB1000 - http://www.maxbotix.com/documents/MB1000_Datasheet.pdf

The sensor has max range of 95 inches to 118 inches (7.9 feet to 9.8 feet ) depending on the size of the object detected.

 

 

The robot will use 6 sensors total, 5 pointed forward and 1 pointed back.

 

The sensors are daisy chained using what MaxBotix calls "Simultaneous Operation".  The TX of the first sensor goes into the RX of the next sensor. The 5 front facing sensors are daisy chained into 1 group, with the back facing sensor being in its own group.  The back sensor is only used when the robot is going in reverse.  

http://www.maxbotix.com/documents/LV_Chaining_Simultaneous_Operatio...

Each sensor takes approximately 50ms to make a measurement.  With 5 sensors the maximum scan rate is 250ms.  This may be a problem when running the robot, depending on how fast the robot ends up being.

 

If the 250ms ends up being too long of a scan period, the image below shows how to use four sensors instead of five and still get a full perimeter scan.

This sensor arrangement  has a gap in the front close to the robot.  This gap is 4 * (half the distance between sensors) in front of the robot.  A gap of 4 inches between sensors will have a gap up to 8 inches in front of the robot.

 

The EMGRobotics Autonomous navigation Board arrived today.  

I finished the MaxBotix analog and pulse drivers last night.  These drivers support up to 6 sensors (4 analog, 3 pulse).  The sensors can be organized into 2 banks.  In addition to the drivers, I wrote some test code to output the sensor data through the serial port in ASCII hex.  This will be used for testing.

 

 

 

 

Views: 314

Tags: emgrobotics, mb1000, minds-i, msp430g2553, robomagellan, ultrasonic

Comment by eric gregori on July 13, 2012 at 1:01am

I have not had much time to work on the robot lately.  I am working on a very exciting project for my day job, and it tends to eat up the majority of the day.  I did get in about 2 hours today to add a speed/stall sensor to the robot.

The sensor uses a IR TX/RX pair shining through a gear to measure speed and detect stalls.  The IR LED is run steady state, while the TR transistor is collector biased with the collector signal going into the comparator of the MSP430G2553.  The comparator in the MSP430G2553 is connected to a timer in the MSP430G2553.  The timer is used to measure the pulse widths that are proportional to speed.

A simple PI controller will be used to control the speed of the motor by taking the pulse width as input, and generating a RC PWM signal as output which will drive the RC motor controller.

The Minds-i gearbox before modification

The Minds-i gear already had holes drilled into it.

I drilled a small hole next to the bearing in both sides of the enclosure.  In this picture you can also see the IR LED and transistor.

The hole I drilled in the other side of the enclosure.

The gear put back into the gearbox.

As the gear turns, the light from the LED is interrupted.  The IR transistor converts the light pulses into electrical pulses.

 

IR transistor mounted in one side of the gearbox.

IR LED mounted in other side of gearbox.

I will post some scope shots of the pulses from the IR transistor in the near future.

Comment by eric gregori on July 14, 2012 at 2:33am

The MSP430G2553 comparator outputs to CCI1B on TIMER 0.

Comment by eric gregori on July 14, 2012 at 2:40am

I just got both the compass driver and the GPS driver up and running.  At this point all the drivers except I2C are up and running.  

Drivers:

I2C Master

I2C Slave

Serial RX and TX

Compass (Comparator+Timer capture)

GPS

Ultrasonic (analog and pulse)

RC PWM

Speed Sensor - same as compass

I will work on the I2C drivers next week.  This weekend I want to drive the robot around and collect some data.

Comment by eric gregori on July 14, 2012 at 3:09am

GPS and NEMA

The GPS driver dumps lat and long in ASCII format into two arrays.

This is accomplished by parsing the NEMA ASCII string from the GPS.

This website: http://www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual1.pdf

has a good description of the NEMA protocol and the GGA sentence.

The $GPGGA sentence is the only sentence parsed.  This sentence contains latitude, longitude, and status information.  

$GPGGA,161229.487,3723.2475,N,12158.3416,W,1,07,1.0,9.0,M, , , ,0000*18

The lat and long information is in ASCII format of the form:  3723.2475, 12158.3416

ddmm.mmmm

The first two ASCII characters are degrees, with the next 7 characters being minutes.

Minutes have both integer and fractional components.

To convert minutes to degrees, divide by 60.  30 minutes/60 minutes/degree = 0.5 degrees

To get degrees from the GGA lat or long:

 ddmm.mmmm -> degrees = dd+(mm.mmmm/60)

dd*10000+mm.mmmm*10000/60  =  10000*degrees

mm.mmmm -> m1m2.m3m4m5m6

unsigned long degrees;

degrees  = (m1-0x30)*100000

degrees += (m2-0x30)*10000

degrees += (m3-0x30)*1000

degrees += (m4-0x30)*100

degrees += (m5-0x30)*10

degrees += (m6-0x30)*1

degrees /= 60

Comment

You need to be a member of buildsmartrobots to add comments!

Join buildsmartrobots

EMGRobotics

© 2013   Created by eric gregori.

Badges  |  Report an Issue  |  Terms of Service