





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















Intelligent Machines Design Lab EEL- 5666
Final Written Report
Jeffery Lettman 4/22/
Table of Contents
Abstract ..................................................................................................................................................... 2
Introduction ............................................................................................................................................... 3
Integrated System ..................................................................................................................................... 3
Mobile Platform ........................................................................................................................................ 3
Actuation ................................................................................................................................................... 5
Sensors ...................................................................................................................................................... 6
Behaviors ................................................................................................................................................... 9
Conclusion ............................................................................................................................................... 10
References ............................................................................................................................................... 12
Appendix ................................................................................................................................................. 13
Abstract
The goal of this project is to bring the time and cost saving advantages of mobile
platforms to the construction site. The design called for a mobile platform capable of locating the
studs on a construction site and securing the sheetrock using anchor screws. To accomplish this
task, the platform will need to be capable of: tracking along walls, raising itself to a number of
vertical heights, and drilling into the wall. For ease of control, the motion will be achieved using
two motors mounted along a central axis. The wheels will be housed inside the platform to make
wall following behaviors easier. The vertical lift will be accomplished using rack and pinion
travel to accomplish forklift type motion. Linear motion required apply pressure to the drill and
drive the drill forward will be accomplished through the use of a screw driven linear actuator.
The robot will use a capacitance stud sensor to detect density differentials in the wall. Sonar
rangefinders will be employed towards the end of achieving wall following behaviors. The value
of a robot capable of meeting the goals laid out in this report would be substantial, allowing
onsite construction projects, like the forty-eight currently in progress on campus, to be completed
at considerable savings to cost and time.
While neither of these problems were necessarily deal breakers in and of themselves, in
combination they created serious obstacles. In further researching scissor lifts in an attempt to
overcome these hurdles, I learned that in addition to a horizontal pushing force, many scissor lift
assemblies use pneumatic pistons to overcome this initial stalemate of forces. This solution is
impractical for this small scale robot, so I decided to scrap this lift mechanism and design
another.
The lift mechanism I ended up designing in small scale tests worked like a fork lift. The
rack gears were vertically aligned and the pinions were fixed perpendicular and powered be the
worm gear assembly so that the lift would not slip under heavy loading, nor would the motor be
required to stay on in order to provide breaking power to the assembly. This setup is illustrated in
Figure 2.3.
Success of these small scale tests in generating high torque and
resisting slipping under loading were encouraging enough to
proceed forward with this as the main lift mechanism. I was forced
to scrap the previously t-teched parts of my design at this point to
proceed forward with new materials. This new design was optimal in that it utilized the same gears I previously ordered for use in the
scissor lift. Rather than balsa wood, this design was built out of
Plexiglas. The robot has 3 levels to provide space for all of the
necessary components. The third level is 10 inches above the base
and serves as a support platform for the worm gear and pinion
assembly as well as a support for the upper end of the forklift
mechanisms travel.
Force Applied
Actuation
In addition to the vertical motion of the mobile platform, the design also requires linear
and rotational motion to drive the anchor screws into the sheetrock. Initially I planned to
accomplish this with two motors for the two types of requisite motion. However, in the redesign
of my platform, space, weight and wire management became more noticeable concerns. For
these reasons I designed a mechanism which, when using self drilling drywall screws, will only
need one motor to provide both these motions. The design as shown in Figure 3.1, uses a moving
lead screw and fixed bolts to combine the motions. The motor is attached to a slide with guide
wheels allowing it to only move in the x-direction along with the progress of the lead screw. The
other end of the screw is fitted with a Philips head bit to drive the anchor screws. This whole
assembly raises and lowers with the forklift. To cut down on the weight that needs to be lifted,
the screws themselves are held in place at the pre-established levels. This feed mechanism is
therefore supported by the frame of the robot and counterbalanced by the lead screw motor. This
is not a particularly fast method, but it is only required that it move through an inch and a half of
travel.
Over the course of this project I went through three different stud
finders in attempting to determine which would be optimum for use in this
project. The first stud finder I purchased from Home Depot was a Zircon
OneStep StudSensor i65. This stud finder uses capacitance plates to determine
the true center of a stud. The device has Center Vision and is capable of
determining the true sensor of a stud while differentiating it from electrical
lines in the wall. However this sensor was far too sensitive and lost its
calibration easily, even when being operated by hand. Therefore the final stud
sensor used in the project was a more straightforward edge detector from
Zircon, the StudSensor™ Pro SL-AC. The specifications of the Zircon
StudSensor are as follows, as provided by the Zircon website:
Dimensions: 6.07 in. H x 2.70 in. W x 1.18 in. D (154mm x 68mm x 30mm)
Weight: 5.7 oz. (1163g) with battery
Battery type: 9-V alkaline (included)
Position accuracy Wood studs: Stud Scan mode: Typically within 1/8inch (3mm) using the dual scan and mark procedure; Deep Scan mode: typically within 3/ inch (5mm) using the dual scan and mark procedure Metal studs: Typically within 1/2 inch (13mm) using the dual scan and mark procedure.
Depth: Up to 3⁄4 inch (19mm) in Stud Scan mode; Up to 1- 1/2 inch (38mm) in Deep Scan mode
AC position accuracy: Typically 90-250 V at 50-60 Hz within 6 inches (150 mm) of a hot unshielded wire in drywall.
AC depth: In typical drywall with Romex™ wiring, wires can be detected up to 2 inches (50 mm) deep
NOTE: Sensing depth and position accuracy can vary due to moisture content of materials, wall texture, and paint.
Operating Temperature: 20° to 120°F
Storage Temperature: -20° to 150°F
Humidity 80% RH (noncondensing)
Water Resistance: Splash and water resistant, not waterproof
When the stud is located the sensor uses an LED
light to inform the user of its presence and location.
Bypassing the actual inter calculations of the stud finder, I
use a CDS cell to determine when the LED flashes the
presence of the stud.
I also use CDS cells to determine the vertical
progress of the lift. The CDS cell is affixed to the lift and
blackout bars are affixed to the frame of the robot. By
counting the number of bars that the CDS cell passes under
the vertical progress of the lift can be tracked. The bottom of
the lifts progress, and where all lift progress starts is the base
of the robot. A bright blue LED marks this bottom position
and differentiates this point from the blackout bars above.
To calibrate the robot to different lighting environments I ran an analog CDS test, whose
results are listed in the table below. I was unable to draw any direct correlations between the
numbers in this table so I decided to have the robot calibrate the CDS values to the room each
time it starts up. This process is covered more thoroughly in the behavior section of the report.
Behaviors
In turning the SkyRiser on it begins its initial calibration phase. As mentioned in the
sensor section, changing the light in the room severely affects the accuracy of the lift CDS cell,
making this calibration phase crucial. The lift is raised until the top bump sensor is tripped which
marks a point at which the CDS cell is not covered. An average of the analog values at this
height is determined and stored as the low value. The lift is then lowered until the value is twice
as high as the low value and stops when it again returns to 35% of the low value. This ensures
that it passes under a blackout bar. The highest value along this path of motion is stored as the
high value. These values are then used as benchmarks when the lift goes through its drill pattern.
The SkyRiser then moves into its wall following behavior, attempting to align itself
parallel to the wall. The robot moves towards the wall at an angle proportional to its distance
from the wall. It does this by driving the outside wheel faster than the wheel close to the wall by
a factor of the forward sonar value divided by the desired distance sonar value. When the robot is
parallel to the wall within a pre selected range of sonar values, the platform stops moving
forward and lowers the lift to turn on the stud sensor, it also stores the values of the forward and
rear sonar units, it performs this only once. These values are then set as the benchmark values
which the robot uses to align itself from the wall. This keeps the unit at the same distance from
the wall as it was when the stud finder was calibrated. This is crucial because if the stud finder
gets any closer to the wall it will register false positive stud findings.
When the stud sensor registers a stud, it bright LED light flashes which the CDS cell
registers as a low value and relays to the Mavric IIB board. The platform then continues to wall
follow until the light again turns off, so that the screw holding palette is aligned with the stud.
SkyRiser then stops and begins its drill pattern.
The lift has two lift patterns which it alternates between. The first pattern drills in the first
and third screws, while the second pattern affixes the second and forth. The lift reaches these
heights by counting the number of blackout bars that the CDS cell passes beneath. When the lift
is at the right height the drill runs until the bump switch is depressed, then backs up until the rear
bump switch is depressed. When the drill pattern is complete, the lift is lowered until the CDS
cell detects the blue LED, the stud sensor is once again turned on, and the values of the forward
and rear sonar pings are once more stored as a reference for wall following. The SkyRiser can
now resume its wall following behavior.
Conclusion
I believe that the real value of this robotic platform could be truly substantial. The
platform could be set up to run at a site with little or no supervision so that workers could be set
to other tasks, cutting down construction time and eliminating a repetitive and unskilled job.
Onsite construction projects, like the forty-eight currently in progress on campus, could be
completed at considerable savings to cost and time.
Improvements
While I believe that this robotic platform was a success, given more time on this project I would
make the following improvements.
A ratchet fixed at the end of the drill so that even if the screw is not countersunk, the screw will not be pulled back out of the wall.
A self feeding screw system allowing many more screws to be used and allowing the platform to run longer.
The incorporation of an IR module to detect the corner of a wall so that the wall following pattern could be extended all around the perimeter of a room.
The inclusion of a motion detector to determine when a person is nearby to improve the safety of the machine at a construction sight.
Replacing the gears of the ¼ scale servo motor with metal gears for better strength.
Smoother wall following behavior through the addition of a better wall following algorithm.
Appendix
#include <avr/io.h> #include <avr/interrupt.h> #include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <avr/pgmspace.h> #include <ctype.h> #include <stdlib.h> #include <string.h>
#define MOTOR_Lift OCR1A //pin5 port B #define MOTOR_Drill OCR1B //pin6 port B #define MOTOR_L OCR3A //pin3 port E #define MOTOR_R OCR3B //pin4 port E
void init_timer(); void motor_move(uint16_t, uint16_t); void ad_init(void);
void config_adc(void); int analog(int);
// Bump
#define BUMP PORTG // Bump switches will bo on PORTG #define BUMP_DDR DDRG #define BUMP_PIN PING
#define DIR_L PORTE #define DIR_R PORTE #define MOTOR_L OCR3A //pin3 port E #define MOTOR_R OCR3B //pin4 port E
/A-to-D/ #define DDRAD DDRF #define PORTAD PORTF
/Global variables/ /Timer/ volatile uint16_t us_48_count; volatile uint16_t ms_count;
/Sonar rangers/ #define DDRSRF DDRD #define PORTSRF PORTA #define PINSRF PINA #define L_TRIGGER 0x #define L_ECHO 0x #define R_TRIGGER 0x #define R_ECHO 0x
/LCD Panel/ void lcd_delay(); // short delay (50000 clocks) void lcd_init(); // sets lcd in 4 bit mode, 2-line mode, with cursor on and set to blink void lcd_cmd(); // use to send commands to lcd void lcd_disp(); // use to display text on lcd void lcd_clear(); // use to clear LCD and return cursor to home position void lcd_row(int row); // use to put the LCD at the desired row
/Delay functions/ void us_48_sleep(uint16_t us_48) { TCNT0 = 0; us_48_count = 0; while (us_48_count != us_48) // Each loop takes 48 us NOT 1 us, //based on the 128 divisor I set in prescalers in function declared //timer_init() ; } void ms_sleep(uint16_t ms) { TCNT0 = 0; ms_count = 0; while (ms_count != ms*21) // Each while loop takes 48 us, but ; }
/A-to-D functions/
void config_adc(void) { DDRF = 0b00000000; // set port F to all input // Note: when JTAGEN fuse is set, F4 - F7 don't work PORTF = 0x00; // make sure pull up resistor is not enabled
ADMUX = 0b01000000; // 5V reference, select channel0 (pin F0) ADCSRA |= 0b10000111; // turn on ADC, don't start conversions // free funning // divide clock by 128
int analog(int analogch) { int anval; ADMUX = 0b01000000|analogch; // Start AD conversion. ADCSRA |= (1 << ADSC); // Wait for ADC conversion to complete. while ( ADCSRA & (1 << ADSC) ); anval = ADCL | (ADCH << 8); //place ACD value into one variable return anval; }
uint16_t ad_readn(uint8_t channel, uint8_t n) { uint16_t t; uint8_t i; t = analog(channel); // Dummy read /Sample selected channel n times, take the average/ t = 0; for (i=0; i<n; i++) { lcd_delay(); t += analog(channel);
if(MOTOR_R > speed_R) { increment_R = -1; } else if (MOTOR_R < speed_R) { increment_R = 1; } else { increment_R = 0; }
while (MOTOR_L != speed_L || MOTOR_R != speed_R) // if either motor does not equal speed, run this loop { if (MOTOR_L != speed_L) { MOTOR_L = MOTOR_L + increment_L; } if (MOTOR_R != speed_R) { MOTOR_R =MOTOR_R + increment_R; }
//lcd_cmd(0x01); // clrscn rtn home //lcd_int(MOTOR_L); } }
void special_motor_move(uint16_t speed_Lift, uint16_t speed_Drill) { int increment_Lift = 0; int increment_Drill = 0;
if(MOTOR_Lift > speed_Lift) { increment_Lift = -1; } else if (MOTOR_Lift < speed_Lift) { increment_Lift = 1; } else { increment_Lift = 0; }
if(MOTOR_Drill > speed_Drill) { increment_Drill = -1; } else if (MOTOR_Drill < speed_Drill) { increment_Drill = 1; } else {
increment_Drill = 0; }
while (MOTOR_Lift != speed_Lift || MOTOR_Drill != speed_Drill) // if either motor does not equal speed, run this loop { if (MOTOR_Lift != speed_Lift) { MOTOR_Lift = MOTOR_Lift + increment_Lift; } if (MOTOR_Drill != speed_Drill) { MOTOR_Drill =MOTOR_Drill + increment_Drill; }
//lcd_cmd(0x01); // clrscn rtn home //lcd_int(MOTOR_L); } }
void stop(void) { motor_move(1398,1398); }
void forward(int speed) { motor_move(1400+speed, 1400-(speed1.23)); // Servos have to correct drift //(Hence, the "...0.91") }
void R_turn(int speed) { motor_move(1400-speed, 1400-(speed*1.23)); }
void L_turn(int speed) { motor_move(1400+speed, 1400+(speed*1.23)); }
void reverse(int speed) { motor_move(1400-speed, 1400+(speed*1.23)); }
void softR_turn(int speed) { motor_move(1400+(speed1.7), 1400-(speed1.23)); }
void softL_turn(int speed) { motor_move(1400+speed, 1400-(speed1.51.23)); }
void slightR_turn(int speed) {
temp_data = ( myData << 4 );
temp_data = (temp_data & 0b11110100); // temp_data now contains the original temp_data = (temp_data | 0b00000100); // lower nibble plus high clock signal
PORTC = temp_data; // write the data to PortC lcd_delay(); PORTC = (temp_data & 0b11110000); // re-write the data to PortC with the clock signal low (thus creating the falling edge) lcd_delay();
void lcd_disp(unsigned int disp) {
unsigned int temp_data = 0;
temp_data = ( disp & 0b11110000 ); temp_data = ( temp_data | 0b00000101 ); PORTC = temp_data; lcd_delay(); PORTC = (temp_data & 0b11110001); lcd_delay(); // upper nibble
temp_data = (disp << 4 ); temp_data = ( temp_data & 0b11110000 ); temp_data = ( temp_data | 0b00000101 ); PORTC = temp_data; lcd_delay(); PORTC = (temp_data & 0b11110001); lcd_delay(); // lower nibble
}
void lcd_init() { lcd_cmd(0x33); // writing 0x33 followed by lcd_cmd(0x32); // 0x32 puts the LCD in 4-bit mode
lcd_cmd(0x28); // writing 0x28 puts the LCD in 2-line mode
lcd_cmd(0x0F); // writing 0x0F turns the display on, curson on, and puts the cursor in blink mode
lcd_cmd(0x01); // writing 0x01 clears the LCD and sets the cursor to the home (top left) position
//LCD is on... ready to write
void lcd_string(char *a) {
while (*a != 0) { lcd_disp((unsigned int) *a); // display the character that our pointer (a) is pointing to a++; // increment a
return;
void lcd_int(int value) {
int temp_val; int x = 10000; // since integers only go up to 32768, we only need to worry about // numbers containing at most a ten-thousands place
while (value / x == 0) // the purpose of this loop is to find out the largest position (in decimal) { // that our integer contains. As soon as we get a non-zero value, we know x/=10; // how many positions there are int the int and x will be properly initialized to the largest } // power of 10 that will return a non-zero value when our integer is divided by x.
if (value==0) lcd_disp(0x30);
else while (x >= 1) // this loop is where the printing to the LCD takes place. First, we divide { // our integer by x (properly initialized by the last loop) and store it in temp_val = value / x; // a temporary variable so our original value is preserved.Next we subtract the value -= temp_val * x; // temp. variable times x from our original value. This will "pull" off the most lcd_disp(temp_val+ 0x30); // significant digit from our original integer but leave all the remaining digits alone. // After this, we add a hex 30 to our temp. variable because ASCII values for integers x /= 10; // 0 through 9 correspond to hex numbers 30 through 39. We then send this value to the } // LCD (which understands ASCII). Finally, we divide x by 10 and repeat the process // until we get a zero value (note: since our value is an integer, any decimal value return; // less than 1 will be truncated to a 0)
void lcd_clear() // this function clears the LCD and sets the cursor to the home (upper left) position { lcd_cmd(0x01);
return; }
void lcd_row(int row) // this function moves the cursor to the beginning of the specified row without changing { // any of the current text on the LCD.
switch(row) {
case 0: lcd_cmd(0x02); case 1: lcd_cmd(0xC0);
return; }
int get_lSonar() {
int n = 0;
PORTA = (PINA & 0x7F); // these two lines create a rising edge