IRksome AGC

IR for neighbours detection

The past few days, Xavier and I did some more IR tests. 

The first thing we wanted to measure is the reaction time of the receiver.

By logging the times the emitter was turned on and off, we realised the receiver’s reaction to toggling the emitter was systematically delayed between 150 and 250µs. This is not surprising as it perfectly matches the datasheet specification. In any case it’s not a problem because it is short enough and also consistent.

Then, we set out to see whether adding 3D-printed materials between the emitter and the receiver would introduce a delay, and if so, measure this delay. But we soon realised we had another issue: not matter how much material we put between the emitter and the receiver, the receiver was still reacting to the emitter turning on and off.

This puzzled us, because we had already tested making a directive receiver by cobbling together a tube out of heat-shrinking duct to reduce its field of view (as in the picture below), and it seemed to work then, but now it had no effect. So we tried to reproduce these older tests (link), and we worked it out: when the emitter is continuously emitting a PWM signal, the receiver with the restricted field of view will detect when the emitter enters and leaves the field of view. But if the emitter is alternating between bursts and gaps, the receiver reacts even when facing away !

This is very likely due to the Automatic Gain Control feature of the receiver, which adapts to the strength of the signal depending on whether we’re facing the source or catching a reflection from another direction. It looks like a continuous emission keeps the gain low, which is why in that case we only detect the signal when directly facing the source.

If anyone knows more about this, your insights would be welcome 🙂

So now we have two problems : 

  • With a continuous IR emission we can detect two edges when the emitter enters and leaves its field of vision. This is good news. But we can only hope the delay is short enough or predictable enough to maintain an acceptable accuracy. To give you an idea, being off by 100µs means the angle is off by about 1°, which would be completely acceptable. The risk here is that, since we’re totally exceeding the maximum burst length of the receiver, the delays could be really long and vary randomly. And we can’t really test that by simply turning off the emitter, because it’s clearly not the same as rotating the receiver until it doesn’t see the source. More tests seem necessary, but we can’t really make anything useful until we have a full phyllo, so we can see and measure the effect of a real rotation.

  • If we use an intermittent IR emission (alternating bursts and gaps) instead, what can we do so that the IR bursts are only detected when faced by the receiver ? We reduced the current in the emitter by increasing the resistor to a few hundred Ohms until the receiver didn’t react when the emitter faced away. This seems the most promising and the most deterministic option : we will probably use a discontinuous IR emission (bursts-and-gaps IR), and adapt the resistors of the emitters so that the receiver only detects when it is in the correct alignment. Also, to do this, we will probably have to change our method of reducing the receiver’s field of vision, and 3D-print the mask instead of using a homemade heat-shrinking tube.

IR for time reference

Thanks to Marc’s work on the ESP32, we won’t need any IR receivers for the shared time reference on the main PCB 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *