PIP-GRL 31415 (not spam!)

Status
Not open for further replies.

ZTiK.nl

Well-known member
Hi again everybody,

I'm not sure if this should be posted in General Discussion or Project Guidance, but since I don't have any questions on how-to's, GD seemed best.
I have been working with my Teensy 3.0 for a little over one month, and since yesterday night I have gotten my TFT touchscreen to work, along with the MicroSD adapter provided by PJRC (my main components).
Since the moment I ordered the TFT I have been thinking about what I'm going to make with it...
The possibilities seem endless, but I have managed to single out something that would be awesome (in my humble opinion).

My goal:
Make a wrist-computer (PIP-GRL 31415) similar to the 'PIP-BOY 3000' in the computer game Fallout.

I know others have made these already, but so far there has been only 1 real functioning pip-boy, which has gone up in flames.
Also, the size of the Teensy allows for a smaller design thus not getting the way of normal life.
Not sure how to explain this properly, but I would scale down the entire thing so it wouldnt extend the width of my wrist...height is less of an issue to me (within all reasonability ofcourse)

At the moment I only have my TFT working with the MicroSD adapter, I still need to update the examples to the new SdFat library so that I will be able to read/display images within < 1 sec instead of the 9 sec it takes now to load an 240x320 .bmp file.
Thats one other thing I will be looking at, adding a section to the GFX library to support .png files as well (if it is actually possible & not slower compared to .bmp).

I have ordered the following items to add:
Crystal 32kHz
Max Power IR LED Kit
PCB Mounted Speaker
Toggle Switch
Missile Switch Cover - Carbon Fiber Look

I realize that the PIP-BOY does not have an on/off switch but I'm afraid I am going to need one.
Also, the switch cover is really needed to make sure my sleeves can't accidentally turn on/off the PIP-GRL
I'm not sure if the PIP-BOY has infrared, but according to the wikipedia it very likely has 'wireless capabilities'
Files can be transferred from some terminals to your Pip-Boy, which could indicate it has some kind of wireless connection.

I had an old pc-speaker connected to one of the digital pins (23), which plays the Tetris theme song very nicely, so switching to the (tiny) pcb speaker should be quite easy.

At the moment I am waiting with ordering more parts until I have all the above working and ready, but I am always looking for new/funny ideas to incorporate into this pet project:

One of the things I will definately be needing is a compass, to show me where north is...
I have thought about GPS, so that I will be able to 'track objectives' (work/home/shops) but this probably be one of the last parts I will add.
Also, I would like to incorporate an FM receiver
Maybe I will also incorporate a pulse-sensor to detect 'health'...

I'm not sure if I want/need a gyroscope... since it will be wrist-mounted, the display should always be in the same landscape orientation i guess...

Currently everything is on a breadboard but I am planning to order a few new Teensy's, mainly because I am not too familiar with the soldering iron yet.
I have read somewhere that Paul was planning/thinking about a Teensy 3.0 ++, so I might wait with ordering these until then... seems like I will be needing a lot of pins eventually :)
All cables are connected except the X-, X+ Y- and Y+ because my remaining jumperwires are either too long or too short.

Everything that you see on the display is text, that includes the lines between the letters.
I could have used the draw line function for it, but this was faster for a quick test of what it would look like:
PIP-GRL 31415.jpg

On a sidenote I should mention that I taught myself programming/electronics, and I am doing something I wouldn't believe if you told me so three months ago.
What I am saying here is that I probably skipped a valuable lesson here and there, and I don't fully understand everything I am doing.
There should be no expectations of this actually working, I am bound to screw up somewhere along the way.
Thankfully I am also quite persistent... if I want something done, I'll get it done... no matter how many sparks I see :cool:

I guess that is all I have to say for now, if you have any suggestions, I would love to hear them!
Thank you for reading this and thanks to those who assisted me with getting this far!
 
Last edited:
Small addition, I have extracted the pipboy images from the Fallout data files and will be using these soon (after SdFat upgrade).

