Electronics > Projects, Designs, and Technical Stuff
IR communication protocol/design for low latency/fast response - ideas?
Corporate666:
I am working on an automation project that requires a sensor that communicates wirelessly. There will be a receiver tied into the machine and a sensor located a meter or two away. The sensor needs to be battery powered, but it only needs to detect during a short window of time. But when it does detect, I need the receiver to trip as soon as possible. I also need to be sure each receiver is only tripped by the sensor that's paired with it, and not stray light from the sensor on the adjacent machine.
I'm going to have two-way communication between sensor and receiver using IR, so the receiver will send a "start sensing now" signal to the sensor which will wake up.
I I know there are various IR protocols out there, but the overhead of the modulated signal to transmit data, plus needing to receive enough packets of data to determine that the correct sensor tripped seems to mean a delay of tens of milliseconds if not more. I'd like to reduce that latency and ideally be below a millisecond.
I'd appreciate any comments/feedback on the approach to take here. I'd like to use Cypress PSoC MCU's as I'm pretty invested in that ecosystem and very familiar with their programming - but I can do another route if there's something that would make all of this easier.
ogden:
What you mean by "needs to detect during a short window of time" and "receiver is only tripped by the sensor that's paired with it". Are you building lap timer? If you can tell more about actual application - do it. Usually it helps.
You can build system using modulated IR. IRDA is outdated and most likely hard to get, yet you can use TV remote receivers. "start sensing now" could be just 0101010... pattern, after receiving number of 01010101... sensor can immediately transmit it's unique ID+checksum (16+16bits?), for defined number of times.
ajb:
CNC touch probe?
IRDA supposedly goes up to 4Mbps, not sure how fast the built-in IRDA peripherals in MCUs can go. Would that be fast enough? Depending on the application you might want to go to a sort of negative detection method, where the sensor transmits a periodic signal so that the receiver knows it's okay and not tripped, then if the receiver misses a message it can assume that the sensor might have tripped. If the timing information is really important, you could have the sensor's tripped message include a count of the number of messages sent since the trip event. Then even if the receiver misses the first message for whatever reason, the count will tell it how many message intervals back the event occurred.
Corporate666:
--- Quote from: ogden on May 09, 2019, 05:42:18 pm ---What you mean by "needs to detect during a short window of time" and "receiver is only tripped by the sensor that's paired with it". Are you building lap timer? If you can tell more about actual application - do it. Usually it helps.
You can build system using modulated IR. IRDA is outdated and most likely hard to get, yet you can use TV remote receivers. "start sensing now" could be just 0101010... pattern, after receiving number of 01010101... sensor can immediately transmit it's unique ID+checksum (16+16bits?), for defined number of times.
--- End quote ---
I don't want to get too much into the application, partly because I have an NDA and also don't want to re-invent the wheel in this thread :) but basically a robot will move a part from A to B and needs to check the position of the part in-between as it's doing the move and corrects any misalignment prior to loading into B. These transitions only happen when A is ready to transition to B... so I want the sensor to be in sleep mode and saving battery until the detection needs to happen. The receiver will transmit a wake-up to the sensor which will run until it detects, then go back to sleep.
The problem, AFAIK, with existing protocols is that they have a start-of-transmission signal, then the actual data. 1's and 0's are sent by modulating the IR beam ... so the start data plus address data of the sensor takes tens of milliseconds to go from sensor to receiver (or more?). Some of this can be programmed out by estimating the motion that occurred during the lag time, and the motion of the robot can be slowed down so less travel occurs between sensor trip and receiver acknowledge... but I want to take out as much of that lag as possible. There are fast IRDA transceivers (4Mbs) but they seem to mostly be obsolete/out of stock. Was looking for the best way to do this... either using an off-the-shelf transceiver or discrete IR transmitter detectors in sensor and receiver.
Corporate666:
--- Quote from: ajb on May 09, 2019, 06:33:58 pm ---CNC touch probe?
IRDA supposedly goes up to 4Mbps, not sure how fast the built-in IRDA peripherals in MCUs can go. Would that be fast enough? Depending on the application you might want to go to a sort of negative detection method, where the sensor transmits a periodic signal so that the receiver knows it's okay and not tripped, then if the receiver misses a message it can assume that the sensor might have tripped. If the timing information is really important, you could have the sensor's tripped message include a count of the number of messages sent since the trip event. Then even if the receiver misses the first message for whatever reason, the count will tell it how many message intervals back the event occurred.
--- End quote ---
Very close - checking position of a picked-up part on a robot loader before placing part in a fixture. I have been looking at 4Mbps IRDA transceivers but it looks like they are going the way of the dodo... I wouldn't want to design something in that I can't get in the future. I only checked Digikey but they have one 4Mbps unit in stock and it's marked obsolete. I'll never need millions of these and always try to design in parts that I can get from multiple sources with low quantity requirements and other parts I could substitute in.
Definitely want to do negative detection for safety.. one of the main reasons the receiver will turn on the transmitter... so that it's always transmitting and stops upon detection. But still need a fast, low-latency "ping" from the sensor to receiver that lets the receiver acknowledge a detection as quick as possible.
Navigation
[0] Message Index
[#] Next page
Go to full version