Assignment 4
Input Output Devices
Sensors in mobile phone
Following are the sensors with their functions in my mobile phone-
- Proximity sensor- is able to detect nearby objects without any physical contact with them
- Ambient light sensor-helps in detecting the light in environment around the device and is able to adjust the brightness accordingly
- Accelerometer-detects motion from different axes
- Gyroscope-captures all sorts of motion to detect how device is held or moved
- GPS-helps in tracking location of device
- Barometer- used for sensing pressure sensing and altitude measurement
- Touch ID sensor- recognises specific fingerprint patterns to unlock the device and recognition
- Magnetometer- This sensor can detect magnetic fields, so the compass app in phones uses this smartphone sensor to point at the planet’s north pole
- Pedometer-Used for counting steps and other human health related activities
Experiments with sensors
- Brightness- Device is continously exposed to sunlight and dark environment at different angles of exposure.

- Accelerometer- Device is moved in all locations to record the speed of movement in all directions. Movement speed in Y and Z direction is highest (probably due to gravity as well)
- Pitch- Recorded frequency of a female and male voice. Spikes in curve correspond to female voice.

- Magnetometer- Close contact with another electronic device shows a consistent range of values for intensity.

- Sound Intensity- Bringing device microphone closer to a speaker shows a sudden spike till ~ 59 dB

- Barometer- Reads constant value. Only decimals change on moving device up or down.

- Compass- Rotation of device just to check directions and also track sun movement.

Air conditioner sensing with DHT11
This project is used for building an air conditioner sensor which detects if the air conditioner is turned on in room and outputs via different LED colours. The idea behind the project was to use DHT11 sensor to detect the air conditioner measurements and also note how quickly DHT11 senses the change in ambient temperature once air conditioner is turned off in the room. Since the detection is using DHT11 and ambient temperature takes some time to change, the detection is not real time and has a lag time for detection.
Connections
Steps
- Make the connections as shown in figure above with arduino, 3 distinct coloured LEDs, LCD panel and DHT11 (Ensure no connection is loose as you make connections, trouble-shooting at the end with lots of wires is not the best thing)
- Measure ambient temperature of the room using DHT11 for 5-6 hours without Air conditioner or fan turned on. This temperature would give us a decent measure of temperature threshold to be set when there is no air conditioner turned on and would be used later in code. In my case the temperature was 24.8 degree centigrades.
- Once, room temperature is measured set up the circuits in such a way that DHT11 is in front of AC outlet (It helps to record the temperature swiftly). Turn on AC and record the time taken by DHT to display the new temperature. Display on LCD screen-
- After change in temperature has been recorded, LED changes its colour according to the temperature threshold (measured in step 2). There are three colours- Green (Temp. < 20) Air conditioner is turned on, Yellow (35>Temp. > 20) Air conditioner turned off, Red (Temp. > 35) Its burning !
- Similar temperature and DHT sensing time is recorded by repeatedly switching on-off and changing the temperature of AC.
Results & Inferences
- On repeating the experiment a few times, the average time taken by DHT11 sensor to record this change in ambient temperature is 2.52 minutes. But the time sensitivity reported in DHT11 handbook is around 10 secs. This can be accounted for the fact that ambient temperature change from air conditioned room to normal temperature takes some time as well
- DHT11 never achieved on state for red led. This highlights the ambient temperature on an average is always less than 35 degree centigrades for the room
- Relative Humidity didn't show any significant change upon turning the air-conditioner on or off.
- This can be also extended to control the air conditioner for thermal comfort if we have a range of comfortable temperatures to the user. This extension to the project would require an IR transmitter and receiver
Codes used
References