Skip to content

Latest commit

 

History

History
172 lines (117 loc) · 14.1 KB

READMEv1.md

File metadata and controls

172 lines (117 loc) · 14.1 KB

Image

What is a MandoPuter?

A basic electronics system that will display Mandalorian characters on a small display (I'm paying homage to Lego Batman with the name "Puter"). Use this as a starting point for adding displays to your costume (like a gauntlet). Feel free to copy the design, modify it, or make feature requests. This is the way! Software setup overview video is here.

What is the difference between the original MandoPuter and a Mandoputer Pi?

  • The original MandoPuter has a longer battery life, but is best suited for text and one image
  • The MandoPuter Pi has lot more memory and can display multiple images including animated GIFs at the cost of lower battery life

Parts list:

You will need the following parts:

  1. One supported display:
  1. Feather M4 Express Board or ItsyBitsy M4 Express (ItsyBitsy is cheaper and smaller - no charger, Feather gives you a battery charger, and battery level monitoring)
  2. 4.2/3.7V Battery (my 500 mAh battery in the picture below ran for over 12 hours)
  3. Small Gauge (22-30) Wire
  4. Velcro for the battery
  5. Switch for a battery. Also available at Mouser (thanks Aldo Andrei for the find)

If you have an ItsyBitsy, or want to add a switch to the battery, Look at these parts:

  1. Switch breakout board
  2. Two pin battery pigtail
  3. ItsyBitsy Backpack for adding a battery charger (just need to solder 3 pins)

Solder the pigtail cable cable to the board (black to one of the GND holes, red to the SW hole). Do not connect red to the + hole, that is not switched. Plug the battery into the breakout board, and the pigtail into the Feather M4. If you are using an ItsyBitsy solder the wires to the BAT and G pins on the board. Red goes to BAT, black goes to G.

Microcontrollers, and size and resoluion of the displays. The grid is 1/2" or 12.7mm

Image Image

Recommended Tools:

  1. Fine tip Soldering Iron (I use a Hakko FX-100, but any fine tip will work)
  2. Solder (what I'm using)
  3. Solder flux (what I'm using)
  4. Micro Cutters
  5. Wire Strippers
  6. Tweezers
  7. Isopropyl Alcohol for cleaning solder flux
  8. A computer with a USB port
  9. Micro USB Cable

I have the parts, now what do I do?

You'll follow 3 main steps to get things setup:

  1. Setup the Feather M4 board (or ItsyBitsy)
  2. Solder the LCD
  3. Copy the files to the Feather
  4. Make selections in the code to match your setup

That's it, no need to write any code or use any other fancy tools. I have the source code here, so you can install CircuitPython and modify the code to suit your needs. More on that in another guide.

1. Feather / ItsyBitsy Setup

  • They changed the libraries in CircuitPython V7, so you will need to install it to use my latest release download CircuitPython V7 here and there is a handy guide on installing CircuitPython
  • If you have an older MandoPuter Install CircuitPython V6, which you can get from here
  • The 1.3" OLED driver requires CircuitPython V5 or newer, and will not work with V4

Setup the Feather M4 first before you start soldering anything. Make sure the basics work just in case you damage the board during soldering. The primary guide to the Feather is here, but you can skip ahead to the CircuitPython setup. Plugging the Feather into USB will power the board, you don't need a battery yet. If you have the battery connected when powered via USB it will charge. Power management details are here. Do not use alkaline or NiMH batteries and connect to the battery port - this will destroy the LiPoly charger and there's no way to disable the charger. Do not use 7.4V RC batteries on the battery port - this will destroy the board.

When you plug the Feather into your computer, it should show up just like a USB key and you copy file to it in the same way. No need to download anything, drag and drop.

2. Solder the LCD

Solder the LCD to the Feather M4 (or ItsyBitsy), so they can talk to each other. Adafruit has a great soldering guide if you are new to soldering. The only thing they did not mention is adding flux to the solder joint first. That makes it much easier to make a good solder joint, and you only need to touch the parts for a second or two.

Feather Pin LCD Pin ItsyBitsy Pin
3V Vin (do not use 3V) 3V
GND GND G (also Battery-)
SCK SCK SCK
MO MOSI MO
5 RST or RESET 4
6 TFTCS or TFT_CS 2
9 DC or D/C 3
n/a n/a Batt - Battery+
  • The 1.3" monochrome OLED is only supported in SPI mode, please read the paragraph Using with SPI on this page. You will need to cut J1 and J2 if you are using the newer version of the display.

  • For the 1.8" LCD you need to jumper the LITE pin to the VCC pin on the display, otherwise the screen will be black.

Image Image

Use this wiring diagram if you are using the Adafruit 1.44" LCD

3. Copy the files to the Feather

Download and extract the zip file that contains the code, libraries, and bitmap font file. Copy these to the root of the CIRCUITPY drive with the Feather M4 connected to your PC. If your lib folder already exists, do not replace it, just add the files from the ZIP file to the lib folder. It should look something like this (ignore the extra files like boot.out.txt the system creates those).

Image

Make sure you let the copy finish before you remove the USB cable or reset the board, or your system could be corrupted. It could take up to 90 seconds or more on some systems. If that happens, please read the troubleshooting page

4. Make selections in the code to match your setup

The file called code.py on your CIRCUITPY drive is the main program. You can edit it with just a text editor, or you can download a nice program called Mu that makes it easy for you. You can find information about Mu here. You'll be commenting some lines out, and uncommenting others. A comment is a line that starts with a # character.

You'll need to make selections for:

  • Board type (Feather or ItsyBitsy)
  • Text color - red or white
  • Display type
  • Text orientation
  • Font size
  • What characters you want to display, and the delay between them

More details on each item coming soon. For now, take a read through code.py.

Latest Mandalorian Font

I have an in depth page on the fonts and sequence here.

The font used on the show is different from the font in the original Star Wars movies. The best match for the font is the Mando AF font. The L characters is not correct (should look like the inverted V character), and the J and X characters are duplicates of characters before them. I have modified this font and fixed the characters - MandoPuter.otf. Bitmap fonts in the ZIP file are now correct as of 11/9/2020.

Adafruit has a guide on how to convert TTF or OTF fonts to BDF (bitmap) fonts that MandoPuter uses. Custom Fonts for CircuitPython Displays

Maybe we will find hidden meaning in the sequence. Mandalorian language reference here : https://www.mandoa.org/

Troubleshooting

If you do not see anything on the display, check the onboard LED to see if the code is running properly. You should see the LED go purple during initialization, and then green, yellow, or red after that to indicate a battery voltage (ItsyBitsy does not measure the battery). If you see a blue flashing LED then there is an error in the code. If that happens try updating CircuitPython, and extract all of the files from the ZIP release to the CIRCUITPY drive. You might also have an error in the code (code.py). Get things running where you see the purple LED before moving on to troubleshooting the LCD.

If you are not using an Adafruit battery then you need to check the polarity of the battery wiring. The black wire should be closest to the USB connector, see the picture below.

You can also power the board from the USB port, so try running it with the battery removed to isolate a battery related problem.

Other brands of LCDs may require different polarity in the SPI communication signaling. There are 4 different options that you can try if you are not using an Adafruit display. By default the Adafruit polarity is selected. You can try commenting Adafruit, and uncommenting one of the other three. Only one should be active at a time (Lines starting with # are commented out). Try Alt1, Alt2, or Alt3 to see if that helps, I know of at least one case where we needed Alt1 selected to get the LCD to work.

SPI_COM   = "Adafruit"                                # SPI bus polarity=0 and phase=0 for an Adafruit LCD
#SPI_COM   = "Alt1"                                    # SPI bus polarity=1 and phase=0 for an alternate brand LCD
#SPI_COM   = "Alt2"                                    # SPI bus polarity=1 and phase=1 for an alternate brand LCD
#SPI_COM   = "Alt3"                                    # SPI bus polarity=0 and phase=1 for an alternate brand LCD

Want to know more?

Check out this getting started guide on CircuitPython. There's also a CircuitPython essentials guide that good to read through.

You should be ready to go. The system should run once the file is saved, and you should see the font look like this: