====== Sensor module ====== Sensor module includes Sensor board with on-board sensors, low-pass filter and external sensors. Sensor module features * Electret microphone * Light intensity sensor (photoresistor) VT935G (resistance 18,5 kΩ on 10 lux) {{:kit:datasheets:ldr.pdf|datasheet}} * Temperature sensor (thermistor NTC) (resistance 10 kΩ on 25 °C) {{:kit:datasheets:ntc10k.pdf|datasheet}} * Potentiometer 10 kΩ * Ultrasonic distance measure sensor Devantech SRF05 with cable (measuring distance 1-400 cm) {{:kit:datasheets:srf05tech.pdf|datasheet}} * Infrared distance sensor Sharp GP2Y0A21YK0F (measuring distance 10-80 cm) {{:kit:datasheets:sharp_gp2y0a21yk0f.pdf|datasheet}} {{:examples:sensor:andurite_plaat_v5.2.jpg?550|}} ===== Electrical connections ===== On-board sensors are connected as follows: ^on-board notation^external notation^on-board sensor^microcontroller port^ |MIC|AD0|Microphone|PF0| |LDR|AD1|Light intensity sensor|PF1| |NTC|AD2|Temperature sensor|PF2| |POT|AD3|Potentiometer|PF3| ==== Sensors ==== Every sensor on the board is connected through the multiplexer, enabling to select between on-board sensor or external sensor which can be connected to the same port through the connectors. By default all on-board sensors are connected to the analogous inputs of the microcontroller (ADC0-ADC3). Multiplexer is controlled with the port PG0. [{{:examples:sensor:multiplexer_sch_v51.png?200 |Schematics of multiplexer}}] [{{:examples:sensor:sensors_sch_v51.png?580 |Schematics of sensor connections}}] ==== Low-pass filter ==== Low-pass filter can be composed between external analogous inputs 0-3 (PF0-PF3). Resistor and capacitor will be connected to the socket for building up the low-pass filter. By default a low-pass filter is not composed only 1 Ohm resistors are included for all channels. [{{:examples:sensor:rc_sch_v51.png?580 |Schematics of external sensor connections and low-pass filter}}] ==== Digital I/O connector ==== In addition to sensors and analog inputs, there is a connector for digital I/O. Digital I/O pins are directly connected to pins PE2-PE5 of the controller. Also digital serial interface connector is in use (74HCT165D), which is convenient for connecting similar digital sensors. Digital serial interface is connected as following: clock input - PC7, asynchronous parallel load input (active LOW) - PA6, serial output from the last stage - PA7. [{{:examples:sensor:dio_sch_v52_2.png?580 |The digital input/output connectors}}]