Sensor, actuators and microprocessor

Measurement application

  • Measurement application mainly involves sensors and microprocessor to continuously monitor physical quantities
  • Sensors reads from the environment and send data to microprocessor (via ADC)
  • Microprocessor will read / process the data in a certain interval, to:
    • record the data (data logging)
    • take action depending on the value (Note that the action will not alter the environment)

Think Pair Share (2 min)

Suggest an example of monitoring applications, and answer the followings:

  1. What are the physical quantities involved?
  2. What will be the appropriate interval of recording?
  3. If action is required, what kind of actuators will be involved?
Application Physical Quantity Interval Action

Examples of monitoring application

Preset value

  • Defines the range of value whether an action / attention is required to the monitored physical quantity
    • e.g. An alert will be fired when the patient's heart beat is lower than 50bpm - thus the preset threshold is 50bpm
  • Preset value can be set by the user (e.g. temperature) or calculated by computer (e.g. from statistics)
  • Preset can be used in control application too, e.g. setting preset temperature in an air-conditioner

Group Project - Data logger

  • In this project, you are going to create a temperature data-logger with micro:bit
  • You will need to use built-in sensor, time and storage in the device
  • Plug in the device, and find a place at home and keep it on for at least 24 hours to record the data
  • After the data is collected, pull out the data and create an A3 poster showing:
    • Blockdiagram of the hardware
    • Flowchart of the software
    • Some pictures of the device and where you place it
    • Plotted graph of the readings (reading/time)

Some functions to help

  • running_time() is a function to return how many milliseconds since the microbit restarts
  • sleep( integer ) is a function that will pause the processor for given milliseconds
  • temperature() to give current temperature that the sensor detects
  • You will need storage which can be found here:
    https://microbit-micropython.readthedocs.io/en/latest/tutorials/storage.html

Control Applications

  • Similar to monitoring applications, but the microprocessor might control the environment using Actuators
  • Output from actuator may alter the monitoring physical variable
    • e.g. Automatic Heater. The temperature is monitored by sensor, if the temperature is lower than preset, then the microprocessor will turn on the heating element. 

Actuator

  • Output device that will affect physical environment
  • Receives analog data, thus required DAC to convert digital signal from microprocessor
  • e.g.
    • Light bulb, LED
    • Heater
    • Motor
    • Valve (Gas, liquid)

For an automatic Heating System

  1. Which sensor(s) are needed? [1]
  2. Where should you place your sensor? [1]
  3. What kind of actuator(s) is needed? [1]
  4. How will the user control the temperature? [1]
  5. Construct a flow chart of the heating system. [4]
  6.  

Sensors

  • Input device that collects data from the environment
  • Sensor measures physical quantity
  • Data collected are in analogue form, so ADC is required to convert it to digital for computer to process
Sensor Application
Temperature
Light Intensity
Moisture
Infra-red
Pressure
Gas (e.g. CO2, O2)
pH
Accelerometer
Magnetometer
Sound

Types of sensor

0478/12/M/J/17 Q9

Sample Exam Question

Made with Slides.com