Challenge

Week -2

AIM:

This challenge aims to make a Simulink model of a doorbell using a solenoid black and make another Simulink model where a thermistor will be used to sense the temperature of a heater & turn it on or turn off the fan when it crosses a certain temperature.

OBJECTIVE:

1) To make a Simulink model of a Doorbell using a solenoid block with the following details.

In the above 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.

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 the 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 is above 25 °C, OFF otherwise.

Case study 1:

Doorbell:

A doorbell is a signalling device typically placed near a door to a building's entrance. When a visitor presses a button the bell rings inside the building alerting the occupant to the presence of the visitor. The heart of a doorbell is an electromagnet Electromagnets are calls of wire wrapped around a small piece of magnetic metal. When electricity passes through the wire it creates a magnetic field around the wire. When you press a doorbell button, you complete an electrical circuit that allows household electricity to flow through the doorbell's internal electromagnet the magnetic field generated by the electromagnet is then used to power the mechanism that creates the doorbell sound

Doorbells are low voltage devices. This means they require relatively little energy to operate. An important part of a doorbell mechanism is the transformer. The transformer converts regular 120-volt household current to the lower voltage (usually somewhere between 6-15 volts) required by the doorbell

The solenoid is an electromagnet with wire winding and a small metal piston inside it. When electric current flows through the wire, an electromagnetic field is generated which pulls the metal piston towards it. The metal piston hits the tone bar located on both sides of the arrangement.

Full Simulation Block Diagram:

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

2. Simulink-PS Converter:

Converts the unitless Simulink input signal to a Physical Signal

3. Scope:

Display signals generated during simulation

4. Switch:

Electrical Switch controlled by an external physical signal

5. Battery:

The Battery block represents a simple battery model

6. Solenoid:

Model electrical characteristics and generated force of the solenoid

7. 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. The sensor is ideal since it does not account for inertia, friction delays, energy consumption, and so on.

8. Mechanical Translational Reference:

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

9. Electrical Reference:

The Electrical Reference block represents the electrical ground Dectrical conserving ports of all the blocks that are directly connected to the ground must be connected to an Electrical Reference block. A model with electrical elements must contain at least one Electrical Reference block

10. Solver Configuration:

The Solver Configuration block species the solver parameters that your model needs before you can begin the simulation

11. PS-Simulink Converters

Convert physical signal into Simulink output signal

Model Explanation:

1. The pulse generator is used to give the signal input where, Amplitude-1 Period 4 sec, Pulse width=50%, and Phase delay 2 sec.

2. After that, the input signal is converted into physical form with the use of the 'Simulink-Ps Converter" and further send to the switch of the electrical circuit.

3. The electrical circuit consists of a solenoid, a battery, and a switch. One end of the solenoid is connected to the battery and the other is connected to the switch and electrical reference is provided in the electrical circuit.

4. The mechanical part of the solenoid is connected to an ideal translation motion sensor and mechanical translational reference

5. The P-port of the sensor makes a connection with the PS-Simulink Converter" to provide the output in signal form. Further, the converter is connected with scope to display our output signal

6. A solver configuration is connected to an electrical circuit to solve all parameters equation before the beginning of the simulation

Signal Input in Doorbell:

Output:

Here we can see that the switch is closed for 2 seconds and after that switch is open. Amplitude 0 means the switch is closed it can also be seen that the plunger strikes after every 2 seconds.

The motion of the plunger was simulated and recorded and plotted in scope.

Case Study 2:

Use a thermistor to sense the temperature of a heater & turn on or turn off the fan as per the below conditions.

Thermistor: thermal resistor is defined as a type of resistor whose electrical resistance varies with changes in temperature, Although all resistor's resistance will fluctuate slightly with the temperature a thermistor is particularly sensitive to temperature changes

Thermistors act as passive components in a circuit. They are an accurate, cheap and robust way to measure temperature. While thermistors do not work well in extremely hot or cold temperatures, they are the sensor of choice for many different applications Following is the Simulink block assembly for a Thermistor-based heater. And with condition follows here as

0-10 sec temperature 20 Degree Celcius.

10-30 secs temperature 27 Degree Celcius.

30-50 secs temperature 23 Degree Celcius.

and you can see these details are plotted on the basis in the signal builder block where the input is inserted with these signals.

Block Diagram To find the voltage for 25 Degree Celcius.

Note:

We found out the voltage value for 25 Degree Celcius of 0.01196Volt. Then input the Threshold value in the switchboard to act as actuating sensor.

Final Block Diagram:

Controlled Temperature Source:

This block represents an ideal energy source in a thermal network that can maintain a controlled temperature difference regardless of the heat flow rate. The temperature difference is set by the physical signal port S. A positive temperature difference causes the temperature at port B to be greater than the temperature at port A.

It gives the proper input signal to the Thermistor.

Signal Builder:

As per the input condition, we plotted the graph

Simulink to PS Converter:

Input Values are given as degC. It automatically takes all the values conversion as per the Solving the mathematical equations.

Voltage Sensor:

The block represents an ideal voltage sensor, that is, a device that converts voltage measured between any electrical connections into a physical signal proportional to the voltage.

Connections + and - are conserving electrical ports through which the sensor is connected to the circuit. Connection V is a physical signal port that outputs voltage values.

Switch:

Pass through input 1 when input 2 satisfies the selected criterion; otherwise, pass through input 3. The inputs are numbered top to bottom (or left to right). The first and third input ports are data ports, and the second input port is the control port.

The criteria for control port 2 are u2 >= Threshold, u2 > Threshold or u2 ~= 0.

Model Explanation:

At first, the signal is created in "Signal Builder" and further passes to "Simulink-PS Converter" to convert the input signal into the physical signal.

This physical signal is connected to a block "Controlled Temperature Source". This block is connected to the thermistor and a "Thermal Reference" block.

The thermistor is a part of an electric circuit where a battery, a voltage sensor, and a resistor connected parallel to the voltage sensor, an electrical reference are connected to make a complete circuit. A solver configuration is connected to that electrical circuit to solve all parameters before the beginning of the simulation.

The voltage sensor senses the temperature in the form of voltage and sends the data to its port V

From this port, we get our output and send it to two different "PS-Simulink Converters".

From converter-1, the signal is sent to the threshold switch. In the switch, the threshold limit is set to 1105550 converter-1 le 02. If the temperature is above or equal to the threshold limit, then it gives T as output which is "Switch On" If the temperature is below the threshold limit, then it will give "0" as output which means "Switch Off". The input signal is generated with the help of a "Signal Builder" block.

The switch is connected to the scope where we can see our output plot

From converter 2, converts the physical signal into a Simulink signal and sends the voltage data from the Voltage Sensor to display. This display gives us the threshold value of voltage. This value is set in the switch.

Output:

It can be seen that the value of the signal is '0' from 0-10 sec because at this time the temperature was 20°C which is below 25°C means 'Switch off the fan. After that, the signal value gives Tas output from 10-30 sec because in this time the temperature was 27°C which is above 25°C means "Switch on the fan. The value of the signal is again going to '0' from 30-50 sec because in this time the temperature was 23°C which is below 25°C means Switch off the fan". Now it is clear that our model is correct and fulfils all the input conditions.

Conclusion:

We have simulated & Exposed the result of both the case study using Simulink in the Matlab software.

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.