How to make an Arduino ultrasonic sensor relay?

How to make an Arduino ultrasonic sensor relay?

Quick Steps. 1 Connect Arduino to PC via USB cable. 2 Open Arduino IDE, select the right board and port. 3 Copy the above code and open with Arduino IDE. 4 Click Upload button on Arduino IDE to upload code to Arduino. 5 Move your hand in front of sensor. 6 See the change of relay’s state.

How are relays used in home automation projects?

Relays are often used in home automation projects. They can be configured to switch AC line current to loads like fans, motors, and lights. Inside the relay is an electromagnetic coil that actuates a high voltage switch when there is current flowing through the circuit.

What can you do with an Arduino relay?

With a relay, you can easily use an Arduino to control the power of nearly any type of electrical device. The circuit shown below uses an LED as the output device. Relays are often used in home automation projects. They can be configured to switch AC line current to loads like fans, motors, and lights.

How is a microcontroller used in a tachometer?

The tachometer is an electrical device, used to measure motor revolutions. The exact feedback of a tachometer is used to enhance the performance and efficiency of the motor. The microcontroller used in this device is AT89C2051. This digital tachometer can be implemented for providing highly precise results.

How is a sensor connected to a relay?

If the sensor sinks current (NPN): The relay should be connected between a + power supply (Vcc) and the output (Vout). If the sensor sources current (PNP): The relay should be connected between the sensor output (Vout) and the ground.

What should the resistance be for a 12 volt relay?

For 12 volt operation and a sensor that sinks 20mA, the relay would need to have a coil/input resistance greater than 600 ohms. If the relay operating current exceeds the sensor operating voltage and current sink, please contact our engineering department to discuss further possibilities.

How are diodes used to protect a sensor?

Protection for the sensor from relay transients can be added using the above schematic. The diodes will protect the sink transistor of the sensor from transients caused by switching of the relay. RS will limit the current that the transistor has to sink, which is generally 20mA.