hi Prof,
I have been using X10 <--> IR <--> etc. for home control for a couple of decades. Since the little box I designed way back when
is still working, guess the hardware design is sound. Only interact with it when I need to learn IR codes for a new TV (etc.).
Looking at the old schematic, don't know why I used a PNP instead of an NPN (maybe was what I had on hand). If I did it today,
would use an NPN & reverse LM339 pins 6 & 7.
The box has an 8052-Basic chip in it, but looks like I wrote the IR/X10 code in assembly language, so I don't think it
would help much to upload it.
Looking at the notes from my old code, it would seem that the IR would need to be sampled/played back at >13KHz, so it may
not be feasible to use a Picaxe for sampling to memory. I believe Hippy is right, if you could generate a sample clock from the Picaxe
& store samples into a bit-wide external memory, you could probably pull it off (surely someone has built an external sampler).
Anyhow, I attached the old schematic I found for the IR/X10 hardware (may be a starting point for you).
Here is the comment leader from the ir_learn procedure. Maybe that will help. Good luck!
Note: If you solve this for Picaxe, please share.
notes from old 805x assembly:
;-----------------------------------------------------------------------------\
; Function : Learn a code from an IR (infra-red) remote |
; Enter With : |
; Exits With : |
; |
; Remarks : Touch any key to abort. |
; CAUTION !! This routine depends on the system clock for its |
; accuracy. Calculations were derived based on an 11.0592 Mhz |
; crystal. Be aware that IRQs will degrade the accuracy of the|
; transmitted data. clock cycle =1.085uS |
; 24 cycles in loop below + 46 cycles for learn_ir5 call |
; so that 1/(70 x 1.085uS) = Sampling rate = 13166 Samples/Second|
; The sampling rate may be slowed by changing the value of r0 in |
; the first line of txmt_ir/learn_ir. The sampling rates will |
; track up and down for both as long as you ALWAYS have 3 more |
; bits in learn_ir's r0 than in txmt_ir's r0. Take note that |
; since most IR signals have bit times of ~.0005 sec., decreasing|
; sample times below 10,000 samples/sec will yield errors of |
; > 20 %. Unless there is a noisy IR signal being measured, |
; higher sample rates use no more memory to store an IR code than|
; slower rates since learn_ir is looking for changes in input |
; state and not linear sampling. |
; sample interval in real time = (70 x 1.085uS) = .00007595 sec. |
; r3/r4 = # of sample intervals |
; r5/r6 = current sampling interval count |
; r7 = holds previous value of IR input pin |
; |
; Dependency : sub_16_bit |
; Declarator : (for use with the user function table) |
; ljmp learn_ir ; xxx learn a command from an IR remote |
;-----------------------------------------------------------------------------|