Challenge

Week -2

Simulink model of Doorbell & thermistor

Project 1: Doorbell model

Aim: Design the doorbell model using Simulink blocks.

Objectives:

  1. Study working principle of doorbell system.
  2. Study working mechanism of doorbell system'
  3. Study Simulink block required for the model.
  4. Plotting the input and output graph.

Theory:

The electric doorbell is a simple circuit that triggers a sound on the completion of the circuit by pressing the button. It is this simplicity that makes the doorbell such a marvel. The simple devices in the doorbell are put the scientific principle of electromagnetism into action in a useful way. To understand the operations of an electric bell, you should first need to understand what is an electromagnet. Well, to put it in simple words, an electromagnet is basically a type of magnet in which the magnetic field is produced with the help of an electric current. When any electrical influences electromagnet it works as a standard magnet (generating magnetic fields). When the power generation to an electromagnet stops, the production of the magnetic field also stops.

So, in an electric bell, an electromagnet forms an important part along with Armature, Spring, Armature rod, Hammer, and a Gong.

An electric source, for example, a battery can be used to power the electromagnet used in an electric bell. The electric circuit is completed by installing a push switch which you can press to generate sound in an electric bell. The switch also acts as the circuit breaker.

So once the setup is completed, when the switch is pressed, the circuit loop is complete which causes the current to flow through the circuit. The arm which strikes the gong is connected to spring at one end and an iron ball at the other end. This is called a hammer or a hammer. The arm is attached to an iron strip which is attracted to the electromagnet when the circuit is complete and the current flowing through it.

Why does this happen? It’s mainly because the magnetic field created by the electromagnet attracts the iron strip towards it when the circuit is complete. This is the moment when you hear the ringing sound since the hammer keeps hitting the gong. Meanwhile, at its rest position, the hammer is held away from the gong on account of the spring attached to its arm. This is an anchored arm.

Working Mechanism:

Now that you have an understanding of the important parts of an electric bell, the step-by-step process of the working of the electric bell is described below:

  • The switch is pressed and the current flows through the circuit.
  • The electromagnet is powered and generates a magnetic field that attracts the iron strip towards it.
  • The hammer strikes the gong (bell).
  • When the hammer strikes the gong, the contact is broken and the current stops flowing through the circuit.
  • This causes the electromagnet to lose its magnetic field. The connected spring arm returns the hammer to its original rest position.
  • The contact is restored and current flows through the circuit (provided the main switch is still pressed).
  • The process is repeated from the beginning.

Simulink Model Study:

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 the output waveform. The following diagram shows how each parameter affects the waveform.

2.Scope: It is used to display the output of the signal. It has only an input port.

symbol:

3.Simulink-PS Convertor: It is used to convert Simulink signal to physical signal.

symbol:

4.Battery: It is used as a source of voltage and current.

symbol:

5.Switch: It is a type of switch which takes the input signal from the physical signal to allow to flow of current from the circuit.

symbol:

6.Electrical reference: It is used for grounding for the circuit.

symbol:

7.Mechanical Translational Reference: The Mechanical Translational Reference block represents a reference point, or frame, for all mechanical translational ports. All translational ports that are rigidly clamped to the frame (ground) must be connected to a Mechanical Translational Reference block.

symbol:

8.Solenoid: The Solenoid block represents the electrical characteristics and generated force for the solenoid in the following figure:

The return spring is optional. To remove the effects of this spring from the model, set the Spring constant parameter to 0.

To show the direction in which the solenoid acts, the block icon changes dynamically based on the value of the Motion direction under the excitation parameter.

symbol:

Ports:

1.+-Positive Terminal:

Electrical conserving port associated with the solenoid positive terminal.

2.-_Negative Terminal:
Electrical conserving port associated with the solenoid negative terminal.

3.C-Case:

Mechanical translational conserving port associated with the case

4.R-Plunger:

Mechanical translational conserving port associated with the plunger.

9.Ideal Translational Motion Sensor: The Ideal Translational Motion Sensor block represents a device that converts an across variable measured between two mechanical translational nodes into a control signal proportional to velocity or position. You can specify the initial position (offset) as a block parameter.

symbol:

Ports:

1.R-Rod (positive probe):

Mechanical translational conserving port associated with the sensor positive probe.

2.C_Case (reference probe):

Mechanical translational conserving port associated with the sensor negative (reference) probe.

3.V_Velocity, m/s:

Physical signal output port for velocity.

4.P_Position, m:

Physical signal output port for the position.

10.Display: It is used to display the output values.

symbol:

11.PS-Simulink Convertor: It is used to convert the physical signal to a Simulink signal.

Symbol:

Simulink Model of doorbell:

Explanation Of model:

1.First up all battery model is added to circuit by battery source block.

2.Now we add a switch with taking input from the physical signal, to operate this switch we add a pulse generator whose output is converted to a physical signal with the help of a signal converter. as stated in the problem we have to give a delay of 2 seconds after each cycle, so we give phase delay as 2 seconds. We have to connect the electrical system to electrical reference i.e. grounding the circuit.

3. Now we connect the solenoid terminal to the battery and switch as shown in the model. The c port is connected to the mechanical translational reference so it is fixed. next, the R port is connected to the ideal translational motion sensor to get the output of the plunger in terms of the position of the plunger.

4. Now we connect the display to the ideal translational motion sensor with the help of PS to Simulink converter and connect this to scope which will plot the output motion of the plunger.

5.The solver Configuration block is used to specifies the solver parameters that your model needs before you can begin the simulation.

Outputs:

  • After successfully running the simulation, the result can be visualized by using scope and also display block which shows the output value.
  • From the simulink model, the Scope that is connected to the Pulse Generator displays the Amplitude vs Time plot i.e. it displays the pulse behaviour.

  • Based on the input data that is given in Pulse Generator Block, the above plot shows the pulse generation.
  • This plot shows the situation where the switch is closed for 2 seconds and then released.
  • As per the declared values, pulse generation has started after 2 seconds.
  • At 2 seconds the amplitude maintained is 1 and then again for next 2 seconds the pulse is maintained zero.
  • From the plot it is clear that, when amplitude is maintained at value 1 then the switch will be Turned Off and when it is zero the switch will Turn On.

  • From the simulink model, that is connected to the Ideal Translation Motion Sensor block displays the Position of plunger vs Time plot.
  • The above plot shows the position of plunger at various time intervals.
  • When we compare the Pulse Generator plot with the Position vs Time plot, it is observed that for the given time intervals the bell rings i.e. the bell start ringing at the interval of 2sec with the given phase delay of 2sec

Conclusion:

A Simulink model of Doorbell using solenoid block is built. Using this model a pysical bell phenomina is developed where the switch is closed for 2 seconds and then released. Also the physical movement of the plunger is observed from the output plot.

Project 2 : Use a thermistor to sense the temperature of a heater & turn on or turn off the fan

AIM : To create a Simulink model of a thermistor to sense the temperature of a heater and turn the fan off or on as per the given conditions.

The conditions are -

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.

THEORY -

A type of resistor whose resistance value is sensitive to the change in temperature is known as Thermistor. This is the passive component in the circuit. The material used in the construction of this differs from RTD’s. The thermistors are made by using Ceramic or polymers.

The temperature measured from this thermistor produces accurate values. These are of cheap and robust nature. But it doesn’t go well when we connect it in extreme cold and hot conditions. When the requirement is raised to maintain certain limited range thermistors are preferred. In the case of large temperature range RTDs are used because they are made up of pure metals.

Working principle of a thermistor -

Thermistors functioning is described as

  • The principle obeyed by the thermistor is its dependency on-resistance values on the temperature change.
  • The value of resistance can be measured by using an ohmmeter. These are connected in series with the battery and the meter.
  • The change in the resistance is depending upon the material chosen in the construction of the thermistor.
  • Thermistors are considered to be a special variety of resistors. Generally, the resistor is known for limiting the amount of current in the circuit.
  • But in these thermal resistors, the change in the resistance is dependent upon the temperature change.
  • If the temperature tends to increase the resistance in the circuit decreases in these special variants of resistors. It is decided based on the coefficient of temperature.

The thermistors are classified into two categories based on the type of temperature coefficient.
There are two types of temperature coefficients namely negative temperature coefficients and positive temperature coefficients. The ceramic semiconductor material used for each type of thermistor, differs, as the temperature coefficient is dependent on the material used.

