Values of 40 and 200 map to voltages of 0.2V and 1V respectively (assuming a 5V reference) so you're right that they won't work for a digital signal.
Perhaps you can use the analog comparator peripheral, or an external analog comparator. On an Uno, for example, pins D6 and D7 can also be connected to the analog comparator. You can read about it in Section 22 of the ATmega328P datasheet.
You would need an external voltage divider to set a threshold of about 0.6V (halfway between 0.2V and 1V) on one of the analog comparator pins then connect your IR sensor on the other pin.
I don't think there are any Arduino library functions for working with the built-in comparator so you'll have to do it at the register level.
The Gadget Shield
: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons