I've got a TSOP4846 IR receiver which I'm trying to correctly interface to an ATmega88. I got it all working when the ATmega88 was running off a 5v supply, matching that required by the TSOP4846, but now need to run the ATmega88 at 3v3.
Checking the datasheets I think the following are the relevant constraints:
ATmega88: Vih max = Vcc + 0.5 (i.e. 3.8v)
TSOP4846: Output supply 5v at 5mA max.
Additionally the TSOP4846 datasheet says:
"The output voltage should not be hold continuously at a voltage below V O = 3.3 V by the external circuit ."
I figured a potential divider should be able to reduce the 5v output to 3.3 for the ATmega88, so made a circuit as follows:
+-----+ TSOP4846 ---| 3k3 |--------> ATmega88 (5v, 5mA) +-----+ | (3.3, max 40mA) | +-----+ | GND|--| 6K8 |-+ +-----+
5v across both resistors (10k1 ohms) gives ~0.5mA, so I think the current should be fine, but the circuit doesn't work as the ATmega88 fails to see any edges from the TSOP4846 :(
If I remove the 6K8 resistor, the ATmega88 does see edges, but is then receiving 5volts instead of 3v3, which probably isn't great for running the circuit for long periods.
How should I be level shifting this input?