BoeBot Maneuvers and Programming Guide
BoeBot Maneuvers and Programming Guide
THEORY:-
The robot we have used for our activities is called BOE-BOT as shown in
the below fig 1. Here, Basic Stamp (BS2) is used which is basically a
microcontroller acting as the brain of the robot. It is placed on the Board of
Education in the space provided for it.
1
The Boe-Bot Performs following tasks-
3. Control its motion (by operating the motors that make its wheels turn)
There are two types of boards used for robotic operational purpose-
1) Board Of Education:
Servo Movements:
PBASIC:-
Pause Period:-
Period is a variable/constant/expression(0-65535)that specifies the
duration of the pause
3
For….Next:-
Counter:-
pin is simply the pin number that you want to send the frequency to.
Duration is simply the length of time in milliseconds you want the frequency
to play. And Frequency is the frequency in hertz that you want to generate
4
Gosub:-
Stores the address of the next instruction after GOSUB, then go to the point
in the program specified by y Address; with the intention of returning to the
stored address. Address is a label that specifies where to go. When a
PBASIC program reaches a GOSUB, the program executes the code
beginning at the specified address label. Unlike GOTO, GOSUB also stores
the address of the instruction immediately following itself.
Return:-
Pulse out:_
{$STAMP}
5
This line should be entered into your code, usually near the top, on a line by
itself. Note that the directive appears on a comment line (the apostrophe (')
indicates this) for compatibility with the DOS versions of the editor.
The directive itself must be enclosed in brackets, {...}. There should not be
any spaces between the dollar sign, $
DEBUG:-
‘COMMENT:-
The apostrophe character was used in two ways in this program. The first
line used the apostrophe to include a comment in t he program and make it
more understandable.
Is a comment .
Programs :-
‘{$Stamp bs2}
pulse_count VAR Byte
FOR pulse_count=1 To 60
PULSOUT 12,650
PULSOUT13,850
PAUSE 20
NEXT
END
‘{$Stamp bs2}
pulse_count VAR Byte
FOR pulse_count=1 To 60
PULSOUT 12,850
PULSOUT 13,650
7
PAUSE 20
NEXT
END
‘{$Stamp bs2}
pulse_count VAR Byte
FOR pulse_count=1 To 60
PULSOUT 12,650
PULSOUT 13,650
PAUSE 20
NEXT
END
‘{$Stamp bs2}
pulse_count VAR Byte
FOR pulse_count=1 To 60
PULSOUT 12,850
PULSOUT 13,850
PAUSE 20
NEXT
END
‘{$Stamp bs2}
pulse_count VAR Byte
Loop:
FOR pulse_count=1 To 50
PULSOUT 12,850
PULSOUT13,650
PAUSE 20
NEXT
FOR pulse_count=1 To 31
PULSOUT 12,850
PULSOUT13,850
8
PAUSE 20
NEXT
GOTO LOOP
END
‘{$Stamp bs2}
pulse_count VAR Byte
GOSUB RIGHT-TURN
GOSUB FORWARD
GOSUB RIGHT-TURN
GOSUB FORWARD
FORWARD
FOR pulse_count=1 To 60
PULSOUT 12,850
PULSOUT13,650
PAUSE 20
NEXT
RIGHT-TURN
FOR pulse_count=1 To 60
PULSOUT 12,850
PULSOUT13,850
PAUSE 20
NEXT
END
CONCLUSION:-
9
EXPERIMENT 2:-
TITLE: DC MOTOR STUDY
THEORY:-
(b) Motor Power supply: The operating voltage of the motor is 12 volt
d.c. while the current, depending on loading, is around 120-650 mA.
A built-in variable voltage source (2-14V d.c.) provides this power
10
and two 3½ digit DPMs are available to monitor the armature volatge
armature current of the motor.
(c) Transient Response Timing Section: When the power is suddenly
switched ON, the motor speed increases gradually and finally reaches
a steady value. This process is quite slow for a CRO display with
repeated ON/OFF of the motor. Hence a 3-digit time count display
enables the user to measure the time constant.
(d) Power Supplies: All the circuits are powered through built-in I.C.
regulated power supply of appropriate capacities.
In the present set up a permanent magnet d.c. motor is used, the field
widing is thus absent and the air gap flux is thus constant. The input drive
may therefore be applied to the armature only, that is, only armature
controlled operation is possible.
The mathematical equations in this operationg mode are,
TM = KT i a ; KT : torque constant
d ia
La + R a i a + e b = e a; armature circuit model
dt
dω
J dt + Bω + TL = TM; mechanical model
11
Taking laplace transform and reaaranging the terms:-
ω (s ) KT
Ea (s)
= (sL ¿ ¿ a+ k R ) ( sJ + B ) + K K b¿
a T
Assuming the inductance of the armature circuit to be very small, the motor
transfer function may be written as,
KT
Where,
Torque-Speed Curves:-
Where TM, Ea, Eb, Ia and ω are the steady state values of the motor torque,
applied armature voltage, back emf, armature current and angular velocity of
the shaft.
12
Fig2: typical torque speed curve
Power lost in Ra = Ra x Ia x Ia
Kb = KT
13
When the motor is loaded, the speed dcreases which reduces the back emf.
This increases the armature current ia so that the motor developes more
torque in order to supply the load. The operation for a constant voltage Ea is
shown in fig.2.
Transient response:-
The transfer function of the motor was obtained in eq. 1. Now in response to
a step input ea (t)= E.u(t) , the motor speed will follow the expression,
14
ω (t) | t→ α = ω ss = EKM
or, KM = N/E = π N/ 30 Ea
PROCEDURE:-
Ra and La are the two parameters in the armature circuit, which may be
measured by any standard method. Although Ra is required for calculations,
La has been neglected.
15
4) Step Response:-
16
(a) Armature Resistance Ra = 4.42 ohms,
AND Armature Inductance= 2.21mH
Graphical analysis:-
17
(a) Motor Characteristics:-
18
(c) Torque Speed Characteristics:-
Graphical analysis:-
19
(d) Step Response study:-
CONCLUSION:-
Hence, with the help of this experiment we could study the torque speed,
step response, motor-generator characteristics of a d.c. motor.
EXPERIMENT 3:-
20
TITLE: CONTROL OF D.C. POWER USING SCR
THEORY:-
Fig.1
E0 being the voltage drop (of the order of 2.0 volts) across the SCR after
firing and Em is the amplitude of the a.c. supply
21
is in phase with a d.c. [Link] CA is drawn as a phasor and with
Z1=R and Z0=j/WC, it is known that IR and IX0 must be straight angles and
must add to the constant voltage CA. Thus the locus of the point is a circle
of diameter CA as shown in fig 2(b). Phasor BD is the triggering voltage,
which will be of constant magnitude, and the angle Q is the angle of the lag
of triggering voltage behind the anode voltage.
Q+(1800-2α )=1800
22
Fig. 3(a) Fig 3(b)
Fig.4
PROCEDURE:-
TABLE 1
TABLE 2
24
Graphical analysis:-
CONCLUSION:-
Hence, with the help of this experiment we could control d.c. power
using SCR.
25
EXPERIMENT 4:-
TITLE: SYNCHRO CHARACTERISTICS
THEORY:-
Synchro or selsyn system is used in position control which causes
angular position of one shaft to follow that of another without any
mechanical linkage between them. They are used for instrumentation and
data transmission, and in many similar applications requiring speed
coordination between the parts of complex apparatus. Single selsyn is used
for small power handling, whereas for large power application a 3 phase
selsyn is used.
A single phase selsyn system shown in Fig.1. consists of one synchro
generator of transmitter electrically connected to the synchro motor or
receiver. Each motor has a single phase winding while the stator has 3
windings with axis 1200 apart and connected in delta or star. These windings
of the generator and motor have their corresponding terminals connected
together.
Fig.1
Fig.2
27
control ytansformer will be exactly same as that of the [Link] effect
is thus same as if the two rotor windings are on the same magnetic
[Link], when the two rotor axes are parallel,the error voltage
developed at the control transformerrotor will be maximum and will be zero
when they are at right [Link] magnitude of the error voltage wil be a
cosine function of the angular discrepancy of the two rotor axes, and its
instaneous polarity will depend on the sign of the [Link] this
arrangement ,the input and output shafts are coupled to the corresponding
rotor in such a way that when two shafts correspond,there is an angular
discrepancy of 900 between the two rotor [Link] shafts will thus be
standstill keeping the output shaft fixed,if the input shaft is rotated by an
angle of +α will be resulted between the rotor axes, and the error
voltage,will be developed which will cause the output rotor to rotate till the
discrepancy of the rotor axes comes back to 900,that is,till the shaft position
correspond.
The output error voltage is actually an error-modulated signal because it is a
wave of frequency equal to that of the A-C mains whse amplitude is a
function of the angular error and whose instaneous polarity is determined by
the sign of the error as shown in Fig-3.
Fig.3
28
motor. The error voltage from the Control Transformer amplified by an
amplifier and fed to the control field of th Control Motor-the other field
winding called “reference feild” is connected to the [Link] exciting the
transmitter [Link] the output shaft positon crresponds that of the
input,the error voltage and hence power input to the control winding are zero
and the motor does not [Link] an angular discrepancy exists,an error
voltage will appear at the amplifier [Link] polarity is such that the motor is
caused to turn in direction to correct the angular error.
Fig.4
When the selsyn system is to supply the armature of a d.c. control motor to
correct the angular dicrepancy,the outlet of the cotrol Transformer must be
rectified or [Link] rectification must be phase sensitive i.e. the
polarities of the output direct voltage must depend on whether the controlled
shaft leads or bags the desired position. Such phase-sensitive rectifier is
employed following the amplifier the error signal as shown in Fig-5.
Fig.5
29
PROCEDURE:-
Finally,
1. V1-2 , V2-3 and V3-1 are plotted against the rotor angular position
2. The curve of the error voltage versus the angular discripency of the two
rotor shafts is plotted.
Graphical analysis:-
31
32
CONCLUSION:-
33
EXPERIMENT 5:-
THEORY: -
PRINCIPLE OF OPERATION:-
Fig. 1
Fig. 2
When the output brushes are connected to the load, the resulting load current
Id will again raise to an armature reaction flux which obviously opposes the
original control field flux φf . The load current will thus be limited to a value
such that mmf of this armature reaction is equal to the mmf by the control
field current If. Thus the machine will act like a constant current generator-
the load current depending only on the field current and independent of the
speed and direction of rotation of armature which is also known as
Rosenberg Generator, used in train lightning.
In control system, such constant current feature is undesirable and the
armature reaction flux due to load current is compensated by the use of a
compensating winding as shown in Fig: 3. Such a machine is called
[Link] compensating winding is placed in series with the load and is
designed to produce a flux as nearly as possible equal and opposite to the
flux produced by direct axis armature current .The machine will thus give a
voltage that is only moderately affected by the load current.
35
Fig. 3
CHARACHTERISTICS OF AMPLIDYNE:-
36
Fig. 4
PROCEDURE:-
37
Fig. 5
Switches S1, S2, S3 and S5 are kept OFF and S4 in ON position. The
battery (30 volt) is connected. R1 and R2 both are varied so that both
I1 and I2need 2mA. V0 is measured.
Keeping I1 constant at 2mA, I2 is increased in steps of 1 mA by
decreasing R2 and V0 is measured in each step till V0 reaches 150V
(but not exceeding 250 V). I2 is then reduced in steps of 1 mA till it
comes down to 2mA. The output voltage V0 is recorded in each step.
Keeping I2 constant at 2mA, I1 is increased in steps of 2 mA and V0 is
measured in each step till it reaches 150V. I2 is then reduced in steps
of 1 mA to reach 2mA. The output voltage V0 is again recorded in
each step.
38
RUN 3: CHARACHTERISTICS WITHOUT COMPOUNDING
WINDING:-
Finally, the curves of V0 vs I1-I2 are plotted for RUN 1, 2 and [Link]
amplification of the amplidyne in output voltage per effective field current at
no load and full load conditions are calculated when If = I1 – I2 = + 2mA. The
power gain is calculated which is given by [Link]/V1.I1.
39
OBSERVATION & RESULTS:-
TABLE 1(A)
40
TABLE 1(B)
41
No Load characteristic (keeping I1=2mA)
TABLE 2(A)
42
TABLE 2(B)
43
Full load characteristics (with compounding winding- keeping I2=2mA)
TABLE 3(A)
44
TABLE 3(B)
45
Full load characteristics (with compounding winding - keeping I1=2mA)
TABLE 4(A)
46
TABLE 4(B)
47
Full load characteristics (without compounding winding-keeping
I2=2mA)
TABLE 5(A)
48
TABLE 5(B)
49
Full load characteristics (without compounding winding-keeping
I1=2mA)
TABLE 6(A)
50
TABLE 6(B)
CALCULATIONS:-
TABLE 7
51
Graphical analysis:-
52
CONCLUSION:-
Hence from all the graph and calculations we have finally obtained
the power gain of amplidyne and thereby studied the characteristics of it.
53
EXPERIMENT 6:-
TITLE: TEMPERATURE CONTROL SYSTEM
THEORY:-
SYSTEM DESCRIPTION:-
At present days Temperature Control is one of the most common
control system. The plant to be controlled is a specially designed oven
having a short heating and cooling time. Temperature time data may be
obtained manually, thus avoiding expensive equipment .A solid temperature
sensor converts the absolute temperature information to a proportional
electric signal. The reference and actual temperature are indicated in degree
Celsius on a switch selectable digital display.
The Block diagram of Fig1 describes the complete system-
54
The plant (Oven): The plant is an electric oven, the temperature of
which must adjust itself in accordance with the reference or
command. This system involves transfer of heat from one section to
[Link] our case heat are transferred from heater coil to the oven
and the leakage of heat from the oven to the atmosphere. Such
system may be conveniently analysed in terms of thermal resistance
and capacitance. But the analysis is not very accurate, since the
transfer of heat essentially analysed in terms of thermal resistance
and capacitance.
There are three modes of heat transfer:-
1) Conduction
2) Convection
3) Radiation
Heat transfer through radiation may be neglected in the present case
since the temperature involved are quite small.
For conductive and convective heat transfer-
E=α∆T,
E=Cd(∆T)/dt
E=CdT/dt+(1/R)*T
With the initial condition T(t=0)=Tamb. Now ,taking Laplace Transform with
Zero initial condition-
T(s)/E(s)=R/(1+sCR)
55
CONTROLLER:-
Basic control action commonly used in temperature control systems
are-
a) ON-OFF or Relay
b) Proportional
c) Proportional and Integral
d) Proportional - Integral –Derivative
56
Where, Kp is proportional constant also known as controller gain. It is
recommended that Kp should be kept greater than unity. If the value of K p is
greater than unity, then it will amplify the error signal and thus the amplified
error signal can be detected easily. This controller is shown in fig 3.
c) Proportional and Integral Controller: The output (also called the actuating
signal) is equal to the summation of proportional and integral of the error
signal. Now let us analyze proportional and integral controller
mathematically. As we know in a proportional and integral controller output
is directly proportional to the summation of proportional of error and
integration of the error signal, writing this mathematically we have,
t
57
Fig 4: P-I CONTROLLER
The output of a PID controller, equal to the control input to the plant, in the
time-domain is as follows:
u(t)= Kp e(t) + Ki ∫ e(t ) dt + Kd de/dt
58
First, let's take a look at how the PID controller works in a closed-loop
system using the schematic shown above. The variable (e) represents the
tracking error, the difference between the desired input value (r) and the
actual output (y). This error signal (e) will be sent to the PID controller, and
the controller computes both the derivative and the integral of this error
signal. The control signal (u) to the plant is equal to the proportional gain
(Kp) times the magnitude of the error plus the integral gain (K i) times the
integral of the error plus the derivative gain (K d) times the derivative of the
[Link] control signal (u) is sent to the plant, and the new output (y) is
obtained. The new output (y) is then fed back and compared to the reference
to find the new error signal (e). The controller takes this new error signal and
computes its derivative and its integral again, ad infinitum.
The transfer function of a PID controller (as shown in fig 4) is found by
taking the Laplace transform-
u(t)= Kp + Ki/s + Kd s = (Kp s + Ki+ Kd s2)/s
TEMPERATURE MEASUREMENT:-
The oven temperature can be sensed by a variety of transducers like
thermistor, RTD, thermocouple and semiconductor sensors. In the present
setup, the maximum oven temperature is around 90ºC which is well within
the operating range of a semiconductor temperature sensor like AD590.
Further, these sensors are linear and have a good sensitivity,viz.1µa/ºK.
PROCEDURE:-
Run 1:-
59
7) Put switch S1 to the ‘RUN’ position and note temperature reading every
15 sec till the temperature becomes almost constant.
Run 2:-
ON-OFF CONTROLLER:-
Run 3:-
PROPORTIONAL CONTROLLER:-
Kp =(1/K).(T1/T2 )
According to Ziegler-Nichols-
60
Kp=(0.9/K).(T1/T2 ).T1=1/K1=3.3T2 giving K1=1/3.3T2
According to Ziegler-Nichols-
OBSERVATIONS:-
Table 1:-
61
Room Temperature (25.5 ºC)
1. 0 25.5
2. 15 25.9
3. 30 27.3
4. 45 28.6
5. 60 30.3
6. 75 32.3
7. 90 34
8. 105 34.9
9. 120 35.9
10. 135 37.1
11. 150 38.5
12. 165 39.9
13. 180 41.2
14. 195 42.9
15. 210 44.7
16. 225 46.6
17. 240 48.3
18. 255 49.8
19. 270 50.5
20. 285 51.8
21. 300 52.9
22. 315 54.3
23. 330 54.8
24. 345 55.6
25. 360 56.7
26. 375 57.4
27. 390 57.9
28. 405 58
29. 420 58.5
30. 435 58.9
31. 450 59.1
62
32. 465 59.6
33. 480 59.9
34. 495 60
35. 510 60.5
36. 525 60.7
37. 540 61.6
38. 555 61.8
39. 570 61.9
2) P Controller:-
Psetting temp=45.4
K=61/0.5=122
Psetting =(Kp/Kpmax)*100
Kp=(1/K)*(T1/T2)
=(1/122)*(240/25)
=0.078
~78%
Table 2:-
Room Temperature=26.5ºC
63
[Link]. Time in Temperature
Sec in ºc
1. 0 26.5
2. 15 26.6
3. 30 27.4
4. 45 28.7
5. 60 32.2
6. 75 33.7
7. 90 35.6
8. 105 37.9
9. 120 39.6
10. 135 41.4
11. 150 41.6
3) PI 12. 165 40.7 Controller:-
13. 180 40.7
Kp= 0.9*0.78 14. 195 40.8
=0.702 15. 210 40.9
~ 70.2% 16. 225 40.9
17. 240 40.9
Isetting=Ki/ 18. 255 26.6 Kimax=1/3.3
19. 270 26.6 T2=(1/(3.3*25))*41
20. 285 27.4 =0.49
21. 300 28.7 ~50%
22. 315 30.4
23. 330 32.5
Table 3:- 24. 345 33.9
25. 360 35.6
26. 375 37.4
27. 390 38.7
28. 405 40.2
29. 420 41.2
30. 435 42.3
31. 450 43.6
32. 465 44.3
33. 480 44.5
34. 495 44.4
35. 510 44.2 64
Room Temperature=26.5ºC
65
4) PID Controller:-
Kp=(1.2/K)*(T1/T2)
= 1.2*1229*9.6
=0.936
Kd =0.5*T2
=12.5
Kdmax=19.97(given)
Dsetting=(kd/kdmax)*100
=(12.5/19.97)*100
~ 62.59
Table 4:-
Room Temperature=25.3ºC
66
16. 225 45.4
17. 240 46.1
18. 255 46.7
19. 270 47.1
20. 285 47.4
21. 300 47.6
22. 315 47.6
23. 330 47.5
24. 345 47.4
25. 360 47.3
26. 375 47.2
27. 390 47.1
28. 405 47.1
29. 420 47.1
30. 435 47.1
Room Temperature=25.6ºC
Table 5:-
67
16. 225 47.8
17. 240 47.0
18. 255 46.0
19. 270 45.3
20. 285 45.5
21. 300 46.2
22. 315 47.3
23. 330 47.8
24. 345 47.6
25. 360 47.1
26. 375 46.2
27. 390 45.5
28. 405 45.6
29. 420 46.3
30. 435 47.4
31. 450 47.8
32. 465 47.7
33. 480 47.0
34. 495 46.2
35. 510 45.5
36. 525 45.6
37. 540 46.5
38. 555 47.6
39. 570 47.9
40. 585 47.7
41. 600 47.1
42. 615 46.3
43. 630 45.6
44. 645 45.7
45. 660 46.5
46. 690 47.5
47. 705 47.9
48. 720 47.7
49. 735 46.2
50. 750 45.6
51. 765 45.7
52. 780 46.1
53. 795 47.6
54. 810 47.9
68
55. 825 47.7
56. 840 47.0
57. 855 46.2
58. 870 45.6
Room Temperature=25.5ºC
Table 6:-
69
17. 240 52.5
18. 255 53.6
19. 270 54.7
20. 285 55.7
21. 300 56.6
22. 315 56.7
23. 330 56.0
24. 345 54.8
25. 360 53.6
26. 375 52.2
27. 390 50.8
28. 405 50.9
29. 420 48.1
30. 435 49.6
31. 450 51.3
32. 465 52.6
33. 480 54.0
34. 495 55.2
35. 510 56.3
36. 525 56.9
37. 540 56.7
38. 555 55.8
39. 570 54.7
40. 585 53.4
41. 600 52.0
42. 615 50.6
43. 630 49.3
44. 645 48.0
45. 660 46.9
46. 690 45.8
47. 705 44.8
48. 720 43.9
49. 735 43.0
50. 750 42.2
51. 765 41.4
52. 780 40.7
53. 795 40.0
54. 810 39.4
55. 825 38.8
70
56. 840 38.3
57. 855 38.0
58. 870 38.7
59. 885 40.1
60. 900 45.5
61. 915 47.3
62. 930 49.1
63. 945 42.1
64. 960 53.5
Graphical analysis-
71
72
73
CONCLUSION:-
Hence, with the help of this experiment we could study the performance of
various types of controllers used to control the temperature of an oven
74