Author Topic: Arduino newbie -- laser pulser/sensor?  (Read 3073 times)

DoktorJ

  • Newbie
  • *
  • Posts: 14
Arduino newbie -- laser pulser/sensor?
« on: September 17, 2012, 03:03:12 pm »
If I'm not mistaken in my understanding, the Digispark will have 6 GPIO pins... with this, could I set it up so the Digispark sends two different high-frequency (~1-10kHz) output pulses to two pins, monitors two other pins for matching frequencies, and pulls a fifth output high (or low) if the input pins go out of spec (say off by 5+%)?

The idea is that the output pins would flip transistors that control simple laser emitters (think $5 cat toy laser pointers), and phototransistors on the input pins would relay the signal they get from the laser pointers.  The net result being an interruption beam that can't be bypassed just by shining a laser pointer at it (unless you know the transmit frequency and have managed to tune your laser pointer to match it :P).

For added "security", would it be possible to have the Digispark cycle the frequencies on its output (and accordingly adjust its accepted input parameters) every 2-3 seconds?  Would I have to "buffer" the last-used frequency briefly (~10ms) so that on frequency shifts it accepts both the new and old frequency for a very short time to allow for output->transistor->laser->phototransistor->input latency?
« Last Edit: September 17, 2012, 03:03:12 pm by DoktorJ »