Sunday, January 31, 2016

[icesl] Things to do with IceSL: Arcade bartop!

After an exciting but somewhat stressful SIGGRAPH deadline I allowed myself a little fun and decided to use IceSL to model and laser cut (and 3D print) a complete Arcade bartop :-)

Here is the design in IceSL:

Of course it is fully parametric! It can easily be adapted to screens of different sizes, other joysticks and buttons. The bartop is quite small, I wanted something that would nicely fit on a table and not look bulky.

Here is a transparent 3D view and an exploded view in IceSL:


And the final result! 


All parts are laser cut using G-code produced by IceSL, using the 'laser' profile (gcode is sent to a smoothieboard driven CO2 laser cutter). This is using 3 mm plywood. 

The insides of the 'beast':


This is of course powered by a Raspberry Pi 2, running RetroPie. I went for Sanwa hardware ; no regrets, the buttons and joystick are indeed super nice. I use a small USB pad emulator board to plug the joystick and buttons -- but it seems GPIO pins could be used as well. The screen is a HDMI TFT panel, size 10.1 (ref LP101WH1), which has a reasonable resolution of 1366x768 -- but there are many other models out there, I picked this one based on price/availability. For the sound I took apart a pair of Logitech Z130 speakers (50mm diameter, fits nicely).

I learned quite a few lessons building this. The 3D preview in IceSL has been incredibly useful, as well as the ability to interactively move things around. I used 3D models of all electronics so that I could check for a proper layout and avoid collisions between the different parts. Nevertheless, I got a few things wrong mostly because I did not model the plugs (USB, HDMI, power) and these take *a lot* of space. This is the second prototype I made, the first one had a few issues and required some manual work to adjust. This one was taken right out of the cutter bed and assembled without requiring any drilling or gluing (everything tightly fits together).

I model all planks in their cutting position (thickness along Z), and define for each a transform to place it in the final 3D model. For instance the pad board is named 'pad_board' and its transform is 'pad_board_T' (just a matrix). To cut the board I use 'emit( pad_board )', whereas to display it in the final model I used 'emit( pad_board_T * pad_board )'. 

To create the finger joints I model only one side on one board and then use the following trick, e.g. between the left side board and the floor board:

side_L_board = difference( side_L_board , inverse(side_L_board_T) * floor_board_T * floor_board )

If you are not familiar with 3D matrices and transforms this may be a bit tricky to understand. 'side_L_board_T' is the transform (matrix) that puts the side board in position in the final model. Thus, inverse(side_L_board_T) is the matrix that moves everything back to the side board cutting space ; as if the entire final model was rotated to lie on the left side. Thus, writing 'inverse(side_L_board_T) * floor_board_T * floor_board' means that the floor board is first placed in the final model (by matrix floor_board_T) and then rotated back to the side (by matrix inverse(side_L_board_T) ). This is when I subtract the floor board from the side board. This effectively carves the connectors (from the floor board) out of the side board. By following this method you can easily model all connectors while being sure they will match. Another example of the power of CSG :-)

I still have a few things to add to finalize the bartop: external USB/Ethernet plugs, and most importantly an independent power supply (it requires three power plugs!) and of course paint and stickers. But for now, let's play some retro-games!