
<p>
<span style="color: windowtext;">
Hello, again. This is Trey.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Welcome to part 4 in my Cheap Yellow Display (CYD) Project series.&nbsp;If you have hung in there with me so far on this journey, thank you.&nbsp;If you have missed earlier episodes, you can find them on my </span>
<a href="https://www.hackerpublicradio.org/correspondents/0394.html" rel="noopener noreferrer" target="_blank">
HPR profile page</a>
<span style="color: windowtext;">
</span>
<a href="https://www.hackerpublicradio.org/correspondents/0394.html" rel="noopener noreferrer" target="_blank">
https://www.hackerpublicradio.org/correspondents/0394.html</a>
<span style="color: windowtext;">
&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
If you have questions, comments, concerns, or other feedback, please leave an episode comment, or drop me an email (Using the address in my profile). Even better, you could record and upload your own show which shares your viewpoint or expertise.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
To review, I finally have an actual project to build using the CYD. It is a portable, programmable morse code&nbsp;"Keyer memory" which can be connected to any of my HF transceiver radios by simply plugging it in to the code key input port.&nbsp;Then I could transmit stored messages by simply touching their specific icon on the touch screen.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
So, now I purchased a pair of CYDs.&nbsp;Each arrived in an anti-static zipper bag with a USB C cable, a 6 inch long 4 pin PB1.25mm to Dupont 2.54mm cable harness, a plastic case holding the CYD itself and a small plastic stylus.&nbsp;There are pictures in the show notes.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<a href="hpr4517_image_1.jpeg">
<img src="hpr4517_image_1_tn.jpeg">
</a>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<a href="hpr4517_image_2.jpeg">
<img src="hpr4517_image_2_tn.jpeg">
</a>
</p>
<p>
<a href="hpr4517_image_3.jpeg">
<img src="hpr4517_image_3_tn.jpeg">
</a>
</p>
<p>
<br>
</p>
<p>
<span style="color: windowtext;">
Depending on how many IO connections I may need, and how I plan to power this, I am probably going to need more 4 pin PB1.25mm wired connectors.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
You can see a description of the various features and connectors on </span>
<a href="https://randomnerdtutorials.com/cheap-yellow-display-esp32-2432s028r/" rel="noopener noreferrer" target="_blank">
RandomNerdTutorials</a>
<span style="color: windowtext;">
writeup about this board (</span>
<a href="https://randomnerdtutorials.com/cheap-yellow-display-esp32-2432s028r/" rel="noopener noreferrer" target="_blank">
https://randomnerdtutorials.com/cheap-yellow-display-esp32-2432s028r/</a>
<span style="color: windowtext; background-color: inherit;">
).&nbsp;The only difference I can see between this description and what I received is that mine have both a MicroUSB and USB C port.&nbsp;&nbsp;&nbsp;</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<br>
</p>
<p>
<span style="color: windowtext;">
<a href="hpr4517_image_4.jpeg">
<img src="hpr4517_image_4_tn.jpeg">
</a>
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Of course, first thing, I had to plug it in and see what happens.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<a href="hpr4517_image_5.jpeg">
<img src="hpr4517_image_5_tn.jpeg">
</a>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<a href="hpr4517_image_6.jpeg">
<img src="hpr4517_image_6_tn.jpeg">
</a>
</p>
<p>
<br>
</p>
<p>
<span style="color: windowtext;">
It appears to be running some kind of simulation of a web site. The backlit display looks alright.&nbsp;It is not super high resolution, but for the price, it will suite my needs.&nbsp;The touch screen is responsive, but it is pressure sensitive and works best using the provided stylus or a fingernail and not your finger tip.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
So, I have the CYD.&nbsp;What other hardware do I need?&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
I need to address how one of these will actually connect to my radios.&nbsp;Modern amateur radio transceivers which support continuous wave (CW) transmission (Which is another name for Morse code) generally can use one of two different pieces of hardware for input.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
The first is what we call a straight key.&nbsp;Below is a photo of the one I own.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
<a href="hpr4517_image_7.jpeg">
<img src="hpr4517_image_7_tn.jpeg">
</a>
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
This is a classic, old fashioned telegraph style code key.&nbsp;It is designed to quickly and easily be pressed down to close a circuit and when released the circuit is opened, effectively making it a normally open push button switch.&nbsp;To send a dot, the operator holds down the key for a short period of time, then releases it.&nbsp;To send a dash, the operator holds down the key for a longer period of time, before releasing it.&nbsp;(We will discuss actual timing specifications for morse code in a future podcast) Connectivity for the switch has been standardized to use a 3.5 mm mono male phone connector which has only sleeve and tip connections.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
The second option is a paddle style electronic keyer.&nbsp;There are many styles of these, and I am including a picture of the one I use, which once belonged to a close friend of mine who is now silent key.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
<a href="hpr4517_image_8.jpeg">
<img src="hpr4517_image_8_tn.jpeg">
</a>
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
In general, the paddle is two separate normally open switches.&nbsp;In the most common configuration, if an operator presses and releases the paddle on the right, a dash is sent.&nbsp;If the paddle on the right is held, a continuous series of dashes will be sent until that paddle is released.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
The left paddle works similarly.&nbsp;If it is pressed and released, a single dot is sent.&nbsp;If it is pressed and held, a series of dots is sent until it is released.&nbsp;The function of these paddles can be swapped from left to right using the radio configuration.&nbsp;There is additional functionality which can be configured in some radios for when both paddles are pressed simultaneously, but I am not going to describe those here.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
The paddle generally uses a 3.5mm stereo male phone connector with the sleeve being common. The tip of the phone connector is wired to the left paddle and ring of the connector is wired to the right paddle.&nbsp;Most modern radios have a built in keyer which can be configured for a paddle and will automatically transmit the dots or dashes at whichever speed is configured based on the paddle pressed.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
You can see this phone connector illustrated on </span>
<a href="https://en.m.wikipedia.org/wiki/Phone_connector_(audio)" rel="noopener noreferrer" target="_blank">
Wikipedia's phone connector page.</a>
<span style="color: windowtext;">
.&nbsp;</span>
<a href="https://en.m.wikipedia.org/wiki/Phone_connector_(audio" rel="noopener noreferrer" target="_blank">
https://en.m.wikipedia.org/wiki/Phone_connector_(audio</a>
<span style="color: windowtext;">
)&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
You can learn more about all the various devices which can be used for sending morse and how they function at </span>
<a href="https://morsecode.world/keys.html" rel="noopener noreferrer" target="_blank">
Morse Code World</a>
<span style="color: windowtext;">
. </span>
<a href="https://morsecode.world/keys.html" rel="noopener noreferrer" target="_blank">
https://morsecode.world/keys.html</a>
<span style="color: windowtext;">
&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Ideally, controlling all the morse code timing within the CYD would be best.&nbsp;That way, it could be connected as a straight key and any keyer settings already configured within the radio shouldn't matter.&nbsp;However, If I wish to also be able to manually send morse code myself using my paddles, without disconnecting the CYD and reconfiguring the radio, that could be problematic.&nbsp;I may need to factor in the possibility of connecting my paddle to the CYD and then building in code to respond to inputs from the paddles.&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
As I mentioned in a previous episode, I have an Arduino Nano on my desk as a practice oscillator for my paddles. I may be able to reuse some of that code on the CYD.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<a href="hpr4517_image_9.jpeg">
<img src="hpr4517_image_9_tn.jpeg">
</a>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
So, if I&nbsp;want the CYD to appear to the radio like a straight key, I will need it to be able to control a switch quickly and accurately.&nbsp;But I also want the CYD and the radio to be electrically isolated from each other.&nbsp;This calls for a relay.&nbsp;I was able to find and order some inexpensive relay modules which work nicely with Arduino and ESP32.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
<a href="hpr4517_image_10.jpeg">
<img src="hpr4517_image_10_tn.jpeg">
</a>
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
These allow connectivity to 5v power and to one of the CYD's GPIO pins.&nbsp;These feed an optocoupler circuit, which, in-turn, drives the coil of the relay.&nbsp;This provides inductive kickback protection to the CYD and can drive a coil which would require more current than the GPIO can provide.&nbsp;&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext; background-color: inherit;">
Inductive kickback rabbit trail: An inductor is simply a coil of wire.&nbsp;Direct current flowing through any wire generates a magnetic field.&nbsp;Within the inductor, because the wire is coiled, the magnetic field builds from each pass of the wire in the coil.&nbsp;If you include an iron core, it sustains the magnetic field even better.&nbsp;This is the basis for an electro magnet.&nbsp;A relay is simply a momentary contact switch controlled by an electromagnet.</span>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
One unique property of an inductor is that, current wants to keep flowing in the direction it was applied.&nbsp;To be specific, when the current source is removed, the magnetic field still exists for a while, and it effectively "generates" an electric current within the coil, in the same direction as the one which initially created the magnetic field to begin with.&nbsp;If it has a path to flow, this current will create another weaker magnetic field, which creates its own electric current, in a diminishing loop.&nbsp;If the circuit which drives the coil of a direct current relay is not ready for this continued push of current, damage can be done.&nbsp;Many times this is countered by wiring a "flyback diode" in parallel with the coil and in the opposite direction in which current will be applied. This way, when the current source is stopped, the diode gives a path for the inductive kickback current to safely flow while the magnetic field dissipates.&nbsp;Explained in greater detail at&nbsp;</span>
<a href="https://inductive-kickback.com/2019/04/inductive-kickback-made-simple-to-grasp-easy-to-handle/" rel="noopener noreferrer" target="_blank">
https://inductive-kickback.com/2019/04/inductive-kickback-made-simple-to-grasp-easy-to-handle/</a>
<span style="color: windowtext;">
&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
The switch side of the relay is a single pole double throw (SPDT) and makes connections available for common, normally closed (NC), and normally open (NO).&nbsp;It will be easy to connect the common and NO connections to a 3.5mm mono male connector so that it may be plugged into the "key" port on any radio transmitter.&nbsp;I will need to do some testing on the speed of the relay, but I think it will work just fine.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Once I start writing some code for the CYD, I will be able to connect and test the relay.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Well, this is a good place to end this episode, and it is one of the longest in this series so far.&nbsp;&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
In the next episode, we will begin to look at how we design the user interface for our program, something I do not know anything about (yet).&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Stay tuned weekdays for additional exciting episodes of Hacker Public Radio, and, at some point, the next episode in this series.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
If you like what you have heard, please leave an episode comment, or drop me an email (Using the address in my profile). If you have more than a single sentence to contribute on the subject, I encourage you to record an episode with your thoughts and expertise.&nbsp;If you dislike what you have heard, you are encouraged even more strongly to record and upload your own show which shares your viewpoint or opinion.&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
&nbsp;</span>
</p>
<p>
<span style="color: windowtext;">
Until next time.&nbsp;</span>
</p>


