Challenge

Week -2

1. Simulink model of Doorbell using solenoid block :Here we are going to simulate classic conventional Door bell.

To build simulation of door bell, we must know the theory behind it.

Door Bell Theory: A door bell is made comprised of a solenoid that turns into an electromagnet when electricity passes through it and a piston or a clapper that conducts magnetically.

Solenoid: A solenoid is an iron core with several rounds of copper coil wrapped around it. The iron core turns into an electromagnet when power is fed through the coil.

To understand its working better, lets look into the below diagram.

IMAGE:

As we can see the door bell consists of a Battery, switch, solenoid(electro-magnet), clapper and bell or tone bar.

when the Battery switch is open, the spring attached to the clapper holds back the clapper(away from the bell). and When you turn the electromagnet on (by pressing the doorbell button), the iron core is drawn to the magnetic field, so it slides into the center of the coiled wire (towards bell).

As the iron core slides towards center of coil, the end of the piston strikes the right-hand tone bar. The tone bar vibrates, producing a particular note. This is the "ding" sound.

As long as you hold the doorbell button, the current will flow through the electromagnet and the piston will remain in this position. But when you release the button, the current will stop flowing through the electromagnet and the magnetic field will collapse. The spring snaps the piston back to the left, where it hits the tone bar on the other side. The second tone bar produces the "dong" sound.

Now to setup this physical system in simulink we need to know about the blocks involved.

PS-Simulink and Simulink-PS converter, Scopes, Displays, Pulse generator, electrical and mechanical references, solenoid, Battery, switch, ideal Transalation motion sensor, solver configuration. These are the following simscape and Simulink blocks that are going to use in this simulation.

PS-Simulink and Simulink-PS converter: These are basically the converter from Physical systems to Simulink signals and vice versa.

Pulse generator: is an analog input that has amplitude and frequency with which the input is transmitted.

Electrical and Mechanical references: is a reference block with which the system has a ground source as a base.

Solenoid: is an electromagnetic device that is represented as a block here.

Battery: is a device that has a negative and positive terminal for the electric circuit to be completed for an electric flow.

The Switch: is a device the completes the electric circuit for current flow and can be controlled manually or automatically depends on the type of switch required.

Ideal Translated motion sensor: It's a type of sensor which provides the position or velocity input for the system to generate output.

Solver Configuration: It's a type of block that acts as a complete equation for where f(x) = 0 where we find the value of x and generate the output which represents the block diagram as an equation.

Before we begin the simulation we need to setup an input parameter here in pulse generator where we delay seconds should be 2 secs with amplitude 1 and Pulse time should be 4 secs to make it in half with 50% pulse width.

Input:

IMAGE:

IMAGE:

And here is the Full simulation with all the simscape and Simulink block system:

IMAGE:

output:

IMAGE:

2.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.

There are two types of thermistors: Negative Temperature Coefficient (NTC) and Positive Temperature Coefficient (PTC). With an NTC thermistor, when the temperature increases, resistance decreases. Conversely, when temperature decreases, resistance increases. This type of thermistor is used the most.

A PTC thermistor works a little differently. When temperature increases, the resistance increases, and when temperature decreases, resistance decreases. This type of thermistor is generally used as a fuse.

Typically, a thermistor achieves high precision within a limited temperature range of about 50ºC around the target temperature. This range is dependent on the base resistance.

AIM:

To use a thermistor in Simulink 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.

Over all simulation:

IMAGE:

Breaking down the model into different subsystems

SUBSYSTEM 1: Generates Simulink signals.

IMAGE:

In order to test the working of the model for a wide range of temperatures, we have designed our input in the form of steps of temperatures greater than, equal to and less than 298.15K.

We have used Simulink blocks here to generate step signals of our desired nature which is fed into a 'controlled temperature source' simscape block. Here the Simulink signals are connected to the temperature signals that are fed as input into the thermistor.

THE GRAPH OF INPUT TEMPERATURE SIGNAL TO THE THERMISTOR :

IMAGE:

SUBSYSTEM 2: The temperature signals here are converted to current signals that are fed to subsystem 3.

IMAGE:

Here we connect the thermistor to a battery source and a current sensor. As the thermistor has an inherent resistance at its standard temperature, we effectively use it as a resistor in this circuit, whose value changes with the temperature input to the thermistor.

As the resistance of the thermistor changes in accordance with the varying temperature, for a given input voltage from the battery, the current in the circuit changes. This current is then fed to the subsystem 3 that is meant to activate a switch.

At its reference temperature 298.15K, the thermistor holds a resistance of 1000 ohms.

IMAGE:

IMAGE:

At this reference state, the current in the subsystem 2 is noted to be 0.011A.

When the temperature signal fed into the thermistor is greater than 298.15K (i.e 25-degree Celsius), its resistance decreases and hence the current in the subsystem 2 increases i.e its value rises more than 0.011A.

When the temperature signal fed into the thermistor is less than 298.15K (i.e 25-degree Celsius), its resistance increases and hence the current in the circuit decreases i.e its value plunges lower than 0.011A.

IMAGE:

The above graph shows the current change with respect to the input temperature signals.

Note that as the temperature is increased beyond 298.15K the current value also surpassed the reference current 0.011A. Needless to say, its value plunges below 0.011A when the temperature falls below 298.15K.

We exploit this behavior using a switch in the subsystem 3 whose threshold is set as 0.011. By feeding a higher value of current through the switch we ensure that the circuit in subsystem 3 gets closed, which enables the fan to rotate. This is in line with our aim that the fan must rotate when the temperature exceeds 25-degree celsius.

And when the current through the switch falls below 0.011A, which happens when the resistance value increases due to low temperature, the circuit in subsystem 3 remains open and hence the fan does not spin.

switch threshold must be kept at 0.011A.

IMAGE:

SUBSYSTEM 3:

We use a universal motor along with an ideal rotational motion sensor to visualize the rotation of the fan.The rotation of the fan in this subsystem is witnessed only when the switch here is closed by the current signal from the subsystem 2. And this switch is designed to close only when the temperature is greater than 298.15K i.e is corresponding to the current greater than 0.01198A as explained in previous subsystems.

IMAGE:

The rotation of the fan is shown using two parameters.

ANGULAR DISPLACEMENT and ANGULAR VELOCITY

ANGULAR DISPLACEMENT GRAPH:

IMAGE:

We can infer from this graph that the fan shows zero angular displacements up to the first 10 seconds when the temperature is 293.156K (20-degree Celcius)

When the temperature is 300.15K (27-degree Celcius)between 10 to 30 seconds we can see the fan moving.

And when the temperature is 296.15K(23-degree Celcius) between 30 to 50 seconds we can see that the fan has stopped spinning and the angular displacement is constant after 30 seconds.

RESULT:

From both the ANGULAR DISPLACEMENT and ANGULAR VELOCITY graphs we could infer that our fan is in motion only when the temperature signal sensed by the thermistor is greater than 25-degree Celcius, which is in line with the aim of the project.

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.