-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sensors.md #133
Merged
Merged
Update sensors.md #133
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,16 +1,103 @@ | ||||||
Sensors | ||||||
======= | ||||||
### What are Sensors? | ||||||
|
||||||
|
||||||
Sensors are devices that detect changes in the physical environment and convert them into electrical signals. They act as the "senses" of electronic systems, allowing devices to interact with the world around them. In the context of the Pocket Science Lab (PSLab), sensors enable users to measure and analyze various physical phenomena, turning the PSLab into a versatile scientific instrument. | ||||||
|
||||||
|
||||||
### Analog vs Digital Sensors | ||||||
|
||||||
|
||||||
Sensors can be broadly categorized into two types: analog and digital. | ||||||
|
||||||
|
||||||
#### Analog Sensors | ||||||
|
||||||
|
||||||
Analog sensors produce a continuous output signal that is proportional to the measured quantity. | ||||||
|
||||||
|
||||||
Key characteristics: | ||||||
- Output is a continuous range of values | ||||||
- Can detect small changes in the input | ||||||
- Often require analog-to-digital conversion for use with digital systems | ||||||
- Examples: thermistors, photoresistors, potentiometers | ||||||
|
||||||
|
||||||
#### Digital Sensors | ||||||
|
||||||
|
||||||
Digital sensors produce discrete digital output signals, typically in binary form (0s and 1s). | ||||||
|
||||||
|
||||||
Key characteristics: | ||||||
- Output is discrete values, often binary | ||||||
- More resistant to noise compared to analog sensors | ||||||
- Can be easily interfaced with digital systems | ||||||
- Examples: digital temperature sensors, infrared motion sensors, digital accelerometers | ||||||
|
||||||
|
||||||
## Experimenting with Sensors on PSLab | ||||||
### Analog Sensor Experiments with the Generic Sensor Instrument | ||||||
|
||||||
|
||||||
The PSLab provides a way to interface with analog sensors. This can be through a Generic Sensor instrument or specific analog input pins. | ||||||
|
||||||
|
||||||
#### Experiment: Motion Sensor to Control Audio | ||||||
|
||||||
|
||||||
This experiment demonstrates how an analog motion sensor can potentially be used to trigger audio output. | ||||||
|
||||||
|
||||||
Materials : | ||||||
- PSLab device | ||||||
- Analog motion sensor (e.g., PIR sensor) | ||||||
- Audio output device compatible with PSLab | ||||||
- Necessary connecting wires | ||||||
|
||||||
|
||||||
Procedure : | ||||||
1. Connect the motion sensor to an analog input on the PSLab. | ||||||
2. Set up the audio output device with the PSLab. | ||||||
3. Use the PSLab software to read the analog input from the motion sensor. | ||||||
4. Create a script that activates the audio output when the sensor reading exceeds a certain threshold. | ||||||
5. Test the setup by moving in front of the sensor. | ||||||
|
||||||
|
||||||
This experiment demonstrates how analog sensors can be used to trigger actions based on environmental changes. | ||||||
|
||||||
|
||||||
### Digital Sensor Experiments with the Generic Sensor Instrument | ||||||
|
||||||
|
||||||
Many modern sensors use digital communication protocols. The PSLab supports interfacing with digital sensors, through specific digital input/output pins or communication interfaces like I2C. | ||||||
|
||||||
|
||||||
#### Experiment: Temperature and Humidity Measurement | ||||||
|
||||||
|
||||||
This experiment outlines how a digital temperature and humidity sensor might be used with the PSLab. | ||||||
|
||||||
|
||||||
Materials : | ||||||
- PSLab device | ||||||
- Digital temperature and humidity sensor (e.g., DHT11 or DHT22) | ||||||
- Necessary connecting wires | ||||||
|
||||||
|
||||||
Procedure : | ||||||
1. Connect the digital sensor to the appropriate pins on the PSLab (likely power, ground, and a digital data pin). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (documentation): Consider mentioning that exact pin connections may vary depending on the sensor model.
Suggested change
|
||||||
2. Use the PSLab software to initialize communication with the sensor. | ||||||
3. Create a script to read temperature and humidity data at regular intervals. | ||||||
4. Display the data on the PSLab interface or log it for later analysis. | ||||||
5. Observe how temperature and humidity change under different conditions (e.g., breathing on the sensor, moving it to different locations). | ||||||
|
||||||
|
||||||
This experiment showcases how digital sensors can provide multiple data points and how they interface differently with the PSLab compared to analog sensors. | ||||||
|
||||||
|
||||||
What are Sensors | ||||||
---------------- | ||||||
|
||||||
What are Analog and what Digital Sensors | ||||||
---------------------------------------- | ||||||
|
||||||
Analog Sensor Experiments with the Generic Sensor Instrument | ||||||
------------------------------------------------------------ | ||||||
Experiment: Motion Sensor, turn on music | ||||||
|
||||||
Digital Sensor Experiments with the Generic Sensor Instrument | ||||||
---------------------------------------- | ||||||
Experiment: Temperature and Humidity |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (documentation): Consider adding information about resolution differences between analog and digital sensors.
This could help users understand another key distinction between these sensor types.