Yet Another Pi Zero Portable!!
-
Thanks! This will help a lot.
-
@moosepr said in Yet Another Pi Zero Portable!!:
the drivers for the screen are already included in RetroPie (as long as the screen uses the ili9341 driver). it basically uses the same screen as early adafruit 2.2" tft screens https://github.com/notro/fbtft/wiki/LCD-Modules#adafruit-22
Haha. That's what I meant. "Notro has drivers provided for some named brand screens which use the same controller, which would work if we dig through the overlay sources and check for the specified connections to hook up our screens accordingly."
@obsidianspider Just make sure you hook up your screen accordingly to mimic the connections for that named brand screen.
-
@moosepr said in Yet Another Pi Zero Portable!!:
i figured i could squeeze about 14 gpio pins out of it, if you make sure you disable the I2C and serial, you can make use of those pins there
whoa 14 pins is good! More than enough including shoulder triggers. Looking at your pic, I see 4 for the Dpad, and a, b, x, y. What about start, select?
-
@senkun said in Yet Another Pi Zero Portable!!:
@obsidianspider Just make sure you hook up your screen accordingly to mimic the connections for that named brand screen.
Haha, yeah, I'll be sure to connect it with the Adafruit-style pins. There's a reason I'm doing all of this experimenting with my old Pi2 before I hook everything up to a new Pi3. I don't want to fry something, but this is all new to me, so I have a feeling there will be a few failures along the way.
-
@moosepr I still didn't understand how you power it with a lipo without a voltage booster?
lipo voltge is 3.7 to 4.2.
Do you power it with the 3.3V or 5V gpio pins of the pi zero? -
@pikgoggle said in Yet Another Pi Zero Portable!!:
I still didn't understand how you power it with a lipo without a voltage booster?
lipo voltge is 3.7 to 4.2.@senkun said in Yet Another Pi Zero Portable!!:
the Zer0 can and has been tested to boot from as low as 2.8V (very unsafe if Lipo) and run unless there are 5v usb peripherals.
The screen needs a strict 3.3V, which is provided by the zer0 which in turn is fed direct off a LiPo (from 4.2V ~ whatever safe cutoff is set). To be safe, the battery should at least have a protection circuit built in. @moosepr has a charger/protection circuit module in the mix.
-
@pikgoggle yeah like @senkun said, im piping the lipo straight into the 5v pin on the gpio header. This way it still goes through the 3.3v regulator, so the pi gets the 3.3v it needs. It even works for most USB devices, had an old wifi dongle working fine. It is going through a cheepo Chinese charge/protect board, just to make sure there is no damage to the battery if things get low.
I chose this method for simplicity, and to reduce power drain. Most boost converters are 90% efficient, but then if your boosting it (with a loss) just to regulate is down again (probably with another loss) then your just nailing battery power for no real reason.
@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
-
@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!!
-
@moosepr said in Yet Another Pi Zero Portable!!:
@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
-
@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........
-
hi Peter,
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.
Thanks -
@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! 😛
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.