GithubHelp home page GithubHelp logo

hamptt's Introduction

Ham PTT

Bluetooth PTT switch for ham radio transmitters like Baofeng UV-5R.
Board helps to control transmitter from PC.

Motivation

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 (SSP) 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 in platformio.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:

      Baofeng UV-5R Pins
      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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.