Week -2
This week the challenge is :
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. Here Im going to solve the doorbell first:
Lets first understand about the Solenoid
The purpose of which is to generate a controlled magnetic feld through a coil wound into a tightly packed helix. The coil can be arranged to produce a uniform magnetic field in a volume of space when a current is pass through it.

Component used to generate a simple doorbell circuit:
In the 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 by creatng a situation where the switch is closed for 2 secs and then released.
Blocks used:
1. pulse Generator
The pulse generator block generates square wave pulses at regular intervals. The block waveform parameters, amplitude, pulse width, period and phase delay, determine the shape of output waveform.

2. Battery:
In battery positive terminal is connected with switch a negative terminal is connected to electric reference.
3. switch:
The switch block model a switch is controlled by an external physical signal.
4. solenoid block:
Solenoid block is connected with switch and battery and electrical circuit will be formed.
The solenoid block represents the Electrical characteristics and generated force for the solenoid.
The return spring is optional. To remove the effects of this sprig form the model, set the spring constant parameter as from 0 to 10.
To show the direction in which the solenoid acts the block icon changes dynamically based on value of the motion directon under excitation parameter.
The port 'c' is connected with mechanical translation reference.
5. Ideal Translation Moton Sensor Block:
Ideal Translation Motion Sensor Block is connected with solenoid Block 'R' to observe the physical movement of the plunger.
connections R and C are mechanical translational conserving ports that connect the block to nodes whose motion is being monitored.
connections V and P are physical signal output port for velocity and position, respectively.
The block positive direction is from port R to port C. This means that the velocity is measured as v = vR - vC, where vR, vC are the absolute velocities at ports R and C, respectively.
Port C is connected with mechanical translational reference.
6. Scope:
Scope is connected with Ideal Translation Motion Sensor to get the output. The real time scope block acquires data in chunks of size number of samples from the real time application that is executing on the target computer.
7. PS_simulink converter:
The ps_simulink converter block converts a physical signal into a smulink output signal. Use this block to connect outputs of a physical Network diagram to simulink scopes or other simulink blocks.
8. Simulink_ps converter:
This Block convert simulink signals into physical signal for operational use in model.
9. Electrical Reference Block:
The Electrical reference block represents an electrical ground. Electrical conserving ports of all the blocks that are directly connected to ground must be connected to an electrical reference block. A model with electrical elements must contain at least one electrical reference block.
10. Mechanical Translation reference block:
The mechanical Rotational reference block represents a reference point, or frame, for all mechanical rotational ports. All rotational ports that are rigidly clamped to frame(ground) must be connected to a mechanical rotational reference block.
11. solver configuration:
Each physical network represented by a connected simscape block diagram requires solver setting information for simulation. The solver configuration block specifies the solver parameters that your model needs before you can begin simulation.
Objectives:
For Doorbell- create a situation where the switch is closed for 2sec and then released. Observe the physical movement of the plunger.

Output:


Conclusion:
1. Understanding of the changes in curve characteristics upon changing the solenoid parameters.
2. Understanding the principle if working of a doorbell and its construction.
3. Analysing the various simulink library blocks.
2 . A thermistor to sense the temperature of a heater & turn on or turn off the fan:
Thermistor-
A thermistor is a resistance thermometer, or a resistor whose resistance is dependent on temperature. The term is a combination of thermal and resistor. It is made of metallic oxides, pressed into a bead, disk, or cylindrical shape and then encapsulated with an impermeable material such as epoxy or glass.
Procedure:
First we give the input signal with the help of repeating sequence stair block.
The input signal block is connect to 's' port of the controlled temperature source block with the help of a simulink - ps converter the 'b' port of the controlled temperature source is connected to the 'a' port(net heat flows through port A) of thermistor.
A scope is connected to the input signal of observe the input.
Then we make a thermistor block and connect a battery to it as a voltage source.
Then we connect a resistor block and connect it to a voltage block in series to measure the voltage flowing through the resistor.
Display block is connected to 'v'(v is the physical port that outputs the voltage value) of the voltage sensor with the help of a ps simulink converter to display the output.
A conditional switch block with 2 constant blocks of value '0' and '1' is connected to the 'v' port of the voltage sensor.
The threshold of the switch is calculated with the help of thermistor equation
8.29 ohms is calculated as the threshold at 25 degree celsius and it given as threshold for switch.
T1 is the first temperature point in kelvin and T2 is second.
R1 is the thermistors resistance at temperature T1 and R2 for T2 in ohms.
The conditional switch block is connect to a scope to display the graph and the output of switch is connected to a lamp, the lamp glows red if the resistance across is less than the switch threshold meaning the fan if off, if the resistance across is higher than the switch threshold the lamp glows green meaning the fan is on.
Thermal reference and electrcal reference is connected to provide earthing.
The initial stop time is given as 20 sec.
Simulink Model:
The fan is off when the temperature is less than 25 degree celsius and the fan is on when the temp is greater than 25 degree celsius.
Input scope:

temperature below 25 degree celcius, fan is off.

output scope:
0 in the graph indicates the fan is off.

Temperature above 25 degree celcius , fan is on.

output scope:
1 in the graph indicates fan is on

Parameters:
Repeating sequence stair:

Switch parameter:
