close-circle
Close
0%
0%

LAMEBOY - another ESP12 handheld

fully portable ESP12 project with battery charging and power muxing

Similar projects worth following
close
Ever since https://hackaday.io/project/18648-nokia-3310-5110-display-board I've wanted to slap on an ESP module and some buttons to make a nice little portable handheld. Now with some googling and checking out other projects how they get their stuff done and a bit time on hand while on vacation I'm using every spare minute to work on this PCB. There are some minor things I'm not sure about that need testing, but the general concept is clear.

What is this good for? 

Ever needed an IoT remote to connect to all your MQTT stuff? Or wanted to check your hackaday.io likes? Maybe test your WiFi with the ESP8266? It's also good for gaming, as the looks might give away.


RGB background light might seem unnecessary at first, but in context and with some thought it's a good indicator for things. To save pins I'm throwing an attiny13/45/85 on the board to let a BlinkM clone handle the RGB controlling.


On that I2C is also a PCF8574, an IO Expander that will scan the buttons for me.


There is a grove connector - basically almost a 2mm JST connector - that will allow me to add some sensors or another board that I'm working on for sound
#T85SID - I2C sound thing 

https://playground.arduino.cc/Main/SIDuinoI2c

http://playground.arduino.cc/Main/SID-emulator


When it comes to power, I've wanted it all, meaning the board needs to be able to charge a LiPo with the help of an MCP73831 but also stay on when I plugin USB or remove it. For this I've integrated the TPS2113A, a power mux chip that does just that and keeps me from throwing in diodes at everything (that chip was also featured in a 3hours youtube live stream by David Watts - great watch!)


For connectivity I've copied from the known ESP breakout boards out there, that use the CH340G as a serial to USB converter and also a flip-flop circuit for pulling GPIO and RESET at the right time.


PCB change log R1 to R2

  • changed every footprint from 0805/1206 to 0603
  • updated footprint for I2C connecter (wrong dimensions in R1)
  • moved the SD card further into the case (spoiler alert, too far)
  • changed 1117-3.3 regulator to AP2112K

R2 to R3

  • changed every footprint from 0603 to "onefitsall" -> 0603/0805/1206
  • moved the SD card back out a bit
  • moved side buttons further down between lcd slots
  • moved LED for charging to a more familiar spot, shines through pcb
  • added three decoupling caps
  • corrected RGB LED layout and wiring error (RED and GREEN were mixed up)
  • bigger footprint for crystal might improve hand soldering
  • moarrr labelz
  • [bug] Enable pin of ap2112k goes to the switch, other side is connected to VCC but should have been connected to regulator in

R3 (current) to R4 (WIP RC)

  • changed USB micro footprint to fit more rigid version with through-hole fixing to the PCB
  • adding soundstuff I still work on

View all 11 components

  • finding the right connector for I2C

    davedarko2 days ago 19 comments

    The whole reason I'm looking for something else: I wrote seeed studio about getting the SMT version of the grove connector and they told me that they're sold out / not in stock anymore. I tried a JST 2mm 4 pin connector, but it's just a pain to connect. To be continued, but please, feel free to comment ideas. I need to find a connector that is: 

    • cheap to find / buy
    • is well supported with modules
    • easy to connect
    • shouldn't break stuff if mistaken for something else
    • easily obtainable cables with no soldering involved

    USB

    there's already a usb port on the LAMEBOY and I don't want people to mixup stuff


    TRRS 

    would be nice, but I don't want to short stuff by accident or have users mistake it for the headphone plug - especially if there's no audio on board. 


    RJ12 / RJ25 / RJ10

    that was actually already proposed to me in a twitter comment () use the same stuff that LEGO, http://wiki.makeblock.cc/index.php?title=RJ25_Wiring_System and probably others. So right now I'm leaning towards RJ10, a 4P4C cinnector, that is also used to connect phones to the speaker+mic part.


    MOLEX / 2.54mm connectors

    Down in the comments Molex adapters and CD rom cables (basically 2.54mm headers) were suggested, I like the hacker-ready approach, but it doesn't feel like a "finished" design that I want to achieve with revision 4. The current boards have the grove connector still on them.


    Sparkfun QUIIC connectors

    @Patrick Van Oosterwijck suggested https://www.sparkfun.com/products/14417 sparkfuns QUIIC connectors, 1mm JST connectors - a wee bit too tiny and the same problems as bigger JST connectors. BUt it features a lot of sensors that one could use.


    Spring connectors

    another suggestion from twitter, use spring connectors. interesting, easily plug and play ready and probably accepts pcbs, if done right. using pcbs as connectors is the cheapest thing I can think of :D https://t.co/taDxle3lOT

  • woah - updating from SPIFFS

    davedarko4 days ago 0 comments

    So I had the Ghost "game" on my lameboy, put the hudy/ninja puzzle game binary that I've exported from arduino into the spiff and was able to update my lameboy firmware from the spiff. So that's a start and could be incorporated into every game / app via a library of some sorts. Some kind of menu could help you go through the SD card, load firmware into spiff and then update the whole thing. Now I'm fiddling with switching images etc.

    Got it working, I can now switch between a menu image and a game image. Woot :) With that my sketch size is limited to half a megabyte (or a bit less), since it's working like the ArduinoOTA library. It reads stuff into the 2nd half of the active 1MB flash and after restart the eBoot bootloader overwrites the firmware. Since this is supposed to be working with Arduino (not just because of me :D) so that people can easily work with it, I just need to take that as a given. There's probably a way to work with rboot, but I'd rather cross that bridge only when I come to it. Cool. Cool, cool, cool.

    One quirk: I had to remove SD card support, since it also defined a File. I need to take a look into that later. It probably makes sense to have a menu that allows for upgrading / updating from the SD card. I need both libraries If I want to get out of the games that also use the SD card as well. 

    Recently I've started a revision 3.2 that turned into a 5.0 revision - in other words it escalated quickly. In the end I had the game boy pocket buttons integrated, changed the CH340G to a CN2102 serial converter, removed the RST and C buttons, moved the I2C port and changed the footprint, changed the footprint of the PCF8574 to a smaller one. Ah, and I ALSO RIPPED UP ALL THE WIRES :D so in the end I closed eagle and called it a waste of time, but didn't delete it. Only 124 airwires, nothing a long weekend can't fix ;)  

    http://www.esp8266.com/viewtopic.php?f=32&t=11324
    http://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#flash-layout 

    http://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#uploading-files-to-file-system

  • external gamepad

    davedarko11/03/2017 at 07:13 2 comments

    I thought about recycling Game Boy Pocket buttons and silicone pads for the Lameboy, but didn't want to redesign the boards just yet (again). So I thought about a little gimmick: why not make a testboard for a little external controller for multiplayer stuff :D it's read out over I2C (with another PCF8574 on it). There's also a race, I've ordered the boards at oshpark and aisler to compare times. I hope every hole is matching the printed things.

  • fixing rev2 board bug

    davedarko10/30/2017 at 22:02 2 comments

    so far I only know of @zakqwy ho ordered boards from that rev, but if there's anybody else out there, here's how to fix it, just connect the pads marked with an arrow with a bodge wire. 

  • sunday inspiration

    davedarko10/30/2017 at 00:06 1 comment

    Played around with tiles and creating characters today. monochrome 8x8 characters are hard, but I found some cool designs from pico-8. Pretty neat stuff.

  • working on game mechanics

    davedarko10/28/2017 at 21:51 0 comments

    I wanted to try out different techniques and tried to replicate the "experience" of the Game of the last log. I got away with a 320x320 pixel tile. The drawBitmap function of the display library seems to do something right :) so no tile engine seems to be needed, but I'm interested to see how @Radomir Dopieralski is doing it over at https://hackaday.io/project/27629-game/log/69791-inside-a-tile-engine 

  • found a cute game

    davedarko10/28/2017 at 10:51 2 comments

    I haven't seen this before, it's an orthographic "3D" version of pac man on a ZX81. This might just fit perfectly on the LCD! (anyone who wants to program that? :D)  


    One Little Ghost (2012)

    Game can be found here, programmed for the ZX81

    http://bobs-stuff.co.uk/zx81.html 

    Discussion on a sinclair board

    http://www.sinclairzxworld.com/viewtopic.php?t=1044


    And here's a little mockup for the nokia LCD version (converted with http://www.digole.com/tools/PicturetoC_Hex_converter.php)


    any ideas are welcome, if you can think of an interesting game that might work on a monochrome display, please comment. Nokias Space Impact would be cool to have too.

  • SSD1327 grayscale display board

    davedarko10/27/2017 at 23:43 2 comments

    So the SSD1327 grayscale display that I found on aliexpress.com is parallel only (8080 protocol). The chip itself is able to talk I2C and SPI as well, but the protocol select pins aren't broken out on the cable. Since I've ordered a display before I realized that and now that aisler has free shipping I designed a breakout anyway. Also on the board: a 15V step-up converter based on the MT3608 - that converter you get when you search for "12V step up" on eBay and sort by "price+shipping lowest first". Plus my new logo design :) I need a different micro controller for that.

  • A Sunday's work

    davedarko10/22/2017 at 19:09 5 comments

    fresh new (not yet working) version on the top left I call "Kürby", since it's orange with a green top - a pumpkin in German is "Kürbis" and it almost sounds like Kirby. 

    Can't tell why it's not working yet, but also am tired and want to clean up the desk...


    Well that clean desk motivated me to check my AP2112K layout on my Rev2 board - let's say that escalated quickly :D Found out that my enable pin was connected to the switch and the other side connected to VCC, not VREG_IN. There's no VCC to turn on VCC :D luckily it's just a bogde wire and a little cut, if anyone bought this. 

  • Withdrawing from prize

    davedarko10/20/2017 at 13:35 3 comments

    I just can't handle everything right now, it's all been too much lately and this hobby feels a lot more like work lately. It's supposed to be fun though, right?

