DIY Photogates Made Easy - St. Cloud State University

advertisement
And cheap, yes!
Saint Cloud State University, MN
River Falls, WI October 30, 2010
What are photogates?
 Photogates measure time with millisecond accuracy.
 With known distance, photogate timers can calculate
period, speed, angular speed, acceleration, etc.
 One can do Newton’s 2nd law, conservation of
momentum and energy etc. with photogates.
 Photogate systems are carried by all major vendors.
 You can DIY a commercial-quality system.
 You only spend a fraction of the cost.
Comparison
Pasco standalone $400
Vernier PC-based $150+software
DIY less than $60
Works with existing gates
What you need?
Parts:
 Arduino microcontroller development board $25
 Photo interrupter modules $2 $4 total
 Stereo audio jacks 3.5mm $1.5 each $6 total
 Stereo audio cables 3.5mm $2 $4 total
 Headers and resistors $2.5
 Prototype boards and wires $8
 Or PCB (much easier to solder) $20 (cheaper with batch order)
Tools:
 Basic PC/Mac/Linux computer with USB
 RadioShack soldering set $8
 Cutting tools if you use prototype boards
Total:
 $50 if you’re good with proto-boards and diagrams or $60 if you’re not
What is an Arduino?
 Arduino is an open-source, very easy to learn/use
physical computing platform
 Arduino can sense many types of sensors and buttons
(analog and digital)
 Arduino can be programmed to sense its inputs
repeatedly
 Arduino can communicate with a computer via the
serial port
 Arduino has an active online community
Initial tests on breadboard
Breadboard testing
Connections
PC interface
Very simple setup
It is a proof of the concept but is not student-proof!
Switching to PCB
Shield diagram
Shield PCB
Arduino
spacing
Photogate diagram
Photogate PCB
PCB results
Arduino board
PCB
Populated PCB
Connected to photogates
Photogate
10mm
Improvements
 All parts are safe and secure
 Soldering is a breeze
 Jumper wires to audio cables and stereo jacks
 Breadboard-bound gates to standalone gates
 Gates can stay a few meters away from the timer and
be mounted
 Arduino board can be easily taken out for repurposing
and put back without having to connect a bunch of
wires
Program the Arduino
 Open Arduino environment and load source code
 Compile source code
 Download compiled code to Arduino board
The PC program
 Shows live data
 Options of different measurements
 Save data automatically
Videos
How long does it take?
 Programming the microcontroller – 30s
 Soldering the PCB – 20 min
 Or using proto-board – 60 min? (I did the easy way)
 Running data collection – 30s
 Securing photogates – depends on your setup
 Testing everything – 10 min
What do you get?
 You will get one timer
 You will get two gates
 Same functionality is sold for $400 at Pasco 
 Your system is pin-compatible with Pasco or Daedalon
gates (needs ¼” to 3.5mm converter $2)
 You’re very happy
 You’ll likely make more stuff with the Arduino board
 Who knows? World peace?
How accurate is it?
 Well, it depends on three things: your picket fence, the
timing accuracy and the speed being measured.
 The PC serial limits dt to ~0.1ms timing for two gates
 Say you use 1.00±0.01cm picket fence machined with a mill.
 For 1.00m/s speed, you get 1.4%.
Boring math:
𝑑𝑣
=
𝑣
1
𝑑𝑥
𝑥
2
𝑑𝑣 =
𝑣
+ 𝑑𝑡
𝑥
2
=
1
𝑑𝑥
𝑡
2
𝑥
+ 2 𝑑𝑡
𝑡
2
𝑣
𝑑𝑥
𝑥
=
1 ∗ 10−4
2
0.01 +
𝑣
1 ∗ 10−2
2
𝑣2
+
𝑑𝑡
𝑥
2
2
=
10−4 + 10−2 𝑣
2
= 1.4% 𝑖𝑓 𝑣 = 1𝑚/𝑠
Update: Physics shield
 Compatible with all Arduino boards
 Two robust RJ11 connectors for sensors
 LCD and 6 buttons for user interaction
 GPS connector for GPS applications
 Real time clock and EEPROM for data
logging, timing etc.
 Brings out all Arduino pins
Connectors:
Photogate connector Breadboard connector Stereo plug connector Proto-connector
Future directions:
 More functions on the PC photogate program
 Support more gates (may reduce timing accuracy)
 Start a blog liudr.wordpress.com for physics projects
 Develop more shields for physics prototyping
 Develop upper-division electronics class with Arduino
Thank you!
Care for some details?
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
105
110
115
120
125
130
135
140
145
150
dv/v*100%
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.1
1.1
1.1
1.1
1.1
1.2
1.2
1.2
1.3
1.3
1.3
1.3
1.4
1.4
1.5
1.5
1.5
1.6
1.6
1.6
1.7
1.7
1.8
1.8
dx(cm)
dt(ms)
x(cm)
0.01
0.1
1
10
100
100
Relative error vs. V
1.9
1.8
1.7
Percentage error of V
v (cm/s)
1.6
1.5
1.4
1.3
1.2
1.1
1.0
0
20
40
60
80
Velocity (cm/s)
100
120
140
160
Just links
Arduino official site
Arduino forum
My blog
Programs for the photogate shield (on my blog)
Parts:
Arduino microcontroller development board $25
Photo interrupter modules $2 $4 total
Stereo audio jacks 3.5mm $1.5 each $6 total
Stereo audio cables 3.5mm $2 $4 total
Headers and resistors $2.5
Prototype boards and wires $8
Phi-1 shield (please check my blog)
Download