Week -2
Week 2 Challenge
Part 1- Create a doorbell using solenoid block in simulink.
Here is the model of doorbell in simulink-

Procedure of creating model using solenoid is quite simple frist we have to take solenoid block then connect it to battery in series to electrical switch , battery voltage is set to 12 voltage. Connect the whole circuit to a electrical reference and a solver. To observe the position of plunger we need a ideal translational motion sensor and connect this block to R-port of solenoid block and provide a mechanical reference also. Pulse generator is used to turn ON and turn OFF the switch.
As we have to analyse the position of plunger so we have to connect a scope to P-port of motion sensor. For this we a need a PS- to -simulink converter block.
Conditions to observe-
1. In first condition we will ON the switch for only 2 seconds then it will remain close for long time. For creating the conditions we will use pulse generator block. The result of scope is following after running the sumilation for 10 seconds. There is 2 seconds phase delay in pulse generator block.

As we can see when switch is ON (t= 2 secs)the plunger get a oscillatory motion with decreasing amplitude for a while after that a constant position is achieved. But when switch is OFF (t = 4 secs), there is again oscillatory motion with same nature and come to its initial position.
2. In second condition we will ON the switch for 2 seconds then OFF for 2 seconds periodically. Now after setting a periodic input the scope result is as followed for the position of plunger.

There is no difference in nature of motion of plunger on changing the input from non-periodic to periodic. Only there is also periodicity in output of scope result having same time period as of input.
PART 2 Create a model using thermistor to ON and OFF the fan by sensing the temperature.
Condition to analyise - We have to run the simulation for 50 secs with heater temperature 20 degree celsius in first 10 secs then 27 degree celsius from 10 to 30 secs and 23 degree celsius in last 20 secs. In this model we have ON the switch of fan when temperature goes above 25 degree celsius.
To create such model first of all we have to take thermistor(with negative temperature cofficient) and apply a variable temperature source to thermistor. Use repeating sequence stair to create temperature signal for variable temperature with 10 secs sample time. Configuration of repeating sequence stair block is (293.15,300.15,300.15,296.15,296.15). Now connect a resistor in series with thermistor to get variable voltage output to turn ON and turn OFF the fan. Connect battery and provide electrical reference to circuit with solver. Use voltage sensor block across resistor to sense voltage and get threshold value by giving constant temperature of 25 degree celsius(in kelvin) to thermistor. We get that threshold value is 0.1188. Set this threshold to conditional switch block.

Now to observe the output we need a scope and connect it to switch.
Here is temperature applied to thermistor using variable temperature source-

Corresponding to temperature the output of the switch i.e. ON and OFF time off fan in heater is as follows

Result : In scope we can see that the switch value is 1(i.e. is ON) from 10 sec to 30 sec and we know that temperature is greater than 25 degree celsius within this period only. So we can in this simulink model fan will operate only from 10 to 30 seconds.