This is my make-through for the week's assignment. Grab a cup of coffee!
Well, It is the PCB intro week. i was waiting for this week for ages and this was one of my TO-DO list!
i had a lot of problems in soldering since ever. when i was soldering boards, i was always ruining it. an example was when it tried to fix my arduino mega regulator, i ruined it by accidently removing board's copper ,another one was with a blower and surely i ruined it too 😕
So, What are you waiting for?,, lets start the week 😁
As mentioned in the SITE, the week can be summarized into these periods
First session: shocking evaluation, group project preview, and Arduino PCB DIY
MID-WEEK self-practice: ARDUINO PCB design with eagle
MID-WEEK session: group project preview, self-practice preview, ATtiny PCB
EO-week self-practice: ARDUINO PCB manufacturing
EO-week lab session: Arduino PCB Milling and soldering
I thought I doing my best with the diploma but I was shocked... VERY SHOCKED by my zero percentage evaluation and I was so mad, well it seems to be that the evaluation is based on the documentation of the process and NOT my WORK. however, to continue I have to tame this feeling and continue to learn from this diploma.
I was under the pressure of the last week of studying and exams and there were tons of assignments and exams to hand out. and with all that I tried to do my best at the diploma.
The Wednesday of the second week was announced as a LAB session less than two days before. and I sent to the instructors that I already had a lot of study work to do but with no reply
That left me unbelieving of what the purpose of this diploma was, however, I decided to GO but the instructor's explanation was making sense.
Despite that negativity, let's continue the WORK!
The first session started with the evaluations, Starting with me who got the ZERO!
I surely was shocked and wondering. I did the assignment, I did my work however explaining the reason for it sounds UNFAIR because I did not put a link to my GitLab project, That means I shall receive zero ?. and I had some trouble understanding AGILE.
Anyway that left me uncaring for the rest of the session and I slept over in the middle of it
So I tried to recover what I missed, I watched the recorded lecture and did some research after, looking at the schematic and schematic files of the Arduino UNO from ARDUINO UNO DOCUMENTATIONS, It was my first dealing with electronics schematics.
the videos of the self-practice were quite impressive but I still had that feeling of the depression left and when I tried to watch some, the electricity went down for more than half a day and continued being down to the session and beyond
During light OUT
Reviewing the cad work of the group project and reviewing the UN-DONE MID-Week self-practice and with the Un-stable connection of mobile data, I had to disconnect from the session meeting, promising that I will get back what I missed.
Well that was so much late work, I had to recover what I missed
Starting at reading week 3 lectures notes & recordings
Some limitations added such as
Regular single layer PCB without soldering mask
It has to be fabricated on the Fab Lab MDX-20 with a V-shape tool of 0.4 min drill width
components available in local vendors may be only used
Soldering must be with the regular soldering iron
Main functions needed
It must act and look like the Arduino UNO
Supports Code uploading without ripping up
Supports input voltage from 12V to 7V with a DC jack
Reachable pin headers
Contains a switch and a LED connected to two GPIOs for later USE
Understanding HOW Arduino works;
Arduino Uno is based on 2 main chips; atmega328p and atmega16u2, Atmega328p is the brain and muscles and approximately everything, atmega16u2 is the communication link between the pc and the atmega328p that means that it is only used to upload the code and establish the UART serial communication between atmega328p and the pc, it may also be replaced by the Chinese CH340 and it will do the same functions as atmega16u2 although some driver configuration issues may appear in PC
Understanding Atmel chips;
MICROCHIP ATMEL, the founder of atmega16u2 and atmega328p, provides several ways to directly program the chips with the SPI protocol through ISP pins, which means you can make the code by Atmel studio and upload it to the microcontrollers, Thanks to Arduino IDE, It supports uploading the code directly to the chips by means of some algorithms and that made it too easy.
*One of those several ways is to use the famous USBasp programmer and that we will use.
So we will through away anything that is not essential and the first thing is the atmega16u2 plus its related components and some of the op-amps that are used for stabilizing the power plus some transistors and 3v regulator, we will USB isp programming by connecting directly to pin headers so we will remove ISP pin headers too, we also can get rid of the crystal but for better timing, we let it there (removed components in RED)
What will remains is this BOM (in BLUE)
The main chip Atmega328p
A 7805 5V regulator
A power jack
A 10uf capacitance between the VCC and the GND to smooth the voltage
Two LEDs one for power indication and the other for one of the GPIO pins
Two 330 resistance for the LEDs
A 16mhz crystal
Two 22pF capacitance for the crystal
A push-button installed on one of the GPIO pins (NOT reset)
Two of 10k resistance one for the reset pin and the other for the pull up of the push button
pin headers for power, digital and analog GPIOs
Make the circuit schematic with a computer software
Design the PCB board satisfying the given limitations
Preparing PCB files for fabrication
Testing with the machine software
Machine fabrication and soldering
LIGHT IT UP!
Removing all the remaining components made it too easy and NOW we can make the connections
In order to make the circuit we have to use a program that contains the required components, looking for the best program suiting our needs we settled on AutoDesk EAGLE
Eagle was too easy to download and install, and thanks to our instructors, we followed their instructions and that saved our time a lot.
Starting with Eagle, we have to configure the libraries so two main libraries are required for this project, the first is the spark fun library and the second is the FabLab library
I thought more libraries equals more fun, so I searched for eagle libraries and downloaded and downloaded any library that has a download button and started my project and searched for the required parts, GUESS WHAT, I could NOT find ANY!
SO, I deleted every library I downloaded and searched for SparkFun and FabLab libraries, I faced some problems searching for FabLab library, so I typed the link mentioned in the session video, and it was our instructor, Ahmed Ibrahim, FabAcademy page
Searching for the library link I pressed download added to the path of C:\Users\HOME\Documents\EAGLE\libraries
and pressed USE ALL
Libraries are now ready, then it is time to start drawing Schematic
thanks to our instructors again, they provided us a neat schematic to follow
trying to search for the components and place them as in the schematic, if the search doesn't show the needed part just insert an * before and after its name just for atmega328 type it as *atmega328*, and select pads and description only to ease the search criteria
when adding components you can rotate them with right-click mouse button
you have to connect parts using the NET tool and name that NET if needed and press yes if prompt to connect others as in schematic as shown, you can connect distant parts using connecting names and labels
you can rename and edit values of any part
*we added a zero ohm resistance to act as a bridge
my First recorded video was recorded and uploaded to youtube
When Done with the schematic we switch to board view
you have to apply your machine limitations and calculate the desired width by means of the passing current
organize the parts' locations to minimize tracks then connect tracks with the desired width
the most annoying thing was the plus sign to move the components, with so many air wires it was too hard to select
*we previously mentioned the 0-OHM resistance bridge and that to fix the air-wire issue, it causes false alarm but it is okay and we know it will work despite program says
Repeating the same process with the ATtiny
the main difference is that we will use SMD components
Now the fab lab library is a MUST to get the components we need
the first ATtiny project was to just connect a led, push button, and ISP pin header
Without providing a schematic to follow it was quite hard, my first trial was a mess, and lots of air-wires that look so random, unfortunately, I did not save it
the second one is as follows
well I tried to do my best but it looks so random again
However, another task was issued and that was to make the ATtiny a general-purpose board just like a tiny Arduino!
that means add all the GPIO as pin headers plus use the led and button from the previous task ☹️
Flashback to the first attempt of the ATtiny. I said it results in a lot of air-wires, well double it then double it again then throw it away.
I deleted the project and started a new one!
the most important lesson I have learned is to organize it in your mind before placing the components which means add the related parts together and think of the traces
Imagine what! the first attempt of ATtiny took 10min from me 😜
But there are three mistakes I made, the first one was fixed before the fabrication and the second and third were not fixed 😭. I will mention them later
To avoid using zero ohm resistance bridges we reduced clearance
Preparing the Fabrication files
Exporting the CAM files from eagle
Use GerbView to edit the files and export them as PDF
Use Gimp to import the pdf files and edit them and export them as PNG files
Use FabModules to run the machine
the first mistake was the profile
the black area must be close to the outline as it will need all that area to start the milling process and that was quite dumb
so the second iteration was quiet better as mentioned above
Well, to save your time, just watch my video
What happened is that we used GerbView view to unite the colors and to export as pdf,just that
then we used gimp to generate the 3 steps of milling
traces with the V tool
drills with drilling endmill
outlines with bigger drilling endmill
Well let's start fabrication
First thing we go to VIEW mode
then we fasten the pcb board with doubleface tabe and press on it
Traces:
when I tried to make the traces it took me around 15 passes of send, stop, and adjust cycles
when we finish the 3 steps we pull it out
the drill was not all through and too tight so I manually widen the hole with a dremel and endmill tool
Now it is time to soldier the ATtiny
the second mistake was that button and the isp pins was not the same as meant to be in the eagle files!
So the ISP pin header was HALF-inserted from the other side
Soldering small components is quite a mess, IT took me 3 hours in order to solder it without causing a short circuit
the button was accidentally ripped off with the copper that means that it cannot be installed again and the components were too small and I wasted a led and a resistor, and then I found that a led is burnt out and needs to be changed
tested with the USBasp and uploaded the code with Arduino IDE
copy this link to the additional boards' manager from preference and select ATtiny from boards
we then select attiny44 and upload the code
Connect the USB asp and choose it as a programmer
add the library and press shift+ctrl+U
and HOLA
there she works!
Now its time for arduino UNO clone, the same steps but different components
And HOLA again!
tested and working again
some pins was not soldered well at first but with avo-meter i knew which pins was not and soldered it again
the DIP pin female fixture has dropped a pin during the soldering so I took a pin off from a spare one and installed it instead in order not to fully un-solder the full DIP female
and a glimpse from the week 4
the atmega and the attiny working together
and, Thanks
Ah, last words!
I learned how to fully fabricate unmasked pcb board and soder the components
I learned how to design and acquire components from different libraries
I learned from my mistakes that i passed through
It was tiring but funny
One last word,, REALLY!
I do not know how to document well as it is so confusing!
why is should document everything that our instructors have already explained and recorded perfectly before!
or I miss-understand the idea of documentation?