Тёмный

Connecting Micro:Bit to Relay 

MAKERDEMY
Подписаться 13 тыс.
Просмотров 6 тыс.
50% 1

Interfacing of a Relay with the Microbit
In this video, we will learn about the 2 channel Relay module, Then we will learn about the need for optocouplers in a relay module, and finally, we will learn to interface the relay with the microbit.
(If you liked this video and would like to buy our course, you are in for a pleasant surprise. Please click on the link below to buy the course for $25 ONLY. Original price is $195.
utm.io/upzX)
Before we discuss the interfacing and projects in this section, please do check out the resources section to get the full list of components needed to finish this section.
We are already familiar with how the relay works. You can see a two-channel relay module in my hand. The two-channel relay module is just a circuit in which two separate relays are provided. This allows controlling two devices at a time. Thus more the number of channels, the more the number of devices we can connect.
Let’s take a closer look at the components of a 2 channel relay. If you look closely, you can see 2 three-pin SMDs also known as Surface Mounted Devices. They are labeled Q1 and Q2. If you look much closer, you can see “J3Y” written on the component. Can you guess what it is?
Q1 and Q2 are NPN Transistors which form the switching circuit for each of the relays. If you remember from the last video, we have explained how a forward base voltage drives the Transistor to saturation and allows the current to flow through the coil inside the relay.
D1 and D2 are known as flyback diodes, One for each relay. They are used to protect the components from sudden spikes of voltage. Consider a situation where the relay coil is fully energized. Now, when the relay switches off, the collapsing magnetic field induces a reverse current which creates an overvoltage due to the open circuit. The open-circuit condition happens when the transistor is suddenly turned off. It is equivalent to having an infinite resistance path. By Ohms law, this results in a sudden spike in reverse voltage that can damage the components of the switching circuit.
The R2 and R4 are the resistors that form the Common emitter configuration of the relay’s switching circuit. The R1 and R3 are pull up resistors for the optocouplers. We will discuss this later in this video itself. The IN1 and IN2 LEDs are used to show the status of the relay, that is, whether it is energized or not.
If you look very closely, the two, black, 4 pin SMDs are labeled as 817C1612AMS. They are known as optocouplers. This 4 pin chip will always be added in any module that has a relay. So what is the relation between a relay and an optocoupler?
An optocoupler is also known as an optoisolator. On the inside, it consists of an infrared led and a photosensitive transistor. We already know that a relay provides electrical isolation between the low voltage control circuit and a high voltage driver circuit. This isolation is called galvanic isolation. But there are still situations where this isolation is broken. One of the main reasons for shorting is the formation of electrical arcs inside the relay. When a sudden spike of voltage is induced in the relay’s coil, the air molecules inside the relay are ionized, and they conduct electricity in the form of sparks or arcs. This can permanently damage components connected to the relay. So to provide an extra layer of galvanic isolation, we will use an optocoupler in the switching circuit.
This figure shows the full circuit of a relay module with the optocoupler included. You might have noticed that the configuration makes the relay module an active-low device. What it means is that the relay will be activated only when the input signal is pulled to the ground. The anode of the infrared LED is pulled up to the VCC, and the cathode becomes the Input control pin, which will be controlled by a microcontroller. To know the significance of active low in electronics, please check out the resources section of this video.
Summary
▪️ In this video, we covered the following topics
▪️ The 2 Channel Relay Module
▪️ The need for an Optocoupler in the Relay Module
▪️ Interfacing the Relay Module with the Micro:bit
In the next video, we will create an Automatic Night light project with the microbit using the relay module.
(If you liked this video and would like to buy our course, you are in for a pleasant surprise. Please click on the link below to buy the course for $25 ONLY. Original price is $195.
utm.io/upzX)
Check us out on
Website : makerdemy.com
Catalogue : makerdemy1.teachable.com
Facebook : / makerdemy
Twitter : / makerdemy
LinkedIn : / makerdemy
Instagram : / makerdemy
Email : support@makerdemy.com

Опубликовано:

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@MAKERDEMY
@MAKERDEMY 4 года назад
Check out the "MicroPython for the BBC Micro:bit" video playlist ru-vid.com/group/PLZPR_hmBy0cwn0SVmrza5rhpmKUPn_VRR
@MLFranklin
@MLFranklin 4 года назад
This is very comprehensive. Thanks for creating and sharing this video.
@MAKERDEMY
@MAKERDEMY 3 года назад
Glad it was helpful!
@sahithivenna1423
@sahithivenna1423 5 лет назад
The project is very clearly explained.
@valmiki700
@valmiki700 5 лет назад
Learned some more about micro bit.
Далее
Fun with Transistors
24:33
Просмотров 83 тыс.
Connecting a Relay Module to a Microcontroller
11:41
Просмотров 224 тыс.
Иран и Израиль. Вот и всё
19:43
Просмотров 1,5 млн
Micro:bit Automatic Plant Watering System
5:50
Просмотров 112 тыс.
JPEG is Dying - And that's a bad thing
8:09
Просмотров 120 тыс.
Schalter, Relais und MosFet mit Micro:Bit
13:43
Everything you need to know about RELAYS
22:48
Просмотров 51 тыс.
What is a PID Controller? | DigiKey
22:19
Просмотров 70 тыс.
Иран и Израиль. Вот и всё
19:43
Просмотров 1,5 млн