crane
DESCRIPTION
Details of craneTRANSCRIPT
PROJECT #6: ELECTROMAGNETIC CRANE
Teacher’s Notes
The Project Time Frame: 2-3 weeks Materials:
• Bolt (1”-2” Long) • 22-24 Gauge Magnet wire (regular solid core copper wire will work)
Available at Electrosonic, see suppliers $10 for approx. 200’
• 20+ paperclips • 2 bowls • 4.5V – 6V battery • Construction materials for the physical crane set-up
Description:
This is a difficult project. This project would be appropriate at the grade 11 or 12 level. The students are required to interface a stepping motor, a DC motor (using an H-Bridge), an LED and an electromagnet. www.claasictechnology.ca has an excellent picture on how to set-up the H-bridge motor. The goal is to move paperclips from one bowl to another bowl through a 90° rotation. The crane starts with the magnet up& above the first bowl. When the program starts:
• LED at the top of the crane starts to flash (crane is moving, Watch out!) • The crane drops the magnet into the bowl. • The magnet turns on & collects the paperclips. • The crane lifts the magnet and paperclips. • The crane moves through the 90° rotation. • The crane lowers the magnet and clips into the second bowl • The magnet shuts off, releasing the paperclips • The crane lifts the magnet back up • The crane rotates back to the first bowl • The LED turns off when the crane stops moving.
Warning!!!
This should not be the first interfacing activity. This project is too difficult to try without attempting some of the previous activities.
Suggested Usage of Pins The following is a suggesting representation of which pins to use for each control.
Lights Output / Pin # Decimal Value Electromagnet D0 / Pin 2 1 Flashing Light D1 / Pin 3 2
DC – Motor Control 1 D2 / Pin 4 4 DC – Motor Control 2 D3 / Pin 5 8
Stepper Motor Control 1 D4 / Pin 6 16 Stepper Motor Control 2 D5 / Pin 7 32 Stepper Motor Control 3 D6 / Pin 8 64 Stepper Motor Control 4 D7 / Pin 9 128
H-Bridge (Bi-directional DC motor control) • To turn the DC motor in one direction, set D2 high & D3 low. • To turn the DC motor in the opposite direction, set D2 low & D3 high. • To stop the motor, set both D2 & D3 low. • DO NOT set both D2 & D3 high!
Stepper control • Stepper motors work by sending a repeating pattern of bits to the different coils. • Taping a popsicle stick to the end of the stepper motor and using a protractor is a good way to
measure the angle per step. For our example, the stepper motor is controlled by D4-D7. The following block of code will make the stepper motor turn. for steps : 1..100 % send the pattern 100 times
for i : 0..3 parallelput(16*(2**i)) % set the correct pin high delay(100) % delay 1 tenth of a second
end for end for
Creating an Electromagnet Things to remember about electromagnets:
• The more coils you make, the stronger the magnet. • Magnet wire works better, because it is thinner and more coils you can get. • A soft iron core will make the magnet work better (a bolt).
Attach wire ends to your interface
Wrap magnet wire around the soft iron core (bolt)
+‘ve -‘ve
North South
Electromagnetic Cra
+5V
7424
To Parallel Port Output D7-D0
See next page for stepper
motor control.
PN222
1k Ω H-Bridge
Bi-Directional DC motor control
ne – Wiring Diagram
Parallel Port Ground (18-25)
2A
PN2222A
2N2907
2N2907
PN2222A
1k Ω
Use an external battery (4.5V – 6V)
GND
220Ω
Flashing LED
Electromagnet
Electromagnetic Crane – Stepper Motor Wiring Diagram
Ground (18-25) D3 D2 D1 D0
1k Ω
1k Ω
Coil 4 White Coil 3
Blue
Coil 2 Red
Coil 1 Orange
+5 V ground
+5 V ground
+5V For Motor
M TIP31TIP31TIP31TIP3174LS245
Electromagnetic Crane – Exemplars
Electromagnetic Crane - Checklist Have I …
CRANE
used / made a eye-pleasing model; verified the flashing LED works; verified the magnet turns on an off; verified that my final program correctly controls the crane;
FINAL PROGRAM
commented all blocks of code; used clear variable & constant names; designed a graphical interface representing the game board; covered the required functions of the game board;
DOCUMENTATION
created a title page; printed out the code for my final program; written a report, including:
o the process, o clear explanation;
drawn a diagram of the crane (and any initial sketches); drawn a schematic of the crane; checked all papers for spelling & grammar mistakes; had at least two person proof-read my report; compiled all the paper submissions in a duo-tang?
Electromagnetic Crane – Marking Scheme Name:
Category Component Mark
Knowledge Program Functionality /15(30%) Wiring & Interface Functionality /15
Application Wiring Neatness /15(30%) Program Appearance /15
Problem S. Crane – Materials & Construction /5(15%) Creativity & Innovation /10
Communication Crane Diagram /5(25%) Project Write-up /10
Internal Documentation /5 Wiring Diagram /5 Total %