Upload
hakhanh
View
224
Download
0
Embed Size (px)
Citation preview
Second Wind Final Report
April 28, 2010
Josh Dowler
Caleb Meeks
John Snyder
1
Table of Contents Requirements Specification .......................................................................................................................... 2
Project Overview and Status ......................................................................................................................... 4
Detailed System Test Plans ........................................................................................................................... 5
Generation System........................................................................................................................................ 6
System Frame ............................................................................................................................................................ 7
Generator Motor ....................................................................................................................................................... 8
Gearing Ratio ............................................................................................................................................................. 9
Return Mechanism .................................................................................................................................................. 10
Electrical System ......................................................................................................................................... 12
Microprocessor ....................................................................................................................................................... 13
Sensors .................................................................................................................................................................... 15
Motor Controls ........................................................................................................................................................ 17
Charge Controller .................................................................................................................................................... 18
Control System ............................................................................................................................................ 19
Slider Control System .............................................................................................................................................. 20
Tension Sensor ........................................................................................................................................................ 21
Kite Reel .................................................................................................................................................................. 22
Angle Sensor ............................................................................................................................................................ 22
Product Management Details ..................................................................................................................... 24
Budget and Analysis ................................................................................................................................................ 25
Schedule and Analysis ............................................................................................................................................. 26
Appendices .................................................................................................................................................. 27
Appendix A: C18 C Compiler Libraries .........................................................................................................................
Appendix B: Microchip PIC18F4550 ............................................................................................................................
Appendix C: ET-PIC18F4550 USB Development Board ...............................................................................................
Appendix D: LCD Screen ..............................................................................................................................................
Appendix E: Microprocessor Code ..............................................................................................................................
Appendix F: 57BYGH207 Stepper Motor .....................................................................................................................
Appendix G: ULN2003A – Stepper Motor Driver ........................................................................................................
Appendix H: 20TQ – 20A Schottky Rectifier ................................................................................................................
Appendix I: FlexiForce Resistive Force Sensor ............................................................................................................
Appendix J: Angle Sensor Preliminary Testing ............................................................................................................
2
Kite Wind Generator
Requirements Specification Overview: Our team will design and prototype a kite wind generator. The generator will produce electrical power from the drag force applied to the kite by wind. The kite will be autonomously guided by a microprocessor to perform the gliding maneuvers necessary to produce power. A kite wind generator would be useful for generating power on large scale agricultural farms, in remote locations for disaster relief or military, or as a part of a larger wind farm. Problem Statement: Due to pollution and depletion of traditional energy sources there is a need to generate power from renewable energy sources. Wind is the second most abundant energy resource, next to solar energy, that can be harnessed to generate power. Kite wind generation is more effective than conventional turbines in gathering the energy from the wind for two reasons. First, the kite can reach much higher altitudes than turbines, where the wind is more reliable and strong. Second, kites can cover more area in the sky and therefore use more of the energy than a stationary turbine can. This technology could allow individuals to become energy self-sufficient and it could also be used in large scale projects as wind farms that produce high power. Operational Description: The kite wind generation unit will produce power based on the drag force produced by the kite in flight and the amount of line pulled, which will be connected to a generator, over time. When the kite has reached its maximum height the kite orientation will be changed to reduce its drag coefficient, and the kite will be retracted using much less power than is generated from the pull up. The kite will run autonomously in winds of 10 to 45 kilometers per hour. When the wind speeds are too high the kite will be retracted to prevent damage to the system. If the wind speeds are too low the kite will be retracted. The system will also have a user interface that displays the length of line released, and power generation. The user will also have options for three different modes of operation for the kite; deploy, sustain, and retract.
Technical Requirements:
System will initially supply its own power to initiate energy generation and then store excess generated power
If power generation is not sufficient to generate excess power the kite will be retracted and the user interface will run off of stored power
System will generate at least 500 watt hours DC within 10 hours Kite system will be able to generate power in winds from 10 - 45 kilometers per hour Setup, including kite deployment, should take no more than 30 minutes Power generation should occur within five minutes of kite deployment System must have deploy, sustain, and retract modes of operation Autonomous control of each mode (deploy, sustain, retract) User interface to enable user to specify modes of operation (deploy, sustain, retract) and show
user length of line released within one meter and power generated within 20 watts
3
Must be able to sense length of line released within one meter and power generation within 20 watts
System will be able to fit through a standard door frame, with width of one meter and height of two meters
Design Deliverables: User manual Drawings and schematics with analyses Kite generator unit User interface Parts list with associated costs Test report Final technical report
System Test Plan
1. Kite stays aloft in winds of 10 - 45 kilometers per hour 2. 10 minutes of autonomous flight and power generation in winds of 10 - 45 kilometers per hour 3. Generation of 500 watt hours DC within 10 hours 4. The electrical system will have a failsafe mechanism that will enable in case of a power surge 5. Kite retraction of less than 10 minutes in winds of 10 - 45 kilometers per hour 6. Shows accurate value for length of line released by comparing it with a tape measure within one
meter 7. Shows accurate value for power generation within 20 watts by using current and voltage
measurements using a multimeter
Implementation Consideration:
Follow FAA regulations part 101, subparts A and B: no flight between sunset and sunrise, a
letter of intent to fly the kite above 150 feet sent to the nearest FAA ATC facility, a 100m radius of land
without obstruction around base, set in an area five miles away from an airport, land must have ground
visibility greater than 3 miles, and the kite line must have streamers at 50 foot intervals above 150 feet
that are visible for one mile. The leads for the generator and battery will be covered to prevent shock.
Sprockets and chains are part of the design and could pose some safety issues.
4
Project Overview and Status
The construction of the system frame is currently completed. The generation system has been
constructed, interfaced and tested. The control system and electrical system have been constructed
and have been integrated and tested. Roadblocks related to higher than anticipated torque
requirements for the control slider are being addressed as the total system integration is completed and
testing begins.
The Second Wind project is completely constructed comprising all subsystems. Systems are all
integrated and have been tested as a complete system. The Second Wind project has undergone testing
to prove that it can meet some of the requirements specification developed at the beginning of the
year.
The challenges encountered during the design and implementation of the Second Wind project
have led this team to a deeper understanding associated with engineering design. The lessons learned
from this project have given our team the experience necessary to prepare us for a future in the
engineering field. If our team were to start over from the beginning we would choose to do a few things
differently. One such difference would be choosing a project that did not rely on unpredictable factors
outside of our team’s control, such as the weather. One of this project’s largest roadblocks during
testing has been finding suitable days to test within our schedules, suitable wind and weather
conditions. The weather is very unpredictable. This made proving the concept of this project difficult
with such a short testing period. Even after allocating over a month to testing, the fact that we must
wait for ideal weather conditions made it difficult to fully and properly test the full system. Another
change would be to better understand the intricacies of kite flight, through a more in depth study of kite
flight dynamics and mechanics. This knowledge, although very advanced for undergraduate work, could
have diverted a number of roadblocks which have occurred during the design implementation process.
Individual subsystems have been tested, however all system components have not been fully
integrated. Individual subsystem testing has shown success in their designed functionality. However,
despite showing some functionality, many of the components of the project will not be able to fully
meet specifications as a whole. We believe that each subsystem has flaws which would not cause the
project to fail. However, when the flaws of each subsystem are integrated, the system is not capable to
function as designed. Some issues include a misunderstanding of the magnitude of the forces acting on
the control slider mechanism. We believe that this system will work as designed if it were replaced with
a more powerful motor that could provide a larger torque on the slider mechanism to control the kite.
A smaller generator motor would also improve the performance of the system. This would decrease the
required torque from the kite and would allow the generator motor to run at the high speeds required
to generate enough power to charge the battery. Currently the generation system has been able to
produce instantaneous voltages in excess of six volts with a constant voltage of around 2.5 volts. Some
modifications have been implemented that we believe could improve this. The lack of wind for testing
has not allowed us to be able to further test the system after these modifications have been made. We
believe that given the proper amount of testing days with adequate weather we would be able to
generate some amount of consistent power.
5
Detailed System Test Plans
1. The kite will have 10 minutes of autonomous flight and power generation in winds of 10-45
kilometers per hour. A measurement of the wind speed will be taken while testing. A stop
watch will measure the 10 minute time period when no physical interaction is imparted on the
system. A wattmeter or multimeter will be used to show that power is being generated.
2. Generation of 500 watt hours DC within 10 hours. The average of the instantaneous powers
generated within a given hour will be taken using a wattmeter. This will show the watt hours
that are produced from the system.
3. Kite retraction of less than 10 minutes in winds of 10-45 kilometers per hour. The kite retraction
mechanism will be tested while a force (equivalent to the force applied to the kite during
operation) is applied. The applied force will be between the calculated values of 1.39 N (0.31
lbf) and 28.13 N (6.32 lbf). A stopwatch will monitor the time necessary to retract the full
operational length of the kite.
4. Shows accurate value for length of line released by comparing it with a tape measure within one
meter. The length displayed on the LCD screen will be compared to a tape measure length.
5. Shows accurate value for power generation within 20 watts by using current and voltage
measurements using a multimeter. The instantaneous power generated will be displayed on the
LCD screen by a wattmeter or multimeter.
6. The tension sensor will be tested and calibrated by attaching varying weights to the string and
creating a resistance curve equation that will be used by the microcontroller to convert the
resistance output to tension on the string. Multiple calibration curves will be made and
averaged to find this curve equation.
7. The angles measured by the angle sensor will be compared to those found using a protractor. If
the angles are more than ±10° off of the protractor’s angles the system will require
modifications or a redesign until the angles are within the ±10° range. Preliminary studies
shown that the angle measure design does produce angles with this range.
8. The slider controller will be tested with a maximum designed load of 225 N (50.58 lbf) on the
kite strings. The slider must be able to move at the speeds required to control the kite. These
speeds shall be determined as further testing on how our slider controller interfaces with the
kite.
9. The return mechanism will be tested by flying the kite and using multiple combinations and
variations of springs to find the optimal springs for varying wind conditions. The wind speed will
be measured. The performance of the springs will be measured by the following criterion:
proper length of line released during pull out of the kite, proper length of line retrieved during
the pull in of the kite, and rate of kite during release and retrieval. A table of wind speeds and
proper spring choice for the wind speed will then be generated.
6
Generation System
7
System Frame In the fall semester the system frame assembly was scheduled to be done after spring break;
however it was necessary for the mounting and testing of other sub-assemblies. Therefore, the system
frame assembly was the first part of the Second Wind project to be manufactured and completed.
Figure 1: Partial System Frame Assembly
The design of the frame underwent some minor changes, from the initial design of last
semester, during its construction. A change was made due to a clearance issue for the generation
system sub-assembly. The pieces labeled ‘Boards 1’ in fig. 1 above are where the generation system
sub-assembly is mounted. These two boards were initially designed under the premise that 2x4 wooden
boards are actually two inches tall and four inches wide. However, boards labeled 2x4 are actually 1.5
inches (38 mm) tall and 3.5 inches (89 mm) wide. This discrepancy caused the flywheel in the
generation system to stick below the frame, meaning it would scrape along the ground. This was solved
by placing ‘Boards 2’ under ‘Boards 1’, instead of having ‘Boards 1’ on the same level as ‘Boards 2’. This
change allowed for plenty of clearance for all parts and it also made attaching the different boards much
easier and sturdier. The increased sturdiness comes from the ability to increase the holding area of the
screws that are placed into the wood. The columns used to support the upper platform were all moved
forward 3.5 inches (89 mm), due to the width of the ‘Boards 2’, to make the frame more compact and to
allow a sturdier place to secure them to the frame. Finally, a metal brace was added at the front of the
system frame to add rigidity and strength. The added rigidity comes from the properties of the metal as
well as from the metal brace attaching to three different wood pieces. Finally, threaded metal rods are
being used to secure the system to the ground. These metal rods are placed near the four corners of
the frame. The system frame has proven to stand up to the forces produced during system testing,
which were in excess of 225 N (50.6 lbf).
Boards 1
Boards 2
8
Figure 2: Generator Motor
Generator Motor The generator motor is a 350 watt brushed DC motor from Monster Scooter Parts (Item # C80-
8759). This motor is reversible, which means that the motor leads can be reversed to allow the motor to
act as a generator. The generator motor was also selected because it is inexpensive and it is rated at
fairly low RPMs (2750 RPM) for this power output level. The low RPM rating is important, because a
motor tends to work best as a generator when operating near its RPM rating.
The motor has currently been tested using the battery that was purchased for the Second Wind
project. The reversibility of the motor has been verified by switching the positive and negative leads to
the battery and observing how the motor behaves. The motor has also been connected to the complete
generation system sub-assembly through chains and sprockets. Throughout system testing the motor
has shown some small amounts of output only exceeding six volts. This is most likely due to the short
pull stroke that can possibly be corrected by modifying the spring return mechanism. This will be
discussed in the spring return mechanism subheading.
The effectiveness of the flywheel has been evaluated to aid in the possible design of a future
system or prototype. The equations of motion for the system have been formulated and the total
inertia of the generation system has been found from experimental results. This consisted of hanging a
weight from the spool, D0, and measuring the time it took to drop over a distance. These values were
applied to the equations of motion to find the total inertia of the system. There are still unknown
variables to consider for the flywheel analysis. Many educated assumptions were made during the
analysis, which concluded that the flywheel should have a moment of inertia approximately 1.4 times
larger than the current flywheel. This would give only a 10 percent fluctuation in motor speed, whereas
the current flywheel allows 30 percent fluctuation. The values used in the analysis assumed a change in
energy per cycle of 85 watts and an angular velocity of two radians per second.
9
Gearing Ratio
The gearing ratio chosen for the generation system sub-assembly is 7.4:1. This means that for
every one turn of the primary shaft shown in fig. 3, the generator motor shaft will turn 7.4 times. This
gearing ratio is necessary to allow the motor to turn at the proper speed. An intermediate shaft is used
to hold the flywheel, which will increase the moment of inertia of the system to allow for more
consistent operation of the motor. All gears are connected via #25 roller chains and sprockets. The
primary shaft will accept the force from the kite and transfer that force via the large sprocket and chain
to the intermediate shaft. The intermediate shaft will then turn the flywheel and transfer its energy to
the generator motor through the sprockets and chain connecting them.
The only change to the gearing ratio setup was to move the motor from the left side of the
intermediate shaft to the right side of the intermediate shaft. This was done to purely to save space and
make the system more compact. The intermediate shaft was attached to two bearings, which were
then mounted to the frame through nuts and bolts. The intermediate shaft was cut to the correct size
and the flywheel was welded to the shaft. The sprockets and bearings are attached to the shaft by set
screws. Aligning the parts took multiple tries, but finally, with precise measurements the parts were
aligned to decrease the effect of friction on the parts as much as possible. The gearing ratio has been
tested to show that all parts work together and perform as they should, even at high speeds. The tests
proved that when the primary shaft was rotated one revolution the generator motor shaft rotated
approximately 7.4 revolutions. This test consisted of rotating the primary shaft one revolution while
monitoring a small mark put on the motor shaft. This shows that the gearing ratio is functioning as
designed. The gearing ratio has been subjected to testing with the kite attached, and has proven to
withstand the forces (225 N or 50.6 lbf) and torques (8.57 N*m or 75.87 lbf*in) generated by the kite.
Figure 3: Gearing Ratio for the Generation System
Large Sprocket
Flywheel
Intermediate
Shaft
Primary Shaft
Generator
Motor Shaft
10
Return Mechanism The return mechanism consists of a variation of springs to store energy to return the kite after it
pulls outward due to the force of the wind. The proper linear spring is chosen from the three springs
available for the proper amount of wind present during operation. The user’s manual provides a list of
the proper spring to use for the proper wind conditions. The spring is changed manually to match the
mean wind speed during the operation of the kite (This is done to accommodate varying wind
conditions; otherwise the return mechanism would only function as designed for one wind speed).
There is a spring for light, average, and heavy wind conditions. The spring is then attached to the
primary shaft shown in fig. 4. This stores a part of the energy into potential energy from elongation of
the spring that the kite produces on its outward pull. This occurs due to the spring being on the same
shaft where the power from the kite will be delivered. Originally the cord attached to the spring needed
to be attached to specific diameters on the primary shaft in order to operate as designed (Labeled D1
and D2 in fig. 4). The freewheel is also an important part of the return mechanism; allowing the primary
shaft to transmit energy in one direction only. This allows the intermediate shaft, which includes the
flywheel, and motor to continue spinning. D0 is the spool on the primary shaft where the cord
representing the kite force will be pulled out and in with the kite movement.
Figure 4: Return Mechanism with Multiple Diameter Spool
However, the varying diameter design is no longer necessary due to the redesign of the spool for the
spring return mechanism shown in fig. 5. The spool no longer consists of mulitple diameters of
attachment for different springs. Instead, only one diameter is being used. This diameter was increased
in order to allow the moment force produced by the spring on the primary shaft to increase. This was
done based upon results and observations from testing which concluded that the springs needed to
offer more resistance to the kite in both the outward and inward pull of the spring return mechanism.
This also means that the eyehole shown in fig. 4 will no longer be necessary, which will reduce friction
on the system. The yellow cord shown in fig. 4 has also been replaced with a metal cable for increased
D0 D2 D1
Eyehole
Yellow Cord
(Spring Force)
Metal Cable
(Kite Force)
Primary
Shaft
11
strength as well as a stronger attachment to the primary shaft. This modification was made to the
system due to a failure during testing of the original attachment method. This new system has proven
itself during testing to be more effective and secure. D0 may also be redesigned to allow a longer stroke
length for the kite. This may be done based on observations from testing that show that the kite should
be allowed to pull outward longer than previously designed for.
Figure 5: Redesign of Spring Return Mechanism
Figure 6 shows a voltage test run on the generation system simulating high wind conditions.
The effect of the flywheel can be clearly seen here to stabilize the fluctuating voltage to the motor. This
results in a more stable voltage generated by the generator motor.
Figure 6: Generation System Voltage Test
D0 D1
Metal Cable
(Spring Force)
Metal Cable
(Kite Force)
Primary
Shaft
12
Electrical System
13
Microprocessor The microprocessor has been a project of higher complexity than was first imagined. The first
roadblock was due to poor documentation from the manufacturer of the PIC18F4550 development
board from Futurlec. The documentation made it ambiguous as to how exactly code gets loaded onto
the microprocessor. The final conclusion after consultation with Harding’s electronic laboratory
technician was that code needs to be programmed via an external programmer. Harding owns a
Microchip PM3 programmer with the MPLab IDE development software which is compatible with the
Microchip PIC18F4550 microprocessor. With this configuration, the code was written and compiled
through the MPLab IDE software then transferred to the microprocessor via the PM3 programmer. A
student version of the C18 C compiler was used so the code for the software could be written using the
C programming language. Conveniently, the C18 compiler features functions which made controlling
the microprocessor’s features easier. Some of these functions include capability to easily control the
A/D converters. Details about these functions can be found in Appendix A. All system test code has
now been programmed and can be found in Appendix E. This code has been complete for some time
but has undergone several revisions to account for calibration with the sensors and the motor.
Figure 7: Development Board with sensor connections
Figure 8: User Interface
14
The kite flight algorithm was produced by using the angle sensors to gain approximate values
from the A/D converter. These values were then used to create thresholds for the kite to cross as it
moves through its pattern. A graphical representation of the kite flight pattern using A/D converter
values can be seen in fig. 9. This is a graphical representation of the kite flight pattern while the kite is in
the sky. The numbers in fig. 9 correspond to values read by the microprocessor’s A/D converter. The
equation y = -0.2584x + 477.57 represents our kite as it is moving to the right and the equation y =
0.2533x + 310.77 represents our kite as it flies to the left. Given a direction and a single x or y value, we
can tell where our kite should be in the air. When the vertical angle reads an A/D value greater than 425
or less than 365, our controls will curve the kite around to complete the figure 8 pattern. It will do the
same when our horizontal angle reads greater than 435 or less than 203. Using this graphical
representation, code was written to orient the motor in order to force the kite to adhere to this pattern.
Figure 9: Kite Flight Graphical Representation
y = -0.2584x + 477.57 y = 0.2533x + 310.77
360
370
380
390
400
410
420
430
200 220 240 260 280 300 320 340 360 380 400 420 440
Vert
ical
An
gle
(A
/D r
ead
ing
)
Horizontal Angle (A/D reading)
Kite Path
Right Direction Left Direction
15
Sensors
All sensors have been tested with the microprocessor and operate to a level of accuracy which
meets system specifications. All sensor tests produced linear results which adapt sufficiently into the
system. The sensors consist of the ±30V voltage sensor, the 30A current sensor, and the tension sensor.
The voltage sensor takes a voltage in the range of +30V to -30V and outputs a voltage between 0 and 5V
for input into the microprocessors A/D converter. This sensor is working correctly from all tests that
have taken place. It currently displays the correct value being produced to the LCD screen by
transforming the A/D value read by the microprocessor. Results can be seen in fig. 11.
Figure 10: Voltage Sensor Test Results
Figure 11: Voltage Sensor Test with A/D Converter
The current sensor is similar in that it will take a value of current between -30A and +30A and
output a voltage between 0-5V. This sensor is also working correctly from what has been tested thus
far. Test results can be seen below in fig. 12.
2
2.5
3
3.5
4
4.5
5
0 5 10 15 20
Ou
tpu
t V
olt
age
(V
)
Input Voltage (V)
Voltage Sensor Test
0100200300400500600700800900
1000
0 2 4 6 8 10 12 14 16 18 20
A/D
Co
nve
rte
r R
ead
ing
Input Voltage (V)
Voltage Sensor A/D Test
16
Figure 12: Current Sensor Test Results
The tension sensor is a variable resistor that changes resistance with the amount of force
applied. As the force increases, the resistance in the sensor decreases causing the output voltage to
increase. The sensor is rated for 0-45.36kg (0-100lbs) of force, so a great amount of force will need to
be applied by the kite to show noticeable change. The housing for this sensor was built with the rest of
the control system. All of these sensors are working close to the specifications indicated by their
datasheets. The final sensors being used with the microprocessor are the angle sensors. More about
these sensors can be found in the controls description. These sensors can be seen in figs. 13, 14 and 16.
Figure 13: 30V Voltage Sensor Figure 14: 30A Current Sensor.
Figure 15: Angle Sensor Configuration Figure 16: Tension Sensor
2
2.5
3
3.5
4
4.5
5
0 2 4 6 8 10
Ou
tpu
t V
olt
age
(V
)
Input Current (A)
Current Sensor Test
R1
1kΩ
50%
R2
Ke y = A
1kΩ V112 V
to uP pins
17
Motor Controls
A major change was made in the way the motors are controlled. The 12V DC brushed motor
which is being used to control the reel has undergone a change in concept. Instead of being controlled
by the microprocessor, it will be controlled by the switch on the user interface. That switch will also
notify the microprocessor that the motor is in use so it can set the control slider to the center position.
This configuration can be seen in figs. 17, 18. A new reel motor needed to be purchased because the
current motor draws too much current for the required torque. This large change in motor control
means that only one motor, the control motor, will be controlled by the microprocessor. This change,
while significant, is still okay with the requirements specification. The control motor is a 57BYGH207 2-
phase, 1.8° per step, 12V, 0.4A, unipolar stepper motor from Mercury Industry Co. This motor will make
all the movements which affect the kite’s flight pattern. The portion of code for the stepper motor
program has been written and implemented. The stepper motor can be controlled by the
microprocessor with accurate precision. It can move in either direction. The motor drive circuit, which
will increase the torque of the motor, is what is seen in fig. 18.
Figure 17: Reel Motor Circuit Figure 18: Reel Motor Signal Circuit
Figure 19: Control Motor
V1
12 V
S1
MOT OR
M
J2
Ke y = Sp a ce
J1
Ke y = Sp a ce
R110kΩ
V112 V
V25 V
U1
2N7000
to uP
J1
Ke y = A
18
Charge Controller
The charge controller circuit is currently undergoing testing to provide functionality for the
generation system. The charge controller consists of a few main components. The first component is
the diode. Specifications for the diode can be found in Appendix H. This ensures no current will
backflow into the motor during generation. A capacitor is then placed in parallel to provide a smoother
voltage flowing into the battery. The DC-DC converter ordered from Maxim never arrived so unfiltered
voltage now flows into the battery from the generator. This circuit will deliver power being produced by
the generator motor to the battery. While unfiltered voltage and current is not optimal, the power is
still being filtered somewhat by the generation system flywheel and the large capacitor. The battery will
then provide 12 volts to the electrical system via a 12V regulator (LM1084). These 12 volts is delivered
to the microprocessor, control motor, and reel motor. The microprocessor contains onboard 5 volt
sources to provide voltage to the system’s sensors. This configuration can be seen in fig. 20. The final
configuration for the means by which all subsystems receive power can be seen in figs. 21,22. Fig. 21
shows the power circuit which receives power from the battery to be sent to the microprocessor and
control motor. Fig. 22 shows all connections coming in from the battery and generator motor. These
components are connected to the rest of the electrical subsystems via the screw down panel (used
because of low gauge wire).
Figure 20: Charge Controller Configuration
Figure 21: Power Circuit Figure 22: Power Connections
D1
1BH62 V112 V
C13900uF
V212 V
A
Reel Motor
U1LM7812CT
LINE VREG
COMMON
VOLTAGE
to uP and sensors
19
Control System
20
Slider Control System The slider control construction was completed on schedule. After initial testing of the slider
control subsystem it was determined that the planned flight path of the kite demands more torque from
the control motor than it was previously designed for. This is because the physics involved in
controlling the kite are not as much a function of the drag force on the kite as previously thought but a
function of the lift produced as the kite glides forward. With the original thought process the tension in
the strings will be equal to each other thereby allowing the control motor to only overcome friction in
the system as it moves the slider. In reality the kite is producing lift as it flies forward much like an
airplane wing would. This lift is not only caused by the airfoil shape of the kite but also the inclined
angle of attack that makes the kite act much like a airplane that is taking off. This also explains why our
kite is producing much higher force readings than originally expected in lower winds. It also means that
during turns there is a significant difference in tension in the two strings, thereby necessitating the slider
motor to overcome, not only the friction forces in the system, but also the tension differences in the
string. To compensate for this changes have been made to the flight pattern so that the turns needed to
control the kite are smaller, and produce less of a tension difference in the strings.
Figure 23: Constructed Slider Control Subsystem
21
Tension Sensor The tension sensor subsystem was constructed on schedule, has passed subsystem tests, and
has been integrated in the total system.
Testing consisted of adding known weights to the kite string and measuring the resistance
output of the tension sensor. These values were tabulated and a fit curve equation was produced so
that the resistance readings can be transferred into tension. The curve produced by these tests
reflects the manufacturer curve but has been calibrated to fit to our specific system. Because
the sensor worked successfully and as expected no changes to the design were made.
This device has been successfully integrated with the microcontroller.
Figure 24: Tension Sensor Subsystem
Force sensor is
pinched by hinge
Force sensor is
pinched by hinge
22
Kite Reel The kite reel was constructed ahead of schedule but the motor was changed out before the
subsystem was integrated into the total system. This was done because, though the torque
requirements for the motor were met, the original motor purchased required more amperage than was
previously thought. The new motor was purchased, attached to the reel system, and has been tested
along with the total integrated system. It was also tested with a simulated max load of about 28 N (6.3
lb) to verify it meets the requirements of our retraction system.
Figure 25: Kite Reel Subsystem
23
Angle Sensor The angle sensor subsystem has been constructed and integrated into the total system. This
angle sensor has been shown to work both mechanically and electronically as needed. Electronically the
sensor must be able to reliably transmit data to microcontroller in a form that it can then use to
determine the kite’s location. This was done using two potentiometers to measure the vertical and
horizontal angle change of the kite’s string. Mechanically the sensor must be able to withstand the
range of positions and angle change speeds produced by the kite’s flight.
The electrical aspects of the angle sensor were tested by recording and tabulating the resistance
values for the two potentiometers at known angle orientations for the string. The values for the desired
path were determined and are used by the microprocessor to determine the kite is flying in the correct
zone and trajectory. See the Electrical System section for more information on how the microprocessor
uses these values. See also Appendix J for the angle sensor preliminary testing.
The mechanical aspects of the angle sensor were tested by integrating it into the system and
verifying that it will function in a full range of flight possibilities. This was done by flying the kite by hand
in a wide range of flight patterns with the angle sensor integrated. This test verified that the angle
sensor functions successfully when integrated into the system.
This angle sensor design utilizes a steel eye-hole bolted to the system frame for the string’s
entrance into the sensor. The string then passes through an eyelet at the end of the angle sensor’s
angle arm. The entrance eye-hole to acts as a multidirectional pulley and bares the load of the kit’s
tension. The eyelet on the angle arm allows kite string movements to change the resistance values for
the vertical and horizontal potentiometers which are read by the microprocessor and used to control
the kite flight.
Figure 26: Angle Sensor
Vertical
Potentiometer
Horizontal
Potentiometer
String exits to
kite through
eyelet at end of
angle arm
String enters
from generator
through eye-hole
String exits to
kite through
eyelet at end of
angle arm
24
Product Management
Details
25
Budget and Analysis
Table 1 – Updated Budget
Updated Budget
Product Vendor
Budgeted Cost
Money Spent Difference
Kite Kite Wind Surf $131.95 $131.95 $0.00
Development Board Futurlec $52.90 $52.90 $0.00
Battery atbatt.com $50.42 $50.42 $0.00
Generator Motor Monster Scooter
Parts $47.91 $47.91 $0.00
Wood/Pulleys Lowes $50.00 $61.96 $11.96
Sprockets/Chains/Axle Electric Scooter Parts $104.87 $104.87 $0.00
Axle Lowes $5.71 $0.00 -$5.71
Springs W.B. Jones Spring Co. $36.00 $36.93 $0.93
Bearings VXB.com $28.43 $28.43 $0.00
Circuit Boards 4pcb $50.00 $49.55 -$0.45
Controls System ebay.com $80.00 $80.00 $0.00
Retraction Motor Trossen Robotics $32.00 $68.12 $36.12
Sensors Trossen Robotics $78.62 $78.62 $0.00
Electrical Components allelectronics.com $25.00 $15.02 -$9.98
Paint Lowes $20.00 $21.88 $1.88
Report Printing Cost HU - ERC $10.00 $10.00 $0.00
Amount Budgeted $803.81
Amount Spent $838.56
Total Remaining $11.44
The spring semester budget for the Second Wind project has changed slightly from the budget
proposed in the final design report from last semester. Axle material as well as construction hardware
were obtained from excess parts from previous years’ design projects. The most recent purchases this
semester have been a new retraction motor and pulleys. These purchases were not foreseen purchases.
However, due to insight gained from initial system testing these purchases were deemed necessary.
The professional circuit board has also recently been purchased implemented into the system. Paint
and brushes were purchased to give the project a finishing touch. The final purchase of the semester is
the report printing services offered at the Education Resource Center. This leaves the Second Wind
Project $11.44 under the allotted spending limit of $850.00.
26
Schedule and Analysis
Significant alterations have been made to the Second Wind project spring schedule. The system
frame assembly was moved to the first few weeks of the semester, due to the need for a frame on
which to assemble the generation system.
The generation system subassembly has been completed on schedule. Throughout system
testing, modifications have been made as necessary to alter the performance and/or integrity of the
generation subsystem. All parts of the generation subsystem have passed testing individually and as a
complete subsystem.
Though the electrical system was slightly behind schedule at the mid-term point of the
semester, significant time was spent during spring break to get the system back on schedule. The
microprocessor interface setup was moved to the beginning of the semester due to necessity of testing
sensors and other parts. Because of the importance of the microprocessor’s functionality, the charge
controller was pushed back. This is also why the motor controller was moved back slightly. Etching was
moved to the end of the semester since all electrical circuits need to be constructed and tested before
they can be etched. The motor controls have been completed and integrated and all initial system
programming has been completed. All electrical subsystems have been completed and integrated and
are undergoing testing with the final system.
All control subsystems have been constructed and integrated into the total system. Both the
tension sensor and angle sensor have been tested as subsystems and proven to function as desired. The
kite reel and slider controller have been integrated into and will be tested along with the total system.
Table 2 - Updated Spring Schedule
27
Appendices
28
Appendix A: C18 C Compiler Libraries
Appendix A
C18 C Compiler Libraries
http://ww1.microchip.com/downloads/en/devicedoc/MPLAB_C18_Libraries_51297f.pdf
29
Appendix B: Microchip PIC18F4550
Appendix B
Microchip PIC18F4550
http://ww1.microchip.com/downloads/en/DeviceDoc/39632e.pdf
30
Appendix C: ET-PIC18F4550 USB Development Board
ET-PIC USB/4550
-1-
ET-PIC USB / 4550
ET-PICUSB/4550 is a PIC Board Microcontroller from Microchip Co., Ltd. that develops PIC18F4550 Microcontroller to be a board. The remarkable specifications of PIC18F4550 is Module USB (Universal Serial Bus) that is widespread communication technology today because of its high speed to communicate data and more convenient to interface. Nowadays, most computers have not RS-232 Port or LPT Port but most connective components are designed to use USB Port. So, ET-PIC USB/4550 is the most suitable device to develop Microcontroller and suitable to learn and study technology of USB communication.
Table shows specifications of PIC18F4550 Microcontroller
Specifications PIC18F4550
Operating Frequency DC – 48 MHz
Program Memory (Bytes) 32768
Data Memory (Bytes) 2048
Data EEPROM Memory (Bytes) 256
Interrupt Sources 20
I/O Ports Ports A, B, C, D, E
Timers 4
Capture/Compare/PWM Modules 1
Enhanced Capture/Compare/PWM Modules 1
Universal Serial Bus (USB) Module 1
Serial Communications MSSP, Enhanced USART
Streaming Parallel Port (SPP) Yes
10-bit Analog-to-Digital Module 13 Input Channels
Resets (and Delays) POR, BOR, RESET Instruction, Stack Full, Stack Underflow
(PWRT, OST), MCLR (optional), WDT
Programmable High/Low-Voltage Detect Yes
Programmable Brown-out Reset Yes
Instruction Set 75 Instructions; 83 with Extended Instruction Set enabled
Packages 40-pin PDIP
44-pin QFN
44-pin TQFP
ET-PIC USB/4550
-2-
� General Specifications of Board
- Use 40 PIN PIC18F4550 Microcontroller - Signal Crystal Oscillator 20 MHz(can use PLL to 48 MHz) - 5 of 10 Pin I/O Port (under standard arrangement of
ETT) - 1 Port of Circuit Driver RS232 - 1 Port of ET-CLCD to interface LCD (under standard
arrangement of ETT) - Connector ICD2 to download program and Switch
Run/Program - 4 Channel LED to test Output - 4 Channel Switch BUTTON to test Input - 4 Channel 0-5V Voltage Generator from VR to test Module
A/D - Mini Speaker - Switching Regulator to convert DC Input to be 5V - Connector VCC and GND
ET-PIC USB/4550
-3-
1 2
44
5
6
7 8 9
1011
12
13
14
15
1617
18
19
3 3
Structure of Board ET-PICUSB/4550
ET-PIC USB/4550
-4-
Detailed description
� No.1 is Test I/O LED that consists of 4 LED as shown in the circuit below.
� No.2 is 4 Test Voltage Analog that can adjust voltage from 0V to 5V and the method to interface circuit is shown below.
� No.3 is 4 Test signal Input from Switch and can create signal Logic “0” (0 Volt) and Logic “1” (5 Volt) as shown in the circuit below.
� No.4 is Test Mini Speaker that can input frequency to make sounds as shown in the circuit below.
ET-PIC USB/4550
-5-
1 2
3 4
5 6
7 8
9 10
RA[0] RA[1]RA[2] RA[3]RA[4] RA[5]
VCC GND
RA[0..5]
NC NC
1 2
3 4
5 6
7 8
9 10
RB[0] RB[1]RB[2] RB[3]RB[4]
VCC GND
RB[0..7]
RB[6] RB[7]RB[5]
1 2
3 4
5 6
7 8
9 10
RC[0] RC[1]RC[2] NCNC NC
VCC GND
RC[0..2]
NC NC
1 2
3 4
5 6
7 8
9 10
RD[0] RD[1]RD[2] RD[3]RD[4] RD[5]
VCC GND
RD[0..7]
RD[6] RD[7]
1 2
3 4
5 6
7 8
9 10
RE[0] RE[1]RE[2] NCNC NC
VCC GND
RE[0..2]
NC NC
� No.5 is Project board.
� No.6, 7, 8, 9 and 10 are Port I/O of Microcontroller that consists of Port A, B, C, D and E respectively. Signal of each Port is arranged as shown in the circuit below.
ET-PIC USB/4550
-6-
D4
D5
D6
D7
EN
RS
RW
RD4
RD5
PIC18F4550
RD6
RD7
RD3
RD2
GND
1 23 45 6
7 89 10
VCC
RSENGNDGND
GNDVO
RWGNDGND
ET-CLCD
11 12
13 14
D4D6D7
D5
VR10K
+VCC
� No.11 is Port ET-LCD to interface with Character LCD Display and the method to arrange signal Pin is shown in the circuit below.
� No.12 is PIC18F4550 Microcontroller. � No.13 is Connector Power Supply that is designed to be
both 2-Pin CPA and DC-JACK. � No.14 is Connector USB. � No.15 is Jumper to select source of Power Supply.
� No.16 is Port RS232 and the method to interface circuit is shown below.
ET-PIC USB/4550
-7-
� No.17 is Connector Download Program that is arranged under standard of ICD2, so it can support Programmer that is ICD2 Interface such as PICKit2, ICD2 and ETT Programmer “ET-PGMPIC USB”.
� No.18 is Switch to select RUN mode or PROGRAM Mode. When we shift Switch to PROG position, it will ON/OFF signal Pin that is used to program data code into programmer and start programming data that is designed by us instantly. When we shift Switch to RUN position, signal Pin will be back to be I/O and we can use it as usual.
� No.19 is RESET Switch.
Source Code Programming The method to program Source Code into Microcontroller of Board ET-PICUSB4550 must use external Programmer such as ICD2, PICKit2 or ETT Programmer “ET-PGMUSB4550” and we must interface cable Program with Connector ICD2 as shown in the picture below.
ET-PIC USB/4550
-8-
ET-PGMPIC USB
ET- PICUSB/4550
12
34
56
ABCD
65
43
21
D C B A
Title
Num
ber
Revi
sion
Size B Dat
e:3-
Apr
-200
7 Sh
eet
of
File
:C:
\Doc
umen
ts an
d Se
tting
s\adm
instr
ator
\My
Doc
umen
ts\M
y eB
ooks
\ET-
PIC
USB
455
0\U
SB-P
IC2.
DD
BD
raw
n By
:
RA0/
AN
02
RA1/
AN
13
RA2/
AN
2/V
REF-
4RA
3/A
N3/
VRE
F+5
RA4/
T0CK
I6
RA5/
AN
4/SS
7
RB4/
AN
1137
RB3/
AN
9/CC
P2*
36
RB2/
AN
8/IN
T235
RB1/
INT1
/SCK
/SCL
34
RB0/
AN
12/IN
T0/S
DI/S
DA
33
RC0/
T1O
SO/T
13CK
I15
RC1/
T1O
SI/C
CP2*
16RC
2/CC
P1/P
1A17
VU
SB18
RC4/
D-
23
RC5/
D+
24
RC6/
TX/C
K25
RC7/
RX/D
T/SD
O26
RD0/
SPP0
19RD
1/SP
P120
RD2/
SPP2
21RD
3/SP
P322
RD4/
SPP4
27RD
5/SP
P5/P
1B28
RD6/
SPP6
/P1C
29RD
7/SP
P7/P
1D30
RE0/
AN
58
RE1/
AN
69
RE2/
AN
710
MCL
R/V
PP/R
E31
RB7/
PGD
40
RB6/
PGC
39
RB5/
PGM
38
OSC
1/CL
KIN
13
OSC
2/CL
KO
/RA
614
VCC
11
VCC
32
GN
D12
GN
D31
PIC1
8F45
50
+VCC
(CPU
)
0.1u
F
0.1u
F
20M
Hz
22pF
22pF
470n
F
1234U
SB C
ON
VU
SB
RESE
T
10k
RE1
RE0
RC7
RC6
RC2
RB7_
CPU
RB0
RB1
RB3
RB4
RB5_
CPU
RB6_
CPU
RB2
RA3
RA2
RA1
RA0
RA5
RA4
RC1
RC0
RE2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
12
34
56
78
910
PORT
A
+VCC
(CPU
)
12
34
56
78
910
PORT
B
+VCC
(CPU
)
12
34
56
78
910
PORT
C
+VCC
(CPU
)
12
34
56
78
910
PORT
D
+VCC
(CPU
)
12
34
56
78
910
PORT
E
+VCC
(CPU
)
RE1
RE0
RC2
RB7_
IO
RB0
RB1
RB3
RB4
RB5_
IORB
6_IO
RB2
RA3
RA2
RA1
RA0
RA5
RA4
RC1
RC0
RE2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
12
34
56
78
910
1112
1314
CLCD
(4 B
its M
ode)
RD6
RD7
RD3
RD2
RD4
RD5
D5
D7
D4
D6
D1
ENRSR/
WD
0D
2D
3
VCC
GN
DV
O
10k
+VCC
(CPU
)
+VCC
(CPU
)
IN1
FB4
OU
T2
GND 3
ON/OFF 5
LM25
75-5
.0
1N58
19
100u
H
100u
F/25
V
VRE
G
100u
F/25
V
VIN 12
VIN
123
JUM
PER
VU
SB
+VCC
(CPU
)
VRE
G
VU
SB
VRE
G
+VCC
560
560
560
FRB
10uF
/25V
Z5V
6
RB6_
CPU
RB7_
CPU
RESE
T
RB6_
IO
RB7_
IO
123456
ICD
2
PGC
PGD
VD
DG
ND
VPP
PRO
G
RUN
MCL
R/V
PP
AC1
+
AC2
-
BRID
GE1
MCL
R/V
PP
RESE
T
RB5_
CPU
RB5_
IO
1K
1 2 3 4 5 6789101112
VPP
PGC
PGD
VPP
PGC
PGD
+VCC
(CPU
)
12
34
56
ABCD
65
43
21
D C B A
Title
Num
ber
Revi
sion
Size B Dat
e:3-
Apr
-200
7 Sh
eet
of
File
:C:
\Doc
umen
ts an
d Se
tting
s\adm
instr
ator
\My
Doc
umen
ts\M
y eB
ooks
\ET-
PIC
USB
455
0\U
SB-P
IC2.
DD
BD
raw
n By
:
SW-P
BSW
-PB
SW-P
BSW
-PB
10k
10k
10k
10k
+VCC
(CPU
)
12
CON
2
12
CON
2
12
CON
2
12
CON
2
10k
10k
10k
10k
+VCC
(CPU
)
12
CON
2
12
CON
2
12
CON
2
12
CON
2
LED
LED
LED
LED
+VCC
(CPU
)
12
CON
2
10K
+VCC
(CPU
)
12
CON
2
10K
+VCC
(CPU
)
12
CON
2
10K
+VCC
(CPU
)
12
CON
2
10K
12
34
56
78
910
+VCC
12
34
56
78
910
+VCC
+VCC
(CPU
)+V
CC(C
PU)
12
34
56
78
910
GN
D
12
34
56
78
910
GN
D
1 2 3 4
RS23
2
C1+
1
C1-
3
C2+
4
C2-
5
R1O
12
T1I
11
R2O
9
T2I
10
VCC
16
V+
2
V-
6
GN
D15
R1I
13
T1O
14
R2I
8
T2O
7
MA
X23
2
+VCC
(CPU
)
VCC
RX TX GN
D
RX TX
10uF
10uF
10uF
10uF
+VCC
(CPU
)
0.1u
F
RC7
RC6
LS1
SPEA
KER
Q1
C547
R2 1k
D1
1N41
48
+VCC
(CPU
)
12
J1 CON
2
31
Appendix D: LCD Screen
The tolerance unless classified 0.3mm
LCD option: STN, TN, FSTNBacklight Option: LED,EL Backlight feature, other Specs not available on catalog is under request.
OUTLINE DIMENSION & BLOCK DIAGRAM
MECHANICAL SPECIFICATIONOverall SizeView AreaDot SizeDot Pitch
80.0 x 36.066.0 x 16.20.56 x 0.660.60 x 0.70
ModuleW /O B/L
EL B/LLED B/L
H2 / H15.1 / 9.75.1 / 9.79.4 / 14.0
Vdd+0.3
VVV
137
ItemSupply for logic voltage
LCD driving supply voltageInput voltage
Vdd-VssVdd-Vee
Vin
25oC25oC25oC
-0.3-0.3-0.3
Symbol Condition Min. Max. UnitsABSOLUTE MAXIMUM RATING
Item
LCD operation voltage
LCM current consumption (No B/L)
Backlight current consumption
Symbol Min.Condition
Vop
IddLED/edge VB/L=4.2V
LED/array
Top-20oC
0oC25oC50oC70oC
VB/L=4.2V
N W7.1
4.54.1
Vdd=5V
3.85.7
6.1
ELECTRICAL CHARACTERISTICSTypical
N W
Max. Units
V
5.14.7
4.4
7.9
6.7
6.3
VVVVV
mAmAmA
3
N W7.5
4.84.1
3.86
6.4
PIN ASSIGNMENTPin no. Symbol Function
123456789
1011121314
VssVddVoRSR/W
EDB0DB1DB2DB3DB4DB5DB6DB7
Power supply(GND)Power supply(+)Contrast AdjustRegister select signalData read / writeEnable signalData bus lineData bus lineData bus lineData bus lineData bus lineData bus lineData bus lineData bus line
1516
AK
Power supply for LED B/L (+)Power supply for LED B/L ( )
2
120
Power supply voltage Vdd-Vss 25oC 2.7 5.5 V
PC 1602-DPC 1602-D
2- 2.5
25.0
1.6
H1
H2
11.5
16.2
3.9
5.52- 3.0
80.0 0.5
36.0
0.5
16- 1.0
75.0P2.54 x 15=38.1
16
2.51.8
2.58.02.
5 7.0
16.0
31.0
17.5
A
K
2.0
4- 1.0
2.55.1
40.6
71.066.056.21
3.55
2.960.56
0.04
0.04
0.665.94
DB7
DB0
ER/W
RSVssVddVo
AK
LCDCONTROLLERLSI
LCD PANELCOM 16
BACKLIGHT
SEG 40
CONTROL SIGNALS 4
SEG 40
SEGMENT DRIVER
5.56
32
Appendix E: Microprocessor Code
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
1 #include <p18f4550.h>2 #include <delays.h>3 #include <adc.h>4 #include <stdlib.h>5 6 #pragma config FOSC = HS,FCMEN = OFF,IESO = OFF7 #pragma config PWRT = ON,BOR = OFF,BORV = 08 #pragma config WDT = OFF9 #pragma config MCLRE = OFF,LPT1OSC = OFF,PBADEN = OFF,CCP2MX = OFF10 #pragma config STVREN = OFF,LVP = OFF,XINST = OFF,DEBUG = OFF11 #pragma config CP0 = OFF,CP1 = OFF,CP2 = OFF12 #pragma config CPB = OFF,CPD = OFF13 #pragma config WRT0 = OFF,WRT1 = OFF,WRT2 = OFF14 #pragma config WRTB = OFF,WRTC = OFF,WRTD = OFF15 #pragma config EBTR0 = OFF,EBTR1 = OFF,EBTR2 = OFF16 #pragma config EBTRB = OFF17 18 19 #define E_PIN PORTCbits.RC1 /* Set E to pin C1 */20 #define RS_PIN PORTCbits.RC0 /* Set RS to pin C0 */\21 22 void longDelay(void);23 void shortDelay(void);24 void superDelay(void);25 void stepperDelay(void);26 void PulseE(void);27 void InitializeLCD(void);28 void ClearLCD(void);29 void PrintLCD(char text[]);30 void SpecialPrintLCD(char text[],int linenum);31 void StepperMotor(int steps, int dir);32 int CheckAD(int linenum);33 int DetermineSteps(int old_x, int old_y, int x, int y, int pref);34 35 void main()36 {37 char string[33] = "Power Gen: String Len: ";38 char pwr_str[6] = " ";39 char len_str[6] = " ";40 int power, linenum, string_len, string_bool, reel;41 int overall_steps, steps, dir, det_step, det_dir;42 int old_x, old_y, horizontal, vertical;43 44 TRISB = 0x00; //make stepper motor pins outputs45 TRISA = 0xFF; //set port A to inputs46 47 string_len = 0;48 overall_steps = 0;49 steps = 0;50 dir = 1;51 det_step = 1;52 det_dir = 0;53 54 InitializeLCD();
-1-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
55 longDelay();56 57 ClearLCD();58 longDelay();59 PrintLCD(string);60 superDelay();61 62 //check angle sensors63 linenum = 3;64 old_x = CheckAD(linenum);65 linenum = 4;66 old_y = CheckAD(linenum);67 68 while (1){69 //check if reel motor is on 70 //if its on, move slider to center and check line length71 reel = CheckAD(5);72 if (reel == 1){73 StepperMotor(overall_steps, 0); //move reel to center74 overall_steps = 0; //reset total steps moved75 76 //check string length77 linenum = 6;78 string_bool = CheckAD(linenum);79 string_len = string_len + string_bool;80 itoa(string_len,len_str);81 len_str[4] = 'M';82 SpecialPrintLCD(len_str,linenum);83 shortDelay();84 }85 else{86 //check power87 linenum = 0;88 power = CheckAD(linenum);89 itoa(power,pwr_str); //converts the ADC int value into a string90 pwr_str[4] = 'W';91 SpecialPrintLCD(pwr_str,linenum);92 shortDelay();93 94 //check angle sensors95 linenum = 3;96 horizontal = CheckAD(linenum);97 linenum = 4;98 vertical = CheckAD(linenum);99 100 //determine number of steps from angles101 steps = DetermineSteps(old_x, old_y, horizontal,vertical, det_step);102 //determine direction from angles103 dir = DetermineSteps(old_x, old_y, horizontal, vertical, det_dir);104 105 old_x = horizontal;106 old_y = vertical;107 108 if (dir == 1)
-2-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
109 overall_steps += steps;110 else111 overall_steps -= steps;112 113 //move stepper motor114 StepperMotor(steps, dir);115 }116 }117 }118 119 /***************DELAY FUNCTIONS***************/120 121 void longDelay(){122 Delay1KTCYx(10);123 }124 void shortDelay(){125 Delay1KTCYx(1);126 }127 void superDelay(){128 Delay10KTCYx(255);129 }130 void stepperDelay(){131 Delay10KTCYx(3);132 }133 /********************END DELAYS***************/134 135 void PulseE() //Pulse E pin to write a command or data136 {137 shortDelay();138 E_PIN = 1;139 shortDelay();140 E_PIN = 0;141 shortDelay();142 }143 144 void InitializeLCD(void)145 {146 TRISC = 0x00; //make RS and E outputs147 TRISD = 0x00; //make data outputs148 PORTD = 0x00; //clear data port149 PORTC = 0x00; //clear RS and E pins150 151 longDelay();152 153 // DISPLAY ON154 RS_PIN = 0;155 PORTD = 0x0C; //display on, underline off, blink off (1100)156 PulseE();157 158 // FUNCTION SET159 PORTD = 0x38;160 PulseE();161 }162
-3-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
163 void ClearLCD(void) //clears LCD screen and sets display address164 {165 // CLEAR SCREEN166 RS_PIN = 0;167 PORTD = 0x01;168 PulseE();169 170 // SET ADDRESS171 PORTD = 0x80;172 PulseE();173 }174 175 void PrintLCD(char text[]) //output a string character by character176 {177 int i;178 for (i=0; text[i]!='\0'; i++)179 {180 if (i==16) // move to second line181 {182 RS_PIN = 0;183 PORTD = 0xC0;184 PulseE();185 }186 RS_PIN = 1;187 PORTD = text[i];188 PulseE();189 }190 191 }192 193 void SpecialPrintLCD(char text[], int linenum) //output a string character by character194 {195 int i;196 char space = ' ';197 198 RS_PIN = 0;199 if (linenum == 0) // move to spot on first line200 {201 PORTD = 0x8B;202 }203 if (linenum == 6) // move spot on second line204 {205 PORTD = 0xCB;206 }207 PulseE();208 for (i=0; i<5; i++)209 {210 if (text[i] == '\0')211 text[i] = ' ';212 RS_PIN = 1;213 PORTD = text[i];214 PulseE();215 }216 }
-4-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
217 218 void StepperMotor(int steps, int dir)219 {220 int i;221 if (dir == 1)222 {223 for(i=0;i<steps;i++) //forward224 {225 PORTB = 0x0C;226 stepperDelay();227 PORTB = 0x06;228 stepperDelay();229 PORTB = 0x03;230 stepperDelay();231 PORTB = 0x09;232 stepperDelay();233 }234 }235 else236 {237 for(i=0;i<steps;i++) //reverse238 {239 PORTB = 0x09;240 stepperDelay();241 PORTB = 0x03;242 stepperDelay();243 PORTB = 0x06;244 stepperDelay();245 PORTB = 0x0C;246 stepperDelay();247 }248 }249 }250 251 int CheckAD(int linenum){252 int voltage, current, power, string_len, string_len2, string_cnt;253 int tension, horizontal, vertical, reel;254 255 OpenADC( ADC_FOSC_32 &256 ADC_RIGHT_JUST &257 ADC_12_TAD,258 ADC_CH0 & //voltage259 ADC_CH1 & //current260 ADC_CH2 & //tension261 ADC_CH3 & //angle (hor)262 ADC_CH4 & //angle (vert)263 ADC_CH5 & //reel on/off264 ADC_CH6 & //string length265 ADC_CH7 & //string length 2266 ADC_VREFPLUS_VDD &267 ADC_VREFMINUS_VSS &268 ADC_INT_OFF, 7 );269 Delay1KTCYx( 1 ); // Delay for 50 T cycles270
-5-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
271 if (linenum == 0){272 //Read and compute power value//273 SetChanADC( ADC_CH0 );274 Delay10TCYx(5);275 ConvertADC( ); // Start conversion276 while( BusyADC ( ) ); // Wait for completion of ADC277 voltage = ReadADC( ); // Read voltage value 278 voltage = (voltage-512)/17;279 280 SetChanADC( ADC_CH1 );281 Delay10TCYx(5);282 ConvertADC(); // Start conversion283 while( BusyADC( ) ); // Wait for completion of ADC284 current = ReadADC( ); // Read current value285 current = (current-512)/17;286 //current = 7;287 288 CloseADC( );289 power = voltage * current;290 return power;291 }292 else if (linenum == 2){293 //Read tension sensor value//294 SetChanADC( ADC_CH2 );295 Delay10TCYx(5);296 ConvertADC(); // Start conversion297 while( BusyADC( ) ); // Wait for completion of ADC298 tension = ReadADC( ); // Read tension value299 CloseADC( );300 301 return tension;302 }303 else if (linenum == 3){304 //Read horizontal angle sensor values//305 SetChanADC( ADC_CH3 );306 Delay10TCYx(5);307 ConvertADC(); // Start conversion308 while( BusyADC( ) ); // Wait for completion of ADC309 horizontal = ReadADC( ); // Read horizontal angle value310 CloseADC( );311 return horizontal;312 }313 else if (linenum == 4){314 //Read vertical angle sensor values//315 SetChanADC( ADC_CH4 );316 Delay10TCYx(5);317 ConvertADC(); // Start conversion318 while( BusyADC( ) ); // Wait for completion of ADC319 vertical = ReadADC( ); // Read vertical angle value320 CloseADC( );321 return vertical;322 }323 else if (linenum == 5){324 //Read reel motor sensor values//
-6-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
325 SetChanADC( ADC_CH5 );326 Delay10TCYx(5);327 ConvertADC(); // Start conversion328 while( BusyADC( ) ); // Wait for completion of ADC329 reel = ReadADC( ); // Read reel motor value330 CloseADC( );331 332 if (reel < 700)333 reel = 0;334 else335 reel = 1;336 337 return reel;338 }339 else if (linenum == 6){340 //Read string length sensor value//341 SetChanADC( ADC_CH6 );342 Delay10TCYx(5);343 ConvertADC(); // Start conversion344 while( BusyADC( ) ); // Wait for completion of ADC345 string_len = ReadADC( ); // Read string length value346 347 SetChanADC( ADC_CH7 );348 Delay10TCYx(5);349 ConvertADC(); // Start conversion350 while( BusyADC( ) ); // Wait for completion of ADC351 string_len2 = ReadADC( ); // Read string length value352 CloseADC( );353 354 if (string_len > 900)355 string_cnt = 1;356 else if (string_len2 > 900)357 string_cnt = -1;358 else359 string_cnt = 0;360 return string_cnt;361 }362 }363 364 int DetermineSteps(int old_x, int old_y, int x, int y, int pref){365 int steps, dir;366 float slope;367 368 slope = (float)(old_y - y)/(old_x - x);369 370 if (y > 315 && y < 470){371 if (x > 340)372 {373 if (x > 435 || y > 425){ //right bottom corner374 steps = 30; // turn around375 dir = 0;376 //if (y > old_y && slope < 0){ //if moving to the right 377 // steps = 30;378 // dir = 1;
-7-
C:\Users\John\Desktop\Final Kite Code\KITE_CODE.c Wednesday, April 28, 2010 5:50 PM
379 //}380 }381 else{382 steps = 0;383 dir = 0;384 }385 }386 else{387 if(x < 203 || y > 425){ //left half circle388 steps = 30;389 dir = 1;390 //if (y > old_y && slope > 0){ //go right391 // steps = 30;392 // dir = 0;393 //}394 }395 else{396 steps = 0;397 dir = 0;398 }399 }400 }401 else{402 steps = 0;403 dir = 0;404 }405 406 if (pref == 1){407 408 return steps;409 }410 else{411 412 return dir;413 }414 }
-8-
33
Appendix F: 57BYGH207 Stepper Motor
34
Appendix G: ULN2003A – Stepper Motor Driver
August 2007 Rev. 6 1/14
14
ULN200xAULN200xD1
Seven darlington array
Features■ Seven darlingtons per package
■ Output current 500 mA per driver (600 mA peak)
■ Output voltage 50 V
■ Integrated suppression diodes for inductive loads
■ Outputs can be paralleled for higher current
■ TTL/CMOS/PMOS/DTL Compatible inputs
■ Inputs pinned opposite outputs to simplify layout
DescriptionThe ULN2001, ULN2002, ULN2003 and ULN 2004 are high voltage, high current darlington arrays each containing seven open collector darlington pairs with common emitters. Each channel rated at 500 mA and can withstand peak currents of 600 mA. Suppression diodes are included for inductive load driving and the inputs are pinned opposite the outputs to simplify board layout.
The versions interface to all common logic families:
– ULN2001 (general purpose, DTL, TTL, PMOS, CMOS)
– ULN2002 (14-25V PMOS)– ULN2003 (5V TTL, CMOS)– ULN2004 (6-15V CMOS, PMOS)
These versatile devices are useful for driving a wide range of loads including solenoids, relays DC motors, LED displays filament lamps, thermal printheads and high power buffers.
The ULN2001A/2002A/2003A and 2004A are supplied in 16 pin plastic DIP packages with a copper leadframe to reduce thermal resistance. They are available also in small outline package (SO-16) as ULN2001D1/2002D1/2003D1/ 2004D1.
DIP-16 SO-16(Narrow)
Table 1. Device summary
Order code
ULN2001A ULN2001D1013TR
ULN2002A ULN2002D1013TR
ULN2003A ULN2003D1013TR
ULN2004A ULN2004D1013TR
www.st.com
ULN200xA - ULN200xD1 Diagram
3/14
1 Diagram
Figure 1. Schematic diagram
ULN2001 (each driver) ULN2002 (each driver)
ULN2003 (each driver) ULN2004 (each driver)
Pin configuration ULN200xA - ULN200xD1
4/14
2 Pin configuration
Figure 2. Pin connections (top view)
ULN200xA - ULN200xD1 Maximum ratings
5/14
3 Maximum ratings
Table 2. Absolute maximum ratings
Symbol Parameter Value Unit
VO Output voltage 50 V
VI Input voltage (for ULN2002A/D - 2003A/D - 2004A/D) 30 V
IC Continuous collector current 500 mA
IB Continuous base current 25 mA
TA Operating ambient temperature range - 20 to 85 °C
TSTG Storage temperature range - 55 to 150 °C
TJ Junction temperature 150 °C
Table 3. Thermal data
Symbol Parameter DIP-16 SO-16 Unit
RthJA Thermal resistance junction-ambient, Max. 70 120 ° C/W
Electrical characteristics ULN200xA - ULN200xD1
6/14
4 Electrical characteristics
Table 4. Electrical characteristics(TA = 25°C unless otherwise specified).
Symbol Parameter Test condition Min. Typ. Max. Unit
ICEX Output leakage current
VCE = 50 V, (Figure 3.) 50
μA
TA = 70°C, VCE= 50 V (Figure 3.) 100
TA = 70°C for ULN2002, VCE= 50 V, VI = 6 V (Figure 4.)
500
TA = 70°C for ULN2002, VCE= 50 V, VI = 1V (Figure 4.)
500
VCE(SAT)Collector-emitter saturation voltage (Figure 5.)
IC = 100 mA, IB = 250 μA 0.9 1.1
VIC = 200 mA, IB= 350 μA 1.1 1.3
IC = 350 mA, IB= 500 μA 1.3 1.6
II(ON) Input current (Figure 6.)
for ULN2002, VI = 17 V 0.82 1.25
mAfor ULN2003, VI = 3.85 V 0.93 1.35
for ULN2004, VI = 5 V 0.35 0.5
VI = 12 V 1 1.45
II(OFF) Input current (Figure 7.) TA = 70°C, IC = 500 μA 50 65 μA
VI(ON) Input voltage (Figure 8.)
VCE= 2 V, for ULN2002IC = 300 mAfor ULN2003IC = 200 mAIC = 250 mAIC = 300 mAfor ULN2004IC = 125 mAIC = 200 mAIC = 275 mAIC = 350 mA
13
2.42.73
5678
V
hFEDC Forward current gain (Figure 5.)
for ULN2001, VCE = 2 V, IC = 350 mA
1000
CI Input capacitance 15 25 pF
tPLH Turn-on delay time 0.5 VI to 0.5 VO 0.25 1 μs
tPHL Turn-off delay time 0.5 VI to 0.5 VO 0.25 1 μs
IRClamp diode leakage current (Figure 9.)
VR = 50 V 50μA
TA = 70°C, VR = 50 V 100
VFClamp diode forward voltage (Figure 10.)
IF = 350 mA 1.7 2 V
35
Appendix H: 20TQ – 20A Schottky Rectifier
Document Number: 94167 For technical questions, contact: [email protected] www.vishay.comRevision: 05-Jun-08 1
Schottky Rectifier, 20 A
20TQ...PbF SeriesVishay High Power Products
FEATURES• 150 °C TJ operation
• Low forward voltage drop
• High frequency operation
• High purity, high temperature epoxyencapsulation for enhanced mechanicalstrength and moisture resistance
• Guard ring for enhanced ruggedness and long termreliability
• Lead (Pb)-free (“PbF” suffix)
• Designed and qualified for industrial level
DESCRIPTIONThe 20TQ...PbF Schottky rectifier series has been optimizedfor very low forward voltage drop, with moderate leakage.The proprietary barrier technology allows for reliableoperation up to 150 °C junction temperature. Typicalapplications are in switching power supplies, converters,freewheeling diodes, and reverse battery protection.
PRODUCT SUMMARYIF(AV) 20 A
VR 35 to 45 V
TO-220AC Anode
1 3
Cathode
Basecathode
2Available
Pb-free
RoHS*COMPLIANT
MAJOR RATINGS AND CHARACTERISTICSSYMBOL CHARACTERISTICS VALUES UNITS
IF(AV) Rectangular waveform 20 A
VRRM Range 35 to 45 V
IFSM tp = 5 μs sine 1800 A
VF 20 Apk, TJ = 125 °C 0.51 V
TJ Range - 55 to 150 °C
VOLTAGE RATINGSPARAMETER SYMBOL 20TQ035PbF 20TQ040PbF 20TQ045PbF UNITS
Maximum DC reverse voltage VR35 40 45 V
Maximum working peak reverse voltage VRWM
ABSOLUTE MAXIMUM RATINGSPARAMETER SYMBOL TEST CONDITIONS VALUES UNITS
Maximum average forward current See fig. 5
IF(AV) 50 % duty cycle at TC = 116 °C, rectangular waveform 20
AMaximum peak one cyclenon-repetitive surge currentSee fig. 7
IFSM
5 μs sine or 3 μs rect. pulse Following any rated load condition and with rated VRRM applied
1800
10 ms sine or 6 ms rect. pulse 400
Non-repetitive avalanche energy EAS TJ = 25 °C, IAS = 4 A, L = 3.4 mH 27 mJ
Repetitive avalanche current IARCurrent decaying linearly to zero in 1 μsFrequency limited by TJ maximum VA = 1.5 x VR typical
4 A
* Pb containing terminations are not RoHS compliant, exemptions may apply
www.vishay.com For technical questions, contact: [email protected] Document Number: 941672 Revision: 05-Jun-08
20TQ...PbF SeriesVishay High Power Products Schottky Rectifier, 20 A
Note(1) Pulse width < 300 μs, duty cycle < 2 %
ELECTRICAL SPECIFICATIONSPARAMETER SYMBOL TEST CONDITIONS VALUES UNITS
Maximum forward voltage drop
See fig. 1VFM
(1)
20 ATJ = 25 °C
0.57
V40 A 0.73
20 ATJ = 125 °C
0.51
40 A 0.67
Maximum reverse leakage curentSee fig. 2
IRM(1)
TJ = 25 °CVR = Rated VR
2.7mA
TJ = 125 °C 105
Maximum junction capacitance CT VR = 5 VDC, (test signal range 100 kHz to 1 MHz) 25 °C 1400 pF
Typical series inductance LS Measured lead to lead 5 mm from package body 8.0 nH
Maximum voltage rate of change dV/dt Rated VR 10 000 V/μs
THERMAL - MECHANICAL SPECIFICATIONSPARAMETER SYMBOL TEST CONDITIONS VALUES UNITS
Maximum junction andstorage temperature range
TJ, TStg - 55 to 150 °C
Maximum thermal resistance, junction to case
RthJC DC operation See fig. 4
1.50
°C/WTypical thermal resistance, case to heatsink
RthCS Mounting surface, smooth and greased 0.50
Approximate weight2 g
0.07 oz.
Mounting torqueminimum 6 (5) kgf ·�cm
(lbf ·�in)maximum 12 (10)
Marking device Case style TO-220AC
20TQ035
20TQ040
20TQ045
36
Appendix I: FlexiForce Resistive Force Sensor
Physical Properties
Thickness 0.008" (0.208 mm)Length 7.75" (197 mm),
optional trimmed lengths: 6” (152 mm), 4” (102 mm), or 2” (51mm)Width 0.55" (14 mm)Sensing Area 0.375" diameter (9.53 mm)Connector 3-pin Male Square Pin (center pin is inactive)Substrate Polyester (ex: Mylar)
Standard Force Ranges (as tested with circuit shown below)
0 - 1 lb. (4.4 N) 0 - 25 lb. (110 N) 0 - 100 lb. (440 N)*
In order to measure forces above 100 lb (up to 1000 lb), apply a lower drivevoltage and reduce the resistance of the feedback resistor (1kΩ min.)
Typical Performance
Linearity (Error) ±3% Line drawn from 0 to 50% loadRepeatability ±2.5% of full scale Conditioned sensor, 80% of full force appliedHysteresis < 4.5 % of full scale Conditioned sensor, 80% of full force appliedDrift < 5% per logarithmic time scale Constant load of 25 lb (111 N)Response Time < 5 μsec Impact load, output recorded on oscilloscope
Time required for the sensor to respond to an input forceOperating Temperature 15°F - 140°F (-9°C - 60°C)*Output Change/Degree F ±0.2%/ºF (0.36%/ºC)
*For loads less than 10 lbs, the operating temperature can be increased to 165°F (74°C)
FlexiForce®
A201 Standard Force & Load Sensors
Actual size of sensor
Sensing
area
Tekscan, Inc. 307 West First Street South Boston, MA 02127-1309 USA tel: 617.464.4500/800.248..3669 fax: 617.464.4266e-mail: [email protected] URL: www.tekscan.com
Rev H_040809
Recommended Circuit
Evaluation Conditions
37
Appendix J: Angle Sensor Preliminary Testing
Use of Potentiometers for Measuring Kite Location in Spherical Coordinates
Caleb Meeks 11/4/09
Abstract:
Potentiometers can be used to convert angular movement into useful electrical information thereby turning a regular potentiometer into an angle sensor. The feasibility of using potentiometers to measure angle was tested and conclusions were drawn based on the results.
List of Symbols:
Θ, Theta refers to the angle measured vertically from the x,z plane. Theta is used as a coordinate in spherical coordinate system.
Φ, Phi refers to the angle measured horizontally along the x,z plane. Phi is used as a coordinate in spherical coordinate system.
Introduction:
In order to use a kite in the Second Wind kite wind generator project it must be controlled by a computer to fly in such a way as to produce power. To control a kite its position and velocity vector must be known. In order to sense the position and velocity vector of the kite a potentiometer based sensor is proposed. This sensor would convert the resistance change in two potentiometers to find the Θ and Φ coordinates for use in knowing the kite’s location in spherical coordinates. The radius R is assumed to be the kit string length which is assumed to be known due to the constant nature of the string length or an assumed sensor measuring the string length.
Approach:
A test platform was constructed using two potentiometers, various lego parts, and two protractors such that the Θ and Φ angles of a single angle arm could be measured. This test platform is depicted in Figure 1 below.
Figure 1: Test platform
Samples of the Φ potentiometer’s resistances at the angles 0,10,20,30 on until 180 degrees were taken, recorded, and graphed. Similarly, samples of the Θ potentiometer were taken at angles 0,10,20,30 on until 110 degrees were taken, recorded, and graphed. Trend lines for each graph were made.
Using the equations generated by the trend lines a program was written in lab view to convert the measured resistance to an angle meter in lab view.
Results:
The resulting graphs are shown in Chart 1 and Chart 2 below.
The results of the program written in lab view for Phi are shown in Figure 2 and the results for Theta are in Figure 3 below.
Figure 2: Results for Theta
Figure 3: Results for Phi
Discussion:
From Charts 1 and 2 we can see that the resistance change with angle is in fact linear. This fact is confirmed by the angles indicated in the lab view program output seen in Figures 2 and 3. The angles read using the program were close if not identical to those observed on the test platform. The pros of this method of measuring the Θ and Φ are that it is relatively inexpensive and easy to construct. Possible cons of this method are that is it mechanically intensive (could have problems with dust, rust, etc), and that there could be a problem with drift depending on the quality of the potentiometer used.
Conclusion:
This is a very good potential method of measuring the angles of the kit strings provided dust, rust and drift are considered in the design.