Documente Academic
Documente Profesional
Documente Cultură
Authors
Aaron Stirk| Jenny Roohr | Hadeel Al Gallaf
Daniel Straub | Mathew Coaty | Enrique Barraza
2 Enclosure 3
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Dimensioning the Enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 80/20.net Enclosure Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3.1 Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3.2 Frame & Paneling Fastening Hardware . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.3 Window Paneling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.4 Wall Paneling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.5 Paneling Gasket - For all internally attached paneling. . . . . . . . . . . . . . . . . 11
2.4 Out-sourced Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.1 Fastening Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.2 Weather Strip - For all externally attached paneling . . . . . . . . . . . . . . . . . 14
2.5 Internal Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.1 Heater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.2 Filter Fan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5.3 Insulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.5.4 Moisture Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5.5 Electronics Enclosures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.6 Assembling the Enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.6.1 Frame and Paneling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.6.2 WidowX and Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3 Software 23
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Arduino and Arbotix-M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.3 Python and Raspberry Pi (RPi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.4 Data Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.5 Power Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.6 Add-on Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.7 Wiring and Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.7.1 Arbotix-M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.7.2 Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.8 Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.9 Installation: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.9.1 Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.9.2 Arbotix-M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.9.3 Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.10 Initiating Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5 Appendices 31
Page 1 of 60
A Local Providers 31
A.1 80/20 Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
A.2 Hardware Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
G Arduino Code 52
H Python Code 58
Page 2 of 60
1 Summary
This document contains a description and user manual regarding the Fall 2018-Spring 2019 Senior Design
project in collaboration with Siemens Gamesa Renewable Energy to develop a camera inspection device
that can remotely "scan" the blades of a wind turbine. The device will sit at the base of the tower, and
when called upon remotely, the device will start to snap sequential photos of the blades that will then be
transmitted and processed by Siemens’ software algorithm. The internals of the device include a DSLR
camera, two servo motors, a Raspberry Pi, and microcontroller. This document goes into detail of what
type of hardware is used, how it interfaces together, and the software and code that controls the devices.
Additionally, it will cover the breakdown, setup, and details of the protective enclosure which contains
the electronics.
First, the breakdown of the 80/20 Extruded Aluminum hardware will be covered from how to purchase
the material, assemble, and maintain the enclosure. The Software portion of the project will then be
explained along with documentation of each of the components covering where to get them, sample code,
and other information.
2 Enclosure
2.1 Overview
The enclosure for the automated wind turbine inspection device is fabricated to appease the following
design requirements:
1. Cost-Effective - Be competitive with third-party inspection techniques
2. Durable - Be able to survive impacts from golf-ball sized hail and ice, achieving a 25-year lifetime
comparable to the wind turbines themselves
3. Maintain Picture Quality - Despite rain and debris, allow for the camera to continue taking quality
pictures of the blades
4. Weatherproof - Be applicable on both onshore and offshore wind turbines, keeping the electronics
inside dry and within their operating temperatures
5. Ability for Serial Production - Have the enclosure be as "off-the-shelf" as possible, minimizing
manufacturing time and effort needed by Siemens Gamesa
The enclosure is to be mounted approximately 2-3 meters from the ground on the base of the wind
turbine, with the blades in reverse rabbit-ear position above it and the enclosure directly beneath the
hub. The enclosure is mounted to the wind turbine base via magnets.
Page 3 of 60
2.2 Dimensioning the Enclosure
The current enclosure is dimensioned to be as universally applicable as possible while operating within
the restrictions of the camera, the Sony Cybershot DSC-RX10 III. The camera can take pictures that
adhere to the metadata requirement of 1 pixel per mm up to 80 meters away. Due to this, the enclosure
is applicable on all wind turbines 85m or shorter, regardless of blade length or tower base diameter.
To modify the case to work with taller towers, a spread sheet has been created to allow for quick and
easy generation of enclosure dimensions. Simply input tower height, blade length, base diameter, and
the normal distance from the center of the tower to the tip of the blade. The spreadsheet will give you
the necessary dimensions to order the enclosure for taller wind turbines.
2.3.1 Frame
1.00" X 1.00" T-Slotted Profile - Four Open T-Slots. P.N: 1010
https://8020.net/1010.html
Description: 1010 is a 1.00” x 1.00” fractional 10 series square T-slot profile with four open T-slots,
one on each 1.00” face. The profile has align-a-grooves to assist in aligning connecting profiles. The
1010 profile is compatible with all 10 series fasteners. This profile lends itself to machine guards, sound
enclosures, work benches, panel mount racks and displays. The four open T-slots enable access from any
direction and are useful for mounting accessories.
To order the frame from 80/20, simply send them or Fiero Fluid (Appendix A) the CAD assembly of
the frame. All CAD files for any length of frame can be downloaded off of 8020.net. Make sure to let
Page 4 of 60
them know about the counterbore holes in the peak of the frame, the BOM for which can be found in
Appendix D.
(a) Isometric View of T-Slotted Frame (b) Drawing of 10 series T-Slotted Frame
Page 5 of 60
Table 2: 80/20 T-Slot Profile Price Breakdown
Price p/ inch $0.23
Price p/ cut $1.95
Price p/ miter cut $2.80
Price p/ rib counterbore $2.25
Price p/ peak counterbore $7.15
Table 4: Associated URLS for Purchasing 80/20 Fastening Hardware and Assembly Use
P.N. Use url
3395 Internal ribs to frame https://8020.net/3395.html
3691 Counterbore hole at peak https://8020.net/3691.html
3656 Counterbore hole at peak https://8020.net/3656.html
3658 Counterbore hole at peak https://8020.net/3658.html
4081 90°frame attachment https://8020.net/4081.html
4143 30°frame attachment https://8020.net/4143.html
3321* Panel & frame attachment https://8020.net/3321.html
2414* Magnet Attachment https://8020.net/2414.html
3342* Magnet Attachment https://8020.net/3342.html
https://8020.net/2642.html
Description: AR polycarbonate panels are a durable option that provides high optical clarity and impact
resistance. It is more abrasion and UV resistant than polycarbonate panels and stable up to 240 degrees
Fahrenheit, making it ideal for both indoor and outdoor applications. AR polycarbonate is commonly
used in enclosures and safety applications in high-traffic areas. All CAD drawings and 80/20 quotes can
be found in Appendices C and D.
Page 6 of 60
(a) Picture from CAD Exploded View (b) Picture from of AR Polycarbonate window on enclo-
sure prototype
Page 7 of 60
Figure 6: The chemical component applied to the miter-cut edges of the polycarbonate panels to bond
them into one window.
Figure 7: The first step is to attach the panels to the frame as they will be in actuality. Tape them
tightly together.
Page 8 of 60
Figure 8: The panels will be held together by the frame and the applied tape
Figure 9: The Dicholoromethane is applied with a syringe inbetween the panels. Be sure that the
chemical gets inbetween the panels. Excess chemical can be wiped away. It is then left to dry for a
minimum of one hour. This completes the bonding process
Page 9 of 60
2.3.4 Wall Paneling
PVC Paneling - .187" Thick, Smooth, Black. P.N. 2660-S
https://8020.net/2660-s.html
Description: Polyvinyl Chloride (PVC) Acrylic panels are impact and chemical resistant with an option
for either a smooth finish or a texture on one side which hides scratches and marks. It is stable up to
160 degrees Fahrenheit and is available in black or yellow. PVC Acrylic is commonly used in exhibits,
displays, signs, and fixtures. All CAD drawings to be sent to 80/20 can be found in Appendix C.
(a) Picture from CAD Exploded View (b) PVC paneling on enclosure prototype
• Purchase any white latex-based paint from local providers (Appendix A).
• Use a roller to apply paint
Page 10 of 60
2.3.5 Paneling Gasket - For all internally attached paneling.
10 Series Economy Panel Gasket. P.N. 2177
https://8020.net/2177.html
To be used on all panels that are inserted into the t-slot frame.
Description: Economy panel gasket is available in either a black thermoplastic elastomer or gray silicone
rubber. It recesses in a T-slot to secure plastic panels, plates, and mesh and is easily inserted after a
panel has been placed in the T-slot. The economy panel gasket can be ordered by the foot (meter) or in
150 foot (45.7 meter) rolls. Tip: Cut ends at a 45 degree angle for corner connections to avoid overlap
or crashing.
Page 11 of 60
Series 10 Series
Material Silicone Rubber
Process Extruded
Finish Gloss
Color Gray
Length per foot
Weight 0.0160 lbs
36 feet of gasket is enough to seal the outside edge of all panels that are attached inside the t-slotted
frame. Only one cut is necessary for this.
2. Insert the gasket into the specified location, externally inbetween the panel and the t-slot. Wedge
it in tightly.
(Reference Figure 11b)
3. Cut off excess gasket at a 45°angle with the corner.
WidowX Attachment: The WidowX is attached to the mounting plate via the four holes on the top
deck as seen in Figure 13. The bottom deck can be put aside. It will not be used for our applications.
Page 12 of 60
Figure 13: The arrow points to the holes that will be used to attach the WidowX to the mounting plate.
The holes are sized for #6-32 screws.
All necessary hardware for WidowX attachment can be purchased from a local provider as described
in Appendix A.
Rubber Washers: Silicone Rubber Washers will be used for all external panel attachment as well as
WidowX attachment.
https://www.mcmaster.com/99604a115
Silicone:
Silicone can be purchased from a local provider as described in Appendix A or via the provided link.
https://www.homedepot.com/p/GE-All-Purpose-Silicone-1-10-1-oz-Clear-Window-and-Door-Cau
100091111
Page 13 of 60
Figure 14: Silicone is used to maintain weatherproof integrity by being applied to all gaps after assembly
is completed.
https://dsi-dortite.com/dortite-sponges/
Description: Original Dortite® Sponges, made in the United States, are constructed of natural open-cell
sponge rubber, combined with a non-stretch backing and a very aggressive rubber-based adhesive. It
can be purchased from a local provider as described in Appendix A or via the link provided.
Figure 15: The Dortite® weather strip being used between the interface of the frame and the polycar-
bonate window
Page 14 of 60
Table 17: Weather Strip Purchasing Information
Name Description Quantity Price
Dortite® Sponge 50 ft. roll 1 $12.50
Description: When outdoor cabinets and enclosures are exposed to cold temperatures the electronics and
mechanical systems inside will take on moisture resulting in degredation and failure. Tutco-Farnam’s
silicone rubber enclosure heaters solve these problems with rapid heat-up and excellent heat transfer.
These durable products are thin, small and a breeze to install. They come with lead wires and thermal
control options.
The heater is equipped by Tutco-Farnam with an inline STAT1525 thermostat that allows the heater
to only operate when the enclosure temperature is between 32°F - 50°F.
Page 15 of 60
(a) Picture from Exploded CAD View (b) Heater placement in enclosure prototype
Application: The heater is attached to the inside of the side panel facing opposite the side panel with
the fan cut-outs. It is attach to the inside of the upper t-slot frame via metal silicone. Reference Figure
16b for placement.
Page 16 of 60
2.5.2 Filter Fan
Automation Direct’s Stego Filer Fan. P.N. 018210-02
https://www.automationdirect.com/adc/shopping/catalog/enclosures_-z-_
subpanels_-z-_thermal_management_-z-_lighting/enclosure_thermal_management/
filter_fans/018210-02
Description: Filter fans and grilles work together to displace hot air inside the enclosure with cooler air
from the outside. The incoming air is filtered to protect components inside the enclosure. Filter fans
are available in various DC and AC voltage ratings, in a range of airflow options. Matching grilles are
available for fans, as well as various filter grades for fans and grilles.
(a) Picture from Exploded CAD View (b) Fan mounted in enclosure prototype
All Stego Filter Fans should be ordered with a Dual Adjustable Thermostat for temperature control:
Page 17 of 60
Automation Direct’s Stego Dual Adjustable Thermostat. P.N. 011720-01
https://www.automationdirect.com/adc/shopping/catalog/enclosures_-z-_
subpanels_-z-_thermal_management_-z-_lighting/enclosure_thermal_management/
thermostats_-a-_hygrostats/011720-01
Description: Thermostats are used to regulate temperature and humidity inside an enclosure. Electronic
and mechanical models are available, with this model having adjustable setpoints to fit a wide range of
applications.
Table 23: Stego Filter Fan and Dual Adjustable Thermostat Price Breakdown*
Enclosure Fan Assembly $125
Dual Adjustable Thermostat $30.50
*When ordering the fan and thermostat from Automation Direct, be sure to order it with a 3 prong
plug from manufacturer.
Application: Assembly and application instructions are provided from the manufacturer.
2.5.3 Insulation
The insulation is R-3 square edge rigid foam board insulation sheathing and can be purchased from a
local provider as described in Appendix A or via the provided link.
Page 18 of 60
Name Description Quantity Price
Owens Corning Foamular 1/2 in. x 4 ft. x 8 ft. 1 $14.90
https://www.homedepot.com/p/Owens-Corning-FOAMULAR-1-2-in-x-4-ft-x-8-ft-R-3-Square-Edge
100320356
Insulation will be cut to size and applied to the interior of the front and back panels.
https://dryndry.com/collections/silica-gel-desiccant/products/
copy-of-20-gram-aiwa-orange-indicating-packets-choose-size-quantity
Description: Premium quality, pure and safe silica gel without cobalt chloride. Each packet contains a
mixture of white silica gel beads and some orange indicating beads. Orange beads indicates the packet
is dry, dark green indicates the packet is saturated. Each packet is rechargable: after saturation the
packet can be dried and re-used. Packets are of special thickness and stored in resealable self-standing
high quality bags for easy storage and use. Each bad is sealed and sturdy for moisture control.
(a) Dry & Dry Silica Gel Packets with Indictors (b) Silica utilized in enclosure prototype. Can be placed
or hung anywhere.
Table 25: Dry & Dry Silica Gel Packets Price Breakdown*
Bulk Quantity Price
6 $9.99
15 $14.99
30 $24.99
130 $89.99
400 $179.99
*Free Shipping
Page 19 of 60
2.5.5 Electronics Enclosures
The following electronics enclosures are used to store the 1. Raspberry Pi, PiJuiceHat, battery, and 2.
Arbotix-m microcontroller. They can both be purchased off of amazon. Holes will need to be drilled to
allow wiring into the enclosures, which will be specified in Assembly. Both enclosures are made of ABS
plastic.
Figure 20: Internal components inside the enclosure prototype: Filter fan and keys, thermostat, silicone
rubber enclosure heater, WidowX, Arbotix-m microcontroller and it’s enclosure, raspberry pi and it’s
enclosures, power strip.
Page 20 of 60
2.6 Assembling the Enclosure
2.6.1 Frame and Paneling
1. Sort frame pieces into categories of length. See cut list for appropriate size. Tape measure needed
at this point since many pieces are similar sizes.
2. The most important thing to think about before assembling is sliding the appropriate amount of
t-nuts into the frame before locking them in with the L-bracket. See CAD model to determine
appropriate number of t-nuts for each 8020 aluminium extrusion.
3. Slide appropriate numbers of t-nuts, and begin by assembling the bottom part of the frame. To
lock in the L-brackets, slide 5 t-nuts into each L-bracket and then partially tighten each bolt into
the t-nuts. Lock in each bolt with a medium torque setting on a drill when the position is adequate.
4. When assembling the peak roof, use the screws attached to lock together the 120 degree angle
brackets. Tighten these as much as possible. Ensure that the aluminium lines up.
5. Slide the paneling into the frame before attaching the very top pieces of the ’cube’. The gaskets
can be put in later so do not worry about that at this point.
6. Once the cube of the frame is assembled, the 60 degree angle brackets should be attached. This
is where it was appropriate to ensure that the perfect number of t-nuts were already placed in the
t-slot frame track. Attach the 120 degree peak roof to the cube frame, and tighten all 4 bolts on
the bracket.
7. The polycarbonate should be bonded already. Before attaching the polycarbonate, add the Dor-
tite® weather gasketing to the top of the frame. The polycarbonate will push this down when
bolted and create a weatherproof seal. Attach the polycarbonate to the top of the peak roof. Make
sure to add the weatherproofing washers before bolting the polycarbonate. The easiest way to do
this part is putting the t-nuts horizontal to the ground so that gravity does not slide them around.
8. Next, attach the ribs to the mounting plate. The t-nuts will attach to the round anchor points that
pull the ribs to the outside frame. After, attach the mounting plate to the ribs. Place the t-nuts
in the appropriate position and then place the mounting plate on top of the ribs. Screw the bolts
into the t-nuts and tighten them down with a medium torque setting on the drill.
9. Attach the magnet attachments to the four corners that will be on the turbine side. These are easy
to attach, simply bolt the bracket to the t-nuts through the L-bracket. The smaller Allen screw
will be used for the bolt closest to the turbine so that it can be tightened. The brackets should be
flush with the edge of the case.
10. All edges of the access door panel shall be lined with Dortite® sponge to create the seal when the
door is screwed onto the front panel.
11. The bottom panel is the last part of the assembly. The Dortite® sponge shall be added to the
bottom of the frame and then the bottom panel presses it down to create a weatherproof seal.
Follow the instructions below as well as the assembly guide provided by Trossen Robotics via the url
below:
Before fastening the FR07-H101K Hinge Frame to the upper (pan) servo, and the pan servo to the
lower (yaw) servo, the motors need to be set to the correct location. From the Arduino IDE, set the yaw
motor to 420 (SetPosition(yawID,420)) and the pan servo to 1500 (SetPosition(panID,1500))
Page 21 of 60
to ensure the motor can pan both clockwise and counter clockwise. If the motor is not set correctly, the
hinge frame on the pan servo may swing into the base of the motor. Setting this "home" position in the
middle of the 180 degree turn allows the motor to move both clockwise and counterclockwise.
https://learn.trossenrobotics.com/projects/175-widowx-robot-turret-assembly-guide.
html*
*Remember, There is no need to use the bottom deck nor the mounting plate.
1. The Sony Cybershot DSC-RX10 III has a mounting hole that is utilized here
2. If you are looking straight at the WidowX, the lense of the camera should be facing left
3. Using a 1/4-20 x 0.500" hex head screw, mount the camera to the FR07-H101K Hinge Frame of
the WidowX
Figure 21: The camera should be mounted onto the WidowX so it’s initial position is as shown.
Page 22 of 60
3 Software
(a) This shows a front view of the turbine with the la-
beled dimensions needed for the software. (b) This shows a side view of the turbine with the labeled
dimensions needed for the software.
Table 27: This table shows example tower parameters of the SWT-2.3-108T80.0 configuration (Boulder
turbine) that are inputted at the start of the code
Parameter Dimension
Tower Height 80 m
Blade Length 53 m
Tower Base Diameter 4.5 m
Prebend Distance 2m
Distance from Tip to Center 16.7 m
3.1 Overview
The project uses a Sony Cybershot DSC-RX10 III camera, the Trossen Robotics WidowX Robo Turret
kit with two Dynamixel MX28T servo motors, and a Raspberry Pi 3 B+. The software architecture relies
on two main hardware components: the Raspberry Pi (RPi) and the Arbotix-M microcontroller. The
RPi is the brains of the architecture, and is used to initiate the inspection process as well as interface
with the camera. The Arbotix is used to innterface with the servo motors and is Arduino compatible.
The add-on hardware components that require some minimal software that offer robustness to the system
will also be covered.
The high-level breakdown of the software is as such: inspection is remotely activated through the
RPi and prompts the user for inputs, RPi sends an initiation signal and tower parameters to the Arbotix
which runs the calculations and actuates the servo, RPi takes photo and saves to its SD card; photos are
then sent to the server via SFTP. Refer to Figure 23 for a flow diagram of the software architecture.
Page 23 of 60
Figure 23: Software overview flowchart
Page 24 of 60
The Arbotix is programmed through the Arduino IDE. It is responsible for running the calculations
needed to set up an array of step values to send to the servo motors. The two servo motors offer the two
degrees of freedom: pan and yaw. The pan motion allows the camera to "scan" the blade and the yaw
motion "tilts" the camera away from the tower in the normal direction.
The goal of the Arbotix is to set up two arrays for the pan and yaw positions. The code requires
five inputs: tower height, blade length, tower diameter, prebend distance, and distance from the vertical
centerline of the tower to the tip of the blade in the normal direction. With these parameters, all
calculations are ran, and the arrays are set up and can be sent to the servo motors. After each change in
position, the RPi will take a photo, and will continue back and forth until the entire length of the blade
has been photographed (defined mathetmatically).
The RPi is essentially an inexpensive computer that has an ethernet port, several USB ports, and WiFi
capabilities. It can support Python programming, which is used to run the "master" script for this
project.
The Python script will ask the user for the five inputs, and listen for feedback from the Arbotix as
to when to take the photo.
Page 25 of 60
does not have a power switch, so if it shuts off, it will need to be physically unplugged and plugged back
in (this could possibly be remedied by a power switch circuit).
The PiJuice Hat can put the RPi to "sleep" and idle the RPi’s power consumption. In addition, it
has the ability to hook a LiPo battery (12000 mAh) to the RPi incase the turbine power goes offline,
keeping the RPi powered. The PiJuice Hat can also be hooked into a 40W solar panel which in turn can
power the LiPo battery, or power the RPi.
The Arbotix-M has three connections that need to be made: 5V FTDI Cable, 12V SMPS power supply,
and the 3-pin Dynamixel Port. The FTDI is used for data communication between the RPi and Arbotix-
M. It is important to have the FTDI in the correct orientation (Refer to Figure 27).
The 12V SMPS power supply plugs into the DC Black Barrel Jack. The 3-pin servo connection gives
power and signals the servo motors. There are three identical 3-pin terminals on the Arbotix board.
Plug the one cable from the servo into one of these ports.
Page 26 of 60
3.7.2 Raspberry Pi
Four cables are connected to the RPi: the 5V power cable, the USB from the camera, the USB from
the FTDI cable, and the Ethernet cable. The power cable plugs into the "PWR IN" port in the bottom
left corner of Figure 28. The two USB cables plug into two of the four available USB ports (upper right
corner of Figure 28). The Ethernet cable plugs into the Ethernet switch on the bottom right corner of
Figure 28.
3.8 Camera
Two connections need to be made on the camera: the battery power adapter and the microUSB for
remote capture. The microUSB (connects camera to RPi) plugs into the appropriate port on the left
hand side of camera. The power cable plugs in like a normal battery. Make sure that the battery is
situated correctly as it can be put in the wrong way. There is a blue clip that must be flush with the
battery (you will hear a click). Refer to Figures 29 and 30 for help.
Figure 29: Location where to plug battery adapter cable into camera
Page 27 of 60
Figure 30: Location where to plug the USB into camera
3.9.2 Arbotix-M
1. To program the Arbotix-M from the Arduino IDE, the correct version of the IDE needs to be
downloaded from the Arduino website. The packages and FTDI drivers also need to be downloaded.
Follow the guide listed on Trossen Robotics website
2. The Arduino code needs to be uploaded from the Arduino IDE on the computer to the board using
the FTDI cable.
3. Once the Arduino IDE confirms "Upload Complete", the Arbotix is ready.
3.9.3 Raspberry Pi
1. Raspbian needs to be installed on the RPi which can be done through installing NOOBS. This will
require an HDMI cable, monitor, keyboard (mouse can be helpful, but not necessary)
2. SSH needs to be enabled on the RPi through the raspi-config settings to enable the data transmis-
sion
3. There are also some other packages and libraries that will be nice to have. Refer to Useful Resources:
Software>Setting up RPi
Page 28 of 60
4. The gphoto2 package needs to be installed. Refer to the Useful Resources: Software>gphoto2
Library links to install the appropriate packages.
• https://pythonprogramming.net/introduction-raspberry-pi-tutorials/
Page 29 of 60
• Setting up the Arduino IDE for Arbotix-M Programming:
https://learn.trossenrobotics.com/projects/182-arbotix-getting-started-guide-arduin
html
• Servo Commands and How To with Arbotix:
http://biorobots.case.edu/wp-content/uploads/2014/12/IntroductiontoDynamixelMotorCon
pdf
• General Information:
https://learn.pi-supply.com/make/pijuice-quick-start-guide-faq/#software-installati
• PiJuice Software Walkthroughs:
https://github.com/PiSupply/PiJuice/blob/master/Software/README.md
Page 30 of 60
5 Appendices
A Local Providers
A.1 80/20 Provider
Fiero Fluid Power, inc.
5280 Ward Rd, Arvada, CO 80002
(303) 431-3600
Page 31 of 60
B.2 Pan & Tilt Device
Page 32 of 60
B.4 Heater
B.5 Fan
Page 33 of 60
C CAD Drawings for 80/20
Page 34 of 60
Figure 8A: PVC Front Panel Drawing. Quantity: 1.
Page 35 of 60
Figure 10A: PVC Mounting Panel Drawing. Quantity: 1.
Page 36 of 60
Figure 12A: PVC Side Panel for Fan Installation Drawing. Quantity: 1.
Page 37 of 60
Figure 14A: PVC Peak Panel Drawing. Quantity: 2.
Page 38 of 60
D Pricing Quotes, Drawings, and BOM from 80/20
D.1 Hardware & Frame
Figure 15A: BOM & Pricing for all 80/20 Framing, Fastening Hardware, and Gaskets.
Page 39 of 60
D.2 Paneling
Lead time on all paneling is 9-13 days without shipping.
Page 40 of 60
Figure 17A: AR Polycarbonate Panel Quote. Quantity: 2.
Page 41 of 60
Figure 18A: Panel Access Door Quote. Quantity: 1.
Page 42 of 60
Figure 19A: PVC Front Panel Quote. Quantity: 1.
Page 43 of 60
Figure 20A: PVC Back Panel Quote. Quantity: 1.
Page 44 of 60
Figure 21A: PVC Mounting Panel Quote. Quantity: 1.
Page 45 of 60
Figure 22A: PVC Side Panel Quote. Quantity: 1.
Page 46 of 60
Figure 23A: PVC Side Panel for Fan Installation Quote. Quantity: 1.
Page 47 of 60
Figure 24A: PVC Base Panel Quote. Quantity: 1.
Page 48 of 60
Figure 25A: PVC Peak Panel Quote. Quantity: 2.
Page 49 of 60
E AR Polycarbonate Spec Sheets
Page 50 of 60
Figure 27A: Page 2 of AR Poylcarbonate Spec Sheet.
Spec Sheet is from local plastic provider. AR Polycarbonate specs are the same for 80/20 AR Polycar-
bonate
Page 51 of 60
F Tutco-Farnam Quote for Heater & Attachments
Figure 28A: Pricing quote from Tutco-Farnam for silicone rubber enclosure heater.
G Arduino Code
1 #include <ax12.h>
2 #include <BioloidController.h>
3 #include <stdlib.h>
4 #include <math.h>
5
6 // Dynamixel servo stuff
7 BioloidController bioloid = BioloidController(1000000);
8
9
10 // ...
-------------------------------------------------------------------------------
11 // For pan, if number increases, turns counter-clockwise, if decreases, CW
12 // pan "home" position is 600
13 // For yaw, if number increases turn counter-clockwise, if decreases CW ...
(looking from top)
14 // yaw "home" is 420
15
Page 52 of 60
16 // For YAW, mapping is as follows (numbers are which way lens is ...
pointing, from top view):
17
18 // TURBINE
19 // 4096 (0) 3072
20
21 // 420(home) center
22
23 // 1023 2048
24 // ACCESS DOOR
25
26 // For PAN, mapping is as follows (numbers are which way lens is ...
pointing, viewing from access door):
27
28 // 1500 (up)
29 // 2500 (home,left)
30 // ...
-------------------------------------------------------------------------------
31
32
33
34 // Initial Variables for setup()
35 int pan = 2; // Pan servo ID
36 int yaw = 1; // Yaw servo ID
37 int yawHomePos = 600;
38 int panHomePos = 2500;
39 float towerHeight;
40 float BL;
41 float towerDiam ; // Tower Diameter
42 float prebendDist; // distance out in normal direction from blade ...
centerline
43 float distCTO;
44 boolean checkInput[5] = {0,0,0,0,0}; // If Arbotix has received ...
parameter from RPi
45 float inputs[5];
46 boolean checkRcvData = 0;
47 int jj = 0;
48
49 void setup(){
50 Serial.begin(9600);
51 delay(50);
52 SetPosition(pan,panHomePos); // Points camera straight up towards hub
53 SetPosition(yaw,yawHomePos); // Turns camera to center position
54 delay(100);
55
56 Serial.println("Input turbine parameters: ");
57 while((jj < 5) && checkRcvData == 0){ // If values have not been ...
inputted, get them now
58 while(int(inputs[jj]) == 0){ // While the value is still empty, keep ...
reading
59 inputs[jj] = Serial.parseFloat();
60 delay(50);
Page 53 of 60
61 }
62 Serial.print("Arbotix received a value of: \t");
63 Serial.println(inputs[jj]);
64 jj++;
65 }
66
67 Serial.println("Received all the values");
68 towerHeight = inputs[0];
69 BL = inputs[1];
70 towerDiam = inputs[2];
71 prebendDist = inputs[3];
72 distCTO = inputs[4];
73
74 checkRcvData = 1; // Start inspection
75 }
76
77 // Counters and Conditionals
78 int count = 1; // Count how many times goes through panAngle loop, ...
this is number of photos needed
79 boolean checkInsp = 0; // Don't want test to keep running over and ...
over, stop after scanning left and right
80 boolean ranCalc = 0; // Check if calculations have been ran for ...
panAngle and yawStep
81 int initRcvd = 0; // For reading data from Pi
82 boolean checkReady = 0; // Check if arbotix is ready for inspection
83
84 // ...
-------------------------------------------------------------------------------------
85 // ...
-------------------------------------------------------------------------------------
86 void loop(){
87 // ...
=================================================================================
88 // Const Variables
89 float pi = 3.14159;
90 float overlap = 0.25;
91 float rootBladeAngle = pi/3;
92 float sensorSize = 0.00889; // Sensor Size of camera
93 float FL = 0.206; // Focal length of camera
94 float mountHeight = 2; // Mounting height of device
95
96 // Calculate initial constants
97 float totHorizDist = BL * sin(rootBladeAngle); // Total horiz dist ...
from tower to tip
98 float totHeight = BL * cos(rootBladeAngle); // Height from tip to hub
99 float maxAngle = atan(totHorizDist / (towerHeight - totHeight)); // ...
Max pan angled
100 float distCamRoot = towerHeight - mountHeight; // Distance from ...
device to Root (H2C)
101 float distCenterTip = totHorizDist - towerDiam/2; // Distance from ...
tower wall to tip [m] =
Page 54 of 60
102 float WD1 = (sqrt( pow(totHorizDist,2) + pow(totHeight,2) )); // ...
Working distance f(SS)
103 float WD [] = {WD1};
104 float maxYaw = atan( (distCTO - (towerDiam/2) + prebendDist) / ...
totHorizDist) * float(180/pi); // Max yaw angle
105
106 // Initialize Variables
107 float FOV = 0; // Field of View
108 float sumFOV = 0; // Sum of Field of Views
109 float panAngle[30]; // pan angle array, initialize with max angle
110 float tempPan[30];
111 int yawAngleParam[30]; // map degree to [0,4096]
112 int panAngleParam[30]; // map degree to [0,2048]
113 float newHorizDist = totHorizDist; // new horiz dist after scanning ...
blade (similar to totHorizDist)
114 float newHeight; // new height from tip to hub after scanning blade ...
(similar to totHeight)
115 float numPhoto; // count how many photos
116 float yawStep; // yaw angle step size
117 float yawAngle; // current yaw angle
118
119 // This is read by RPi, and is exactly 54 char long, if change, ...
change the 54 on python side
120 if(checkRcvData == 1){ // If Arbotix has received all the input data ...
from Pi
121 if(checkReady == 0){
122 Serial.println("Arbotix is waiting on input to initialize ...
inspection");
123 checkReady = 1;
124 }
125 delay(500);
126 // ...
================================================================================
127
128
129 // Get value from RPi to initialize inspection
130 while(Serial.available() > 0){ // Check if inspection has been ...
called by getting a value from RPi
131 initRcvd = Serial.read();
132 //Serial.print(initRcvd);
133 delay(50);
134 }
135 delay(500);
136
137 // Start inspection
138 // ...
===============================================================================
139 if(initRcvd != 0){ // If the initiation input has been received
140 Serial.println("Inspection has been initialized.");
141 while(ranCalc == 0){// if panAngle and yawStep calculations have ...
not been ran
142
Page 55 of 60
143 // Build Pan Angle Array (values change as FOV and FL change)
144 Serial.println("Running calculations...");
145 while(BL-FOV*overlap - sumFOV*(1-overlap) > 0){ // The value ...
in parentheses is how much of the blade has been scanned
146 newHorizDist = (BL-sumFOV*(1-overlap))*sin(rootBladeAngle);
147 newHeight = sqrt( pow( (BL-sumFOV*(1-overlap)),2) - ...
pow(newHorizDist,2) );
148 WD[count] = sqrt( pow(newHorizDist,2) + pow( (distCamRoot - ...
newHeight),2) );
149 FOV = (sensorSize*WD[count]) / FL;
150 sumFOV = sumFOV + FOV;
151 panAngle[count-1] = ...
atan(float(newHorizDist)/float((distCamRoot - ...
newHeight))) * float(180/pi);
152 tempPan[count-1] = panAngle[count-1];
153 count++;
154 }
155
156 numPhoto = count-1; // count number of photos, -1 to account for ...
last count++
157
158 // THIS WILL NEED TO BE CHANGED IF YAW STEP IS TOO BIG
159 yawStep = float( maxYaw / numPhoto ); // Calculate Yaw angle ...
[param]
160
161 ranCalc = 1; // don't need to run calculations again
162 Serial.println("Calculations finished.\n");
163 Serial.println("Arbotix needs an input to start inspection ...
process");
164 delay(50);
165 }
166
167 // Actuate Servos
168 // ...
---------------------------------------------------------------------------------
169 Serial.println("The camera is starting the pan and scan process\n");
170 // Scan LEFT BLADE (facing turbine)
171 // ...
_________________________________________________________________________
172 Serial.println("Scanning the left blade...");
173 Serial.println("-----------------------");
174 yawAngle = maxYaw; // Starting point for camera
175
176
177
178 for(int ii=0; ii<numPhoto; ii++){
179 Serial.print("Photo number: ");
180 Serial.println(ii+1);
181
182 // Actuate PAN servo
183 panAngleParam[ii] = int( panHomePos - ((2048/180) * (90 - ...
tempPan[ii]) ));
Page 56 of 60
184 Serial.print("The pan angle is: ");
185 Serial.print(panAngleParam[ii]); // Print to screen the current ...
pan angle [deg]
186 Serial.print('\t');
187 SetPosition(pan,panAngleParam[ii]); // change position of pan ...
servo
188
189 // Actuate YAW servo
190 yawAngleParam[ii] = int(yawAngle * 4096/360) + yawHomePos;
191 SetPosition(yaw,yawAngleParam[ii]); // change position of yaw ...
servo
192 yawAngle = yawAngle - yawStep;
193 Serial.print("The yaw angle is: ");
194 Serial.println(yawAngleParam[ii]); // print to screen the ...
current yaw angle [deg]
195 delay(4000); // Waits for camera to stop oscillating
196 Serial.println(1); // Let RPi know that servos have moved so it ...
can take photo
197 delay(2000); // Wait for Pi to download photo
198 }
199
200
201 // Scan the RIGHT BLADE (when facting turbine)
202 // ...
_________________________________________________________________________
203 Serial.println("\nScanning right blade...");
204 Serial.println("--------------------");
205 yawAngle = maxYaw; // Starting point for camera
206 for(int ii=0; ii<numPhoto; ii++){
207 Serial.print("Photo number: ");
208 Serial.println(ii+1);
209 // Actuate PAN servo
210 panAngleParam[ii] = int( panHomePos - ((2048/180) * (90 - ...
tempPan[ii]) ));
211 Serial.print("The pan angle is: ");
212 Serial.print(panAngleParam[ii]);
213 Serial.print('\t');
214 SetPosition(pan,panAngleParam[ii]); // change position of pan ...
servo
215
216 // Actuate YAW servo
217 yawAngleParam[ii] = int(yawAngle * 4096/360) + yawHomePos + ...
2*(1023-(maxYaw*(2048/180))); // Get to other blade
218 SetPosition(yaw,yawAngleParam[ii]); // change position of yaw ...
servo
219 yawAngle = yawAngle + yawStep;
220 Serial.print("The yaw angle is: ");
221 Serial.println(yawAngleParam[ii]);
222 delay(4000); // Waits for camera to stop oscillating
223 Serial.println(1); // Let Pi know servo moved
224 delay(2000); // Wait for Pi to download photo
225 }
Page 57 of 60
226 Serial.println();
227 Serial.println("Inspection process finished.");
228 checkReady = 0; // To ask for initialization input again after ...
first scan
229 }
230 }
231 // ---------------------------------------------------------------
232 initRcvd = 0; // Reset incoming data variable
233
234 // Bring back to home after inspection
235 SetPosition(pan,panHomePos);
236 SetPosition(yaw,yawHomePos);
237 }
H Python Code
# Packages
import math
import numpy as np
import serial
import array
import struct
import time
from time import sleep
from datetime import datetime
from sh import gphoto2 as gp
import signal, os, subprocess
import os # Used for renaming pictures
from subprocess import call
# Photo label string: have technician save input turbine name, and label
picID = "Photo" + shot_time
Page 58 of 60
# Generate a folder with date of pic and picID label
folder_name = shot_date + shot_time
save_location = "Inpection" + folder_name # Save location
time.sleep(2)
killgphoto2Process() # Housekeeping
if True:
readMessage = ser.readline().decode("utf-8")
print(readMessage)
for ii in range(0,5):
if ii == 0:
param = input("Enter the Tower Height in [m]: ")
ser.write(bytes(param,'utf8'))
confMessage = ser.readline().decode("utf-8")
print(confMessage)
if ii == 1:
param = input("Enter the Blade Length in [m]: ")
ser.write(bytes(param,'utf8'))
confMessage = ser.readline().decode("utf-8")
print(confMessage)
if ii == 2:
param = input("Enter the Tower Diameter in [m]: ")
ser.write(bytes(param,'utf8'))
confMessage = ser.readline().decode("utf-8")
print(confMessage)
if ii == 3:
param = input("Enter the Prebend Distance in [m]: ")
ser.write(bytes(param,'utf8'))
confMessage = ser.readline().decode("utf-8")
print(confMessage)
if ii ==4:
param = input("Enter the Distance from Centerline of tower to blade tip in ...
[m]: ")
ser.write(bytes(param,'utf8'))
confMessage = ser.readline().decode("utf-8")
print(confMessage)
while True:
readData = ser.readline().decode("utf-8") # "Input a single value to initiate..."
print(readData)
#print(len(readData)) # For debugging
if(len(readData) == 54): # this banks on the fact that first message is: Arbotix is ...
waiting on input to initialize inspection
initiate = input("Input a single value to initiate inspection process: ")
Page 59 of 60
ser.write(bytes(initiate,'utf8'))
while(initiate != []):
readData = ser.readline().decode("utf-8")
if(len(readData)>3 & len(readData)<54):# Don't print the confirmation "1" from ...
Arbotix
print(readData)
if(len(readData) == 3): # If RPi received "1" back from Arbotix, take photo
# Capture image, download to Pi, delete from camera, and rename file on Pi
call(["gphoto2","--capture-image-and-download","--filename", ...
"/home/pi/Desktop/Inspection-%Y%m%d/Photo-%H%M%S.jpg"])
ser.write(bytes(1))
Page 60 of 60