Hello!
My end goal is to be able to control my A/C (a Panasonic unit) from my RPi Zero.
I'm attempting to get the IR Transmitter wired as per Figure 2 here - http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote - however have had no success in seeing it lit. However, if I connect the IR LED to GPIO 14 and ground, I see it light up (via my camera). I should note that when I do this, it is permanently illuminated.
Am I doing something wrong, is the diagram incorrect? I am using a BC547 NPN transistor, and I believe I have the correct resistors.
Post your code and circuit.
>>1117180
Use that example 1-second blink script with an LED directly to the GPIO pin to figure out if it's bad circuit or bad software.
Test the circuit by disconnecting the green wire from the gpio, and hooking it to V+ (3.3V or red wire)
The IRLED should turn on.
>>1117235
It's figure two on this page - http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote
>>1117255
I'll have to pick up a proper LED from somewhere, I didn't think to order one for troubleshooting! Bah.
>>1117298
It did not :( If I hook up the IRLED directly to the 3.3v and ground, it does turn on though?
>>1117784
post a picture of the circuit on your breadboard
>>1117792
It's hard to get an angle that shows everything, sorry
>>1117819
I think the transistor might be backwards.
Also, What base resistor are you using?
The schematic called for a 10K base resistor, but yours looks like it has a red band.
>>1117922
I have the 'hump' facing outwards. Sorry, I'm new to these terms- what's collector, base, and emitter supposed to mean?
I can't seem to find the exact colour 10KΩ resistor in the pack that I got. There are 5 sheets on a page, each with multiples of the same kind.
>>1118375
With an NPN transistor,
collector goes to the positive side
emitter (with arrowhead in schematic) goes to negative.
base is the control lead, current flowing through the base to the emitter amplifies the collector current .
According to the schematic, the emitter (arrowhead) goes to ground.
On the BC547, >>1117922 the emmitter is pin 3. If you're looking directly at the "flat" side, the emmitter is on the right.
Your circuit has the ground on the left.
turn that transistor around to opposite what the pic @
>http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote
shows.
The pinouts on the 2N2222 and BC547 are opposite.
here's the 2N2222, The pinout is opposite from this pic >>1117922
>>1118375
>I can't seem to find the exact colour 10KΩ resistor in the pack that I got.
Kek, that pic on the resistor pack is wrong.
Same colors for 1K & 10K
10K is brown, black ORANGE like you used.
Color code:
Black = black = 0
boys = brown
rape =red
our =orange
young = yellow
girls = green
but = blue
violet = violet
gives = grey
willingly = white = 9
>>1118384
Fantastic! Thanks for the explanation, I'll keep that in mind. That's got it at least to emit IR light.
but it is constantly on, I would have thought it would flash on and off as needed.
>>1118386
Ah, glad I'm not crazy then. I did search online for the correct colours and went with what I thought should be 10K
Finally, got it working! Thanks for everyones help. I managed to get the RAW codes from my AC unit and program them into LIRC.
The only issue is that the IR LED works up to about 10cm away from the wall unit. Is there anyway of boosting the signal a bit?
>>1118836
as is, the current thru the LED is 9mA. you need to increase that by 5 or 10 times to get a good range.
so you may need an LED that can take more current without dying. you can probably go as high as 30mA with a regular old LED.
one trick to get more range without more current is to put 2 or more LEDs in series. using a 3.3V supply, you can only use 2 in series. you'd replace the 200 ohm resistor with a 10 ohm resistor.
calculation: (3.3V - (2x1.5V)) / 0.03 A = 10 ohms
>>1118865
How did you work out that the current current is 9mA?
I bought this IR LED - https://www.adafruit.com/product/387 - which says "100 mA continuous, 1000 mA pulse" - how do I go about upping the mA's to it?
>>1119289
supply voltage - LED voltage divided by resistance : (3.3V - 1.5V) / 200 ohms = .009A
if you want 100mA then you do (3.3 V - 1.5V) / 0.1A = 18 ohms
I was thinking of turning a pi into a telemarketer call screener. Something like
>pi answers phone and if it's a new number it says "If you are not a telemarketer, please press 1" (it's illegal for them to lie about this, so they can be reported and fined)
>pressing 1 will make my phone will ring so I can answer the phone
>if they're still a telemarketer, press button combination to end call, add their number to block list
>all numbers are stored in a white list or blocklist
>>1120219
>it's illegal for them to lie about this
they don't care.
neither do the regulating bodies
phone numbers don't die unlike the fly by night companies, they are recycled.
you need to get it approved to connect to a public telephone network usually, you might get an old modem or something and utilise the hardware from that, it already conforms.
better would be find out where they operate from and attach it to a flaming brick and stave their windows in.