Wanting to control Thymio II with an external circuit, I pointed a IR-emitting LED at a proximity sensor, thinking it would act like reflected IR from a near object. It did not do so, but rather, if the LED is physically close enough to Thymio to trigger the sensor by its proximity, when the LED is activated it turns the proximity sensor off! Can someone explain this to me?
The Thymio horizontal IR sensors use some hardware and software filtering to remove the external noise, this is a feature :)
There is first an optical filter tuned on a specific wavelength: 940nm. Thus if you want to interact with the sensor, you must use this wavelength.
Then the sensors have an hardware electronic high-pass filter with a tau ~= 15us, thus by pointing an IR emitting a constant light, you won't "see" it on the Thymio, as it will be filtered by the electronic before reaching the microcontroller.
And then, there is some software processing which make sure we read the sensor value only when the sensor is actively sending light. This is needed in order to not have several Thymio interfering with each others when they are close ( less than 1 meter ) to each others.
So what you experience is perfectly normal, by pointing an IR led (or the sun or an old-fashion lightbulb BTW) to the Thymio you should not impact it's sensors values.
The last behaviour that the sensor see "nothing" when the IR led is switched-on really close to it can be explained by the sensor saturation. All the above explanation hold only if the sensor is not saturated.
When too much IR light hit the sensor it will saturate, which mean that the sensor value will not change even if the intensity of light is changing. Since we have a electronic high-pass filter, we will simply see as if there is no light hitting the sensor.
To control the Thymio by external circuit in IR it will be easier to pass by the IR remote control sensor.
It is a RC5 coding at 38kHz. You can some found some info here: thymioirremote and also here: http://en.wikipedia.org/wiki/RC-5
Thank you, retp2401 and Michael Bonani. I see that I had underestimated Thymio's sophistication.
I have used a remote control (from an Integra AV receiver, programmed for a Philips TV), which works well. What I was trying to do, however, was signal Thymio from a distance using an unobtrusive trigger like a light-beam interruption or a switch on a door (the idea is that Thymio does something when you walk into the room). I'll think of some other way. Maybe a solenoid could administer a tap or a speaker could sound a clap.
Thanks again, I think Thymio II is an excellent way to introduce a young person to principles of robotics and programming, and you have designed it beautifully to stimulate the imagination.