This console has been a long time in the making. I started off wanting to make a games console that my daughter might like and I was attracted to the challenge of porting Arduboy to the SAMD21 and 51 series of chips. And it needed a bigger display than the original. And the option for headphones (because then children can play with the volume turned on and it won't bother me!). And (rechargeable) AA battery powered, because then no-one has to wait for the lipo to recharge in-situ. And one day, maybe we'll all be doing multiplayer Arduboy games with an infrared datalink - so an IR LED + mosfet and 36 kHz IR receiver would also be needed.
Aside from personal motives, the SAMD21/51s are great chips with plenty of power and there have been forays into the range before within the Arduboy community. @MLXXXP did a great work mapping a possible pinout for the SAMD21 from the original ATMEGA32U4 and showing a homemade based on a sparkfun Zero dev board.
I orginally thought I would go for a large LCD display for daylight readability. Here's a render of the first prototype (obviously the IR LED wouldn't be green...):
You can see I somehow thought it would be cool to plug it straight into the USB port for programming with that corner tab! The Ardugirl name wasn't very imaginative but it captured my original motivation to make something my daughter would hopefully engage with.
I got some good advice on the Arduboy forum to check physical dimensions for the buttons etc before confirming the final layout. I plotted the PCB to pdf in Kicad and then printed onto paper and glued it to card. I cut the card out and used this as a physical prototype. It was a great way to check and adjust the feel in the hand, for something I had no previous experience of designing.
Early days in the population and bring-up of the initial prototype:
You can see I populated just enough components to supply 3.3V from USB, flash the bootloader (Atmel ICE and Atmel Studio for me), confirm button pin assignments and blink the RGB LED. Top left is a little joystick which felt awesome in its own right but didn't let you do things like press up and down together, which could have been needed for certain games, so I left it behind in the next design.
The LCD was very large, at 2.4" diagonally:
But eventually, after much help from the likes of @Pharap, I got it working
Sadly, it proved to "ghost" too much for a reasonable refresh rate and would have made all but the slowest games unplayable. One day someone will make a fast-refresh e-ink Arduboy and they will have my admiration!
Those gold buttons? They were awful as a tactile input for a games console. Even I could tell and I am no connoisseur. They had to be upgraded for the next prototype. And the wheel potentiometers I had specified for the volume and backlight were just a bother to source at reasonable cost, so I decided to replace them with a button to increment volume and a slide switch to flick between headphone and beeper sound output. The LCD was gone, so no need to dim a backlight for now.
I also opted for a crystalless bootloader to save on the BOM cost and assembly bother there. The SD card was my original idea for storage for multiple games, a bit like the Arduboy FX chip (which wasn't official when I started all this) and the Gamebuino (I think, but memory of that is hazy now). I realised that I had a lot to get right before I could even begin to think about side-loading games from external memory. But I whacked a SPI flash chip footprint on the next rev anyway, in a rare bout of optimism!
I had also had time to think about the form factor for the next revision and, while going for a smaller (1.3") OLED screen, I realised I should make the whole thing more compact if it really was going to be the right size for my children to play with comfortably.
There was one other consideration about the size: if I was clever, I might be able to get the whole thing inside the 10cm x 10cm envelope that many budget PCB service use as their limit for cheap offers. So here's what the next rev looked like in render:
Note I somehow managed not to route any traces to the headphone socket... But let's not let that spoil the story for now ;-).
I'll quickly digress into the power setup: the usb feeds into a 3.3V low dropout regulator and separately, the two AA batteries in series feed a 3.3V switching boost converter. A slide switch "POWER!!!" routes one of the outputs from these two sources to the circuit VCC. There is a polyfuse connected to the AA batteries for safety but my cell holders prevent reverse polarity physically, so I didn't put reverse polarity protection in this time. If you make something similar, you may want to consider this.
Here's the second prototype next to the first, during initial population and board bring-up:
Buttons worked straight out of the gate:
But A and B were a little too close to the display area for my liking. And there was that issue with the sound. But there were much bigger problems with the display. For what felt like weeks on the Arduboy forum we went round in circles. You know, where I ask for help and everyone helps but we (I) still end up flinging round crazy theories about the capacitor values needing to be exactly right, even though none of the OLED modules implement what the OLED driver IC datasheet suggests! Eventually, we pinned it down to me accidentally swapping SCK/MOSI but a greenwiring save managed to confirm that swapping the pins would fix the issue:
The new name, GAMOO, is a silly family play on words, but it seems to have stuck within the Arduboy community. It's still a DIY Arduboy though!
I also added vias to the surface mount button pads to try and improve their mechanical resistance to tearing the pads off the substrate due to inadvertent lateral forces in-use:
And now things were starting to look good!
There were a few more things to improve in the hardware but one more board spin got me to where I am happy with it for now, so that hopefully I and others will be able to finish the software features I set out to have.
One thing I haven't really covered is the firmware changes to the Arduboy2 library that were required to get the screen loading and deal with things that were written for AVR and ATMEGA32U4 registers. It took me quite a long time to get this working. Slowly I was able to add display and then sound. I am calling GAMOO done.
Looking to the future for SAMD21-based Arduboys, I have yet to get the eeprom emulation working, but it is on the todo list and looks eminently feasible with SAMD21. The SPI flash chip is soldered in-place and I have confirmed the SAMD21 can communicate with it. I am currently trying to learn from Project Falcon, the Arduboy community effort to make the FX mod chip, to see how to try and implement a multi-game library on the flash chip that can let the user browse from a bootloader on the SAMD21 and then load a game into application space to play.
If you haven't been over to the Arduboy forum yet, I thoroughly recommend it as a highly supportive community. Thanks for reading!
Comments