GAME CONTROLLER#2
3D printed - Laser cutting
3D printed - Laser cutting
I have tried to make 3D Arduino Box on fusion 360 & will explain to you how to make one by your self ►►
Designing on fusion 360
First # import the the Arduino Uno 3D body file from GRABCAD, then take the right dimension and project it on new sketch and make few millimetres larger for extrude it later.
second # Make new skitch as the same dimension as the last skitch that you made without projecting the hols of Arduino skitch.
third # Extrude the box bottom & walls dimension and make hols for power and USB .
forth # make skitch on the sides that you want to make fits on it, then extrude it.
fifth # make a skitch on the bottom at the corner of the Arduino and extrude an a carved body from the bottom, the thickness is about 5mm, & Hight is about 10mm ;make this at the two corner of the Arduino , this two extruded bodies just for holding Arduino at the right place.
sixth # make skitch on the sides of the box and press ctrl wile you select the large inner square and extrude it about 4mm thickness .
seventh # select construct and make it at the last 4mm then make it the plan that you will cut through it ,to make the top.
eighth # hide the top body after you extrude it, then make new skitch an the serfs of the pins of Arduino and show the hidden top and make extrude to the serfs of the top, this will cut hols through the top body.
ninth # select the top body from down beneath and make a new skitch, then masseur the right dimension of the fits from the sides that you make it before,& extrude it from the skitch .
Ultimaker Cura
Save bodies as mesh and choose STL file from fusion .
First # open Ultimaker Cura then import STL file or drag & drop the files .
Second# prepare the STL file by adjust the body ( X,Y&Z )axis .
Third# choose the infill to be 20% ,and choose quality 0.2 for more smooth surface and choose support and make it about 50.0, & from (Build Plate Adhesion) choose skirt it did not work with me so I rise the Pad temp of 3D printer to be 70 degree and choose Brim from (Build Plate Adhesion) to increase the surface area to make the body sticky more to the heated Pad.
Find out that the top face of Box STL file has to be lined vertically on Ultimaker Cura
After many fallers it finally done printed and I was so Happy
In this project we will try to make programmable board and learn how to make it on PCB; and program it using USBasp AVR programmer.
The electronic component that you need .
FIRST# WHAT IS ATMEGA328 ?
The ATmega328 is a single-chip microcontroller created by Atmel in the MEGA AVR family {later Microchip Technology acquired Atmel in 2016}. It has a modified Harvard architecture 8-bit RISC processor core.
second # we need Breadboard to connect the electronic component on it; NOTES!! (Breadboard are so important if yo want to make your board, Because you can replace the damaged IC chip and moving electronic parts & connect them so easy; and this so useful to be sure that your electronic circuit work well before soldering the electronic parts on PCB).
This image show you the schematic how to connect ATMEGA328 to the electronic component ; NOTES!! I thought it will work fine but the schematic shows only 5V so asking my self what if there is 9V battery or 12V adapter is only the accessible tool at certain situation ? so in this case we need electronic parts to convert down the voltage to 5V or the ATMEGA328 will be busted!
! Find out the solution is voltage regulator ( LM7805 ).
This specific voltage regulator LM7805
Tern down the voltage to 5V and the extra volt convert it to heat
so adding this to the schematics .
This type of switch have 4 pins so trying to find out the right pins that did not connect to each other until you pushing the button by using the Avometer set it on beeping sound mode ◄video link
NOTES!!Connect the switch to the reset pin from ATMEGA328 and connect the second pin from the switch to the 10k ohm resistor and the another pin of the resistor connect it to the GND . !!DO NOT FORGET THE 10k ohm resistor OR YOU WILL MAKE SHORT CIRCUIT!!
We will be using EAGLE soft wear to design on it the schematic and make the GERBER file then use these files to fabricate.
we are supposed to make a schematic like this shown in the image on EAGLE.
First# download EGALE software.
Second, set up the sparkFun library on EAGLE.
First # Adding the component by click on add port tool as shown in the image.
Second# search by writing the name of the component and add(*) for easy searching
Third# connecting the components together by adding net connection from the net tool and renaming the net that you want to connect as the same as the name of the other net
After finishing the schematic click on the tool button ( generate/switch to board).
Forth# moving the parts and placing them in the place that you see it easy to connect the parts together.
NOTES !! DELETE THE Extra out outlines to make the organ point close to the board file this will affect on your design when you edit it on the others software and fabrication prosses !!
This image is for different designs but with the same steps.
First# save your design as GERBER file by clicking on CAM processor tool ,or generate files to save from the generated CAM tool .
second# after extract the folder take the cooper_bottom .gbr & profile files and drills.gbr file ◄◄ GERBER files
Third# open GERBER file by import it in Gerb-V software .
Make the three file color BLACK; and be sure that opacity (255) !
Then SHOW the drill file and HIDE the cooper _bottom file by clicking on the mark no the top left ( keep profile file is marked ).
Forth# Export files as pdf.
Gimp software used to trans form pdf files to three png files to use it later for fabrication
Remember this ►► NOTES !! DELETE THE Extra out outlines to make the organ point close to the board file this will affect on your design when you edit it on the others software and fabrication prosses !!
◄◄
Import the pdf file and make resolution 1000.
Click on tool free select tool
Select around the schematic but inside the out line to make out line; then click (right click), and choose select then choose invert.
click (right click), and choose select then choose edit and choose fill with BG color.
click (right click) then choose select and then click on none
from image tool select mode and choose indexed
Click on Bucket fill tool and fill all around the out line and the circles that inside the out line that you want to drill .
click on color tool and choose invert.
now all the colores have to be inverted.
From image tool click choose transform then click on flip horizontally Because this is the cooper plated layer that will be at the bottom of the PCB; when you will fabricate it on the CNC machine .
Export file as Png file.
do the same steps again BUT This time with out choosing the invert of the select tool with the full schematic.
and after that import the drill pdf file and do the same
CNC Machine is tool that have few motors that moving in (X,Y and Z ) axis to drill or cut or writ to make 2D PCB
Cut the right diminution of the PCB.
Then cover the top of PCB that did not have the cooper layer with tape vertically
then cover it with the double sticky tape to Atash it to the pad of the machine.
I try many times and make many PCB and it falls many times and some time you know that the PCB not work after soldering
!!But in the end it works and all the faller is not faller it gives me more experience and make me more advanced .
Select the net that you want then click (right click) then choose invert.
Export it as Png file.
!! You can select the net that connect to the wrong net only and send it to the machine again
the machine will move writ around the selected net and cut the an wanted connection
click (right click) then choose Edit then click on FG color.
Now connect your USBAsp and run the Zadig program. In the Zadig window a drop-down shows all the found devices which it might be able to help with and hopefully USBasp is in there.
click on the tool menu then choose ►►Programmer USB asp then choose►► USBasp,
ATTiny85 is a programmable IC we will use to program our game controller by using Arduino IDE software.
ATTiny85 need short net wire to decrease the noise and to be programmed well.
!!Notes this PCB will be re designed to make small connections because it did not worked .
The electronic component that we need .
Breadboard
10uf
7X 1k ohm
ATTINY85
2X zener diode 3.3v
2X zener diode 3.3v
2X 47 ohm
6X switches
I fabricate the destine on two PCB to be more easy to make and to find out if anything goes wrong.
After soldering its time for programming the ATTiny85
First # connect the ATTINY85 as you as it shows on the image down below.
Second # Burn bootloader on the on the ATTiny85 by using Arduino UNO ISP.
After upload the code; keep everything connected to the PC wile you doing the next steps.
After this, download the ATtiny85 Boot-loader files from the given link. Open "Burn_AT85_bootloader.bat" and change the COM port number "PCOM5" with whatever COM port number your Uno is connected to by editing from right click choose edit. Save the changes before exiting; as shown as in the image down below
Then copy the (Attiny85.hx,and Burn_At85_bootloder) files to the Arduino folder .
Then run as s administrator (Burn_AT85_bootloder ) file.
After verifying complete plug out the Arduino UNO from the PC and insert the ATTINY85 to the PCB board; you can now download the Digispark drivers. after install the driver connect your PCB to the PC.
copy this link►►►► https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json
Open Arduino IDE software then ►►file then ►►preferences ;and paste the link as shows in the image.
search from board manager for Digistump AVR.
After installing it, now you would be able to see a new entry in the Board menu titled 'Digispark'.
Now we can upload the code
every thing going well but after the code uploaded pc did not figure out the USB I try many things even I made small PCB to decrease the noise.
I think the IC was busted due to static charge but maybe if I add the crystal oscillator this will fix this problem ;which not the case .
We find that after 10sec from connecting the ATTINY85 it automatically disconnected and connected again .
upload code to measure the buttons value.
write the measurement on the note to keep remind myself .
To upload code we need to install Digi keyboard library ;then delete un wonted libraries.
Make the body of game controller using Fusion360
we will make 3D printed parts with Acrylic.
Then make extrude.
Insert the DXF file that made before from EAGLE; then make new skitch and project the out line and the holes .
Download the buttons and the USB type B from grabcad.
Make new skitch on the circuit board body then hide the body ;to make extrude .
!I forget to hide the body so I had to make construct and cut through it !
Make new skitch and select the offset from it; to extrude the sides from it .
click on extrude and choose cut, to cut the un wonted body.
Make a new skitch on the side to make the finger place.
extrude the finger place .
Make the top of the body after cut 4mm from the top sides .
Extrude to make the top.
After making the top make Form to fingers the sides from Form tool.
Cut the unwanted extruded parts to make the hands of game controller moving easy .
Make new skitch on the hands sides as shown on the image ;and make circle from the centre (the diminution is about 5mm in diameter).
Extrude the circle as shown extrude in the image .
Extrude from the tow sides of the bottom body to connect the moving hands to it as shone in image .
Extrude the circle to connect the hands to it the diminution 4mm in diameter and 4mm in height; then make 1mm Form from the side of the circle.
Check the movement of the moving hands then cut the unwanted parts.
Click on extrude then choose tow sides then choose cut and cut the unwanted parts as shown on the image .
Make new sketch and make two lines and between them circle and term the inside half of the circle then make offset as shown in the image.
Make four extruded parts to stand the top on ,and at the same time to connect them to the hands as assemble after extrude 4mm circle from the centre .
Make form to the circle that will work as moving bearing to the two hands as shown in image .
Make new sketch to make buttons place; I was trying to make the (PHI) ratio to make it more comfortable for fingers.
Make the buttons shape then make offset to give it more space to move the buttons .
Extrude the buttons by select the button sketch with out selecting the offset.
Make new sketch on the switch then make square and extrude 2mm ;for connect it to the buttons later .
Show the hidden Button that we will connect to the square .
Make sketches and connect the right square to the right Button as shown in the image .
Make new sketch on the bottom body moveable parts make lines and make offset for them .
Make extrude and choose cut tool to cut the selected bodies; then make form for the sharp edges to make the hands moves easy .
After finishing the design I asked my brother about his opinion he said its looks nice but not that much so I insert image that looks cool; then make new sketch.
Make tons of lines then hide the bodies ;and make extrude.
Then make copy the half of the face and then flip it then move it and join it to the body, it look like wings, or half face, or face wings .
Time for preparing the bodies on ultimaker cura ;finding out the weight will be 120g which was little bit expensive and take about 12 hours so I redesign the body .
Inserting the DXF file of anther PCB board to make new body.
Moving the buttons and extrude them to fits the right diminutions and place.
Cut the unwanted parts .
Replacing some parts with Acrylic.
now its weight is about 76g .
we using laser cutting machine to cut the parts .
Adjust the focus lance of the laser
I soldered the sensor in opposite direction to fit well in my board
Using sand paper to smoothing the extra edges.
The flexible buttons are too flexible to push the buttons.
To make the buttons more strong to push the buttons I glued aluminium layer to the bottom of the switches.