Overview
I grew up watching Star Trek: The Next Generation. Iâve always wanted to build a Star Trek themed device, so I finally got around to remixing one of my old projects to make a Star Trek Display Terminal.
The terminal provides the following information:
- Weather â using the National Weather Service
- Indoor Temperature, Humidity and Volatile Organic Compound (VOC) strength
- News Articles â from News.org
- Schedule (with alarm function) â from Microsoft Outlook
- Fitness Information (Steps, Move Minutes, Heart Points, Weight, Calories Burned) â from Google Fitness
- a Resistor color code chart
- an LED Resistor Calculator (to determine the resistor value based on current and source power)
- Power and Current Measurement tool
This information is made available through a combination of APIs and hardware sensors. I leverage an ESP32 for the microcontroller, and leverage the AWS Cloud for all of the data collection and aggregation.
I also included a few âeaster eggsâ:
- Ron McNair homage â Dr McNair is the reason I became an engineer; he grew up 45 mins from my hometown. He died in the Challenger explosion.
- The name of my star ship is the âUSS Ronald E McNairâ
- The Registry Number is from Sr McNairâs birth date; the Prefix Code is the day he lost his life.
- The use of a âprefix codeâ is a nod to Star Trek: Wrath of Khan (the greatest Star Trek movie of all time; donât @ me).
- The numbers of the right of the terminal case refer to my fraternity (1906 â Alpha Phi Alpha) and my alma mater and field of study â (University of Oklahoma, College of Engineering)
You have the option of customizing the numbering, lettering, and ship name, registry, etc for your own âeaster eggsâ.
Background
Last year, I needed a low cost way to measure power and battery drain for a wearable project. I purchased an Adafruit INA219 Featherwing, and used some assorted spare parts to build a simple Power Measurement device (you can read more about it here).
This year, I decided to upgrade the device⌠to make it more âtechyâ. I originally planned to build a working Star Trek tricorder (the Mark IV TR-590 Mark IX version, for those that care)⌠but I quickly realized that it made more sense to create something that would sit on my desk (I mean, why go to all this trouble to make a cool device, just to close it up and put it in a drawer when not used).
So, I I turned to making a version of the computer displays that you see on Star Trek TNG or Voyager (or the assorted movies). I toyed around with different designs, then came across a version created by the Ruiz Brothers of Adafruit. Adafruit does a great job of provided source files for their 3D printed projects, so I was able to take their original version and remix it for my hardware, buttons, and other peripherals.
Things to know before your proceed
- I provide step by step instructions for making my version of the project; however, I do not go into details on certain steps (Iâll link to supporting instructions or documentation)
- This is a complex project. Itâs a âmulti-disciplined makeâ, that requires the following skills
- Arduino IDE
- AWS â You will need an account and will need to understand S3, Lambda, and Node JS
- Soldering
- 3D Printing
- There are optional âadd insâ to enhance the project in order to get Calendar and Fitness information. The functionality is included in the codebase; however you will have to create âappsâ in the Azure and Google clouds to support the features.
- This is ultimately customizable⌠you can swap out the Current Sensor with another featherwing You can use a different feather/wifi combination.
Supplies:
Electronic Components
- Adafruit ESP32 Huzzah Feather
- Adafruit Featherwing Tripler Mini Kit
- Adafruit 12-Key Capacitive Touch Sensor Breakout
- Adafruit TFT FeatherWing â 3.5âł 480Ă320 Touchscreen
- Adafruit BME680 â Temperature, Humidity, Pressure and Gas Sensor
- DC Panel Mount 2.1 Barrel Jack (2)
- Lithium Ion Polymer Battery â 3.7 V 500mAh
- Piezo Buzzer
- Mirco USB cable and 5V charger (a typical USB phone charger will work)
- Copper Foil Tape with adhesive
- Optional â Adafruit INA219 Featherwing
- Optional â 2.1 Male plugs â (for use with the INA219 Current Sensor)
Link to all electronic components except 2.1 plugs: http://www.adafruit.com/wishlists/505926
3D Filament Components And Optional Paint/Sanding Components
- Proto Pasta Conductive PLA
- Additional 3D filaments â I used 4 colors â Grey, Black, Aqua (light blue) and White
- .25 and 0.4 mm nozzles (I used the 0.25 for the lettering details).
Hardware Assembly Components and Tools
- M2x5 and M3x5 Screws
- Straight and Right Angle Header Pins (See Adafruit wishlist for links)
- Soldering Iron (and spool of solder, tip tinner, solder sucker, etc.)
- Philips Head Screwdriver Kit
- Shrink Wrap
- Stranded Wire 22AWG â five or six colors
- Solid Wire 22AWG â five or six colors
- PCB Vise and Helping hands (optional, but makes soldering easier)
- Diagonal Wire Cutters
- Wire Strippers
- Xacto Knife (for removing supports from 3D printer parts)
- 3D Printer (if you plan to print yourself)
- Putty or tape (to affix the battery to the inside of the printed case)
- Digital calipers
- Krazy Glue
- Optional â Nitrile Disposable Gloves
- Optional â Soldering Mat (optional, but protects surfaces)
Note: if you donât have these tools, I suggest you check out Becky Sternâs site for recommendations for good options.
SoftwareArduino IDENode JS editor (like Microsoft Code)AWS AccountOptional â Google Cloud Account (for Fitness info)Optional â Microsoft Azure Cloud Account (for Calendar info)
Step 1: Download, Modify Files, and Print 3D Files
You can submit the files to a 3D printing service (like 3D Hubs) or you can print your own. Files are available at PrusaPrinters.org.
This case is a remix of the Py Portal Alarm Clock featured on Adafruit website. My project uses a similar TFT so, I was able to minimize the amount of design work needed to make the case work with my accessories.
I used the following settings for printing:
- Front and Back- printed at 0.2mm Layer Height with a 0.4mm nozzle, no supports
- Side Number â printed at 0.10mm Layer Height with a 0.25mm nozzle, no supports
- Keys â printed at 0.2mm Layer Height with a 0.4mm nozzle. You will need to print 7 and you will need to print with Proto-Pasta Conductive Filament.
- Case â printed at 0.2mm Layer Height.
- Supports are needed, but are not needed everywhere (only on the sides and the middle where the keypad sits
A few things you should know:
- The Prusa MK3 allows you to change colors at different layer heights. I used this feature for the side-number piece.
- Also, in regards to the side-number piece:
- The Star Trek TNG production crew would sprinkle easter eggs in the props. If you look closely at various plaques and panels, youâll see people names, song lyrics, etc. I wanted to create my own âeaster eggâ for the side number, so I use â06â â which refers to my fraternity (formed in 1906), and âOUCOEâ â which refers to my alma mater (University of Oklahoma, College of Engineering).
- I created a âblankâ side_number piece that you can modify in order to make your own custom number and text.
Step 2: Solder/Assemble Components â Part a (Keypad and Side Number)
First, weâll affix the side number. Use a small dab of glue to put the side number in place.
Next, weâll assemble the keypad.
- Youâll need to cut 7 pieces of stranded wire â each between 10-12 inches in length. These will be connected to Pins 0-6 of the capacitive touch sensor. I suggest you use different colors (and write the colors/pin mapping down, as youâll need this information later). I used the following color combination:
- Yellow â Pin 0/Button 1
- Gray â Pin 1/Button 2
- Red â Pin 2 /Button 3
- Blue â Pin 3 //Button 4
- Green â Pin 4 //Button 5
- White â Pin 5 //Button 6
- Black â Pin 6 //Button 7
- Strip 1/2 in from the end of each wire.
- Cut 7 pieces of conductive tape (each about 1/2 inch in width) and solder the wires to the copper side of the tape.
- Remove the adhesive backing and stick them to the bottom of the keys. You may need to trim off some of the copper tape.
Note: the Keys can either be glued from the bottom (so that they are flush with the top) or glued from the top (so that they âfloatâ a few mm from the top). I chose to glue mine from the top.
Once youâve completed all 7, use a small dab of glue affix the keys to the keypad. I find it easier to:
- First âsnakeâ the wire through the key hole.
- Then put a small dab of glue on the ridge/rim of the key
- Quickly put the key in place.
Note: Krazy Glue works best here; you may want to use gloves to limit accidents and chances of skin irritation.
Step 3: Solder/Assemble Components â Part B (Featherwings and Sensors)
The next step is to prepare and assemble the hardware components. Ultimately, this means soldering header pins and wires for later use. This guide assumes that youâre comfortable with soldering; if not, check out this âGuide to Excellent Solderingâ from Adafruit.
First weâll prepare out materials. For this step, youâll need:
- TFT 3.5 Featherwing
- ESP32 Feather
- INA219 Featherwing
- Tripler Featherwing
- MPR121 Capacitive Touch Sensor
- BME680 Sensor
- Straight and Right Angle Header pins
- Solid and Stranded Wire
- Soldering Tools and Helping hands
- Diagonal Wire cutters and wire strippers
- Calipers
Note: I suggest you first read through this step and cut all your wires and headers before you start soldering. That way, you wonât have to stop to measure/cut.
Prepare the TFT 3.5 Featherwing
The TFT is ready to use out of the box with the only one adjustment. Youâll need to solder a wire between the âLiteâ pad and a pin solder pad. Our code uses ESP32 Pin 21 to control the TFT lite. Arrange the TFT the âlongâ way, with the reset button at the bottom. Pin 21 will be the bottom left pin.
Cut a 40mm piece of stranded wire. Strip the ends so that a few millimeters of wire are showing on each end. Using your soldering iron, carefully solder to both pins.
Note: you only need about 35mm of length⌠so you can trim your wire as needed. Also, I find that adding solder to the pad, then to the wire, then soldering the wire to the pad is the easiest approach. Finally â these pads are small⌠if youâre uncomfortable, you can always skip this step: itâs only for turning off the TFT with the keypad.
Prepare the ESP32 Feather
Youâll need to solder standard male header pins to the ESP32. Your ESP32 should come with the headers, though you may need to trim them to get to the correct length (16 pins on the long side; 12 pins on the short side). Header pins are made to âsnap awayâ, so you can use your diagonal cutters to clip the headers to the correct length. Again, Adafruit has great instructions on how to do that, so check it out if you need guidance.
OPTIONAL â Prepare the INA219 Featherwing
First, solder male headers to the featherwing (using the same instructions as used for the ESP32). Next cut four 20mm lengths of stranded wire. I would make 2 BLACK and the others a different color. I used GRAY and BLUE for my color choices.
Strip the ends of the wire so that 3-4mm of copper wire is exposed on each end. Youâll solder one each of each wire as below:
- GRAY -> V+ (plus)
- BLUE -> V- (minus)
- BLACK -> GND (ground)
- BLACK -> GND (ground)
Leave the other ends of the wires at this time; weâll ultimately solder them to the DC 2.1 plugs.
Attach the Piezo Buzzer
The INA Featherwing comes with a small prototyping area; weâll use that to attach our piezo. The piezo will give our project the ability to beep and sound alerts, alarms, etc.
The piezo connects to ESP32 PIN 13; this correlates to the pin next to the USB pin on the featherwing (see image for arrows). The other piezo pin connects to ground. The pieze pins are long enough to solder them directly to the featherwing⌠youâll just need to bend the pins into a âbow-legged manâ shape (see image). Once you have the pins in place, use a helping hands (or tape) to hold the piezo in place, and solder from the underside of the featherwing.
Note â If you do not use the INA219, then youâll need to solder the piezo directly to the featherwing board.
Prepare the Tripler Featherwing
The featherwing saves us a lot of soldering; it can hold 3 feathers/featherwings⌠so weâll use it to make electrical connections between the TFT, ESP32, INA219 (as well as the piezo and the TFT Lite pin).
To make the connections properly, weâll need to solder two pairs of stacking headers and one pair of standard male headers.
- The regular male headers will go on in the âtopâ spot, but will be soldered to the bottom side of the Tripler.
- The two stacking headers will be soldered in spots 2 and 3, on the top side of the Tripler.
This is a little confusing, so be sure to look at the images to understand where each header is placed. Also, a combination of a PCB Vise and Helping Hands can greatly aid in soldering the components.
Prepare the BME 680 Sensor and the MPR121 Capacitive Touch Sensor
The last two sensors are the most difficult the attach. We need to attach header pins to the breakout boards before finalizing the assembly.
The BME Sensor is attached at a 90 angle, so that I can align the sensor to a hole in the case (so that the sensor can capture temperature, gas, humidity). Youâll need to solder right angle pins to the holes. See the images to ensure you align them correctly.
The Capacitive Touch sensor is straightforward â just solder straight male connectors pins, as outlined here. Note: you SHOULD NOT solder pins to the Capacitive Touch Pins (0 â 11).
Attach BME 680 and MPR121 Sensors to Tripler Board
Both Sensors communicate via I2C⌠which means we only need to make 4 connections between the breakout boards and the Featherwing. For simplicity, I solder all connections between the boards.
BME 680
For this sensor, I use Helping Hands and a PCB Vise to hold both components in place (see image above). The BME680 Sensor should be placed at the end of the featherwing. See the images above to confirm placement.
The process of soldering the connections is tedious, so go slowly. I use solid core wire for the connections:
- BLACK â GND
- RED â VIN
- YELLOW â SCL (SCK pin on the sensor to the
- ORANGE â SDA (SDA pin on the sensor)
Note: The SCL and SDA pins are needed for both sensors, so it might be easier to use a SCL or SDA pin on another part of the Featherwing.
MPR121
Helping hands also help when soldering this sensor in place (tape works as well). The code used I2C for communication to the ESP32, so youâll be connecting the SCA and SDA pins.
Step 4: Solder/Assemble Components â Part C (Keypad to Capacitive Sensor and Feathewing in Case)
Youâll solder the wires from the Keypad to the Capacitive Touch sensor in this step. Use the same color mapping from earlier. If you followed my color scheme, then youâll solder the colored wires as follows:
- Yellow â Pin 0/Button 1
- Gray â Pin 1/Button 2
- Red â Pin 2 /Button 3
- Blue â Pin 3 /Button 4
- Green â Pin 4/Button 5
- White â Pin 5/Button 6
- Black â Pin 6/Button 7
Once soldering is done, use a twisty-tie to hold the wires in place.
Next, screw the TFT screen to the âFrontâ piece. Youâll use the M3 screws (four total). Once the TFT is in place, screw the âFrontâ piece to the case. Again, youâll use M3 screws (two).
Next, plug the Featherwing Tripler, with the all components plugged in, to the TFT.
Note â If you plan to use a battery, be sure to plug it into the ESP32-JST port before inserting the TFT. Use tape to affix the battery to the inside bottom of the case.
Step 5: OPTIONAL â Solder/Assemble Components â Part D (INA219 Feather)
If you are using the INA219 sensor, then this is where you attach the wires to the DC plugs.
- Insert the DC plugs to the back cover, and screw them in place.
- Use a soldering iron to connect the INA219 wires.
- The Black wires should go to the GROUND for each DC plug.
- The Gray wire should go to the INPUT DC plug
- The Blue wire should go to the OUTPUT plug.
Step 6: Screw on Back Cover and Plug in USB
The final step in hardware assembly is to screw the back cover in place â using M2 screws (4). From there, plug in the USB cable, connect it to your PC, and proceed to software steps!
Source: Make It So! Star Trek TNG Mini Engineering Computer