Implementation of Push-To-Talk board for ham radio transmitters like Baofeng UV-5R
Project description
Ham PTT
Bluetooth PTT switch for ham radio transmitters like Baofeng UV-5R.
Board helps to control transmitter from PC.
Problematic
Testing of UART interface showed unstable connection. During transmit via UART an usb-ttl chip periodically crashes and stops working. Cause is some radio strong interference on USB cable. So Bluetooth serial protocol stack chosen instead.
Schematic
Host -> (Bluetooth) -> Esp-32 Arduino -> Relay -> Transmitter PTT button
-
Hardware
- Host PC with Bluetooth (tested Ubuntu 20.04)
- Esp32 DevKit v1 (or similar esp32)
- Relay shield
- Baofeng UV-5R
Examples
- Find BT devices
hcitool scan
- Python
from hamptt import open_ptt
with open_ptt(bt_addr="A0:B1:C2:D3:E4:F5") as ptt:
ptt.begin()
# I.e. play message to transmitter or something else
ptt.end()
Install
-
Host PC machine
-
Python 3.8
-
Bluetooth's libs (required for pybluez)
sudo apt-get install bluez libbluetooth-dev
-
Pip
python3 -m pip install "hamptt[bt]"
-
-
Esp32
-
Upload sketch to your esp-32 via PlatformIO
NOTE! Check your board config inplatformio.ini
(see: https://platformio.org/)pio run -t upload
-
Connect pins Esp-32 to relay
- VVC -> Relay +
- GND -> Relay -
- GPIO D25 -> Relay IN
-
Connect relay and audio, for Baofeng UV-5R it looks like:
NOTE: You can rebuild your hands-free cable or buy another one
-
Development
-
Build and install
pip3 uninstall hamptt rm -rf dist && poetry build && pip3 install ./dist/*.whl
-
Publish
-
Prepare
poetry config repositories.testpypi https://test.pypi.org/legacy/ poetry config pypi-token.testpypi <TOKEN> poetry config repositories.pypi https://upload.pypi.org/legacy/ poetry config pypi-token.pypi <TOKEN>
-
Publish
poetry publish --build -r testpypi poetry publish --build -r pypi
-
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hamptt-0.3.1.tar.gz
.
File metadata
- Download URL: hamptt-0.3.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.10 Linux/5.4.0-77-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0d8519c6a03a91a38b46bbdd22a2d22fcc661519f52b5f0623614222e85d58 |
|
MD5 | 916ff1bb4a6e166820f61804bee178a9 |
|
BLAKE2b-256 | 36d533f29b55eed357685ac1b8b0c5f8f94709ea4edb621c624afb3274f6ad6b |
File details
Details for the file hamptt-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: hamptt-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.10 Linux/5.4.0-77-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb673b2262bb28a08642dd30b31c5ee595c1af2158ca20439f1f8d4d965c445 |
|
MD5 | 8f7cc43334bec41aae22a13332810982 |
|
BLAKE2b-256 | efb1910b659f82832664fddc4fb0af86655c358bc0a23a6bdb0cbde4c591938f |