Week -2
Simulink Model of a Doorbell Using a Solenoid Block
Objective
Create a Simulink model of a doorbell using a solenoid block to simulate the mechanism where the switch is closed for 2 seconds and then released. Observe the physical movement of the plunger.
Theory of Doorbell Mechanism
A chime doorbell uses a solenoid, an electromagnet with a coiled wire surrounding a metal piston. When the switch is closed, the electromagnet receives power, pulling the piston to hit the bell and produce a sound. Releasing the switch stops the current, and a spring returns the piston to its original position.
Simulink Model Components
- PS-Simulink Converter: Converts physical signals to Simulink signals.
- Simulink-PS Converter: Converts Simulink signals to physical signals.
- Scope: Displays the simulation results.
- Pulse Generator: Generates a pulse to control the switch.
- Electrical and Mechanical References: Provide reference points for the electrical and mechanical systems.
- Solenoid: Represents the solenoid component.
- Battery: Provides power to the circuit.
- Switch: Controls the flow of current in the circuit.
- Ideal Translation Motion Sensor: Measures the position of the piston.
- Solver Configuration: Configures the solver for the simulation.
Simulation Setup
Pulse Generator:
- Amplitude: 1
- Period: 4 seconds
- Pulse Width: 50%
- Phase Delay: 2 seconds
Simulation Time: 10 seconds
Model Construction
- Connect the Pulse Generator to the Switch block.
- Connect the Battery to the Switch and Solenoid blocks.
- Use the PS-Simulink and Simulink-PS converters to interface the physical and Simulink signals.
- Connect the Ideal Translation Motion Sensor to measure the plunger's movement.
- Display the results using the Scope block.
Output
The simulation will show the physical movement of the plunger for the first 2 seconds when the switch is closed and then its return to the initial position when the switch is released.
Simulink Model to Control a Fan Based on Temperature Using a Thermistor
Objective
Use a thermistor to sense the temperature of a heater and turn on or off a fan based on the temperature conditions:
- Temperature source: 20°C (0-10 seconds), 27°C (10-30 seconds), 23°C (30-50 seconds)
- Fan conditions: ON if temperature > 25°C, OFF otherwise
Theory of Thermistor
A thermistor is a type of resistor whose resistance varies significantly with temperature. It's used to measure temperature changes accurately and robustly.
Simulink Model Components
- PS-Simulink Converter: Converts physical signals to Simulink signals.
- Simulink-PS Converter: Converts Simulink signals to physical signals.
- Scope: Displays the simulation results.
- Signal Builder: Creates the temperature profile for the heater.
- Thermistor: Senses the temperature.
- Switch: Controls the fan based on temperature.
- Fan (represented by a load or indicator): Turns on or off based on the switch signal.
- Solver Configuration: Configures the solver for the simulation.
Simulation Setup
Temperature Profile:
- 0-10 seconds: 20°C
- 10-30 seconds: 27°C
- 30-50 seconds: 23°C
Fan Control Logic:
- Use a comparison block to check if the temperature is above 25°C.
- Use the output of the comparison block to control the Switch block.
Simulation Time: 50 seconds
Model Construction
- Create the temperature profile using the Signal Builder block.
- Connect the Signal Builder to the Thermistor block.
- Use a comparison block to compare the temperature with 25°C.
- Connect the comparison block output to the Switch block.
- Connect the Switch block to the Fan (load or indicator) block.
- Display the results using the Scope block.
Output
The simulation will show the fan turning on when the temperature exceeds 25°C and turning off otherwise. The temperature profile and fan status will be displayed on the Scope.
Refer attachment for images