I guess that as long as I use them in a non-commercial way I shouldn't be in much trouble...
Maybe I will send an email to Bethesda :)
 
I have realized that it is unwise to use .png images as they are not easily translatable to RGB, so for now I will direct my focus elsewhere...

I am thinking about making 240x320 images of the Netherlands and storing them on the microSD.
Then link it with a GPS module, and display the corresponding image for the given coordinates.
Maybe I will get that GPS sooner than I thought...

Has anyone invented 'Fast Travel' yet ? :p
 
Oops, I confused .jpeg with .png on the arduino forum about this topic...

Thnx, didn't realize I misread until you said that.

OK so looking at that forum post, the issue is decoding complexity of the compression method (with both PNG and JPEG/JFIF) nothing to do with whether the image data is stored as RGB or some other color model.
 
Yeah it appears so, I mixed up reply #4 and #6 in that post.

Well, for the time being I won't scratch .png off of my wishlist just yet.
Once I have a little bit more time to dive head first into yet another subject I'll see where that takes me :)
 
Awesome project. I hope you won't have te same wiring issues as pip-boy#1. I suggest the judicious use of fuses to avoid that sort of problem. I like PTCs because they auto reset once a fault has been cleared.

My mums English-made boat had enough electrical wiring issues to prompt me to replace it all. Took a long time. Lots of pain getting at the wires in question. But ultimately a better solution than having the boat go up in flames whilst on the high seas.
 
I made a start with the PIP-GRL menu and also did a 'login-screen', and since it is working so nicely I made a youtube vid.
It is only 30-something seconds long, but it shows the basics :)

Everything you see is either text positioned at x/y coordinates, or lines/triangles/rectangles drawn from/to x/y coordinates.
I still need to rewrite the adafruit graphics library to load the VaultBoy icons using SdFat, because when I use the default library it takes 8+ seconds to load a 100kb file...

Also, no matter how often you login incorrect, the display says '4 attempts left', still have to work on that ;)
 
Well, I ordered some more items for this project...

-Breadboard wire bundle
-Solder Wick
-5x Solderless Headers - 10-pin Straight
-20 in 1 Basic components mixed pack

-Black Metal Knob - 14x24mm
-Key Switch - Small
-Logic Level Converter
-Coin Cell Battery - 20mm
-10K Breadboard Potentiometer
-Adafruit Ultimate GPS Breakout - 66 channel w/10 Hz updates - Version 3
-LSM303 Breakout Board - Tilt Compensated Compass
-MCP23017 - i2c 16 input/output port expander
-Humidity and Temperature Sensor - RHT03
-8-channel Bi-directional Logic Level Converter - TXB0108
-Surface Transducer - Small
-Electret Microphone Amplifier - MAX4466 with Adjustable Gain

Í guess that this topic will expand quite a bit in the near future with updates of how it is working out.

As always, if there is any interest in a guide on what I managed to get working, or information on what I did, please ask.
I might not be able to answer all your questions properly, but it's a learning experience for me as well ;)
 
Following Constantins advice, I am ordering a few PTC's too, thanks again!
I'm not using them yet until I've done some more reading about it, simply because I don't know for sure how to use 250mA PTC with devices that want less (100mA and lower).

