How to connect the Cny70 Sensors

5/5 - (6 votes)
The CNY70 used to be a very common sensor to detect surfaces.

This low range sensor is widely used in robotics. In my case, I used it in my 3kg sumo robot for detecting the black or white color of the floor.
The datasheet of CNY70 can be found on the Vishay website.
CNY70
Here, I show how to connect a CNY70 sensor in order to obtain an analogue output proportional to the observed colour. I used 2 resistors: 220 Ohm and 10kOhm.

 

With this configuration the output signal is:
black colour –> 5V –> 1
White colour –> 0V –> 0

2 thoughts on “How to connect the Cny70 Sensors”

  1. Hola Alberto! estimo que hablás español! jejeje. Muy buena tu página y este post. Estaba justamente en duda si el CNY70 respondía de forma analógica o más tipo llave abierto/cerrado. Por lo que entendí, si se comporta tipo llave para colores blanco y negro. Esto quiere decir que hay valores intermedios para el resto de colores?. Desde ya muchas gracias por tus comentarios!.
    Carlos Villegas.

    Reply
    • Buenas Carlos,
      Sí hay valores intermedios… Si quieres puedes ajustar la resistencia para que te de totalmente 1 o cero. Pero para los usos normales se le suele poner en saturación para ver solo negro o blanco.
      Saludos!

      Reply

Leave a Comment