diff --git a/zk/Difference_between_frequency_and_bandwidth.md b/zk/Difference_between_frequency_and_bandwidth.md new file mode 100644 index 0000000..b2cccda --- /dev/null +++ b/zk/Difference_between_frequency_and_bandwidth.md @@ -0,0 +1,29 @@ +--- +tags: [radio, ham-study] +--- + +# The difference between frequency and bandwidth + +Think of a radio transmission as being like a lane on the motorway. The +frequency is the specific motorway that you are travelling on. A frequency like +95.8 is the "center frequency". + +In fact, a licensed radio station has a range of frequencies at its disposal. +These other frequencies exist around the center frequency. The total available +frequencies constitute the station's bandwidth. + +The different frequencies are like different lanes on the motorway. Not all of +the data will be transmitted on the center frequency. Nearby frequencies will +also be used such as 95.7, for example. + +When you tune to 95.8 you are not only tuning to that frequency, you are tuning +to it as the center frequency encompassing the other frequencies. +[FM](./Frequency_modulation.md) has 200kHz bandwidth per station whereas AM has +much less bandwidth resulting in poorer sound quality. An FM station can use the +additional frequencies to transmit sound in stereo, for example. + +A radio receiver is designed to process the data accross the frequency spectrum +for the station and unify it into a reconstruction of the original audio signal. + +The more information you want to transmit, the more "lanes" or bandwidth you +require. diff --git a/zk/Electrical_energy_equations.md b/zk/Electrical_energy_equations.md new file mode 100644 index 0000000..e01da35 --- /dev/null +++ b/zk/Electrical_energy_equations.md @@ -0,0 +1,49 @@ +--- +tags: [radio, ham-study] +--- + +# Electrical energy equations + +## Voltage, current, resistance + +![](../img/voltage-equation-ham.png) + +### Voltage + +$$ +V = I \times R +$$ + +### Current + +$$ +I = \frac{V}{R} +$$ + +### Resistance + +$$ +R = \frac{V}{I} +$$ + +## Power, voltage, current + +![](../img/power-equation-ham.png) + +### Power + +$$ +P = V \times I +$$ + +### Voltage + +$$ +V = \frac{P}{I} +$$ + +### Current + +$$ +I = \frac{P}{V} +$$ diff --git a/zk/Radio_transmitters_and_receivers.md b/zk/Radio_transmitters_and_receivers.md new file mode 100644 index 0000000..8a77887 --- /dev/null +++ b/zk/Radio_transmitters_and_receivers.md @@ -0,0 +1,60 @@ +--- +tags: [radio, ham-study] +--- + +# Radio transmitters and receivers + +## Transmitters + +![The radio transmission process](../img/radio-transmission-process.png) + +Radio transmission comprises four stages: + +1. Audio stage or "amplification" + +- The weak signals from the microphone are amplified + +2. Frequency generation via an oscillator + +- The [carrier wave](./Frequency_modulation.md) is generated + +3. Modulation + +- The carrier wave and audio signal are combined + +4. RF power amplification + +- The combined signal is increased and fed through to the antenna + +The following are important considerations: + +> Incorrect setting of the oscillator can result in operation outside of the +> amateur band and cause interference to other users + +> The microphone gain should not be set too loud as this will cause distortion. +> Furthermore, too loud a signal causes **over-modulation** on AM and +> **over-deviation** on FM which again could cause inteference. + +> The RF power amplifier must be connected to a correctly matched antenna to +> work properly. If not, damage can be caused to the transmitter. + +## Receivers + +![The radio reception process](../img/radio-receiver-process.png) + +Radio reception comprises three stages: + +1. Tuning/RF amplifier + +- The receiver is tuned to the required frequency and the weak incoming signal + is amplified so that it can be used + +2. Demodulator + +- Extracts the original audio signal from the modulated radio signal, separating + the signal from the carrier. +- Each type of modulation type (FM, AM, SSB etc) has its own demodulator + +3. Audio amplifier + +- Amplifies the recovered signal and feeds it to a loudspeaker or headphones diff --git a/zk/Sudoers_file.md b/zk/Sudoers_file.md new file mode 100644 index 0000000..849cc48 --- /dev/null +++ b/zk/Sudoers_file.md @@ -0,0 +1,22 @@ +--- +tags: + - Linux + - procedural +--- + +# Sudoers file + +Control users' `sudo` priveleges and against which services/programmes they can +run `sudo`. + +Access with `sudo visudo`. + +Example: + +``` +deploy ALL=(ALL) NOPASSWD: /bin/systemctl daemon-reload, /bin/systemctl restart eolas-api.service +``` + +This gives the user `deploy` the ability to run certain restricted `systemctl` +commands with no password. The second two limit him to running `systemctl` +against specific `systemd` services, not all of them. diff --git a/zk/Timed_systemd_units.md b/zk/Timed_systemd_units.md new file mode 100644 index 0000000..eadfe3a --- /dev/null +++ b/zk/Timed_systemd_units.md @@ -0,0 +1,62 @@ +--- +tags: + - Linux + - procedural + - systemd +--- + +# Timed `systemd` units + +In order to use [systemd](./systemd.md) in the manner of [cron](./Cron.md) (but +with added benefits, such as being able to set the user to run as, environment +variables and so on), you first create a timer template, e.g.: + +``` +# everyhour@.timer +[Unit] +Description=Run %i every hour + +[Timer] +OnCalendar=*-*-* *:00:00 +Persistent=true +Unit=%i.service + +[Install] +WantedBy=timers.target +``` + +You can then pass in specific units using this template to `systemctl`. + +As an example, this unit runs a simple bash script that pings a server: + +``` +# ping-eolas-api.service + +[Unit] +Description=Ping Eolas API to check it is up + +[Service] +User=thomas +Group=thomas +Type=oneshot +ExecStart=/home/thomas/self-host/scripts/ping_eolas-api.sh +``` + +Then when enabling the service, do the usual: + +```sh +systemctl daemon-reload +``` + +But when enabling/starting, invoke the timer template, viz: + +```sh +systemctl enable everyhour@ping-eolas-api.timer +systemctl start everyhour@ping-eolas-api.timer +``` + +The schema is: + +``` +[timer_template_name][service_name].template +``` diff --git a/zk/Whats_running_on_port_x.md b/zk/Whats_running_on_port_x.md new file mode 100644 index 0000000..e69de29