CT7AFR DIY CW-Keyer

ct7afr-cw-keyer

Finalmente, está pronto o meu keyer para CW!

Este projecto começou por ser apenas um oscilador para excitar um pequeno altifalante sempre que fechasse um pequeno botão de pressão  ou uma chave vertical de Morse. Mas durante o meu estudo de CW, apercebi-me de que existem diversos tipos de chave e diversos modos de operação. Então, abandonei o 555 em prol de um microcontrolador para criar um keyer que satisfizesse as minhas necessidades, não ficasse limitado a um único tipo de chave nem a um único modo de operação. Nasceu assim o CT7AFR-CW-Keyer.

Este pequeno circuito aceita chaves do tipo Vertical, Paddle e Bug, tendo as seguintes características:

  • Frequência do Tom: 400 ~ 800 Hz (aprox.)
  • Velocidade de transmissão: 5 ~ 60+ WPM
  • Tipo de chave: Vertical, Paddle, Bug
  • Orientação da chave iâmbica: Standard ou Reverse
  • Modos de Operação: Curtis Mode A, Curtis Mode B, Ultimatic, Bug
  • Relação Dit/Dah: 1:3 ou 1:4.4
  • Saída em Dreno aberto (MOSFET) para controlo de um emissor (modo A1A, ON-OFF)
  • Saída áudio para altifalante de 8 Ohms
  • Saída áudio para headphones ou Line-In de PC (32 Ohms), jack stereo 3,5 mm
  • Volume de som ajustável por potenciómetro
  • LED indicador de POWER ON
  • LED indicador do estado da saída MOSFET
  • Alimentação: 7 ~ 16 VDC

A divulgação do desenvolvimento deste projecto, no Facebook, suscitou curiosidade em alguns colegas de hobby que se mostraram interessados na aquisição de um exemplar. A partir daqui, o projecto ganhou um novo objectivo: ser um kit para aspirantes a CW com gosto pela arte de manusear o ferro de soldar.

Toda a informação técnica acerca deste kit está disponível no capítulo RADIO do AIRLOMBA.NET em http://www.airlomba.net/radio/?pagina=Tecnica&Project=CW_keyer

ct7afr-cw-keyer-webpage

Nesta página, estão também apontados dois vídeos alojados no canal CT7AFR do Youtube. Um destes vídeos demonstra o funcionamento deste keyer.

Finalmente, quem estiver interessado em adquirir um kit destes ou simplesmente solicitar informação adicional acerca do mesmo, poderá contactar-me através do endereço de correio electrónico RADIO <arroba> AIRLOMBA <ponto> NET (visível no banner vertical, no canto superior direito da referida página).

Escrito isto, vou praticar CW… dah-dit-dah-dit dah-dah-dit-dah…

VY 73 DE CT7AFR.

Shutdown button for the Raspberry Pi

shutdown_1
One thing that sometimes bothers me when using an headless embedded Linux system, is the workload I get when I need to power off the system for some hardware maintenance (e.g. adding some sensor, replacing some peripheral, moving the system to another location). Indeed, one cannot just cut the power supply; there is the risk that some files become corrupted. So, the proper way to shutdown a Linux system is to send a command like:

$ shutdown -h now

But to do this, one needs to be “online” with the system, via SSH for example, using another system (computer) that, at that moment, may precisely be OFF… Doh!

So, at the expense of a simple push-button (normally open), a couple of wires and some programming, I implemented a smart(?) way of shutting down my Raspberry Pi, safely, without the need of an extra computer, SSH and other complications.

Connecting the push-button

The push-button is connected to two of the 26 or 40 pins header, depending on the version of the raspberry Pi in use. From those two pins, one is GND and the other may be any free GPIO. Remember that some pins have multiple possible roles (I2C, UART, SPI, etc), so choose wisely. In my case, I plugged the button between pins 14 and 16, respectively GND and GPIO23.

raspi_pinout

Programming

To translate any action on the push-button into a Shutdown command, a script was written in the Pi’popular Python programming language.

In a folder of your choice (e.g., /home/pi), using the terminal command line, enter:

$ nano shutdown_button.py

Then, copy the following code into it and save as usual (CTRL-X + Y + ENTER):

shutdown_2

Testing the script

To test this script, just enter the following command and then press the button once.

$ sudo python shutdown_button.py

If everything is correct, the system should shutdown itself. You must then unplug and replug the power cord to start your system again.

Launching this script automatically after every system power-up

In order to launch this script automatically after every system boot, one must add the following line to the /etc/rc.local file (just before the line with exit 0) as shown in the image hereafter (assuming your script file is in the /home/pi folder):

python /home/pi/shutdown_button.py &

shutdown_3

Final notes

  1. If you prefer to have your Pi to reboot instead of shutting down after pressing the button, in the shutdown_button.py script, in the line containing os.system(“shutdown -h now”), replace the letter ‘h‘ (from halt) by a ‘r‘ (for reboot).
  2. The line stated in the above note is in fact a System Call. So, with this script, you can have your Pi doing “anything you want” after pressing the push-button, just by replacing the command between quotation marks, by another command invoking some application that suit your needs.

Have fun!