1

I have CNY70 connected this way:CNY70 schematics

And I need to determine the value of R2 for OUT to be from 0V to 3.3V. I don't know how to calculate it, please help.

EDIT: Input is the 5V and output goes to microcontroller similar to Arduino, but its inputs can't take Voltage higher than 3.3V. So I need to get the output to 0V - 3.3V. I am sorry for being misleading.

EDIT 2: It goes into one of the microcontroller's analog inputs. Not the power supply.

Thank You!

Wojtic
  • 13
  • 4

1 Answers1

1

You cannot do it by modifying the value of R2.

You can add a series 510\$\Omega\$ resistor between the +5 and the reflective sensor collector.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • 1
    So the value of R2 will stay 1k? – Wojtic Aug 04 '20 at 16:38
  • 1
    Yes, it must stay 1K. If you find the sensor is not sensitive enough, increase both resistors proportionally. Eg. 1.5K and 3K. – Spehro Pefhany Aug 04 '20 at 16:39
  • 1
    Thank you so much. This should solve my problem. – Wojtic Aug 04 '20 at 16:40
  • 1
    @Wojtic You are welcome, and welcome to the site. By the way, it's good practice to link the datasheet for your parts such as the [CNY70](https://www.vishay.com/docs/83751/cny70.pdf) which would have made it more clear what you are trying to do. – Spehro Pefhany Aug 04 '20 at 16:51