Post on 16-Dec-2015
transcript
DIY Photogates Made EasyAnd cheap,
yes!
River Falls, WI October 30, 2010
Dr. John LiuSaint Cloud State University, MN
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 $400Vernier PC-based $150+softwareDIY 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 platformArduino can sense many types of sensors and
buttons (analog and digital)Arduino can be programmed to sense its
inputs repeatedlyArduino can communicate with a computer
via the serial portArduino has an active online community
Initial tests on breadboard
Breadboard testing
ConnectionsPC interface
Breadboard testing
ConnectionsPC interface
Breadboard testing
Connections
Very simple setup
It is a proof of the concept but is not student-proof!
Switching to PCB
Photogate diagram Photogate PCB
Shield diagram Shield PCB
Arduinospacing
PCB results
PCB
Populated PCB
Connected to photogates
Arduino board
Photogate
10mm
ImprovementsAll parts are safe and secureSoldering is a breezeJumper wires to audio cables and stereo jacksBreadboard-bound gates to standalone gatesGates can stay a few meters away from the
timer and be mountedArduino board can be easily taken out for
repurposing and put back without having to connect a bunch of wires
Program the ArduinoOpen Arduino environment and load source
codeCompile source codeDownload compiled code to Arduino board
The PC programShows live dataOptions of different measurementsSave data automatically
Videos
How long does it take?Programming the microcontroller – 30sSoldering the PCB – 20 minOr using proto-board – 60 min? (I did the
easy way)Running data collection – 30sSecuring photogates – depends on your
setupTesting everything – 10 min
What do you get?You will get one timerYou will get two gatesSame 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
boardWho 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%.𝑑𝑣 = ඨ൬1𝑡𝑑𝑥൰2 +ቀ
𝑥𝑡2 𝑑𝑡ቁ2 = ඨቀ𝑣𝑥𝑑𝑥ቁ2 +ቆ
𝑣2𝑥 𝑑𝑡ቇ2 𝑑𝑣𝑣 = ඨ൬
1𝑥𝑑𝑥൰2 +ቀ𝑣𝑥𝑑𝑡ቁ2 =ඨሺ0.01ሻ2 +ቆ
1∗10−41∗10−2 𝑣ቇ2 = ඥ10−4 +ሺ10−2𝑣ሻ2 = 1.4% 𝑖𝑓 𝑣 = 1𝑚/𝑠
Boring math:
Update: Physics shield
Connectors:
Proto-connectorBreadboard connector Stereo plug connector
Compatible with all Arduino boardsTwo robust RJ11 connectors for
sensorsLCD and 6 buttons for user
interactionGPS connector for GPS
applicationsReal time clock and EEPROM for
data logging, timing etc.Brings out all Arduino pins
Photogate connector
Future directions:More functions on the PC photogate programSupport more gates (may reduce timing
accuracy)Start a blog liudr.wordpress.com for physics
projectsDevelop more shields for physics prototypingDevelop upper-division electronics class with
Arduino
Thank you!
Care for some details?v (cm/s) dv/v*100% dx(cm) 0.01 10
0 1.0 dt(ms) 0.1 1005 1.0 x(cm) 1 100
10 1.015 1.020 1.025 1.030 1.035 1.140 1.145 1.150 1.155 1.160 1.265 1.270 1.275 1.380 1.385 1.390 1.395 1.4
100 1.4105 1.5110 1.5115 1.5120 1.6125 1.6130 1.6135 1.7140 1.7145 1.8150 1.8
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
0 20 40 60 80 100 120 140 160
Per
cen
tag
e er
ror o
f V
Velocity (cm/s)
Relative error vs. V
Just linksArduino official siteArduino forumMy blogPrograms for the photogate shield (on my blog)
Parts:Arduino microcontroller development board $25Photo interrupter modules $2 $4 totalStereo audio jacks 3.5mm $1.5 each $6 totalStereo audio cables 3.5mm $2 $4 totalHeaders and resistors $2.5Prototype boards and wires $8Phi-1 shield (please check my blog)