Ticket #84 (new task)

Opened 3 years ago

Last modified 2 years ago

detect frequency

Reported by: jdunn Owned by: bluey
Priority: lowest Component: Hardware
Version: Severity: wishlist
Keywords: Cc:

Description

Is there any way to build a piece of hardware that could actually detect the frequency that a remote is transmitting at? I'm not asking that this be built into the current design, but can we make a one-off device to detect the IR frequency? Seems like it would be extremely useful, but requires a hardware redesign because reception currently relies on a receiver that is specific to 38kHz.

Change History

Changed 3 years ago by bluey

Maybe -- if you replace the IR Receiver with a photodiode. Then you can see raw pulses -- problem is your resolution will be limited by how fast you can read the GPIO pin going up and down. If it takes 12 clock cycles to read the pin and write it somewhere, that is 500ns (24MHz clock), so that's about 1kHz resolution. If it take you 120 clock cycles, that's 10kHz resolution. There might also be issues with signal strength -- and this will detect light, so you will have to shield stray light from the detector.

Changed 3 years ago by jdunn

Is it possible to have a photodiode that only operates in the infrared? Seems like it would be easier than shielding. Still thanks to that back of the envelope resolution check it doesn't seem possible given our frequency. Now if we could say put this on a busy wait on the serial port of a real computer we might be talking.....

Changed 3 years ago by bluey

Yeah, there might be tricks with using a stack of timers too... you really only need a few pulses to get an estimate on the frequency. Also, there are other tricks, but they are a bigger pain in the butt. You could XOR the signal with a known (and adjustable) frequency and the output would have a frequency component at the difference between the two ... as you made them nearly the same frequency, it would be easy to detect because the changes would be slow.

But probably a better way is to use a counter running of the 24 MHz bus. At go, reset the counter and then after 10000 clock cycles (or whatever) stop the counter and read out the counts. If you want better resolution, check run the counter longer.

I'm not sure about photodiodes with narrow wavelength sensitivity, but I could look. It's also possible to put a filter in front of the diode.

Changed 2 years ago by jdunn

  • priority changed from normal to low

Changed 2 years ago by bluey

  • priority changed from low to lowest
  • severity changed from normal to wishlist
Note: See TracTickets for help on using tickets.