This blue LED is blinking Morse code, and I’m already excited.
But let's do a real light communication with a powerful LED, and let's receive it from
a hundred meters with a Smartphone’s camera, So, let's get started
Hi, guys welcome to Electrical Projects channel.
Today I’m going to build a powerful Morse code LED beacon.
How powerful?
Well, considering that MOSFET I’m going to use can handle 36A, I think a couple hundred
watts at 12 volts will not be a problem at all.
But I don’t want to cause epilepsy in my neighbors,
so I think 10W will be enough for today.
To control the MOSFET I’m going to use ESP8266, it is almost like Arduino, but cheaper and has Wi-FI,
The ESP8266 uses 3.3 volts as a logical high level,
unlike an Arduino that uses 5V.
This means I cannot for example use my favorite IRF540N,
because in order to fully turn it on we need 4V, and ESP can only provide 3.3.
The solution to the problem could a level shifter, but I don’t like adding unnecessary
components, so it is better just to use appropriate MOSFET.
For example, IRL540N is a good choice, because it requires just 2V to be fully turned on,
so I am going to use it.
Since I am going to power ESP from 12V, I need a 12 to 5V DC-DC converter.
So Let’s connect it.
Before continuing let me show you the schematic, so it will be easier for you to understand
what is going on.
Now let’s solder wires to drain and source leads of the MOSFET
Now you can just connect the gate lead of the MOSFET directly to the pin on the Arduino
or ESP8266, but I think the right way to do it is to add a resistor in between,
I decided to use 1K resistor.
And that is it, no more soldering.
I’m connecting it to GPIO2, on the board for some reason it is labeled as D4,
I hate such inconsistencies.
GPIO2 is also the pin to which built-in blue LED is connected, so it makes testing easier.
Now let’s connect everything according to the schematic that I previously showed.
As you can see when the blue LED is on big white LED is off, and vise-verse, that is
because the build in led is inverted.
Since the white LED's signals are not inverted I need to fix it in the code.
Let’s disconnect power and connect it to the computer.
Fixing the problem is extremely easy; I just need to change this Boolean variable to false,
and flash the ESP.
And here it is, let’s try to decode it with a smartphone's camera.
This is the fastest speed I could achieve.
But as I promised at the beginning of the video,
the final test is to decode it from a hundred meters.
Let’s do it.
That is the moon, and this is my Morse beacon ready for the test.
The distance is 160 meters.
I just tried to decode it with the fastest speed and I failed, so I lowered the speed
from 80 ms to 300 ms.
Also, I'm using a different decoding app.
So here it is, it actually works, 160 meters, yes now it is much slower, but it works.
The message is “beacon on esp8266 test” well almost works.
And that is all for today.
Like subscribe, and see you next time.