Week -2
Objective:
1.To Create a situation where the switch is closed for 2 seconds and then released.
To Create a situation where the switch is closed for 2 seconds and then released in the Doorbell.
2. By Using a thermistor to sense the temperature of a heater & turn on or turn off the fan.
Temperature source: 20 °C from 0 to 10 seconds, 27 °C from 10 to 30 seconds, 23 °C from 30 to 50 seconds.
Theory:
1. Doorbell:
A doorbell is a signaling device typically placed near a door to a building's entrance. When a visitor presses a button the bell rings inside the building, alerting the occupant to the presence of the visitor. Although the first doorbells were mechanical, activated by pulling a cord connected to a bell, modern doorbells are electric, operated by a pushbutton switch. Modern doorbells often incorporate intercoms and miniature video cameras to increase security.

solenoid:
A solenoid is a type of electromagnet formed by a helical coil of wire whose length is substantially greater than its diameter, which generates a controlled magnetic field. The coil can produce a uniform magnetic field in a volume of space when an electric current is passed through it.
Model in simulink:

Explanation:
1. using pulse generator as input source and setting the required parameters.
2. using simuling to ps convertor to convert the data as physical state.
3. connecting the wiring to switch to battery and forming a circuit with solenoid block
4. using solver config and electrical reference for the completion process.
4. solver config is must for electrical structures.
5. using ideal motion sensor to detect the vibrations and Connections R and C are mechanical translational conserving ports and connections V and P are physical signal output ports for velocity and position
6. connecting the wirings in correct inputs and outputs.
7. using mechanical reference in mechanical structure.
8. using ps to simulink convertor and getting the plot and results.
RESULTS:
input result:

we can see the delay of 2 sec as mentioned in the question.
Output result:

we can see the door bell ringing in 2 sec interval.
2. Using a thermistor to sense the temperature of a heater & turn on or turn off the fan:
Introduction for thermistor:
A thermistor is a type of resistor whose resistance is strongly dependent on temperature, more so than in standard resistors. The word thermistor is a portmanteau of thermal and resistor. Thermistors are divided based on their conduction model.

Where:
- RT is the resistance at temperature T (K)
- R0 is the resistance at temperature T0 (K)
- T0 is the reference temperature (normally 25oC)
- β is a constant, its value is dependant on the characteristics of the material. The nominal value is taken as 4000.
Inputs:

Signal input in signal builder block
Temperature source: 20 °C from 0 to 10 seconds, 27 °C from 10 to 30 seconds, 23 °C from 30 to 50 seconds.
MODEL:

Explanation:
1. using signal builder to implement the inputs that are provided in the question as a plot.
2. After putting the input that block is simulink block, we have to change it to ps block so we are using simulink to ps convertor block.
3. ideal temperature source:
The Temperature Source block represents an ideal source of thermal energy that is powerful enough to maintain specified temperature at its outlet regardless of the heat flow consumed by the system.
The source generates constant absolute temperature, defined by the Temperature parameter value.
A is the source outlet
4. the outlet is connected to the thermistor in the electrical model and the battery and resistors are connected.
5. the voltage sensor has to connected in order to get how much voltage passes through the terminal.
6 we have to put a constant value 25 degree and get how much voltage is produced and use that value to prepare when to turn the fan on and off.
7. using solver config and thermal and electrical reference in their respective blocks.
8. using ps to simulink convertor and using switch with 3 inputs to set the parameters asked in the question, giving u2 the 25 degree celcius voltage value that is converted into kelvin.
9. getting the result in the scope as plot and the voltage.
RESULT:

As we can see the fan is turned on by the given conditions in the switch as turn on the fan if above 25 degree celsius.