Yet Another Pi Zero Portable!!
moosepr last edited by moosepr
@senkun im currently usnig 8 gpio your correct. I have start and select included in those 8 at the moment, it is the only way i can get in and out of games for now.
im currrently using only the right hand gpio pins for the buttons (6,13,19,26 & 12,16,20,21)
the screen is using standard pins (18,24,25,8,9,10,11)
so that leaves an extra pile of pins (2,3,4,5,14,15,17,22,27) which is more than enough for start, select, and 2 shoulder buttons
this is of course assuming that you dont want sound. have bought the I2A board from adafruit https://www.adafruit.com/product/3006 whic uses 3 pins (18,19,21) Now my tft board gets round pin 18 being used for the backlight (assuming you can stop the driver from attempting to use it) so 19,21 will need to be re-assigned differently for the buttons i already have. But then that will still leave plenty of room to play!!
obsidianspider last edited by obsidianspider
@obsidianspider I like the wound of your project. If you are just using the tft screen as a second screen then things might actually be simpler for you than first thought!!!! As long as you have the modprobe command to get the screen fired up, all you need to do is use simple commands to send a simple command to throw an image at the screen. if you look here https://github.com/notro/fbtft/wiki/Framebuffer-use
the handhelds use the mirroring, but you can use the image or video options, to display something related to the game in use
I'm hoping I can figure it out. I was inspired to use a second screen by this bartop, but he used a GLCD, not a full-on display. (More information in the comments on reddit.) The code he used to output a simple graphic and/or text looks a lot simpler. I'm going to need to figure out how to do some programming if I want the little slide show he did (I think I can do something like that with fim, but what I am not sure of how to do would be to also use text if I wanted to have the display show something else (scope creep). If I understand it correctly his second slide is an image with button text overlaid from an XML file.
What I'm planning is a Super Famicom with a Pi3 in it, and I wanted to have a game in it that did something, I wasn't sure what. I was originally going to do the "put the SD card in the cartridge" thing I've seen done a few times, but I decided I'm going to try to get it set up so when you select the game and it starts playing to display the game art on a cartridge inserted in the Super Famicom.
I measured up the $4 soccer game I bought on eBay to use as a donor and that 2.2" screen is just slightly taller than the label area, so it should fit nicely, and since so many Super Famicom cartridges seem to have that graphic area surrounded by a colored label, it should look right at home once I either paint the label area, or make up a new label.
…Of course, I can't try anything with the new screen until it actually gets here, so I'm hoping the shipping is quick!
not to revive a dead thread, but for anyone interested, here are a few updates on my little project.
Firstly, i have finally got round to testing my battery. it is 2500mah, so the 10 hour runtime means 250mah per hour of runtime. i think this is partly due to the lack of audio/usb hub/boost circuit.
Secondly, my little ili9431 adapter boards work!!! I have finally found the time to test, and although i have not tried it on a Pi, it works a treat with an esp8266 board, using a basic adafruit test sketch
The soldering is a little messy, and the only naked screen i had to hand was 2.8 inch, so had 18 pins rather than 14, so you just have some spare overhang
excuse the poor focus, my phone doesnt like the 0.8mm pitch pins
obsidianspider last edited by
@moosepr Great job! Now I need to find another project to put a screen in and get one of those boards.
@obsidianspider well now I know it works, I'm going to be designing a few different things that stick a pi and a screen in the smallest package possible. Watch this space........
you wouldn't happen to have a parts list with links would you? I'd like to try to build something like this but I'm a bit of a NOOB with the electronics side of things.
@gazredtyke I think there may be the details peppered though the thread. It is basically a pi zero, 8 buttons and a TFT screen. It's all wrapped rather haphazardly around a lithium battery, with a charge/protect PCB, and a microcontroller doing a bit of switching
@moosepr I've ordered a screen from china, I've got a few pi zero's, I've found the li po charge protector but I couldn't find the microcontroller, also will any li po battery around 2000 mAh do? Do you reckon I could use the guts of a usb snes controller for the input?
@gazredtyke with my testing, 2500mah got me 10 hours, so 2000 will get you about 8 hours.
The microcontroller is a uhex from dfrobot https://www.dfrobot.com/wiki/index.php/UHex_Low-power_Controller_SKU:_DFR0343
I did plan on adding a power level indicator and safe shutdown of the pi, but never got round to it. You could replace the microcontroller with a simple switch really
The controller route is a good idea, the PCB will have one side of each switch going to a common point. This will need connecting to one of the gnd pins on the pi, with the other side of the switch being connected to individual gpio pins
@moosepr thanks for that, I've got a 5200mah power bank that I don't use, would that just be too much?
@gazredtyke the only thing you need to watch with batteries is the voltage. If you use the power bank USB output then you will get 5v, but you will loose some of that capacity with the conversion. If you crack it open and use the raw cells you will get more capacity, but only get 4.2-3.3v from the cell. You can put anything as low as 3.3v into the 5v pins on the zero and it will work fine, but anything over 5v and the magic smoke will come out. The capacity will only alter the runtime. A 5000mah battery will just get you 20 hours runtime
@moosepr it says 3.7V 5200mAh 19.24Wh on it
@gazredtyke awesome, that's just under 21 hours runtime then! Will probably take like 6 hours to charge though! 😛
@moosepr overnight then! haha, would you mind if I got in touch when my parts arrive for some help?
@gazredtyke yeah no problem dude! If you start a post detailing the build, you will get lots of help from everyone!
@moosepr thanks mate, could you let me know which gpio pins are needed for all the connections? Can't quite make it out from the photo...
@gazredtyke I used this as a guide to connect the screen
Then the buttons, you can use any of the remaining gpio pins. You have to install some software on the pi that turns your pin input into keyboard commands, and in there you set what pin does what
@moosepr I think I've thought of another way, if i desoldered the micro usb I could just solder the usb wires directly to the pi couldn't I?
@moosepr infact scratch that, ridiculous idea!! I've just soldered 5 wires to a micro usb male, still smaller than the screen and battery when plugged into the micro usb port!
rockyhill last edited by
This is exactly what I need! I'll be making something like it when I get my hands on a zero. Have you played legend of zelda nes?