Go Down

Topic: Do you know how frustrating electronics can be??? >.< lol (Read 784 times) previous topic - next topic

bag06a

Backstory: I picked up some radioshack IR LED emitter and detector pairs (part #276-142) recently for a project I want to start. I'm relatively new to electronics and arduino so I wanted to play around with them first. I just spent the last couple hours trying to figure it out >.<. What I WANTED them to do was when there was no voltage on the detector (LOW) I wanted an LED that I was using as a "status" LED to NOT light up, and when it went HIGH i wanted it to light up. For whatever reason the LED was always staying on.

I could NOT figure out how to get the detector to do it's job, detect. I thought I tried all feasible connections (with pullup and pull down resistors) and I was getting so frustrated! I thought it was going to be a simple hook-up and go operation, but i was wrong.

For the longest time I was trying to connect one end of the detector to GND and the other to an arduino pin (this is where "all combinations" with pullups, pull downs, and no pullups or pull downs comes in).

I dont know what made me finally decide to try hooking it up the "final" way, but it worked. Instead of hooking the anode/collector to ground, i hooked it to 5V from the arduino. Then I hooked the cathode/emitter to the pin with a pulldown resistor betwen cathode/emitter and GND and VIOLA! it worked!

It seems like such a simple/noob/elementary problem, but when I figured it out I was ecstatic!

Electronics can be so frustrating at times....but at the same time they can be so rewarding :).

Also, I should have realized it earlier because upon reading, the detector is a photodiode/transistor. And in a transistor power (positive) goes into the collect, and flows out through the emitter to ground! Argh. I think what was really throwing me off was the fact that on regular leds the longer lead connects to positive, and the shorter to negative. On the detector's packaging/specs it has it labeled like a regular led, but the longer side was getting the "negative" side of the flow instead of the positive like a normal led ....so it wasn't making sense  (the way that my mind rationalized it anyway).

Anyway, thanks for reading lol. I'm sure it all seems gibberish because I was all over the place :).

RPCoyle

It's called the learning curve... we all be there and in many cases, still are trying and failing and learning as we go.

Now you are an expert on radioshack IR LED emitter and detector pairs. So when some other person post a question about these devices...you well may have an answer for them.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike

Quote
but when I figured it out I was ecstatic!

Summed up in this great video:-
http://www.youtube.com/watch?v=9saYHg_JmWE

bag06a

Ha, that video is awesome. Thanks for sharing it :-). My first "real" project was reflashing my paintball gun's trigger and even though someone else did a bulk of the code and brain work I was ecstatic when I was able to replicate the end result as well as do my  part figure out how to program it with the arduino :-)

Go Up