I want to start using IR remotes, proxy sensors and so on...... but I have start from the ground up.
Not just copy some project.
I have some>good electronic knowledge and some programming knowledge. Obviously have used Arduino uno board before.
Project: Measure a .177 cal air rifle pellet travelling between 300ft/sec to 1500ft/sec.
After searching this forum and internet in general decided to go with IR led (940 nm) 5mm and
IR photo diode or IR phototransistor, both 5mm (looks like normal 5mm led).
Bill of materials:
Uno board and laptop
IR led BL-L513IRAB Butux Electronics
IR PhotoTRansistor LTR3208E Lite On Electronics
or IR diode of ebay/china no specs ..... looks like 5mm dark led
resistors for led and photo transistor/diode ?
Questions?
Wil uno board have enough juice for project, do not want to fry my only uno board?
IR led on digital out pins..... me thinks?
How does one use a Phototransistor with uno? Voltage devider..giving values or would it be on/of?
How does one use a Photodiode? Voltage devider??
How do one determine the resistor values for PH transistor/diode?
Using the 5v pin from uno:
Resistor value for led R={5v(uno) - 1.4v forward v IRLed}/40mA ? Forward v spec 50mA ?max?
resistor for IR Led=72ohm?
How do I calculate the resistor val if I use a digital outpin? Digital write
I atemted to load a pic of the circuit but pic to large...(how does one post a large pic?)
so I have uploaded a vid to youtube..
Once I have the hardware sorted I will start on the coding........but to shorten a long search on this forum and internet any pointers welcome.
The .177 cal pellet travels relatively straight as it leaves the mussel of the rifle at an estimated 500ft/s.
Luckily the uno picks up the signal from the IR phototransistor from a V-divider so no need for amplifiers.
I have done heaps of searching and found some threads, mostly related to airsoft/paintball projects.
There's one where someone used ir to photograph a speeding bullet on impact.
None explain why they used that value resistor or why they used a while loop instead of for loop and so on.
I will not learn anything from copying other projects.
Once I have learned how to use IR to do a simple speed test I will move on to sending and receiving signals via IR.
If you are using a digitalWrite you can assume the output voltage is the same as the supply voltage (or close enough), in this case that would appear to be 5V based on your above description.
Tjaart:
The .177 cal pellet travels relatively straight as it leaves the mussel of the rifle at an estimated 500ft/s.
Does it shoot pearls?
Tjaart:
I have done heaps of searching and found some threads, mostly related to airsoft/paintball projects.
There's one where someone used ir to photograph a speeding bullet on impact.
By the way you're describing things it sounds like you're going to try using analogRead() with the phototransistor. An analogRead() is much slower than a digitalRead(), about 10,000 reads/sec, where digitalRead() is around 200,000 reads/sec, and then that can be further improved with direct port access (ask about that later). 500 ft/s is 152400 mm/s; your pellet will have travelled 15mm each time you can perform an analogRead() -- I don't think you'd be able to create your light beam wide enough and still get usable hysteresis in your phototransistor's output.
Anyway, if you want to improve your sensor's accuracy and sensitivity you want to convert the output voltage from the phototransistor into an on/off type of thing so you can use digitalRead(). A simple way to do this is with a comparator circuit. The article is pretty clear on the details so I won't bother to expand further -- just trying to keep you pointed in the right direction.
I was also thinking about speed and beam width etc, I was wondering if using 2 sets of IR LEDs and Photodiodes a know distance apart might be a better approach, the first set starts the clock the second stops the clock kind of thing.
Also instead of thinking of it in terms of breaking a beam, perhaps the IR LED and photodiode go side by side, so that the photodiode gets an IR reflection back off of the pellet, though I do not really know how much reflection would be needed to be useable, nor if the pellet could produce enough light reflection to make this idea useful..
Tjaart:
Anybody know how many W the 5v out pin on a uno board can handle?
The limit is based on how well the regulator is cooled where (Input voltage) - 5V * amperage = watts of heat. If the regulator can dissipate that heat and stay under 150C then the absolute max limit is 2.2A. The realistic limit, with a ~9V input, is 1A.
Did not expect it to be anywhere near that much.
Stil a bit sceptical that so decided to go with an external 5v source and to increase the beam with I am going with 2x set IR led and phototransistor and 2x IR led and photo diode.......
(Funny how both IR phototrans and photodiode looks and act the same in my breadboard mock-up)
How could one test to see whether its a IR phototrans or IR photodiode?
Hi,
Have you tried an air rifle pellet yet, its a lot smaller than what you are testing with, and a lot faster.
The sensor may not have the reaction time.
Going to order LM358 for comparator as per Chargin suggestion,
I am looking fir suitable pin diodes AnalysIR on ebay , with no luck so far.
Could you suggest a part for me?
I have visited your blog and are going to look further into that....good one.
I really need help getting this project to work with digital read.
I live in a remote location so all my electronic stuff comes through the mailbox.... I don't have a preference
Will have another look at mentioned distributors.
Stuff from American suppliers way more expensive because of posting.
I sometimes use the digikey search to find a list of parts & then check to see if I can get one on eBay or Aliexpress.
BTW: Cool test setup & videos...good stuff.
I suspect that with the smaller projectile/pellet it is not big enough to block the light. So you will have to ensure the beam is narrower & the projectile passes thru it. Otherwise, use some sort of analogue approach to detect minor changes in light levels hitting the sensor.
Of course, I am assuming that you have an emmiter on one side and a sensor on the other/opposite side.
However, if you use 'reflectance', (receiver & sensor on the same side), you may get better results.
Obviously, using reflectance within the tube you have may create some challenges, if you get a reflection from within the tube.
TIP: I sometime use heatshrimk tubing over an emitter to create a narrower beam & stop inteference with the sensor.
I did a quick search on ebay for 'PIN PHOTODIODE' and quite a few come back.
The SFH229 for example has a 10ns switching time and half-angle of +/- 17deg
You need to check the datasheets of any item your select - for fast switching times (10ns is good), small angle & make sure the IR wavelength 'range' matches your emmiter's.
its also a good idea to do the maths on the timings you need for any particular velocity/accuracy range required.