Week -2
Objective: To make a simulink model of door bell using solenoid block. Obeserving the physical movement of plunger when the switch is closed for 2 s.
Theory: This type of bell uses the principle of electromagnetism. When the switch is closed the current passess through the solenoid and a magnetic field is created which creates a magnetic force & push the plunger which is coupled mechanically to hit a metal sheet and produce sound.

A simulink model has been made for the same. The blocks are connected and the motion of of plunger is observed.
Pulse generator: It generates the pulse whose time period is set to 4 s.(since the switch is to be closed for 2 s). A simulink to PS convertor is the simulink signal to physical signal.
This signal is given to switch. The circuit is closed when the input is greater than threshold. Current passes through the solenoid block which works according to the same principle as described above. A ideal translational motion sensor is attached to the output of the plunger to record its motion in scope block.(Physical signal is converted to Simulink using PS to simulink converter block).
The position of plunger as observed is attached below
Result:

The movement of plunger can be seen as the switch is on. It is going down quickly because the damping factor is 1.
The movement of plunger is according to our set time peroid of 4 s. The pulse width is 5% of the time period in above case. Increasing its value one can observe disturbance of plunger over more wider time range.
Following are images attached of pulse genertor block & Solenoid respectively.


Objective 2: To use thermistor to sense the temperature of heater and turn the fan ON & OFF according to given conditions.
Temperature source: 20 °C from 0 to 10 seconds, 27 °C from 10 to 30 seconds, 23 °C from 30 to 50 seconds
Fan conditions: ON if the temperature above 25 °C, OFF otherwise
Theory: A thermistor is a resistance thermometer, or a resistor whose resistance is dependent on temperature. The term is a combination of “thermal” and “resistor”.
There are two types of thermistors: Negative Temperature Coefficient (NTC) and Positive Temperature Coefficient (PTC). With an NTC thermistor, when the temperature increases, resistance decreases. With PTC temperature decreases, resistance increases. This type of thermistor is used the most.
In our case we have used a NTC thermistor.
The simulink model to replicate above condition is given below

Explainaton: The signal builder block is used for creating temperatures as given in conditions above.
Signal Builder Block:

This signal is given to Controlled temperature source block. Whose one port (A) is connected to absolute zero ref.
Thermistor: Thermistor block has been used for NTC thermistor (All parameters are here set to default)
As the temperature will increase the the resistance will decrease . This will lead to decrease in "voltage drop" Which can be sensed by the voltage sensor.
Care sholud be taken of units of temperature i.e both signal builder & thermistor units should be same.
It should not be confuse as temperature sensor. It's resistance changes wrt to temperature.
A threshold switch is used for having a if else condition for on & off of fan. For a temperature of 25 deg c.
To have a threshold volatage value that is to be applied to the threshold switch. Initialy we can give a constant signal of 25 deg C (298.15 k ) to registor a voltage value corresponding to if else conditon. And thus obtained voltage can now be set as threshold value i.e 0.01196 to satiafy our conditions for ON & OFF.
The switch is modelled such as It is on if the temperature is above 298.15 k and off if it is below 298.15k by using constants 1 & 0.
When temperature is above 298.15 switch will be on and fan is on else off.
The closing & opening of switch is observed via scope block. for a time of 35 s. respectively
Result:
The reading of voltage sensor & Switch behaviour are attached below
Voltage:

Switch Behaviour( Fan ON & OFF):
We can see below that the Fan is ON for the time 10-30 s only when temperature is above 25 deg C otherwise off for remaining time.

NOTE:
Although the results seems to be in accordance with Given situation. But we are getting two warnigs still whose image has been attached below .
