wiring diagram
DESCRIPTION
Wiring Diagram. - PowerPoint PPT PresentationTRANSCRIPT
Wiring Diagram• The overall wiring
diagram will resemble this structure. The power board will be extremely similar to that of TigerBot #3. The difference lies in that our power board will not have the current sensing to each limb but a totally separate board. The servos, microcontrollers, sensors, and will still be powered from this board but in a slightly different configuration. The design for this board can be seen below. The foot sensor boards are also going to be used from Tigerbot #3.
Power Board Schematic
Current Sensing
Foot Sensor Board Schematics
Foot Sensor Board Schematics
Foot Sensor Board Schematics
Foot Sensor Board Schematics
Foot Sensor Board Schematics
Servo Information
• This software allows a full simulation of motion. Motion files can be created to re-enact movements of the robot. Some examples include the “Low crouch”, “Leg Lift”, and “Pick Itself Up”. The majority of the initial simulations are for mechanical qualifications and will be covered in the Mechanical/Industrial engineering portion of the design review. However, the next step in this process is to implement Inverse Kinematics to develop a walking algorithm that also supports the mechanical design parameters. Below is the extensive characterization conducted on the servos, done by Alexander Yevstifeev last quarter.
Servo Information
Servo Information
Servo Information
Servo Information
Servo Information
Software Flow Charts
Inverse Kinematics Leg Diagram
Locomotion.c
/***Controls the robots locomotion*with more functions added depending on the task**/ #include "Locomotoin.h" void walk(){ } void stand(){ } void balance(){ }
Locomotion.h
#ifndef LOCOMOTION_H#define LOCOMOTION_H void walk();void stand();void balance();
RobotStatus.c
/*** Checks the robots status to begin movements* different types of check depending on the situation**/ #include "RobotStatus.h" int checkBalance(){
return 0;} int frontClear(){
return 0;} int currentServoPosition(int Servo){
return 0;}
RobotStatus.h
#ifndef ROBOT_STATUS_H#define ROBOT_STATUS_H int checkBalance();int frontClear();int currentServoPosition(int Servo);
Sensors.c/*** Class to return data from all the sensors**/ #include sensors.h int check_IR( int IRnumber ){
int value = 0;switch(IRNumber){case 0:
break;case 1:
break;case 2:
break;case 3:
break;case 4:
break;case 5:
break;case 6:
break;default:
break;}return value;
} int check_IMU(void){
return 0;}
Sensors.h
#ifndef SENSOR_H#define SENSOR_H int check_IR( int IRnumber );int check_IMU(void);
ServoControl.c/***Control the servos, can be added to locomotion maybe depending*on what else might be needed in this class. **/ #include "ServoControl.h" void setServo( int ServoNumber, int position ){
switch(ServoNumber){case 0:break;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:break;case 6:break;default:break;}
}
ServoControl.h
#ifndef SERVO_CONTROL_H#define SERVO_CONTROL_H void setServo( int ServoNumber, int position );
Compile Script
#!/bin/bash rm ServoTestCode; g++ -static -I /home/roboard/RobotCode/RoBoIO/libsrc/ -c
ServoTestCode.cpp -o ServoTestCode.o g++ -o ServoTestCode ServoTestCode.o -static -L
/home/roboard/RobotCode/RoBoIO -l RBIO ./ServoTestCode;
Servo Test Code#include <stdio.h>#include "roboard.h"#include "rcservo.h"#include <unistd.h> int main(void){
roboio_SetRBVer(RB_100RD);unsigned long motion_frame[2] = {0,0};if(rcservo_SetServo( RCSERVO_PINS1, RCSERVO_SERVO_DEFAULT_NOFB )){puts("Servo 1 set correctly");}if(rcservo_SetServo( RCSERVO_PINS2, RCSERVO_SERVO_DEFAULT_NOFB )){puts("Servo 2 set correctly");}while(1){if(rcservo_Init(RCSERVO_USEPINS1 + RCSERVO_USEPINS2)){puts("Victory");rcservo_EnterPlayMode_HOME(motion_frame);rcservo_MoveTo( motion_frame, 500 );if(motion_frame[0] == 0){motion_frame[0] = 1500;motion_frame[1] = 1500;}else{motion_frame[0] = 0;motion_frame[1] = 0;}rcservo_Close();}else{puts("Could not init Servo");puts(roboio_GetErrMsg());sleep(1);}}return 0;
}
Example Inverse Kinematics Code %Inverse Kinematics Function. Computes 6 output angles given foot position%and orientation.%written by Alexander Yevstifeev%Based on work in the paper Closed-form Inverse Kinematic Joint Solution for Humanoid Robots by Muhammad A. Ali, Andy Park, and C.S. George Lee. function [T] = Leg_Inv_Kin(rx,ry,rz,p) %outputs joint angles for T(1)-T(6) of a humanoid leg given the x,y,z axis%rx ry rz are rotation angles for orientation and a position vector.%order of angle joints from T(1) to T(6) are leg twist, leg side, leg lift, knee, foot lift, and foot tilt.%Link length definitionsL5 = 0.05 ; % Link between ankle and bottom of footL4 = 0.25 ; % Link between knee and ankleL3 = 0.25 ; % Link between hip and knee %compute rotation matrix given rotation angles rx, ry, and rzCx = cos(rx) ;Sx = sin(rx) ;Cy = cos(ry) ;Sy = sin(ry) ;Cz = cos(rz) ;Sz = sin(rz) ;Rmat = [ Cy*Cz , -Cx*Sz+Sx*Sy*Cz , Sx*Sz+Cx*Sy*Cz ; ...Cy*Sz , Cx*Cz+Sx*Sy*Sz ,-Sx*Cz+Cx*Sy*Sz ; ...-Sy , Sx*Cy , Cx*Cy ; ] ;
Example Inverse Kinematics Code %build location matrix, find inverse, assign inverse vectorsM = cat(2, Rmat , p') ;M = cat(1,M,[0 0 0 1]) ;Mi = inv(M) ;s = 1:3 ;ni = Mi(s,1)' ;si = Mi(s,2)' ;ai = Mi(s,3)' ;pi = Mi(s,4)' ;C4 = ( (pi(1)+L5)^2 + pi(2)^2 + pi(3)^2 - L3^2 - L4^2 ) / (2 * L3 * L4 ) ;T(4) = atan2(sqrt(1 - C4^2),C4) ;S4 = sin(T(4)) ;psi = atan2( S4 * L3 , ( C4 * L3 ) + L4 ) ;T(5) = atan2( -pi(3) , sqrt( (pi(1) + L5)^2 + pi(2)^2 ) ) - psi ;C5 = cos(T(5)) ;T(6) = atan2(pi(2) , -pi(1) - L5 );if (cos(T(4)+T(5))*L3 + C5*L4) < 0T(6) = T(6) + pi ;endS6 = sin(T(6)) ;C6 = cos(T(6)) ;T(2) = atan2( -S6*si(1) - C6*si(2) , -S6*ni(1) - C6*ni(2) ) ;T(1) = atan2( sqrt(1 - (S6*ai(1) + C6*ai(2))^2) , S6*ai(1) + C6*ai(2));if sin(T(2)) < 0T(1) = T(1)+3.14159 ;endT(3) = atan2(ai(3) , C6*ai(1) - S6*ai(2) ) - T(4) - T(5) ; %Adjustment for reference frames on modelT(1) = -(T(1)+1.5707);T(2) = -(T(2) + 1.5707) ;T(3) = T(3) - 1.5707 ;T(6) = -T(6) ;%correction for position value over 2*pifor i = 1:6 ;T(i) = rem(T(i),6.283) ;endend
analogRead() (arduino function)
• Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using analogReference().
• It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.
Preliminary Test PlanFunction to Test Expected Result
Send commands to move each elbow servo Servo moves to desired position, does not extend too far
Send commands to move each shoulder servo Servos move to desired positions, three degrees of freedom are observed
Send command to move center hip servo Robot turns left or right appropriately
Send commands to move each non-center hip servo Servos move to desired positions, three degrees of freedom are observed
Send command to move each knee servo Servo moves to desired position, does not extend too far
Send commands to move each foot servo Servos move to desired positions, two degrees of freedom observed
Place object within one foot of IR sensors Robot will stop moving, alter course of direction
Intentionally (or accidentally) knock robot over IMU will detect that the robot has fallen, begin procedure to pick itself up
Begin walking the robot Foot sensors will detect pressures from each area of the foot, adjust walking scheme accordingly
CE/EE Planning SchedulesCE Schedule Spring Quarter
Week 11 Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8
Sean Outline Voice Code
JamesConfigure Roboard for servo communication
Fine-tune code for walking/balancing
Configure working voice commands
I2C communication (foot sensor to IMU)
Configure all servos for roboard
Walking/Balancing algorithm
Combine voice and servo actions
Serial communication (arduino and roboard)
EE Schedule Spring Quarter
Week 11 Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8
Brian
- Design Power Board - Start to implement Inverse Kinematics
with CE's
Finish Power board Design and test
Inverse Kinematics with Webots software
Mohammad Current Sense testsFinish Current Sensing
BoardTweak Foot sensor
Board
- Swap Designs and compare/review them -send out boards to be
made
Cableing plansPopulate Boards and
test functionalityPower Robot and hand off to CE's to program
Current Bill of MaterialsBudget 2500
Orders
Date Ordered By Description Amount Budget remaining
1/21/2012 Ken EE Dept. Voice Recog, IR Sensors, Camera, RoBoard RB-100 391.93 2108.07
1/25/2013 Sr. Design Dept. 10 XQ Servos 1070 1038.07
1/25/2013 Sr. Design Dept. RoBoard IMU 89 949.07
1/28/2013 Sr. Design Dept. Mechanical test components 60.86 888.21
TBD Mechanical components 457.67 430.54
•Left to order• Wireless module for Roboard (about $50.00)• Roboard Servos (10, possible discount?)
Risk AssessmentID Risk Item Effect Cause Likelihood Severity Importance Action to Minimize Risk Owner
1 Budget is too lowUnable to purchase all the parts
we would like for the projectCertain parts required for robot cost
more than budget allowed3 3 9
Prove that we need an increase in budget
Team
2 Stress in limbs Excessive deflection of limbs Limbs can not handle load 2 2 4 Thorough structural load analysis
ME
3Servos will not have
enough torqueRobot will be unable to complete
taskIncorrect measurements were made /
wrong servos purchased2 3 6
Accurately measure the torque in servos / Webot
simulationME
4Battery life is too
shortRobot cannot operate for a long
period of timeRobot draws too much power 2 2 4
Consult with advisor / customer
EE
5Parts not arriving on
timePushes timeline back making late
deliverables
Poor planning / reordering parts that were damaged or not in taken into account / Lead time not taken into
account
2 2 4Research parts and know the
actual lead time per partTeam
6 Machining of partsPushes timeline back making late
deliverablesUnable to machine parts correctly 1 2 2
Design for simple manufacturing
ME
7Roboard has enough
power to process information
The time to compute commands will take too long
Unable to estimate the computing power needed
1 1 1Research capabilities of
RoboardCE
8Interfacing old code and code structure
for Tigerbot v4Increase time of coding
Unable to contact previous teams about their code
2 2 4
Make early effort to get in touch with last year's team
and start using the new interface with the old code
CE
9 Circuitry Burning chips Servos drawing to much current 2 2 4 Test circuit EE
10Team
Communication Cause unnecessary delays Poor meeting structure / agenda 3 2 6
Have a set plan for each meeting to know what needs
to be coveredTeam
11Time for Software
Calibration
Robot performance (walking, balancing, etc.) would not be
idealNot enough time to test/debug code 2 2 4
Start debugging early, ensure physical portion is completed
on timeCE
12Not Completing
WeBot SimulationPushes timeline back making late
deliverablesUnable to understand WeBot Software
and not asking for help2 3 6
Asking for help to understand how to use WeBot Software to
simulate robotTeam
13 Walking SchemeUnable to complete major
deliverableMisinterpreting what customer wanted 2 3 6
Understand how humanoid does the walking scheme have
to be for the robotTeam
14 Voice RecognitionUnable to complete major
deliverableNot enough time to test/debug code
and sensor2 2 4
Adjusting and testing voice recognition system
CE/EE
15Output Shaft Connection
Unable to attach servos to move joints
Adaptor too expensive for our budget 2 3 6 Look for cheaper alternatives ME
16Fasteners Will Not
hold the jointsRobot will be unable to move Fasterner design was not correct 1 3 3 Weld joints instead ME
17 Make Housing BoxUnble to have the degrees of
freedom neededCNC capabilities too expensive for our
budget2 3 6 Look for cheaper alternatives ME
18 Press Fit Assembly Output shaft will take loadingUsing correct press fit tolerance and
interference. Working within constraints of joint brackets
2 2 4 Test Assembly ME