MeshComm - a DIY Meshtastic Communicator

by hausofpayne17 in Circuits > Microcontrollers

47 Views, 0 Favorites, 0 Comments

MeshComm - a DIY Meshtastic Communicator

meshComm pic.png

I wanted a handheld Meshtastic communicator and it's an amazingly achievable goal. The firmware already supports a basic terminal user interface and supports the M5Stack cardKB mini keyboard via I2C.

I drew inspiration from Tony G's Meshenger project on Printables. I've made my own version to suit a LilyGo Lora32. I use his keyboard templates which are fantastic.

A larger battery may be fitted (4mAh?), but if more run time is needed, a separate power bank and USB cable are easy to carry along.

This tutorial expects you are already able to read simple schematics, solder components and install the Meshtastic firmware on your dev board and to get a Meshtastic session going using the Serial interface to the Web Client.

Watch this Meshtastic Video to see how the UI and keyboard work in Tony Gs Meshenger. This project works the same way.

CAVEAT EMPTOR:

This project uses the LilyGo Lora32 2.1-1.6 which is an older ESP32-based dev board. There are more modern, lower power consumption boards out there. If you're using a different board, this tutorial may just be an idea generator.

If you're planning to build a MeshCore station, the LilyGo Lora32 is limited in power output by the client firmware and cannot use the cardkb keyboard. Bottom line, if you want to use MeshCore, this project is not likely going to work out the way you'd expect.

Let's get printing and assembling.

Supplies

-LilyGo Lora32 2.1-1.6 Development Board

-M5Stack cardkb mini keyboard

-LED

-3x mini SPST or SPDT switches

-SPST rocker switch for an ON/Off switch. 13mm x 9mm.

-1000mAh Lipo Battery (or larger if you want and can fit it in the enclosure)

-12mm ACTIVE piezo buzzer

-2N2222 or 3904N transistor

-1K resistor

-2x 33R resistors (or less than 100R overall resistor)

-22uF electrolytic capacitor

-0.1uF ceramic capacitor

-IN4007 diode (or similar)

-3volt vibration motor

-Prototype board (1 sided is fine)

-PLA filament

-TPU filament for the keyboard pads

-1mm clear acrylic sheet

-6x 2.6mm screws - for mounting the board to the base and for attaching the cover to the base

-Thin gauge wire

3D Print the Enclosure

Print the provided .STL files for the enclosure. Get the acrylic display cover and keyboard overlays laser cut/etched.

This project uses Tony G's .SVG files for the display cover and keyboard label overlay. I removed the labels and speaker holes from the screen cover as I don't use that layout for my project but they're still in his original .SVG files provide here. The enclosure was designed with Fusion 360.

On the displayCover, 'L' represents 'LED', 'Z' represents 'Buzzer' (Z prints clear through better than a B) and 'V' represents 'Vibration Motor'.

Use a bit of epoxy to glue the LED holder to the back of the screenCover.

Configure Your Dev Board for Meshtastic

To be able to use the cardkb keyboard, you need to do some configuration of your board.

Connect your dev board to your computer via the Serial interface and connect to it.

Using the Meshtastic Web Client (recommended), set the following:


Go to Settings on the Web client left side.


On Settings/ Module Settings/Canned

Module Enabled (Enable Canned Message) - ON

Allow Input Source - cardkb (**** this is critical for the keyboard)

Send Bell - ON (to send notification character to the recipient)


On Settings - Module Settings - Ext Notif:

Enable External Notification - ON

Output MS - 100 (milliseconds - duration of notification)

Output (OUTPUT) - 13 (LED pin)

Output Vibrate - 12 (vibration motor through transistor)

Output Buzzer - 4 (piezo buzzer)

Active - ON

Alert Message - ON

Alert Message Vibrate - ON

Alert Message Buzzer - ON

Alert Bell - ON (alert triggered when receiving BELL character from sender)

Alert Bell Vibrate - ON

