Week -2
Aim: (1) Make simulink model for doorbell using solenoid .
(2) Make simulink model for Thermistor which sense temperature of heater & turn on and off as per conditions.
Oblective 1: Model for doorbell using solenoid
Doorbell theory

The above image shows working circuit of doorbell. when the switch is turned on the circuit becomes active and the solenoid activates the plunger which in turn hits the bell. The solenoid used is a simple electronic device that use electrical energy for mechanical work. when electric current is introduced a magnetic field forms around coil which draws the plunger in more the copper wire turns or folding around core more stronger the force caused by magnetic flux.
SIMULINK MODEL

BLOCKS USED
- Pulse generator:- It generates wave pulse at regular intervals. The block waveform parameters , Amplitude ,Pulse, Period and phase delay determine the shape of output.
In this case to cause 2 seconds delay the inputs were feeded accordingly as shown.
- Simulink -PS covertor:- Converts input simulink signal into physical signal, Used to connect simulink block to simscape block.
- Switch:- This model is controlled by an external physical signal. If external signal Ps is greater than value specified in threshhold parameter,then switch is closed, otherwise it remains open.
- Battery:- It implements a generic dynamic model that represents the most popular types of rechargable batteries.
- Solenoid:- The solenoid block represents electrical chracteristics and generated force of solenoid.
- Solver configuration:- Each physical network represented by simscape block diagram requires solver settings information for simulation. The solver configuration block specifies the solver parameters that your model needs before you can begin simulation.
- Ideal Translations motion sensor:- This block measures velocity or displacement in a mechanical translation network
- Electrical & mechenical references:- This block is used for fixed parts frames or grounding electrical connections or determining or labeling constants.
- Scope:- used for displaying signals output in graph, similar to plot in matlab.
EXPLANATIONS
- The pulse generator is used to give signal inputs with phase delay so it can be delayed for 2 seconds as asked aslo shown in input scope.

- After signal is coverted via simulink ps block it is sent to switch block
- To complete the circuit batter solenoid blocks are use and connected to each other. then we use electrical for grounding and constant frame purpose
- Solver configuration is used to specify solver parameter.
- Then the one output from solenoid is connected to ideal mechanical sensor which is already connected to mechanical reference.
- Ideal mechanical sensor is conncted to scope which shows output which shows plunger movement as shown below

The vibrational spike in graph shows that the after 2 seconds delay the bell rings and create that impulse in graph.
OBJECTIVE 2: THERMISTOR model using simulink.
Theory
Thermistors are resistors whose electrical resistance varies with changes in temperature. The working principle of a thermistor is that its resistance is dependent on temperature
IT is of 2 types
NTC: Where temperature increases and resistance decreases and vice versa.
PTC: where temperrature increases and resistance increases and vice versa.
Simulink Model

BLOCKS USED
- Signal Builder: Generates electrical signal according to inputs we give.
- Ps-simulink convertor: Converts simulink signals into physical signal.
- Controlled temperature source:Provide temperature physical output based on condition given in input port.
- Thermal Reference: It provides Required initial conditions to connected thermal block for the solver
- Thermistor: We use here NTC thermistor .
- Battery: It is storage device that provides required voltage based on parameter given and can use DC source too.
- Resistor: Provide opposing nature to the current in the circuit.
- Voltage sensor: Used to measure potential difference across any electrical component and should be connected parralel only.
- Electrical reference: It provides required initial conditions to solve connected thermal block for solver.
- Solver configuration: It specifies solver parameters taht model needs before you can begin simulation and its mandatory in all simascape models.
- Constant: Provides constant output value.
- Switch: It is simulink library block which has 3 ports port 1,2,3. Port 2 is a control input where signal given to port 2 is satisfied with the conditions and threshhold of the switch block then passes to port if it satisfies then it ok otherwise it will send to port 3 as output .
- DC motor: It proved velocity and torque as output.
- Ideal rotational sensor: It measures angular velocity or rotational work of the block.
- Controlled voltage source: Provide voltage physical output based on conditions provided in input ports.
- Scope: Provide results in graphical method.
EXPLANATION
- FIrst we add thermistor (NTC) block. The port T is connected with controlled temperature source block.The block one port is connected to thermal reference and other to convertor.
- The temperature Data is created in signal builder block which is then converted to physical signal Using PS-simulink converter and sent to the controlled temperature source the temperature data is as shown below.

- We use temperature data in kelvin so we change ps -simulink data units into 'K' and change input handling into filter input & first order filtering.
- Battery and voltage senesor are connected in series and resistance in paralell to voltage sensor solver configuration is connected with electrical reference .
- Voltage sensor sends output to switch block in which threshold value is inserted and when value is above 25 degree celcius it switch on and sends data furtur to DC motor.
- DC motor data is passed through Controlled voltage source block and sends to ideal rotational sensor block .
- Rotational sensor block is connected in circuit with DC motor ,rotational reference and solver configuration.
- We then send output of sensor to scope and run for 50 sec to confirm the results.
Results


AS the speed legend shows when the temperature is more than 25 degree celcuis the fan is working so switch is working in perfect way.