- modify an existing board design, adding a least:
a. one led connected to digital or PWM pin
b. a button connected to a digital input
c. Multiple VCCs and GND
d. A voltage regulator
- mill and solder the board
- test and program the board
- create a page to document your progress of week 6 and 7, what did you do, in which order, what are your experiences (problems, solutions, etc.), and add a video about the successful programming of the board
- GIMP
- GIMP
This zip-File include all Files about the Board.
Copyright: Danielle Ingrassia
This zip.File include the schematic, the board design, thr inside.png, the outside.png, the inside.rml and outside.rml files.
After we learned last week how to produce a finished PCB layout ourselves, this week is about how we can design our own PCB and then produce it ourselves using a CNC milling machine.
Most of the steps are the same as in the lesson before. I will only briefly explain these steps.
We can use either the Attiny45/85 or the ATMEGA 88 THIN as processor.
I decided to use the ATMEGA. This means more soldering and milling, but prepares me better for the final project.
I can then use the board directly for my test setups.
First, we have to create a new project in Eagle. Create a new project by right clicking on "Projects"-> Projects => New Project Then right click on the project and then on New =>Schematic. First we have to import the library with the components from the Fablab. This is done by clicking on "Libraries" => "Library Manager" => in the dropdown select "in use" and then click on "Browse" and specify the url of the library.
After the empty drawing opens, the first step is to select the microcontroller. As described above I will take the ATMEGA 88 THIN. Via the ADD button we get to the selection window for the components. Under Fab/ Fabhello we can select the ATMEGA. We use it in the form factor TQFP32.
Select the Microcontroller
The ATMEGA 88 THIN
Next is the power supply of the ATMEGA. For this and as part of the weekly task we have to install a Step-Down-Converter. This adjusts the incoming voltage to the desired voltage. For this I use a 7805 Stepdown-Converter. It can downshift from 6V to 12V to 5V. After placing the converter, I inserted a VCC and a Ground (GND) into the drawing. I connected the VCC to the input pin of the 7805 and connected it to a DuPont header and connected the ground to the common pin of the stepdown and to a DuPont header. Additionally I added the labels to both symbols. Pins are connected by labels. So you don't have to add any cables in the drawing and it looks clearer.
Adding VCC to the schematic
Adding Labels to VCC and Ground
The dialog to connect labels
The schematic for the power part
The pins for 5V and Ground
The schematic for the undervoltage protection
Adding a 5 Pinheader for VCC and Ground
The pins for the VCC and Ground
The schematic part for the Led
The schematic part for the push switch
The pins for the four ADCs
The pin for TX, RX, SCL and SDA
The pins for ISP
The schematic for the reset button
The ATMEGA with the labels
The final Schematic for the Board
After we have drawn everything, we can create the board layout in the next step. By clicking on "Create board" we switch to the board mode. At the beginning all parts outside the board are chaotic.
Starting to create the board layout
Moving the ATMEGA
The board after moving everything in the right position
The board with the ground layer
The final board layout as a black-white png
The created path from Fabmoduls
During the milling process
The PCB before soldering the components
Partlist Assembly variant: Part Value Device Package Library Sheet ADC_HEADER M04 04P con-amp-quick 1 C1 100nf 01_SPARKFUN_CAP1206 01_SPARKFUN_1206 satshakit_cnc 1 C2 100nF 01_SPARKFUN_CAP1206 01_SPARKFUN_1206 satshakit_cnc 1 C3 1uF 01_SPARKFUN_CAP1206 01_SPARKFUN_1206 satshakit_cnc 1 C4 10uF 01_SPARKFUN_CAP1206 01_SPARKFUN_1206 satshakit_cnc 1 COMMUNIKATION_HEADER M02 02P con-amp-quick 1 HEADER_GND M05 05P con-amp-quick 1 HEADER_REG_POWER M02 02P con-amp-quick 1 HEADER_UNREG_POWER M02 02P con-amp-quick 1 HEADER_VCC M05 05P con-amp-quick 1 IC1 ATMEGA88-THIN ATMEGA88-THIN TQFP32-08THIN fab 1 ISP_HEADER M04 04P con-amp-quick 1 LED LED1206 1206 FAB_Hello 1 RESET_HEADER M02 02P con-amp-quick 1 RES_AM_RESET 10K 01_SPARKFUN_RESISTOR1206 01_SPARKFUN_1206 satshakit_cnc 1 RES_AM_SWITCH 10K 01_SPARKFUN_RESISTOR1206 01_SPARKFUN_1206 satshakit_cnc 1 RES_AN_LED 499 RESISTOR1206 1206 FAB_Hello 1 SDA_SCL M02 02P con-amp-quick 1 SL1 M03 03P con-amp-quick 1 SWITCH_1 6MM_SWITCH6MM_SWITCH 6MM_SWITCH FAB_Hello 1
The front side of the PCB after soldering the components
The rear side of the PCB after soldering the components
To be able to upload code without an external programmer, we must first upload a bootloader to the chip.
For this we need an external programmer. In our case we use an Arduino Uno.
We use this with the program "Arduino ISP". This can be found in the IDE under "File" => "Examples" => "11.ArduinoISP".
The sketch is then played on the Uno.
Next you have to download the configuration file for the ATMEGA328. You can find it here.>
To integrate the file correctly, you have to follow the steps in the manual.
If this is seen, we can start burning the boardloader.
First you have to select the right board under "Tools" => "Board", here "ATMEGA328 on a Breakboard" would be correct.
What happens if you select the wrong board, you can read under Issues.
Under "Tools" => "Programmer" you have to select "Arduino as ISP" as programmer.
Before we can start, i must wire the Uno and the PCB.
Uno | PCB |
---|---|
5V | 5V |
Ground | Ground |
Pin 11 | MOSI |
Pin 12 | MISO |
Pin 13 | SCL |
Pin 10 | Reset (on the right side) |
#define ledPin 8 void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); }So now I know that the LED works. As well as that I burned the boardloader correctly and that the microcontroller works properly.
Burning thr bootloader with a Arduino Uno
Programming the board with a FDTI-Cable
- Cause milling a board is very time consuming, i was not able to mill the board in this week.
- Several pads were torn off during the first soldering. I had to connect these places with the green cable. It's not nice, but it works.
- I didn't choose the right chip when I first burned the bootloader. Instead of the ATMEGA 328 on a Breakboard I burned the bootloader for the Arduino Uno on the board.
Unlike my board, the Uno uses an external crystal. But my board uses the internal crystal of the breathing gas.
Because the board now expects an external crystal to determine the clock, the chip is now dead. I couldn't burn a new bootloader. So
I had to remove the ATMEGA from the board and solder in a new one. To desolder the chip we used a hot air dryer.
With this we heated the chip and the solder joints and were able to remove the chip from the board. Then I had to remove the remaining solder from the solder joints.
Then I could solder the ATMEGA like the first time.