miércoles, 6 de mayo de 2020

AVR IoT Light Sensor

La tarjeta AVR IoT cuenta con el sensor de luz ambiental TEMT6000  un foto-transistor PNP adaptado a la respuesta del ojo humano.

Según el circuito esquemático la salida del sensor esta en el PD5 y su equivalente en arduino en el 17 o A5.
El atmega4808 tiene un conversor Analógico / Digital de 10 bits por tanto tendremos lecturas de 0 a 1023 en un rango de voltaje de 0 a 3,3 Vdc
Esto produce una resolución de lectura de 3,2 mV



















//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
AVR IoT includes the TEMT6000 ambient light sensor on board.
A PNP photo transistor adapted to the response of the human eye.
In the schematic circuit, the sensor output is on the PD5 and its equivalent in arduino pin 19 or A5.
*/
void setup() {
  // initialize serial2 communication at 115200 bits per second:
  Serial2.begin(115200);
}


void loop() {
  // read the input on analog pin 0:
  int lux = analogRead(A5); // Pin PD5  atmega 4808
  // print out the value you read:
  Serial2.println(lux);
  delay(500);        // delay in between reads for stability
}

AVR IoT Light Sensor

La tarjeta AVR IoT cuenta con el sensor de luz ambiental TEMT6000  un foto-transistor PNP adaptado a la respuesta del ojo humano. Según el...