NTC thermistor -

NTC or negative temperature coefficient thermistor is a device whose resistance decreases with an increase in temperature. These types of resistors usually exhibit a large, precise, and predictable decrease in resistance with an increase in temperature. Unlike other resistors (fixed or variable), these are made of ceramics and polymers, which are composed of metal oxides that are dried and sintered to obtain the desired form factor. In the case of NTC thermistors, cobalt, nickel, iron, and copper oxides are preferred.

A typical NTC thermistor gives the most precise readings in the temperature range of -55oC to 200oC. However, some specially designed NTC thermistors are used at absolute zero temperature(-273.15oC) and some can be used above 150oC. The figure below shows the characteristic curve of an NTC thermistor.

PTC thermistor -

PTC or Positive temperature coefficient Thermistors are those resistors whose resistance increases with an increase in ambient temperature. PTC Thermistors are grouped according to their structure, materials used, and their manufacturing process. Silistors, are PTC Thermistors that belong to the first group(according to material used and structure). They use silicon as the semiconductor and have linear characteristics. Switching type PTC Thermistors belong to the second category (according to the manufacturing process). This Thermistor has a nonlinear characteristic curve. As the switching type, PTC Thermistor gets heated, initially, the resistance starts to decrease, up to a certain critical temperature, after which as the heat is increased, the resistance increases dramatically. The following figure shows the characteristic curve of a Silistor and a switching type PTC Thermistor.

In our Simulink model, we will be using an NTC thermistor.

Before we make the model, we need to choose the right blocks and each of those blocks has been explained below.

1. Signal Builder - this block is used as an input signal in our model as we have varying temperatures at different time intervals. This block is the perfect fit for our model.


2. Controlled temperature source - this block is used as a temperature source for our thermistor in the model.

3. Thermistor - this block will be used for the connection with our controlled temperature source in the model. The inputs given to this block is shown below.

4. DC voltage source - this block acts as a voltage supply to the electrical circuit in the model. The input is provided below.

5. Resistor - this block is connected to the thermistor and serves as a medium through which we can observe the variation in the thermistor. Basically, this block acts as an ohmmeter. The inputs are provided below.

6. Voltage sensor - this block is used to check the voltage variation across the resistor which is connected with the voltage source.

7. Switch - this block is used as an if & else statement that satisfies the required conditions. The first port is given an input of a constant value 1, the second port is given an input of a constant value 0. Hence, the block acts as an ON & OFF switch.

8. simulink PS converter - It is used to convert Simulink signal to physical signal.here we are using degC as signle unit beacuse we provide the value in terms of degreecelsius

PROCEDURE -

1. Firstly, we need to select an appropriate temperature source and provide our input. For our temperature source, we will be using the controlled temperature source block.

2. For the input, we will be using a signal builder and the input is provided below. 20 °C from 0 to 10 seconds, 27 °C from 10 to 30 seconds, 23 °C from 30 to 50 seconds.

3. Now the temperature source is connected to the thermistor which is connected to another resistor and this circuit is powered through a DC voltage source of 50 V. A voltage sensor is connected across the resistor through which we can observe the voltage variations as the temperature varies.

4. The output of the voltage sensor is connected to a switch. This switch acts like an if & else statement in this model or more accurately an ON & OFF switch for our fan.

5. The output of the switch is connected to a scope so we can show the changes and signal builder is also connect with the scope 1 so we can compare the condition.

6. We will be using the electrical, temperature, and mechanical rotational references wherever required in the model. The solver configuration block is also used wherever necessary.

7. After all the connections are made and inputs are fixed, the model will be ready.

The Simulink model for the heater is shown below.

OUTPUT :

  • After successfully running the simulation, the result can be visualized by using scope and also display block which shows the output value.
  • The trend of the input parameter signal is visualized and then its compared with the output signal.
  • when the temp is below 25 then output is 0 means fan is OFF but when the output is above 25 then output value is 1 means fan is ON.

CONCLUSION : A Simulink model using a thermistor to sense the temperature of a heater is created and parameters are set to Turn On or Turn Off the Fan based on the specified temperature and time.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.