[WIP] Arduboy Dock - 3d printed dock + RPi


(Erwin) #1

Hello!

I am going to share the design and code for the Arduboy Dock. This dock is basically a real life version of my Updater https://github.com/eried/ArduboyUploader/releases/ mixed with my repository http://arduboy.ried.cl/

The 3d models are here:

You need:

Electronics

Following the pinouts given here: http://neverstopbuilding.com/wiring-micro-usb-pinout and
here: https://cdn.shopify.com/s/files/1/0270/0585/files/PiZeroConnections_large.jpg?14913446398312428817 and also here: http://www.sunrom.com/media/content/811/micro-usb-pinout.jpg the idea is to connect:

  1. D+ and D- from the pads on the bottom side of the Raspberry OR the USB traces on the upper host usb (they are the same) to D+ and D- in the male connector (exposed in the dock).
  2. VCC directly from the USB PWR of the RPi to the VCC of the male connector, passing thru the resistor.
  3. Any GND to the male connector.
  4. The capacitor, oriented correctly, between VCC and GND.

The end result should look like this:

I removed the secondary USB because the Pi Zero only has 1 USB, but you may keep it and open the slot in the case for fitting it:

Assembly guidelines

  1. Solder wires to the MICRO USB MALE connector, leave pad 4 without any wire. Check the diagram earlier in this post
  2. Set up the raspberry and get it working. You can try with the command:
    cat /dev/serial/by-id/--------first entry item of that path here---------
    to check if the arduboy is connected. First create a simple sketch that sends something via serial every second and connect the arduboy with a normal micro usb host wire (male to male)
  3. Solder the other components and use the backside pads of the Raspberry for the USB. Use the holes in the pcb to get the wires from one side to the other, there is not a lot of space in the case for go around
  4. Turn the raspberry on with an external charger or battery pack, do not use the computer usb port. (I burned my USB3 because bad connection… I was able to fix it back http://www.eevblog.com/forum/repair/help-to-identify-component/ but it is not something I recommend to do) check if you can get the Arduboy to send serial text, disconnect and retry a couple of times
  5. Cover the wires with kapton tape, or some thin insulator. Do not leave the wires or parts floating in the breeze.
  6. Assemble the dock. Scrape a little bit the bottom boundaries of the top part (the fit is tight but if it is too tight it may break the bottom part of the dock). Glue the MALE USB MICRO with a drop of epoxy. Set the arduboy while the glue is not completelly dry to get a perfect fit.

Case

Print it, no supports required

Solder the wires and epoxy the male USB to the top part.

Software

Work in progress (no real functionality yet, besides uploading hex and some other stuff but I am just trying and testing stuff so the code might be ugly

# Install Jessie light and then configure wifi:
https://pirobotblog.wordpress.com/2016/12/25/setting-up-jessie-light-25-11-2016/

# Update and upgrade
sudo apt-get update
sudo apt-get upgrade
___________________________

sudo apt-get install avrdude mono-complete git
___________________________

# GIT actions

# Delete repo
rm -rf

# Clone repo
git clone https://github.com/eried/ArduboyCollection.git repo

# Update local repo
cd repo
git reset --hard HEAD
git clean -xffd
git pull

First test here: https://github.com/eried/ArduboyUploaderDock

Copy the files to /home/pi/arduboy/
___________________________

# Add to the startup
sudo nano /etc/rc.local

# Replace:
exit 0

# with:
mono /home/pi/arduboy/uploader.exe &
exit 0

Functionality roadmap

  • Full repo browse (dynamic listing from the dock). Game name, category, images, description
  • Mirroring game to HDMI
  • Clock and alarm stand
  • EEPROM save/load capability (automatic save if possible)
  • Weather information, news ticker
  • Surfing the internet thru the Arduboy?, notifications, etc?

An Arduboy Game Menu (Not enough space in the title to explain)
Flash cart(ridge)
Flash cart(ridge)
Recommended games?
(Kevin) #2

This is so cool!!!

Alright, we’ve got to see about having a board made and I’ll see about how much it would cost to have a small run of these injection molded. (Probably too expensive) But it may actually be affordable to mass 3d print some cases while I’m overseas.

Would have to use the pogo pin design like this USB hub I would suppose!

Great work, I really love the smooth blends to the shape!


(Erwin) #3

There is a small detail with the pogo pins, I tried to do that for my first attempt, but there are some issues with the USB:
http://www.uugear.com/portfolio/is-zero4u-compatible-with-raspberry-pi-zero-w/

Maybe trying another board is recommended. Mine works perfectly now, is super reliable but involves a lot of work soldering. Also I did wanted to bypass the power circuitry in the Pi, that is why VCC is connected directly from the power instead of using that back pad.

Having the Arduboy powered on plus the charging circuitry generated a small drop in the voltage that almost always rebooted the dock:

(this version of the Pi seems to be over simplified: prone to issues when hotplugging)

Maybe the orange pi zero is more adequate (just because is different :slight_smile: )


(Kevin) #4

Hmmm, yeah I also realized that the test pads are on the bottom side so the design would have to be flipped!

The details! Always the details! :smiley:


(Pharap) #5

One small problem.

Arduboy Dock by eried is licensed under the Creative Commons - Attribution - Non-Commercial license.

Creative Commons NC licenses expressly define NonCommercial as “not primarily intended for or directed towards commercial advantage or monetary compensation.”

I could be wrong (I’m most definitely not a lawyer, and I hope I’m wrong) but this sounds to me like it means people who 3D print the Arduboy Dock can’t sell it, whether it be Arduboy Inc or another third party.

One of the reasons I’m usure of the ramifications is that I’m not sure if it applies to the whole Dock or just the .stl files.


(Simon) #6

Great work @eried … I would love to see this ‘productized’, maybe in kit form?


(Erwin) #7

I am not really sure, it is an option in Thingiverse. I do not want copies in ebay :stuck_out_tongue: but I am easily persuasible with beef jerky or slim jims.

It could be, for now I am just finishing the software. Slowly.

I can print the parts and ship them to anyone in exchange for help :smile:


(Pharap) #8

The licence won’t necissarily prevent that. To quote the article you linked to:

One particularly peeved maker, Louise Driggers found many of her designs on eBay even after posting them under a Creative Commons non-commercial license, which allows for downloading and printing but not commercial gain.

Having a licence just means that the creator (e.g. Louise Driggers) can take the entity breaking the licence (e.g. Just3DPrint) to court over the incident.

The article also says (quoting Louise Driggers):

“The models these guys are selling were CC-noncommercial. That’s as open and free as you could possibly ask for. Everyone can use them, for anything, except to sell. That’s a very generous offer. The designer spent his time and equipment making them and gets nothing for it, you can have it, so long as you don’t make money off it either,”

This is where the flaw lies: Arduboy Inc will want to sell them (as it should do, that’s a good thing for all of us), but the CC-NC licence might be hindering that.
Creative Commons itself states:

CC’s NonCommercial (NC) licenses prohibit uses that are “primarily intended for or directed toward commercial advantage or monetary compensation.”


So basically it’s not urgent but it needs ironing out before Arduboy Inc can think about selling the dock.


(Holmes) #9

@eried, you’ve outdone yourself, man. This is simply amazing. Great work. A lot of work went into creating this project and it shows by the amount of polish. I’m impressed!


(Kevin) #10

I’m totally down to try and mass-produce anything the community can support and wants to buy, but right now the issue would be making the kit complete with a PCB that can plug in or bolt on. The issue about power drop is one that would have to be addressed somehow.


(curly) #11

I’m building one, materials are on the mail :slight_smile:


(Pharap) #12

Any thoughts about the licence?
Does the ‘non-commercial’ aspect hinder the idea of selling a kit?


(Kevin) #13

Yeah, guess it depends on the license.


(Erwin) #14

I have not had much time to finish the software but my conclusions as far:

  1. The RPi is 100% stable with this electronic setup. Maybe the resistor/cap could be even lower.
  2. The dock takes about 19-25 seconds to boot. I would love to improve that trying to remove stuff from the linux system installed on the pi
  3. The bottom of the dock needs more weight so pressing the buttons do not require holding it. However I am not sure because the actual dock is super tiny :confused:

@curly asked about the EEPROM functionality. I discarded the idea time ago but rethinking it now it can be done. The only thing to do is to find a way to detect that the game has not changed since the dock installed it for the first time. So it could work like “virtual” memory cards.

Any idea on how to know which game is currently installed? Has the dock to write stuff to the EEPROM (like a hash in several places?


(Simon) #15

You have probably seen the thread regarding EEPROM use and you are likely to get some debate going here.

Without a standard, your approach sounds like it could work - write it to (say) three or four places and hope the program does not overwrite them all. If you have loaded the app from the dock and assuming the user does not load apps any other way, can you simply keep track of the last loaded app and associate the EEPROM image with it?


(Erwin) #16

Yes I was going to do that. In that way the UI can be seamless. You can even have “gamestates” for the same game, one for every time you plugged the Arduboy in the dock, if something changed in the eeprom a new gamestate would be available.

The only missing case will happen if the user loads a different game that does not change the “dock signature” from the EEPROM to identify the last loaded game.


(curly) #17

Without modifying the games here’s one idea, have the dock ask if game was changed, if no update eeprom if yes bring up a list of games user selects currant game from list confirms and that games eeprom updates

Would also be a good idea to have multiple save slots per game


(Erwin) #18

I tested something and I can actually read the hex back, so no need for tricks now, options, dialogs, etc. The dock can save everything, history of saves per game, smoothly and quietly.


(Scott) #19

You might consider additionally reading the unit ID from system EEPROM, so you can handle tracking multiple Arduboys on the same dock.

The unit ID is a 16 bit value defined and handled by the Arduboy2 library, that users can set to uniquely identify a given Arduboy. It can be set, along with a 6 character unit name, using the SetNameAndID example sketch included with the Arduboy2 library.

File > Examples > Arduboy2 > SetNameAndID


(Erwin) #20

Good idea, I’ll think on how to combine everything. I tried to use that id to identify my Arduboys but I ended sticking a number in the back, because some games overwrite that part :confused: