Week -2
- Make a Simulink model of Doorbell using solenoid block with the following details:
when the switch is closed the electromagnet receives electrical power from the battery and pulls the metal arm to hit the bell producing sound.
Create a situation where the switch is closed for 2 seconds and then released. Observe the physical movement of the plunger.
working of doorbell-
- The switch The switch is pressed and current flows through the circuit.
- The electromagnet is powered and generates a magnetic field that attracts the iron strip towards it.
- The striker strikes the gong (bell).
- When the striking arm strikes the gong, the contact is broken and current stops flowing through the circuit.
- This causes the electromagnet to lose its magnetic field.
- The connected spring arm returns the striker to its original rest position.
- The contact is restored and current flows through the circuit (provided the main switch is still pressed).
- The process is repeated from the beginning.

here is the simulink model of doorbell.
Explanation-
- we connected -ve end of battery to the -ve terminal of solenoid and the +ve end of battery and solenoid is connected to the switch .
- we give the input signal to the switch by using pulse generator.
- Plunge part of the solenoid connected to the Ideal Translational motor to get exact output, Electrical Reference and mechanical reference is also provided.
- one end of motion sensor is connected to scope.
- scope is connected for visualise the output.
- parameter sets for 2 sec delay

- output

2. Use a thermistor to sense the temperature of a heater & turn on or turn off the fan as per the below 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
What is Thermistor?
The thermistor is a kind of resistor whose resistivity depends on surrounding temperature. It is a temperature sensitive device. The word thermistor is derived from the word, thermally sensitive resistor. The thermistor is made of the semiconductor material that means their resistance lies between the conductor and the insulator.
There are two type of theremistor -
Negative temprature cocefficient and Positive temperature coefficient.
NTC Thermistor
In an NTC thermistor, when the temperature increases, resistance decreases. And when temperature decreases, resistance increases. Hence in an NTC thermistor temperature and resistance are inversely proportional. These are the most common type of themistor.
The relationship between resistance and temperature in an NTC thermistor is governed by the following expression:

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.
Model-

To built model we need
- Signal builder - to provide input according to given conditions ( 20 °C from 0 to 10 seconds, 27 °C from 10 to 30 seconds, 23 °C from 30 to 50 seconds)

- simulink- ps convertor
- control temperature source
- thermal reference
- solver configuration
- Thermistor -

- dc voltage source
- resistor
- battery
- voltage sensor
- ps-simulink convertor
- switch -

- constant
- dispaly
- Scope
connect signal builder to simulink-ps convertor then connect with control temperature source , CTS is connect to thermistor , thermistor connect to dc voltage source and voltage sensor , voltage sensor is connect with ps- simulink & connect to switch , switch is connect to scoope and display .
OUTPUT-

when fan is off then-

point to remember-
set stop time 50sec
select filter input , derivatives calculated on input handling option in simulink- ps convertor block
