Close

Getting something together in a weekend

A project log for Tiny2048

A pocket sized RGB LED version of the 2048 game

davidDavid 07/29/2024 at 15:560 Comments

This was a rare weekend to myself so I decided to make the most of the limited time available to try and get the board designed and sent off for manufacture.  One of the key things I want to do with this project is to design something with built in battery charging so that's where I started. I'm using a MCP73831 for this, along with a TPS61092 to boost the battery voltage up to 5V. I don't have a huge amount of experience designing charging/power circuitry but this is the same pair of chips that are used in the PowerBoost 500 by adafruit so I figured it's a proven combination. I ended up basically just implementing the reference designs in both chips respective datasheets which was relatively straightforward. I also took care to pay attention to the recommended component choices and layout for the boost converter as this is something that I've missed in the past and paid the price for it!

With the hard (for me at least) part done I moved on to the rest of the project. The LED matrix is just a string of WS2812B LEDs arranged on a grid. These are powered from the 5V output and controlled by an ESP32-S3-MINI-1. This is a slightly risky choice as I plan to have these boards assembled professionally. All of the pads for the module are hidden underneath it which means it is harder to debug/bodge if I've made any mistakes. On the other hand, the smaller form factor is convenient given that space on my board is constrained. Plus I think it looks cooler! (that's an important consideration right?). To hopefully mitigate this a little I've broken out a bunch of IOs on the top edge of the board so at least there are some spare pins available. It also means I can use this as a dev board for future projects which I've already got ideas for.

In order to actually control the game I decided to go with an accelerometer. Specifically the LIS3DH, which I've used before. I'm planning to implement either tilt or tap based controls (or possibly both). I considered using buttons around the edges of the board so that you could squeeze the edge you want tiles to move towards. In the end though, I decided that the accelerometer based approach would be more fun and versatile.

Laying out the board was quite tedious and it took a few attempts before I was happy with it. I wanted to keep a large area clear for the LiPo battery which I plan to attach with some double sided tape. I also wanted to maintain reasonably large margins free from components (except for the USB port and a power switch)  around the edge of the board to make it more enjoyable to handle and easier to mount in a case if I decide to make one.

I wanted to get a feel for the size and ergonomics of the board before getting it made, so I exported a model of it and printed a rough version out on my 3D printer. Satisfied that it was at least nice to hold, I submitted my order to JLCPCB to be manufactured and assembled. Now I just have to wait for it to arrive and hope I didn't make any silly mistakes!

Discussions