View all 32 project logs

Enjoy this project?

Share

Discussions

Keko wrote 11/11/2017 at 23:58 point

Hi, did you manage to try to run a Atari emulator on ESP8266?

  Are you sure? yes | no

d1rtyd wrote 10/05/2017 at 20:01 point

Why did you go with an attiny/blinkm clone instead of ws2811/fastled?  The ESP can drive the ws2811 directly and it only uses one pin.  

  Are you sure? yes | no

davedarko wrote 10/05/2017 at 23:57 point

That's still one pin I don't have since I need I2C for the buttons. There's not much room under the lcd for standard ws2812 anyways, would need apa106(?) dotstars that are 2x2mm and the an extra attiny for controlling them. This way it's a bit retro but worked for me. System is also 3V3 - not officially ws2812 voltage as well.

  Are you sure? yes | no

d1rtyd wrote 10/06/2017 at 14:05 point

Ah, that makes sense.  Thanks for the quick reply!  I'm also interested in one!

  Are you sure? yes | no

Erin RobotGrrl wrote 09/20/2017 at 15:39 point

Will you make this into a kit and sell it on Tindie? :)

  Are you sure? yes | no

davedarko wrote 09/20/2017 at 16:33 point

Do you mean kit as in "a package of smd parts plus pcb"? I'm thinking about that vs. already soldered - some parts can't be handsoldered, like the crystal, so I'd need to redesign a bit. Next 4 weeks I'll work on this little board and the software. Will also update parts and board designs here.

  Are you sure? yes | no

Erin RobotGrrl wrote 09/20/2017 at 16:35 point

Yeah! All for the hand soldering, that's one of the fun parts! Maybe there could be a way to have an optional hand-solderable crystal, so maybe it wouldn't need as much of a big redesign?

  Are you sure? yes | no

Adam Vadala-Roth wrote 08/29/2017 at 03:09 point

if this is using my lib I will gladly repost about it on my project page/twitter!

  Are you sure? yes | no

davedarko wrote 08/29/2017 at 05:43 point

I don't think I did, but I'm happy to try, independent of any tweets ;) happy to have something that's not easily overwritten by an update that renders it unfunctional. Please drop a link to your lib :)

  Are you sure? yes | no

Craig Hissett wrote 08/19/2017 at 21:10 point

Put me on this list for one of these when they are done please. 

I've been desperate for an ESP-portable with screen for quite some time!

I'm going to be getting another one or two of @al1's breakout board when money allows, then going to try using it with a Nextion screen for now, but yours is perfect!

  Are you sure? yes | no

davedarko wrote 08/19/2017 at 21:19 point

Thank you so much! The hardware is very close to @al1s boards, I'll definitely remember you when it comes to selling some and you'll be first!

  Are you sure? yes | no

Craig Hissett wrote 08/19/2017 at 21:23 point

Cheers buddy!

Yeah I love Al1's board  (and your version too!) - I use them all the time for various taska at home and at work. Im getting another one of Al's just so I can have one at home and at work :-)

If I spend some time on the Nextion's display I could make something very useful, but having a proper handheld such as this can't be beaten, really.

The Grove expansion is a great touch too!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates