Microcontrollers and Arduino

profileaztecant

This assignment requires your own materials. You do not have to record a video but you will need to upload the layout of the breadboard so I can make the video.

 

The lab work for this module requires you to familiarize yourself with the use of the components and modules listed below:

  • Turning LEDs on and off
  • Sensing the state of a pushbutton
  • PWM output with analogWrite
  • Reading value of potentiometer
  • Using a photoresistor
  • Using the DHT11 temperature and humidity sensor
  • Programming the RGB LED

All the wiring and programming information is available in the textbook and/or at the resource links provided under Study Materials.

Please complete all the lab exercises given below and submit a report including a video demonstration. You will submit the report and video demonstration separately on the course website.


Report (60 percent): The report should list all the major procedures required to complete each of the exercises. Here are the general guidelines for the report:

  1. Cover Sheet (5 points): The lab report must include a completed cover sheet with your name, student ID number, the lab number, lab title, and submission date. Note: Your lab report will not be graded without a completed cover sheet.
  2. Objective (15 points): A short paragraph stating the purpose (main ideas) of the experiment.
  3. Procedure (30 points): At the beginning of this section, give a summary description of the procedures taken during the lab.
  4. Discussion/Conclusion (30 points): State your understanding of this experiment. (What did you learn from these experiment?) State challenges and problems faced, and measures taken to resolve these problems and overcome challenges.
  5. Arduino Sketches (20 points): At the end of the report, please append the text of all the Arduino sketches you have developed. To do this, simply cut the entire text from the Arduino IDE editor window and paste it in the report document. Start on a fresh page for each sketch.


Video Demonstration (40 percent): In this section, your video demonstration should provide a visual record of the results obtained in each exercise. Please start with recording a brief video clip giving your name, course number, and assignment number. Record a video clip for each exercise according to the instructions provided. Use a video editor to combine all the clips into one video file before you submit/upload to the course website. For guidelines to record and merge video clips, check Record, Merge, and Upload Your Videos.


Exercise 1: LEDs and pushbutton

Connect three LEDs, one each of Red, Yellow, and Green, to pins A2, A4, and A6 respectively, on the breadboard. Connect a pushbutton to pin 7. Be sure to use the resistors to limit current as you have learned from the study material. Write an Arduino sketch to sequentially turn on the LEDs, one at a time. This should create a Red, Yellow, and Green LED flowing display. Now add code, in the beginning of the loop, to check the status of the pushbutton. If the button is OFF (normal) then let the LED code execute. If it is ON (pushed), then skip the LED part and go to the end of loop at a time for one second. The LED display should come on as before. When you keep the button pressed, the display would stop at the end of sequence and will remain so as long as the button is pressed. It would start again when you let go.

The video clip for this exercise should show the initial LED display and the result of the button being pushed. Please repeat by letting go and pushing the button again, two or three times.


Exercise 2: Using a potentiometer to control the brightness of LED

You have learned to control the brightness of LED using the PWM, but you were just incrementing values in a loop. You also know how to read the setting of a potentiometer. Write an Arduino sketch to read the setting of the potentiometer and use it to control the brightness of the LED. This way, you should be able to interactively control the brightness.

The video clip for this exercise should show the wiring of the experiment and the changing brightness of the LED with the setting of the potentiometer.


Exercise 3: Temperature and humidity monitor using DHT11

Load the test program given in the Reading Assignment, DHT11 Temperature and Humidity Sensor, in Arduino IDE. Modify it to send the data to the serial port every 5 seconds. Compile and download to the UNO board. Open the serial monitor window.

The video clip for this exercise should show the wiring of the experiment and the running display of the results in a serial monitor window. Reset the UNO board after starting video recording, breathe on the sensor, and display the text in the serial monitor window. [MO2.1, MO2.2, MO2.3, MO2.4, MO2.6, MO2.8]

 

    • 7 years ago
    • 100
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      microcontrollers_and_arduino_1.docx
    Bids(1)