Simulink model of Doorbell using Solenoid block
Aim: Simulink model of doorbell using solenoid block and to make a Simulink model of a thermistor to sense the temperature and turn on or turn off the fan as per the temperature conditions.
Theory:
The Solenoid is a electromagnet.current through the conducting wires a magnetic field is generated around it which attracts magnetic materials. This phenomenon is used in the bell. When the switch of the bell is pressed the current passes through the circuit, exciting the electromagnet and pulling the plunger towards the metal portion. This produces a ringing sound.

Simulink Model:

In the Simulink model I have used a pulse generator block as an input. The pulse is such that, every 2 seconds its on.

here are some spikes in the graph when switch is closed due to electromagnetic interferences.
Fan operation by thermistor:
Thermistor is a sensor which is used to measure the temperature of the surrounding by comparing it with a known temperature and resistance values. The conditions are:
0-10 seconds 20 degree celsius
10-30 seconds 27 degree celsius
30-50 seconds 30 degree celsius
The input signal corresponding to the above parameters is given using a signal builder block.
SIMULINK MODEL

voltmeter to find the voltage of the circuit at different temperatures. It is found that, voltage at 25 degree celsius is approximately 0.23 V. Now, this voltage signal is passed through a switch. The switch is configured in such a way that, it is open if the voltage across the voltmeter is less than 0.23 V (temperature less than 25 degree celsius) and close if the voltage across the voltmeter is greater than 0.23 V (temperature more than 25 degree celsius). The threshold of the switch is set to 0.23v.

switch output we can see that, only output is between 10-30 seconds as the temperature is greater than 25 degree celsius. So, this output can be given to Fan for the simulation.