Hi, I'm trying to quickly build a one off IR remote control for an unusual piece of equipment because the original got broken a couple of days ago. I found Nick Gammon's code on here:
which I'm using for the carrier output on D11 on an Arduino Nano and was going to output the modulated control signals out on D6. I was hoping to connect things up roughly like the diagram below:
and use a couple of transistors to enable me to drive around 150mA through the IR LED.
I've got IRFZ44N's, PN2222A's, 2N3904's and a couple of SN74HC08's available all as options to combine the PWM and modulated signal but I'm not sure what I'm better off using? I want to keep to at least the 150mA current for the TSAL6100 LED's I have. The carrier frequency is 38KHz as per Nick's code.
I would have used IRRemote or IRLib2 but I can't find a corresponding protocol. It's similar in timings to a Sony but the commands are much shorter, and I can't make head or tail of sending raw codes (I only need four commands) in either library. It's basically a 2500us header, 600us gaps, 1200us long and 600us short pulses at 15 or 24 bits.
If anybody can help it would be much appreciated, I've spent two days on trying to figure the remote libraries already and need something operational by Saturday Many thanks
You can use single pin to output the modulated carrier. Just turn the carrier on and off instead of writing the other pin HIGH and LOW. Of course the circuit shown should work too.
Using Nick Gammon's example code, how would I do that? I'm not too familiar with writing directly to the registers and the code just sets up a reasonably accurate carrier on timer 2. I'm not sure how I would switch that on and off in the main loop?
If I end up going for the circuit I've shown above, which of the available components I have are recommended? Or do I stick both pin outputs directly on to the AND gate and then drive the MOSFET? I presume the other transistors would draw too much current from the AND gate (max 25mA on the datasheet)?
I would limit the current 100mA, and use two LEDs in series.
And the constant current circuit shown on this page.
Q1 2N2222
Q2 2N3904
R1 220ohm
R2 5.6ohm
Leo..