So much to learn... (no I'm not complaining, merely stating a fact)
 
This could be considered overkill, but I ordered another set of items:

-Laser Card Module - Red
-LED Light Pipe 0.6" Round
-3x LED Tactile Button - Red
-MOSFET Power Control Kit
-MPL3115A2 Altitude/Pressure Sensor Breakout
-Pulse Sensor
-10x Resettable Fuse PTC
-SparkFun Inventor's Kit for Arduino - Carrying Case
-SpeakJet Module

Quite anxious about the SpeakJet Module, GPS and compass modules...
 
Some of the parts came in a few days ago.
Didn't have much time to play with everything yet but I got the GPS module up an running.

Since it also syncs time/date I have replaced the HP/XP/AP (hitpoints/experiencepoints/actionpoints) in the menu with TM/DT/NE (time/date/northeast) displays

I still need to create a map page in the script, so I placed the GPS info display on the 'Perks' menu :x
-I'm not too sure about the altitude info, I'm on the 2nd floor of a building, but I know I am below sealevel... still need to dig up more details on that
-I can also verify that I am not moving yet my velocity/speed is never at 0, I think this is because I am indoors and not using an external antenna (yet).
-The coordinates are quite accurate, I am but a few meters away from where Google Maps says the coordinates are.
-If the GPS connection is lost, the last known position will be displayed.
-If the GPS connection is lost and there is no last known position, it will display 31415, probably no explanation needed ;)

Here is an image of what it looks like now:
GPS working.jpg
(I lowered the backlight to get more detail in the picture, but it is much more vivid at full backlightation(?) )

Also, I am completely out of pins on the T3 now, so I have to find a way to use the bottom solder pads/pins on a breadboard.. any suggestions?

Just a few more things about the image:
-There is a battery level indicator on the top left instead of where the LVL # should be, it doesn't function yet, I simply set an int batterylevel = 100; at the top of the .ino file
The script behind it does work, if the batterylevel var falls below 66 the first (last in display) one bar will disappear, below 33 another bar disappears, and below 5 the last bar disappears
I am currently working with 2x 100% pure 'pc supplied' usb power, in the final product I hope to get a batt.level module to make this actually work.
-There is a big green rectangle in the middle of the screen I should have removed before taking the image.
This is something I was using as a test for a batt.meter but will also be used for the CND/health meter on the Status menu.
I will probably link this to the pulse-sensor I ordered to make a .. well... health percentage meter...

Anybody know how to convert heartbeats p/m to percentages ? :p
 
I forgot to credit kingforger for writing a guide on how to accomplish this.
Also, if anybody needs/wants a copy of my working lib, let me know!
 
Made a new youtube vid which shows (in this order):

-The new and improved login screen and locked/bricked screen

after reuploading the code and logging in with PARTS passwd (could have resetted, but hard to reach with all those cables):
-(not really functioning) charging/battery indicator
-GPS time/date lat/long
-SdFat working together with the tft bmpdraw example to draw Vaultboy

Then the RAD submenu:
-A meter that takes a random value from A13 once per second, combines 3 values and displays the average

Then on the Perks menu:
GPS lat/long, speed, angle, altitude, amount of sat. connections and quality.


I have to work on the GPS code to increase time with 1 hr for daylight saving time.
To make the vid I lowered backlighting a bit, webcam doesn't really like the display changing from black to green that much :x
 
I've (finally) done some work to combine the MicroSD with the GPS and screen to create a rudimentary 'you are here' system.

When the page is loaded, a map of the Netherlands is drawn to the screen.
Then the GPS coordinates are mapped to the coordinates of the relative location on the screen, and a square is drawn around the location with a dot in the epicenter.
(I will create the arrows that the pip-boy actually uses, but since I haven't been able to connect my compass yet, I have no direction to point the arrow to...)

Due to the shape the Netherlands is, I chose to rotate the map 90 degrees clockwise to be able to show the full map of NL.
At a later point in time I want to do the same for each province (12 total) to give the option to zoom in/out 1 level.
I am also thinking about an overlay option for road/public transport/bicycle routes/emergency services/work & home, but with so many things on my wish-list I'm not so sure this will ever get done :)

For your viewing pleasure:
Everything working together.jpg
 
Thanks, always nice to hear others agree with my opinion :)
A bit of an 'open' question though, I'll try and answer to what I think you want to know.

The interface consists of:

startup defines and vars with
Code:
page = 0; // loginpage
menu = 0;
submenu = 0

setup loop with
-initializations of screen, gps, microSD
-trigger to page_0() function

main loop with
-touch triggers (open page/menu/submenu and trigger buttons like mute)
-value updates on screen (refresh time/date/gps) after elapsedMillis(#);

functions file with
Code:
page_0(); // login page
page_1(); // STATS page
page_2(); // ITEMS page
page_3(); // DATA page
page_99(); // device locked page
page_100(); // settings page
There are a lot more functions in there, but I won't put them all in, a sample: different beeps, password check, refresh time/date/gps, coordinate calculate functions, mute function, etc, etc, etc :)



To give a general idea of what happens when the code is executed/teensy is reset:
-The startvars are set and the setup loop kicks in.
-Once the setup loop reaches the last line, it is diverted to the loginscreen in function Page_0();
-Page_0(); waits for input from the loop to press a passwords x/y coordinate, and checks if the corresponding password matches the system
-If pass is good, Page_0(); sends you to Page_1();, otherwise the counter goes down with 1 failed loginattempt.

Pretty much the same happens for every other page/menu/submenu


At the moment there are 2 images loaded, the Vaultboy image on Page_1 Status menu, and the map of the Netherlands on the Page_1 Skills menu.
Everything else is either printed text or drawn lines/squares/triangles.
This also means that I use a LOT of code to draw the interface and I have less code left for actual scripts I want to implement.

I still need to rewrite a lot of code to consume less memory/space, at the moment my scripts take up:
Code:
Binary sketch size: 64.360 bytes (of a 131.072 byte maximum)
Estimated memory use: 8.860 bytes (of a 16.384 byte maximum)
but I have to admit that I have not been really mindful of this from the start on, I just wanted it to work :)
I think I can free up about 10k (maybe 15k) of space by replacing often used code with functions, and I think I can shave quite a bit off the memory usage as well by cleaning up some scripts.

That is about all I can think of concerning the interface at the moment.
I hope this answers your question, if not, please clarify what you'd like to know more about and I'll definately follow up!

Btw, love your nickname :)
 
Last edited:
At the risk of sounding like the complete code noob that I am...you wrote it in python, right?
Are you using a raspberry pi?

Thanks ^_^
 
At the risk of sounding like the complete code noob that I am...you wrote it in python, right?
Are you using a raspberry pi?

Thanks ^_^


Ha, I didn't think about explaining that part, sry.

I am using a Teensy 3.0 instead of a Rasp Pi.
Everything is written in the C++ derived Arduino language.

I know that it should be possible to code in other languages, but since my programming skills are pretty much equal for all languages (not that good :x), I stuck with the Arduino language.
 
Thank you, the only coding languages I'm familiar with are HTML, CSS and php, so my idea to build a pipboy for a comic con probably wasn't the smartest. However, your insanely awesome descriptions of your process have made it seem halfway doable.

So is the teensy acting like an arduino then? I put together a shrimp (cheap arduino) and I'm wondering if I could use that instead.

Edit: grammar
 
My goal for my pip boy right now is just the main screens and being able to use a rotary enable switch, a five-position switch, and push buttons near the LEDs like pip boy 1 to move within and between them. I think I will worry about GPS and health sensors much later!

My only credential right now is that I have taken a basic electronics class so hopefully I won't blow anything up. Mind if i ask where you got your LCD?
 
My background is in PHP/SQL as well, so for me this was a big step up.
Don't let the C language discourage you though, it is not that hard to understand the basics, and you can get pretty far with just the basics ;)

The Teensy is indeed compatible with (most) Arduino code, but the Teensy is quite a bit more powerful and has more memory compared to a stock Arduino.
When I started this I was expecting to display a few simple bmp's, but the Teensy has allowed me to expand on that idea up to where I drew my own interface instead of using an image.

I know that the TFT, GPS & MicroSD can all work on Arduino so the limiting factor would be the Arduino's memory/processing speed.
For this reason I suspect most of this should also function on an Arduino, but I haven't tried this myself ;)
 
Status
Not open for further replies.
Back
Top