![]() ![]() ![]() So the trick is to time how long it takes a point in the circuit the reach a voltage that is great enough to register as a “High” on a GPIO pin. This time is called the time constant : t = RC When using a Light Dependent resistor this time will be proportional to the light level. The time it takes for the voltage to reach 63% of the maximum is equal to the resistance multiplied by the capacitance. When a voltage is applied across these components the voltage across the capacitor rises. ![]() In this circuit you place a Resistor in series with a Capacitor. It uses a basic “RC” charging circuit ( Wikipedia Article) which is often used as an introduction to electronics. In the case of a light sensor this allows you to measure different light levels. ![]() It allows you to measure a number of levels using a single GPIO pin. This is great for sensors that provide a digital input to the Pi but not so great if you want to use analogue sensors.įor sensors that act as a variable resistor such as LDRs (Light Dependent Resistors) or thermistors (temperature sensors) there is a simple solution. They can output high and low levels or read high and low levels. Unlike some other devices the Raspberry Pi does not have any analogue inputs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |