Introduction: PiE-Ink Name Badge
Want to decorate your chest with something amazingly dorky? Want to stand out in a crowd? How about earn some serious geek cred, and the wonderment of your peers?
HAVE I GOT THE THING FOR YOU!
Introducing the PiE-Ink Name Badge - a Raspberry Pi Zero Python Powered E-Ink Linux Name Badge (what a mouthful!). A full wearable linux computer system on your chest!
This guide will take you through procuring the necessary components, putting them together, and coding the device - from beginning to end.
Beginners may want to take on an easier project - as this requires soldering, some linux-knowledge, coding, and is generally a little more complex. But hey - who am I to stop you? Do what you want!
Step 1: Parts List
1. Soldering Iron - Order here
2. Solder - Order here
3. 30 AWG Wire - Order here
4. Helping Hands - Order here
5. USB or Bluetooth Keyboard - Order here
6. USB Wi-Fi Dongle (ignore if buying Pi kit with one included) - Order here
2. Adafruit Powerboost 1000c - Order here
3. PaPirus 2" e-ink Hat - Order here
4. Mini Slide Switch - Order here
5. Micro USB Hub - Order here
7. USB LiPoly Charger - Order here
8. Adhesive Putty - Order here
9. Magnets - Order here
1. Clear nail polish for weatherproofing - Order here
2. 3-D Print an enclosure - Find or make one here
3. Use a Pi RTC module to display time - Order here
4. Resistors for optional safe shutdown procedure - Order here
5. Super nice helping hands upgrade - Order here
6. PCB Vise - Oder here
7. Wire Stripper - Order here
Step 2: Solder GPIO Header Pins to Pi Zero
- Get your soldering iron nice and hot!
- Put on some tunes, and solder all 40 pins of those pins to your raspberry pi zero. It helps to hold things in place with your vise, helping hands, tape, or any combination of the those.
Step 3: Solder and Mount Powerboost 1000c to Pi
- Strip some 30 AWG wire on both sides
- Solder the contacts just to the left/bottom of the + on the 1000c to the PP1 contact on the Pi Zero. Then, solder the contact just to the top/right of the - on the 1000c to the PP6 contact on the Pi Zero. Reference the screenshot if you need help.
- Mount the powerboost 1000c onto the pi zero board with some putty adhesive, electrical tape, or Sugru if you want something a little more permanent.
NOTE: We will remove the wire contacts from the board in an upcoming step once we install the switch. Easy peasy! Don't worry about it for now.
You are now able to power your raspberry pi with a lipoly battery, and use a MicroUSB charging cable to both power the board and charge the battery at the same time. WOW! Those Adafruit Powerboost boards are pretty handy, aren't they?
For more information on pinouts, assembly and schematics regarding the Adafruit 1000c, you can visit their official product page here.
For information on wiring for safe shut down (not part of this tutorial), you can visit this page here.
Step 4: Connect and Mount PaPirus E-ink Hat to Pi
- Connect the PaPirus hat to the GPIO header pins you soldered earlier.
- Snap the screen of the Papirus into the hat (flip up the brown cover, push into place, snap back). Use some putty adhesive or the included sticky tape to get the screen to stay in place.
- Use the plastic screws and mounts that came with the PaPirus hat to screw together the boards and hold them in place. You may not be able to get them all in, due to the Powerboost 1000c. This is fine.
Step 5: Solder and Mount Mini Switch to Pi Zero
- Remove the ends of the wire we connected to the Pi Zero contacts earlier. Connect the positive lead to the rightmost contact of the switch, and the ground to the middle contact of the switch.
- Strip some more 30 AWG wire on both ends, and solder them from the contacts you just connected to the appropriate contacts on the pi zero.
- Use adhesive putty, electrical tape or sugru to put fasten the miniswitch against the board securely.
Step 6: Connect to Your Pi - Install & Update Software
- This is not a 'how to install a raspberry pi operation system' guide. For information on how to get started, goolge some quickstart guides. I recommend you use win32 disk imager and the new Raspbian Pixel OS.
- Be sure to use raspi-config to expand your file system, turn on SPI, I2C, and optimally VNC so you don't have to keep using a monitor and USB keyboard.
- Make sure to change your default password, hostname (if you want), and localization/timezone options.
- Connect to your wireless network, and update your raspbian OS using these commands:
sudo apt-get update -y && sudo apt-get upgrade -y
- This will take quite some time. Reboot once finished.
- Follow the set-up instructions here to get everything ready and working for your Papirus Hat E-Ink module. If you did everything right, you should only need the following commands:
curl -sSL https://pisupp.ly/papiruscode| sudo bash
sudo papirus-set 2.0
- If you are using a size other than the 2" E-Ink screen, be sure to specify something else of course.
- Reboot the Pi after successful installation (sudo reboot).
Step 7: Edit Script + Images to Your Liking
- Download the files I've hosted for you on my github.
- You'll notice all the image files are 2 bit, 200x96, and greyscale. You can use my images to test. If you'd like to make your own, you'll need to edit them into that format to be used by the PaPirus.
- An easy way to make your own photos is to use the free application Photo Filtre 7. Once you have it installed and the images you want sized correctly, simply go to Filter -> Color -> Gray Scale -> Click 'Ok'.
- Edit the badge.py script to point to the directory you'd like to use. Here is the one I use:
projectPath = '/home'pi/Desktop/badge/'
- Edit the image names under the while loop starting on line 77 to match the images you've created in your folder. You can edit the sleep timers to change how long the image remains on the screen, or the other functions documents on the PaPirus github. Get creative!
BONUS: If you'd like to make the buttons on the PaPirus hat function, use something like this:
if GPIO.input(SW1) == False:
draw(papirus, 'Photo-Name.bmp', "Name: Francesco\r\n" + "Surname: Vannini")
else if GPIO.input(SW2) == False:
draw(papirus, 'DireStraits.bmp', "Favourite band:\r\nDire Straits")
Step 8: Set Script to Auto Launch
- Follow the instructions here to create a cron task to auto-launch our script on reboot.
- Do not skip any steps, as it is crucial you follow to a T.
- Once you've created the cron task, be sure to test the script by rebooting.
- If you somehow get stuck, pressing CTRL-C can exit the script.
Step 9: Attach Magnets - YOU'RE DONE!
- Attack magnet(s) to the back of the battery, then connect them to the inside of your shirt. I'm using two smaller ones because they're what I had on hand - you can choose to use one single bigger one if you'd like.
- You should now have a fully functional PiE-Ink Name Badge!
- The battery will last 4 - 5 hours on a single charge. Be sure to charge it regularly and safely by disconnecting the lipoly battery from the PowerBoost 1000c, and charging it from the USB lipoly battery charger I recommended you purchase at the start of the guide.
- The Adafruit Powerboost 1000c you soldered onto the board will charge the battery as well while plugged into a power source, but I find the board can get hot and cause damage to the components connected to your new device. It's best to follow step 3 whenever possible. Of course, you can disregard if you feel the heat is not that great, or take additional steps to dissipate the heat from the board (heatsink, etc).
Step 10: Extra Credit - Optional Upgrades + Ideas + Links
- Use a board with built-in wifi, or solder on a wifi adapter. This way, you can connect to the internet and display information like weather, stocks, time/date etc.
- Solder on an RTC module and make a permanent time display as part of your cycle or one of the button pushes.
- Use a solar powerbank to go completely green!
- Safely shut down your Pi instead of switching it off and on completely.