Professional Documents
Culture Documents
Lab 9
Lab 9
BTVTEd – CP3
LAB 9
1. Can the relay module control other appliances with higher voltage aside from
Yes, a relay can control more than just lights. It's like a remote for turning on
and off things, and it works with devices that use a lot of power, not just light bulbs.
The cool part is that it keeps the small, safe signals away from the big, strong ones,
so everything stays safe. It's like having a switch that listens to a small voice to
control something much louder, like appliances. So, relays are handy for all kinds of
gadgets, not just lights, and they help keep things safe.
2. Define the specification of the 5v relay module and discuss its limitations. Give
The 5V relay module is like a little switch that listens for a 5-volt signal, often
from something like a computer or a small gadget. It's handy because it can control
bigger things, like appliances or machines that need more power. It keeps the small
signals safe from the big ones, which is cool. However, it does have some limits. You
can't make it switch too fast, or it might not work well. Also, it might wear out over
time if you use it a lot. It could make a little bit of noise and cause some interference,
which might be a problem in certain situations. And, you need to be careful not to go
over its limits, like using too much voltage or current. So, while it's useful for many
things, there are some things you need to keep in mind to use it right.
Write a program that will turn on the light if a person is within the 0-30cm range.
Otherwise, the light is off. Note: You may use HC-SR04 as your sensor. The circuit
#include <DistanceSensor.h>
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(relayPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
unsigned int distance = sonar.ping_cm();
I've learned from this activity that by the use of a relay module I can control
things that require high voltage such as a light bulb with a microcontroller that is the
Arduino. I also learned that the relay module not only can control light bulbs but other
big appliances as well.
In conclusion, relay modules are like helpful switches in electronics. They let
us safely control powerful devices using small signals.