I'm returning to arduino projects after a few years off and trying to build a Nerf Chronograph - but I feel I'm not understanding something basic about an (also basic) circuit.
I've armed myself with one of my many Nano clones, some breadboard, dupont connectors and a pair each of:
TSAL6400 IR LED
L-7113P3C phototransistor
I intend to modify the code because I want to set a timer between two gates - not one gate like the instructable has. That's because I don't want to rely on projectile length for my FPS reading.
However, I can't get past testing my IR circuit (step 7) - the analog pin is always reading high. It's a simple circuit but I'm stumped.
I think my IR LEDs are dead because:
I feel like I have wired everything up as per the diagram in the instructable (I've re-wired twice just in case);
if I pull the A0 jumper wire the analog value fluctuates between 700 and 1023 - which suggests the phototransistor is working correctly (if it is receiving no IR); and
The LEDs are not warm, nor do they show up on my cellphone camera.
However, my meter shows 5v across the LED, so it's getting power.
I agree on instructables, I'm not going to follow it exactly (not enough gates as I said) - I was looking for a way-in. I've seen several arduino Nerf chronographs in real life, but there are very few guides online.
I put two links in my OP:
The instructable (which contains a hand drawn circuit diagram); and
An imgur link to a photo of my actual breadboard taken with my (IR-seeing) cellphone camera.
If the LED does not light up, either the circuit is incomplete (connections are not continuous), the LED is backwards, or defective. The photo was taken from an angle that obscures some of the connections. The phototransistor may also be wired backwards.
A cell phone camera can usually "see" light from an IR LED.
what indicates to me a blown (or reversed) LED of infinite resistance. Measure the voltage on the current limiting resistor and calculate the current (I=U/R).
We know not that the 3YO has your attention as it should be, that is smart not stupid. I am surprised you got this far as the instructable is krap. From my experience A0 is not fast enough if using it as an A/D but it could be used as a digital input, I did not read the code.
You might try downloading KiCad and play with that as your 3YO is about. It is a great CAD program, relative easy to use but do not expect to be doing great drawings in an evening or two.
I think that you have interchanged the TSAL6400 IR LED (blue gray filter) and the photo transistor L-7113P3C (clear).
Check the data sheets to see which is clear and which is dark. This would mean that the resistors are also wrongly placed.
It'd been so long (3 yrs conicidentally) since I last worked on this I forgot which was which.
Works fine now, even the sketch from the instructable.
Just need to wire up 2 pairs of gates and change the sketch to time my nerf dart between them. I think there are examples out there using digital inputs and interrupts I can learn from