Week -2
Objective:
1.Make a Simulink model of Doorbell using solenoid block.
2.Use a thermistor to sense the temperature of a heater & turn on or turn off the fan.
1.Simulink model of Doorbell using solenoid block.
Theory:
Solenoid:the solenoid is a device comprised of a coil of wire, the housing, and a moveable plunger (armature). When an electrical current is introduced, a magnetic field forms around the coil which draws the plunger in. More simply, a solenoid converts electrical energy into mechanical work.
Doorbell:
Below image shows the working of the electric doorbell. when the switch is on the electrical circuit is activated and it activates the solenoid which turns to hits the bell.
Block model:

Explanation:
- The Signal Builder block is used to create a signal, where for initial two seconds the amplitude is 5mm and after two seconds the amplitude drops to 0mm for another 4 seconds
- The signal is observed using scope
- The Simulink-PS converter is used to input the signal to the Switch, which is part of electric circuit, other blocks in electric circuit are battery, Electrical Reference,and Solenoid
- Block model:The switch is closed for first 2 seconds as the threshold value is less than the signal amplitude and the charge flows through the circuit, and the magnetic field is generated due to the solenoid and the plunger starts to move and after 2 seconds the signal amplitude becomes less than threshold so the switch become open, stopping the flow of charge
- The Solenoid block has two ports R(plunger) and C(case) other than +ve and -ve charge ports
- The C port is connected to theMechanical Translational Reference and R port is connected to the R port of Ideal Translational Motion Sensor block
- The Ideal Translational Motion Sensor block is connected to the Solenoid to measure the plunger displacement
- This block has four ports R, C, V, and, P which are Rod, Case, Velocity, and Position respectively
- The PS-Simulink converter is used to convert the physical signal from the sensor block and input the converted signal to the scope to obtain the position of the plunger
Result:
- Scope output of the signal from Signal Builder block, showing the signal curve, for initial 2 seconds the amplitude is 5mm and after 2 seconds the amplitude drops to 0

- Scope output of the Ideal Translational Motion Sensor, showing the displacement of the plunger, from 0 to 2 seconds there is plunger movement and then after 2 seconds the plunger movement comes to rest

2. Simulink model of Fan controlled by Temperature
Given:
- Temperature source: 20 degC from 0 to 10 secs, 27 degC from 10 to 30 secs, 23 degC from 30 to 50 secs
- Fan conditions: ON if the temperature above 25 degC, OFF otherwise
Theory:
Thermistor: The Thermistor is a special type of variable resistive element that changes its physical resistance when exposed to changes in temperature. The working principle of a thermistor is that its resistance is dependent on its temperature.
Block model:

Explanation:
- To create a signal according to the given condition the Signal Builder block is used and then the signal is passed to Controlled Temperature Source through the Simulink-PS Converter, which converts the Simulink signal to Physical signal and this block is also used to assign units for the signal
- The Controlled Temperature Source usually stores the temperature in Kelvin units, so in order to get correct solution the input signal should be in Kelvin or the units should be specified so that convertion could be done in the Controlled Temperature Source
- The output of Signal Builder is observed using scope
- The output signal from Controlled Temperature Source is passed to Thermistor which is connected in a electrical circuit which has other elements including Resistor, Battery, Electrical Reference, Voltage Sensor, and Solver Configuration
- The resistance was changed to 1000 ohm inside the Resistor block, although it is not necessery for this model
- The voltage sensor is connected parallel to the resistor and the voltage is observed across the resistor through the scope
- To impliment the condition according to which the fan would be controlled, a Switch block is used with three input port where first port is data port which is passed with the output signal from the Voltage sensor, the second port is passed with with the same signal as passed with the first port but with the condition that if the signal value is greater than the Threshold value then only the signal from port one could be passed as an output from switch, if the signal value at second port is less than the threshold value, it will be blocked and the signal from third port will be outputed. Here in this model the third port is given value 0 using the constant block
- The output signal from the switch block is passed to Controlled Voltage Source which is connected in another electrical circuit which consists DC Motor, Electrical Reference and Solver Configuration
- The DC Motor block has other two ports excluding the charge ports, namely C(Motor Case) port and R(Motor Rotor) port
- The DC Motor is connected to the Mechanical circuit with its two ports C and R. The R port is connected to the R port of the Ideal Rotational Motion Sensor and C port of DC Motor is connected to the C port of the Ideal Rotational Motion Sensor and this closed circuit is connected with Mechanical Rotational Reference
- The Ideal Rotational Motion Sensor block has two output ports namely W(Angular Velocity) portand A(Angle) port. The output physical signal from the W port is converted into Simulink signal and it is observed using the scope block
Result:
The below figure shows the scope output contaning the signal from the Signal Builder block, which shows the signal which is a variable temperature over a time range of 50 secs. From 0 to 10 secs, temperature is 20 degC, from 10 to 30 secs, temperature is 27 degC and from 30 to 50 secs, temperature is 23 degC

The below figure shows the scope output containing the signal from the Voltage sensor, where 0 to 10 secs the voltage is 5.396V, from 10 to 30 secs the voltage is 6.228V and from 30 to 50 secs the voltage is 5.757V

The below figure shows the scope output containing signal from the Ideal Rotational Motion Sensor, which shows the angular velocity over a time period of 50 secs. From 0 to 10 secs the Angular Velocity is 0 rad/s, as in this period the temperature is below 25 degC and switch passes 0. From 10 to 30 secs the Angular Velocity is 9.058 rad/ms, as in this period the temperature raises above 25 degC and switch passes the voltage signal and from 30 to 50 secs the Angular Velocity drops to 0 rad/s over this time range as the temperature falls below 25 degC and the switch passes 0 value
