Interesting idea. The remote control is probably much cheaper than our sensors but most likely it is too big for us to use. We are using as small as possible components here. For example, we are using tiny QFN parts more and more. In case of inductive sensors, the sensor is often smaller than the cable connectors. In case of optic sensors, it is still not that bad but the trend is getting smaller. I have not measured the pulsing current of these remote controls, I guess that they are not high enough to fully utilize the IR emitters. We are pulsing them at the limit in order to achieve longer sensing distance yet keep the current consumption low. If the emitter is allowing 750mA then we will probably pulse them at 700mA (a bit of safety margin). Therefore we may not be able to send two pulse with too small pause. The sensing distance of an optic sensor ranges from several millimeter to 10s of meters (visible light or infrared) or even higher (using laser diode). The other thing is the relative fast switching frequency required (the higher the better). Anyway I see your point and will consider it in future applications. This is also applicable to all kinds of sensors: level sensors, capacitive sensors, ultrasonic sensors, etc. Regards, Xiaofan -----Original Message----- From: olin_piclist@embedinc.com [mailto:olin_piclist@embedinc.com] Sent: Tuesday, June 28, 2005 10:32 AM To: Microcontroller discussion list - Public. Subject: Re: [PIC] generating different pseudo random sequence using the s ame firmware The more you taylor the detection algorithm to the expected pulse the better. You have a minimum and maximum valid pulse duration, so it's probably a good idea to use that. You could also send specially coded pulse sequences so that it's virtually impossible for random noise look like a real signal. Even just sending the "pulse" as a burst of a known frequency will help a great deal with signal to noise ratio. If you can send a burst of 10 cycles at 35-50 KHz, then you can use a standard IR remote detector like is built into VCRs, TVs, and lots of other things. These do all the IR receiving, gain adjustments, and carrier detection for you. You give them +5V and GND, and they return a digital signal indicating presence of carrier. They usually require minimum bursts of 10 carrier cycles. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist