Simulink model of Doorbell using Solenoid Block
AIM : To make a Simulink model of "Doorbell using Solenoid Block" and make one more Simulink model to Sense the Temperature of Heater using a Thermistor & turn on or turn off the Fan as per given conditions.
SOLENOID :
A solenoid is a type of Electromagnet, the purpose of which is to generate a controlled Magnetic Field 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 an electric current is passed through it. Common applications of solenoids are to power a switch, like the starter in an automobile or a valve, such as in a sprinkler system.
- The coil is made of many turns of tightly wound copper wire. When an electrical current flows through this wire, a strong magnetic field/flux is created.
- The housing, usually made of iron or steel, surrounds the coil concentrating the magnetic field generated by the coil.
- The plunger is attracted to the stop through the concentration of the magnetic field providing the mechanical force to do work.


THERMISTOR :
A thermistor is a type of resistor whose resistance is strongly dependent on temperature, more so than in standard resistors. The word is a combination of thermal and resistor. Thermistors are widely used as inrush current limiters, temperature sensors (negative temperature coefficient or NTC type typically), self-resetting overcurrent protectors and self-regulating heating elements (positive temperature coefficient or PTC type typically).
Thermistors are of two opposite fundamental types :
- With NTC thermistors, resistance decreases as temperature rises usually due to an increase in conduction electrons bumped up by thermal agitation from valency band. An NTC is commonly used as a temperature sensor, or in series with a circuit as an inrush current limiter.
- With PTC thermistors, resistance increases as temperature rises usually due to increased thermal lattice agitations particularly those of impurities and imperfections. PTC thermistors are commonly installed in series with a circuit, and used to protect against overcurrent conditions, as resettable fuses.

OBJECTIVE :
1. To Make a Simulink model of Doorbell using solenoid block with the following details :-
- Create a situation where the switch is closed for 2 seconds and then released.
- Observe the physical movement of the plunger.
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.
SIMULINK MODEL OF DOORBELL USING SOLENOID BLOCK :

SIMULINK BLOCK EXPLANATION :
- The pulse generator is used to create square wave pulses at regular intervals. The block waveform parameters Amplitude, pulse width, period and phase delay determine the shape of the output waveform.

- In the pulse generator signals are generated for every 2 sec to control the switch to ring the bell.
- The generated signals are plotted and then converted to real time environment.
- Then according to the signal, the switch acts to control the flow of the current to the solenoid. When the current is passed to the solenoid it generates magnetic field to attract the iron armature.
- From the solenoid the Motion is sensed using Ideal Motion Sensor then the signals are converted to Simulink phase to record the motion of the hammer.
- Scope is connected with the ideal translational sensor to get the output.
- PS-Simulink converter is used to convert the physical signal to simulink signal.
- Each physical network represented by a connected simscape blocks requires solver setting
information for simulation.
FOR THE ABOVE BLOCK REPRESENTATION INPUT & OUTPUT PLOTS WOULD BE SHOWN BELOW :
INPUT PULSE GENERATOR PLOT :
- It’s understood that the time pulse is generated for every 2 seconds to control the switch in a time span of 10 sec.
-
When the switch is closed the solenoid blocks receives electrical power and the plunger move from port R to c to hit the bell and produce sound.

OUTPUT VELOCITY PLOT :
- From the velocity plot it’s understood that the bell is rung for every 2 sec in a time span of 10 sec.
- Hence we get this output signal which is actually plotting the physical motion of the plunger where we receive physical output
signal from the transitional motion sensor and this signal is converted to simulink signal by using PS-simulink converter and this
signal is read through scope which actually plots the graph.

OUTPUT POSITION PLOT :
- From the position plot it’s understood that the bell is rung for every 2 sec in a time span of 10 sec
- If the solenoid parameter is set as 'Port R moves toward port C', following negative waveform is obtained.

CONCLUSION :
- In order to obtain the simulation of the doorbell a solenoid is used which convert the electrical energy into mechanical energy
and form a simulation accordingly. - The motion of the plunger was simulated and recorded and plotted by using an ideal motion sensor and scope.
SIMULINK MODEL OF A THERMISTOR TO SENSE THE TEMPERATURE OF A HEATER TO
CONTROL THE FAN FOR COOLING :

SIMULINK BLOCK EXPLANATION :
- The Signal Builder block allows you to create interchangeable groups of piecewise linear signal sources and use them in a model. You can quickly switch the signal groups into and out of a model to facilitate testing. In the Signal Builder window, create signals and define the output waveforms.
- Input parameters are given in signal builder. Here it is required to input three temperatures and those in kelvin, as the temperature requirements are in kelvin within the code.
- The signal builder generates the time interval with various temperature as a source of heater.
Conditions of Heat Source,
T = 20 Degree Celcius for (0-10 s)
T = 27 Degree Celcius for (10-30 s)
T = 23 Degree Celcius for (30-50 s)
Condition for FAN,
T = Above 25 Degree Celcius - ON
T = Below 25 Degree Celcius - OFF
- We are providing 3 inputs which are in the form of temperature. In order to let the thermistor know whatever the input we are giving is a Temperature values, we are providing a Controlled Temperature Source.
- The output from the Controlled temperature source is given to the temperature input of the thermistor. Thermistor itself is a resistor whose resistance changes as per the input temperature. While double click the thermistor block it will shows some values the block are given below, The temperature values are initiate in kelvin (K).

- A voltage sensor is used which is a a device that converts voltage measured between any electrical connections into a physical signal proportional to the voltage. It is a physical signal port that gives voltage value.
- The voltage sensor is connected to switch by Ps-simulink convertor. In the switch block the threshold value is entered by obtained output value that is get from voltage sensor.
- Here the threshold value is measured and a display block is given to show the threshold value and this same value is given in the switch block to activate the switch and turn on the fan. The values obtained is 0.011964107676969 and it is then entered into switch block.

- Switch is the block which allows the fan to either ON or OFF depending upon the threshold voltage.
- Then the particular value (T=27 respective Voltage) the DC Motor is turned ON.
- Using the Ideal Rotational Motion Sensor the activities of DC Motor is obtained for plotting the Velocity and Angular Displacement plots.
FOR THE ABOVE BLOCK REPRESENTATION OUTPUT PLOTS WOULD BE SHOWN BELOW :
VOLTAGE SENSOR OUTPUT PLOT :
- From this plot we can conclude that the voltage is generated according to the temperature input w.r.t time. So the maximum voltage at T=27 Degree Celcius is 0.01285943094 V.

SWITCH OUTPUT PLOT :
- From this plot we can understand that the voltage is obtained for (10-30 s) at T=27 Degree Celcius to turn ON the motor. The threshold value used is ‘0.011964107676’

OUTPUT VELOCITY AND ANGULAR DISPLACEMENT PLOT :

- From the above two plots we can conclude that the fan (DC MOTOR) was turned ON when the temperature exceeds T = 25 Degree Celcius. Here out of three inputs, T = 27 Degree Celcius is where it exceeds T = 25 Degree Celcius so the fan will be turned ON (Time = 10-30 s).
CONCLUSION : Do the simulation of a Fan for the input conditions and start and stop the fan depending upon the temperature. Understanding the working of a thermistor, its properties, how to switch on or off a fan depending upon the inputs. The thermistat is used to sense the temperature as per the given conditions and output is obtained.