Week -2
- Make a Simulink model of Doorbell using solenoid block with the following details:
In the above arrangement, 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.
Assume remaining parameters.

Ans: Doorbell Using Solenoid
A solenoid is an electromagnet. Whenever the current is passed through the conducting wire a magnaticfield is generated around it. This magnetic field attacts the magnetic material. This mechanism is used in the doorbell. 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.
To create the simulink model of Doorbell using solenoid i'm using different simscape blocks as well as some simulink blocks.They are battery,switch,solenoid,ideal translation motion sensor,pulse generator, PS to simulink converter and visa versa,electrical & mechanical references, solver configuration and scope.These are shown below.

Simulink Model:

Fig. 1 Simulink Model
The above simulink model represents a door bell using a solenoid.In this simulink model pulse generator block is used as an input. The pulse is such that after every 2 seconds, its ON.

Fig A.

Fig B.
As we want the circuit to be closed for the interval of 2 seconds a switch block is used. The switch block has a threshold value of 0.8. The pulse generator has threshold value of 1. The switch will only close only if the value is more than 0.8. This then connected to solenoid block which is connected to plunger arrangement.The plunger is away or near C the value of X can be shown from the output graph of plunger distance vs time.The position of the plunger is obtained from ideal translation motion sensor.
2. Use a thermistor to sense the temperature of a heater & turn on or turn off the fan as per 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
Ans:
Thermistor is a sensor which used to measure the temperature of surrounding by comparing it with a known temperature and resistance value.
It is given that when the temperature sensed is above `25^0`C the fan should get turned ON.
The conditions are:
0 to 10 seconds 20 degree selcius
10 to 30 seconds 27 degree selcius
30 to 50 seconds 23 degree selcius
To create a simulink model for the given conditions, we need the simscape & simulink blocks namely
Signal builder,controlled temperature source,thermistor,voltage sensor,switch,electrical & thermal references,display, scope, constant and PS to simulink converter & vica versa.These blocks are shown below.

The input signal corresponding to the above mentioned conditions is given by using signal builder block.

fig.1 Input signal to the model
To create the model, first we use a thermistor to which supply is given through a battery. The port S of thermistor is a physical signal port, through which the control signal that drives the source is applied. These signals are generated using a signal builder block according to the given temperature & time period conditions.Now a resistor is connected in series with the thermistor to sense the change in the temperature in terms of change in the resistance. A voltage sensing source is connected across the resistor to meausure the voltage across the resistance.
This voltage signal is given to a switch which has 3 input ports where the 1st & 3rd ports are data ports and 2nd port is an control port.The Switch block passes through the first input or the third input signal based on the value of the second input. The criteria for control port is u2>=threshold. This threshold value can be taken from the model by running it for the first time which in this case is 0.01099. To the 1st and 3rd port two constant blocks are connected having value 1 & 0 respectively.
When the voltage signal exceeds or equal the to threshold value the switch gets closed i,e the swich will be in ON condition for temperature value greater than `25^0`C or else it will be in closed condition.The simulink model is shown below.
Simulink Model

Fig. 2 Simulink model
For the above model the Switch input and output signals are shown below.

Fig. 3 Input signal to the switch

Fig. 4 Output signal of model
Conclusion:
From the switch output we can see that, only output is between 10 to 30 seconds as temperature is greater than 25 degree celcius. Thus this output can be given to the fan for the simulation.