Introduction: Doomsday Radio Messengers

A pair of simple doomsday radios πŸ’€πŸ’€πŸ’€. These radios use a powerful radio communication technique called LoRa that allows for simple communications, like texts, across long distances! Usually radios that communicate at similar distances are not allowed by hobbyist but LoRa radios are an exception. For good reason, this has given LoRa radios an off-grid doomsday lore.

Supplies

two radios main boards with the microprocessors. These radios operate at frequencies for the USA. Check your country's frequency laws, you might need a differnet board.

two antennas again, these are for frequencies for the USA. Different chips need different antennas.

two screens screens that display typing and received messages.

two pairs of stacking headers will allow the screen to snap on directly to our radio chip(s) greatly reducing wires and space.

two pairs of headers the radio (and screen chip) will snap into these headers. These headers connect to a custom PCB. More on the PCB below.

two keyboards for typing.

two LEDs LEDs that light up with a new message.

two rechargeable batteries for mobile use.

cables connect the keyboard into the chip.

tactile buttons satisfying buttons to send and read messages.

slide switch on/off switch.

1X4 Female Headers soldered onto the PCB for the keyboard wires to plug into.

Step 1: Radio Chips

Grab your radio and solder your antenna. Adafruit has a great tutorial for antenna assembly. Solder your stacking headers. This board will plug into the PCB and have the screen plug on top of it via these stacking headers.

Step 2: Screen

Solder the included pins onto the screen. Once again, that's it! Adafruit's feather collection makes it simple to combine chips by stacking them. The screen only needs four pins. Two for I2C communication and two for power and ground. Once you snap the screen into the stacking headers on the radio, the pins should be aglined.


The combination of these two boards will recharge batteries, display messages, receive and send radio signals, and process all code using (powerful) microprocessors. Shows the power in buying the right hardware. These boards take up little space and are easy to wire.

Step 3: Printed Circuit Boards

I added some PCBs and I would recommend getting them. I was even able to create a shared project where you can just add them to a cart.

For me, it takes about two weeks to arrive.

I will also add the gerber files (the PCB industry file types) if you would like to order the PCBs elsewhere. Just put them in their own folder and zip them.


Once they arrive, directly solder the chip header,LED,tactile button,slide switch, and keyboard headers for each radio. The LED is the only piece you need to worry about the polarity. The positive side will be on the right side or closest to the `new msg` text printed on the board.


The boards and keyboard could be directly soldered onto the PCB, but I prefer using headers in case you make a mistake or want to use these parts for something else later on. It will save you the pain of de-soldering. I directly solder the LED(s) and button(s) since they are relatively cheap.

Step 4: 3D Printed Case

Print this 3D case to help hold everything. It was made to fit the custom PCBs. I do not have a 3D printer but I use my local library that only charges me a few dollars.

The battery's cable should plug into the radio board and the board will take care of all charging. When charged, unplug the radio and it will switch to battery mode. The battery should fit in the back. The small pieces should snap onto the side holding the battery in place.

The keyboard should snap into a place and the custom PCB should fit onto the front. I did use a piece of electrical tape under the radio board and above the PCB to help keep the PCB attached to the case.

Step 5: The Code

Upload the code to the boards using the Arduino IDE. This code followed the great tutorial at https://dronebotworkshop.com/lora/

These libraries may need to be installed with the Arduino library manager.

#include <Adafruit_GFX.h>
#include <Adafruit_SH110X.h>
#include <LoRa.h>


Both Radios

The same code works for the two radios - you need to just uncomment the correct lines for each radio.

For the first radio, comment out all the lines that have // for radio 2 -- uncomment here next to it and make all the lines with // for radio 1 -- uncomment herenot commented out. Upload the code to the board. If the LoRa radio starts up correctly, a small red LED will light up. Just because this LED is lit does not mean the boards will communicate tho, the rest of the code has to work as well. Upload the code to the next board but opposite with respect to the uncommented and commented lines.

// byte localAddress = 0b10111; // for radio 1 -- uncomment here
// byte destination = 0b10010; // for radio 1 -- uncomment here
byte localAddress = 0b10010; // for radio 2 -- uncomment here
byte destination = 0b10111; // for radio 2 -- uncomment here


Filter

This code does have an extra method for filtering out unwanted messages. LoRa radios and other devices will communicate at these frequencies and your radio may intercept them. Even though intercepting a message is cool it will most likely be encrypted. Your messages will also be encrypted thanks to the board.

When we get a message we will use a custom identifier (called the address in code) and if the message does not have this identifier in the right place, the message will be ignored. This will help block noise.


Display

The code will handle the display. It flashes a doomsday skull that matches the PCB. It also has a display for incoming messages that shows the signal strength (RSSI) and a display for when you are typing a message. Button A on the screen will turn off the screen so you dont waste power.


Msg history

The code will store up to 3 messages from the other radio. Just keep clicking the read msg button to cycle through all three. A simple class named IncomingMsgr helps handle the messages

class IncomingMsgr {
public:
int receivedIdx=0;int viewdIdx=0;int unseenIdx=0;
int H = 3;
String msgs[3] = {};
void newPacket( String msg ) {
msgs[2] = msgs[1];msgs[1] = msgs[0];msgs[0] = msg;
viewdIdx = 0;unseenIdx += 1;
if (unseenIdx > 3){unseenIdx=4;}
}
void updateFromShowed()
{
viewdIdx += 1;
viewdIdx = viewdIdx%H;
}
String getNewMsgs()
{
if (unseenIdx == 4){unseenIdx=2;return "3+";}
String val = String(unseenIdx);
if (unseenIdx > 0){unseenIdx-=1;}
return val;
}
};


Keyboard

The Wire.available() method triggers when a user starts typing. Typing automatically brings up the display screen and your message. Some of the keys are not recognized and will look like space invaders or funny text. I wanted to include a backspace or delete button so maybe try to write your own!


Ping

Pressing button B on the screen mimics the ping function found with internet devices. When you hit ping on radio 1 (button B on the screen), it will send a very specific message to radio 2 which will then command radio two's hardware to send a message back saying `hello`. Radio 1 will then light up letting you know radio 2 is turned on and able to communicate.

Step 6: Final Radio

The final radio should have long battery life, sit in your hand, and send/read messages to its sister radio. I tested the radios in a crowded city and they worked over a mile away! Maybe even further but the trail I was on ended :)