twpayne / 100pct-ptt

Make your own push-to-talk button to use with the Zello app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

100pct-ptt a.k.a. Clickoris

A BLE hardware button for transmitting over the Zello push-to-talk app while flying a paraglider.

Introduction

Clickoris was created to help communicating with others during cross-country flights. It improves on handheld UHF radios when flying in an area with good cellular network coverage (Swiss Alps).

The device is based on an nrf51822 BLE beacon (aliexpress), powered by a CR2032 battery. It integrates with the Zello App (Android and iPhone).

Provided 3d-printed case can be mounted to a brake toggle, keeping the device within easy reach and making it possible to push the button even when wearing thick gloves.

Once paired in the Zello app, button stays connected for several hours and can be used even with the phone screen turned off (or running another app). When not in use, the button is powered off (a click powers it on). When powered off, battery usage is close to zero, and the button should remain usable for a few years.

How to make one

  1. Get the parts (use the provided links to AliExpress)

  2. Program the board.

  3. Print the case, it consists of 2 parts:

    • base bleButtonCase/baseCase.stl
    • cover bleButtonCase/cap.stl
  4. Pair with Zello.

  5. Tie it to a break handle.

  6. Go fly.

Programming the board

The board is programmed with an STLink V2 programmer using 4 pins (SWDIO, SWCLK, GND, 3.3V). It is possible to simply solder the 4 wires to the board (pinout below), or build a Flashing case.

Pinout diagram

Flashing

Flashing is done from PlatformIO (VSCode plugin) - install it first and open this repository in PlatformIO.

Before programming the button, it is necessary to apply a patch to the BLE stack of the Arduino framework, otherwise the power usage will be significantly higher. The patch is located in src/lowPow.patch and more information is available in this blog post

Once the patch is applied, it should be just the matter of uploading the firmware.

To check if clickoris is working, install the battery and push the button - it should make the green light blink once quickly. If the light stays off, read on.

NOTE in in some cases the button did not work after flashing from PlatformIO. In those cases it helped to:

  1. flash the NRF softdevice from the Arduino IDE.
  2. Program it from PlatformIO as normal(see TODOs).

Flashing case

To make programming many buttons easier it is worth building a special case to avoid having to solder the programming wires.

4 spring loaded pins are glued to the 3d-printed case so that the board can be pushed in with a finger against the contacts while it is being flashed.

The pins are connected to an STLink V2 using the following pinout ("B" stands for battery):

Printing

Printed with no supports, 15% infill works OK. Use 0.2mm layer height as this is what I've tested with. Both parts of the case can be printed in one go.

Pairing with Zello

Android instructions. IPhone should be similar.

Code dependencies

  1. VSCode + PlatformIO with the arduino framework and the NRF S130 softdevice.

  2. BLEPeripheral. This library is forked here, as I needed to make a few low level modifications to get it working with an iPhone.

TODOs

  • Report battery level to the phone.

The code is already there, but the service is not exported as I haven't tested it with an iphone yet.

In some cases flashing using Platform IO does not work (only happened on some boards), but it started to work after I flashed the softdevice from the Arduino IDE.

About

Make your own push-to-talk button to use with the Zello app.

License:MIT License


Languages

Language:Jupyter Notebook 95.4%Language:C 2.4%Language:C++ 2.1%Language:Shell 0.0%