Are you ready to take your communication device go off-grid? Introducing Meshtastic 20.25! Made to go camping or hiking, during a festival or just commuting to the office.
In the core a Seeed Studio Wio Tracker L1. On top of that added a mini keyboard from a TV remote, E-ink screen for power-saving visuals and a vibration motor for instant alerts. All housed in a case with a solar panel on the back!
Originally Meshtastic devices were made to work as a Bluetooth companion device connected to a phone with a messaging app. But what if you don’t want to carry a phone on your hike? That’s fine, the Wio Tracker L1 devices have a single menu-button and a tiny joystick, so you can twist your thumb for minutes, to twiddle something down.
Not really useful if you are hanging on the edge of a cliff and want to type an SOS message to your friend… Let’s include a keyboard! And maybe even an SOS button?
During your camping trip you go off-grid for multiple days. But the commonly used always-on-OLED-displays consume battery capacity all the time, even when you are not looking at your device. That is why I will use an E-ink screen that only refreshes when it is needed. And to charge the large internal battery on-the-go, just flip it over and hold it in the sun, there is a solar panel on the back!
While you lay down in your beach-chair, your FOMO starts creeping up. Did you miss a message? I got you covered, there is no need to keep refreshing the screen to see if there are new messages, a vibration motor will be added to work together with the buzzer to instantly alert you of something new!
Meshtastic off-grid communication, always available, always useful, always fun! Welcome to 20.25 ;)
What is Meshtastic?In very short phrasing, cutting a lot of corners; it is a communication framework, with a lot of features that make it magical!
Meshtastic sends its data on the license free bands, so you don’t need to be a HAM. In each region of the world, the frequency to use is a bit different. For example, in Europe 433MHz and 868MHz, in North America 915MHz. These are slow bands due to the (relatively) low frequency, but that also means you can reach a long distance. Because it is slow, you will have to cleverly design your protocols to use as less airtime as possible, and still making sure your message will be received crisp and clear. The protocol used in Meshtastic, is LoRa, which stands for Long Range. This protocol is based on Chirps instead of Pulses. Clever thinking!
The additional clever thing that Meshtastic did, is in its name: it is based on a Mesh network. Each device repeats the messages that are not meant for itself. That means the already long range can even become longer. Records are into the hundreds of kilometers!
Ok, now we have a device that can send messages over a mesh network to other devices. How do you get your message send? Classically, you would use a mobile phone with a Bluetooth connection, and use the Meshtastic app there to type and read messages. Most Meshtastic devices have a little OLED screen to show status on. Some devices, like the Seeed Wio Tracker L1, have additional buttons or joysticks to do more with this menu and even create messages on the tiny screen.
That is where this project wants to add a bit more. No need for the mobile phone, everything in this single device!
Project planning - anticipated stepsIn the coming weeks, I'll design and build this Meshtastic device, combining hardware, to make the ideal communication tool. These are the steps that I will follow in this project:
- Step 1: Selecting the parts
- Step 2: First design to see of my idea fits the parts.
- Step 3: All parts are ordered, they will come in the mail one by one.
- Step 4: Create a model in Fusion 360 of each part received.
- Step 5: When all parts are in, put them all together in real life to see if the device works as expected.
- Step 6: Move all parts into the right position in Fusion 360 and build the ideal casing around it.
- Step 7: 3D Print the design
- Step 8: Test, Try, Debug, Fail or Succeed. Go back to step 6 and repeat (until satisfied).
- Step 9: Take Meshtastic 20.25 out into the wild!
Will keep the updates coming here, so follow along!
Step 1: Selecting the partsActually, read the first chapter again, that is my braindump of what my vision is of the Meshtastic 20.25 and all the parts that I need for that.
Step 2: First design to see of my idea fits the partsAs a start, I've already made some Fusion 360 designs with the first ideas.
Front of the device; a full QWERTY keyboard including numbers and special characters. Top left is a joystick, top right is where the E-ink display goes:
Front cover and keyboard removed, these are the components that need to be placed inside the device: Left the GPS, middle a LiPo battery, right at the back is the Wio Tracker, right at the front is the E-ink display:
On the backside there is a solar panel that covers as much as possible, that might even become the full backpanel.
On the Seeed website, the Wio Tracker with E-ink display was in backorder, so I did order the OLED version.
And ordered a similar E-ink and cables plus connectors elsewhere:
At the front I want a full keyboard. Soft keys, and not invent it all myself. There are these mini-keyboards that work as a TV-remote. Did order one that looks the correct size. Now hopefully it will generate serial data that I can tap into on each keypress. If not, I'll have to work with a matrix and wire that up to an RP2350. Of course the case will be ripped off, using only the rubber keys and PCB.
On the back-side there will be a solar panel. I've chosen one that is close to the size of the keyboard (assuming that is close to the PCB size too), hoping that I can cover the full backside edge to edge. Let's see what will show up in the mail...
This Solar Panel will charge a Lithium Polymer (LiPo) battery. Have one laying in the drawer, with 3500 mAh capacity.
Lastly, there is a vibration motor to be included. Small but mighty!
UPDATE September 2: Received the Seeed Studio Wio Tracker L1 (with OLED screen) in the mail, the Fusion model is already provided by Seeed, but I added colors for better looks.
The delivery of the Wio Tracker also included the LoRa antenna and GNSS antenna. So made models of these to later import in my drawings.
And found a USB-C breakout board in my stash, which I will need to extend the USB port to the new side. Also here, made the model.
The design of the case already looks a bit better with these models. Placing comes later when everything is received.
UPDATE September 3: the Keyboard arrived! This thing is complex to model, so that will take a few days. But here are the product pictures already:
Looking at the PCB it might be a bit harder to tap into the serial bus, but I have some alternatives in mind.
UPDATE September 4: created the model of the keyboard. This is how the hardware is as-is, but I'll cut out some unnecessary keys (F1/F2/etc) when it goes to the real design.
Now that I have the size of the main components, it's time for a better drawing! The E-Ink screen is to be added on the top-right, 4 or 6 of the small keys will be sacrificed for that. On the back is the edge-to-edge Solar panel. And this way you can see how the antenna can fold into the casing!
What do you think of this design?
UPDATE September 9: As there are no serial test-points on the keyboard that I can tap into, there are two alternatives: use the USB-dongle (HID device) and 'plug' that into an RP2350, which translates the keystrokes to serial data. Or tap into the keyboard matrix and do the key mapping on the RP2350. The latter does need less power, as we are not transmitting wireless data and having an additional IC running. So Keyboard Matrix analysis to be done!
To "see" the matrix, I did first take pictures of both sides of the PCB. Mirrored the picture from the back and overlayed it with a bit of transparency to see all traces and vias:
Then follow all the traces, with vias going from front-to-back and vice-versa. This way we can find all the contact points behind the buttons. Many colourful lines, but it makes me understand where I have to tap into the matrix to "listen" for keypresses:
UPDATE September 11: more parts received. While doing inspection of the parts, measured all sides and made models of them:
And two items that I made models for last week and even included them in the designs above, but didn't upload the pictures yet.
That means all major parts are in now. There are some small things on order, like a USB-C connector (the one pictured above is too large) and two switches to move the on/off and reset to the outer shell.
UPDATE September 16: I've spend the past couple of evenings soldering wires to the Keyboard matrix. This is so small! First time this size, so although it is a bit messy, I'm happy. And most important, tested all connections, it works! Wires used are 0.2mm enamelled copper. With a magnifying glass and lots of patience. No coffee, you will get shaky hands!
Now it's time for the software that will run on the RP2350.
UPDATE September 18: How does a Keyboard matrix work? Look at the image somewhere higher up with the Keyboard and the colorful lines: we have 7 horizontal lines (rows) and 11 vertical lines (cols). Each of these rows/cols are connected to a pin on the RP2350. The row pins will be set as OUTPUT default HIGH, the col pins are an INPUT with PULLUP. When you press a key, on the crossing of the row/col you will create a connection, reporting the input to be LOW.
The program on the RP2350 will run a loop every 500ms to check if one of the crossings has a connection (is LOW). We do that by setting the row pin 1 to LOW and then one-by-one check all col pins to see if one of them is LOW. Then reset the row 1 to HIGH, and set row pin 2 to LOW. This continues in a loop till all rows are checked.
When a LOW is found, this is the key that is pressed. To avoid capturing repeating keypresses, there is checked if the key was already pressed in previous loop. If this is a new keypress, we have a table with the ASCII key characters for each connection in the matrix. This is what we will send over the serial connection from the RP2350 to the Wio Tracker L1.
There are two special keys: SHIFT and CAPSLOCK. I did not include the CTRL, ALT and FN keys as we just need an ASCII keyboard without other specials. In the loop, there is first checked for the SHIFT key. If SHIFT is pressed, we use a different ASCII table for the matrix. This table contains all ASCII codes for the SHIFT logic; on characters that is the capital character, on numbers there is special characters.
If the CAPSLOCK is pressed, this is toggled ON/OFF in a parameter. Again it will use another ASCII table, as now only the characters will be in capital. The numbers stay numbers. To make it more complex (who doesn't like that!), you can also first turn on CAPSLOCK and then press SHIFT while pressing another key. This inverts the capital character usage, but at the same time gives you special characters on the number keys. So we have 4 different Key Matrixes: normalKey, shiftKey, capsKey, capshftKey.
The code I wrote for this, is loosely based on code from Cameron Coward: 64-Key Prototyping Keyboard Matrix for Arduino. He has a logic shifter for the cols where he needs to set registers, so I had to rewrite this for individual pins. The matrix Cameron is using has 1 dimension only, he multiplies the rows to get to the correct bit. For easier access, my array is 2-dimensional, to point to the exact row/col position. All-in-all, his code was a perfect jumpstart for me to get this working!
Little side-note on getting the RP2350-Mini (as how they call it on AliExpress) working in the Arduino-IDE: add the Additional Boards Manager URL in your configuration:
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
Then search in the Board list for RP2350 and install this. When uploading your sketch, in the board selection use Waveshare RP2350 Zero. Maybe it is not a 100% correct board configuration, but this worked out for me for the pin allocations.
First time you upload a sketch, make sure the board is in boot mode: press the BOOT button while plugging in the USB. You will get a virtual drive added in your machine. Then upload your sketch as your normal Arduino IDE workflow. Next time you do not need the manual boot process anymore, the sketch upload process will automatically put your RP2350 in boot mode.
UPATE September 19: First test-print done! I must have been sleeping when creating the model for the battery. Just 2 cm off... Other than that there are some tolerances I have to work on, and fine-tuning the printer...
To be continued... I'll print a test version of the front of the current design of the enclosure today. That gives me more visibility of sizes and where adjustments are needed.
Comments