Alert Bell Buzzer - ON


As you SAVE the screens, your device may reboot to implement the changes.

Assemble the Vibrating Motor Circuit

Vibrator Motor Circuit.png
vibrator circuit photo.png

Since a GPIO can't drive the vibrator motor, it's necessary to drive it through a transistor.

This circuit is based on: learningaboutelectronics.com/Articles/Vibration-motor-circuit.php

The capacitors are included to reduce RF interference and from the motor and voltage fluctuations. The diode prevents fly-back current from damaging the GPIO pin when the motor powers down after notification.

The circuit diagram is correct. The photo is for illustration purposes only. Without seeing the underside you may not have a correct circuit.

Assigning GPIOs for the Notification Devices

If you wish to use External Notifications when messages come in, you need to assign GPIOs.

I tried all the pins (Don't try the TxO pin. You may destroy your board's ability to connect to the Web client via Serial(USB) for firmware uploads. - Benefit from my mistake).

I found the following pins work on the LilyGo Lora32:

13 - LED

4 - Piezo Buzzer

12 - Vibration Motor

21 - SDA for the cardKB keyboard (I2C)

22 - SCL for the cardKb keyboard (I2C)

Preparing the Cardkb Keyboard

keyboard wiring.png

The Grove connector on the cardKB is too tall to fit in the enclosure. It has to be removed.

My desoldering skills are less than up to the task so I CAREFULLY cut the connector off using a cutting wheel on my rotary tool. Worked fine but take your time. You can't go back.

Solder 4 lengths of wire on to the now available pads.

From top to bottom, the wire colours are:

Black - GND

Red - VCC

Gray - SDA

White - SCL

I covered the pads with some hot glue to help protect them.

Assemble the Circuit in the Base

Communicator Circuit.png
a battery buzzer bus.png
b vibrator and kbd connector.png
c LED and mc soldered.png
d led holder.png
e power switch.png
f USB port.png

Hooking up all the components on a breadboard and getting the project working before assembly is always encouraged. It can save time and frustration.

Wire the parts together as you like. Lots of photos are provided here showing how I organized my components.

I chose to put terminal pin connectors on my keyboard just so I could remove it if needed.

The piezo buzzer is really loud if connected directly to the GPIO. Two, 33 Ohm resistors in series were used to try to reduce the loudness. Any total resistance over 90 Ohms makes the buzzer inaudible based on experience.

Notice that an ACTIVE piezo buzzer is used. If you want to use a PASSIVE buzzer, there are PWM codes on Tony G's tutorials for how to configure the passive buzzer to play a series of tones. Passive buzzers with PWM were not experimented with for this project.

Female terminal strips on a prototype board like a "shield" for mounting the dev board were initially tried. In the end, it made the enclosure thicker than desired.

To keep the enclosure thinner, the signal pins are just soldered directly to the GPIOs on the board and a small 'bus board' is under the board for the VCC and GND wires to be connected to the dev board.

Assemble the Enclosure

Once you've got the circuit assembled and tested,

  1. Mount the dev board in the base with two 2.6mm or similar screws.
  2. Stack the screen panel and acrylic cover on top of the dev board.
  3. Stack the TPU keyboard pads, the keyboard frame and the acrylic keyboard panel on top of the base.
  4. Carefully fit the cover over all the assembled parts and gently slide it downwards until it holds all the parts in place as you want.
  5. Then drill small holes in the base through the screw holes on the top and bottom of the cover and secure the communicator together with four 2.6mm screws.

Use Your Communicator!

Power up your communicator and start typing a message on the keyboard. Press the TAB key to get to the list of all the nodes your device can see. Use the Arrow keys to pick your recipient and press the ENTER key. Then press the ENTER key again and your message will be sent.

Try the different switches to use the various notification options (LED, buzzer or Vibration Motor).

Have fun with your MeshComm!

NOW GO MAKE SOMETHING WONDERFUL!