# CNY70 from 3.3v instead of 5v?

I would like to use a CNY70 with arduino that is not 5v but 3.3v powered. On the web there most tutorials use 5v and 200 + 10k resistors (e.g. here and here). So as far as I understand for 3.3v I would have to use lower ones.

Can someone explain how those 200 or 10k were calculated? How could I use CNY70 with 3.3v (if it's possible at all) ?

• That 200R is current limiting resistor. For 5V power supply and 1.3V forward voltage drop on LED that means about 19mA through resistor: `If = (5V-1.3V)/200R = 18.5 mA`. With 3.3V power supply you'll get about 10mA with the same resistor.
– KIIV
Sep 10 '19 at 7:39
• and what about 10k on the transistor ? Sep 10 '19 at 7:54
• That's just a pull-up resistor. It's basically "pick one between 1K and 100K". So even internall pull up resistor on the input should be sufficient. It depends on wire length, its capacitance and so on. Longer lines means stronger pull ups. Well, technically it should match line impedance, so there will be no signal reflections, but it's valid on much higher frequencies.
– KIIV
Sep 10 '19 at 8:01

On an Arduino you could even get away without the pullup resistor and use an input in `INPUT_PULLUP` mode.