The aim of this week group assignment is to observe the operation of a microcontroller circuit board using different test equipment available in the lab. The individual assignment is to redraw one of the hello-world circuit boards available in the fablab site and add at least one input and output (button and LED), checking the design rules, mill it, solder components, and test the circuit by programming it.

Machines used:

  • Mailling Machine: Roland SRM-20

Softwares used:

This week assignment content:

Design resources:

Programming resources:

Final version of this week files:


7.1. Group assignment.

The group assignment of this week is to use the test equipment in our lab to observe the operation of a microcontroller circuit board. Documentation of the group assignment is available on the group assignment page.

Click here to enter the group assignment page.


7.2. Individual assignment.

I chose the echo hello-world circuit with ATtiny44 to redraw it; you can find it here. Although I have experience in using Altium Designer, I used Eagle software to redraw the circuit board because I want to learn other designing softwares and compare between them.

7.2.1. Schematic Design.

1- Create a new project and a new schematic. new_project new_schematic

2- Add the fab library for Eagle. From the Library menu > Open library manager > In Use tab > Browse > choose the egle_fab library. Open_library_manager choose_library

3- Add all circuit parts by clicking on Add Part from the left toolbar and choose the circuit parts under eagle_fab library. add_part add_part_library

4- After adding all parts, route them using Net tool from the left toolbar. route

5- Final schematic: schematic

7.2.2. PCB Design.

1- Design the actual board by shifting from schematic to PCB. Click on Generate/switch to board icon from the upper toolbar. generate_PCB

2- Download the eagle_fab design rules, then upload it by clicking on DRC icon from the left toolbar. drc upload_rules

3- Rearrange components. rearrange_components

4- Make autoroute. Set to top layer only. auto_route

5- Click End Job, when routing is finished. end_job

6- Some routes were not made because there is no possible space for it, so I changed some components places. After I finished routing, I noticed that the traces width is 10, which is very thin so I changed all traces width to 16 by selecting all traces > in the command line type change width 16 > rigth click on the selected space and choose Change: Group.

select_all

change_width_16

change_group

width_16

7- Edited the board size by clicking on the yellow line and dragging it toward inside. Here is the final result. after_routing

8- I found some blank area on my board, so I added my name using Text tool from the left toolbar. text

9- To show only the traces, go to Layer settings > Hide Layers > click beside the top layer to show it > OK. show_traces

10- To export the traces file, go to File menu > Export > Image. export

11- Set a name for the file, change the resolution to 500, and select Monochrome to make it black and white image. export_settings interior

12- Change frame width to 1/32 inches which equals to 31.25 mils because mods will not consider small lines when using 1/32 milling bit. Rigth click on each boarded line and set the width. set_width

13- To export the frame file, follow the same steps from 8 to 10 and consider showing the Dimension layer. Here is the exported frame file: frame

7.2.3. Mods Settings.

1- Export the traces png file to mods. dpi is shown as 500.024, how ever it should be doubled to 1000.048 to resize it. mods

3- Set to mill traces (1/64) for traces. mods_mill

4- Click Calculate to produce the RML file mods_calculate

5- To generate the frame RML file, repeat the steps from 1 to 4 consider invert the png image and setting mill outline (1/32). mods_frame

For more detailed steps on using mods, click here.

7.2.4. Milling and Soldering.

After generating YML files using mods, I have sent the traces file first to the SRM-20 milling machine and mill it using (1/64) bit. Then, I have changed the milling bit to (1/32) and started milling the outline. You can find more detailed steps about milling in week 5.

The milling bit used for traces 1/64 inches: traces_bit

The milling bit used for frame 1/32 inches: frame_bit

The milling bit should be touching the copper sheet surface as shown in the following figure: milling_bit

The following image shows the circuit board after milling and after cleaning: milling_circuit

7.2.5. Soldering.

I have gathered all the cirucit components used in the design. The following table list them:

P/NDESC
ATTINY44A-SSU-NDIC MCU 8BIT 4KB FLASH 14SOIC
SW262CT-NDSWITCH TACTILE SPST-NO 0.05A 24V
 CER RES 20MHZ 15PF SMD
 LED WHITE 1206 SMD
 CAP CER 1UF 50V 10% X7R 1206
 RES SMD 10K OHM 1% 1/4W 1206
 RES SMD 499 OHM 1% 1/4W 1206
 CONN HEADER SMD 6POS 2.54MM
 CONN HEASER SMD 2.54MM

Then I started soldering the components on my circuit board and here is an image of the final result: final_result

7.2.6. Programming.

Programming done using Fab ISP board (attiny45) with Arduino software IDE. Steps as following:

1- Connect my echo hello-world board and the Fab ISP board together both to my laptop using FTD and USB cables. connection

2- Set Arduino Preferences by going to File top bar menu > Preferences > in the Additional Board Managers URLs paste this URL:

“https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json”

programming preferences

3- From the Tools menu > Borad > Boards Manager. boards

4- Search for attiny and install it. attiny

5- ATtiny microcontrollers should be shown in the boards menu. attinys

6- Set the following: settings

7- Click on Burn Bootloader. When done, you should see this message “Done burning bootloader.”. burn_bottloader

8- Upload a simple blinking LED code to my echo hello-world board.

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin PA7 as an output.
  pinMode(PA7, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(PA7, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(PA7, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

9- You should see this message “Done uploading.”. done_uploading


7.3. Problems.

7.3.1. Remove all routes in Eagle.

After routing my circuit board in Eagle, I found that there is no space for more routing and I need to change some components places. To do that, I have removed all routes made by typing in the command line ripup;.

ripup

ripup_all

ripup_done

7.3.2. incorrect milling.

For the first milling try, I got the circuit size doubled as shown in the following figure: doubled_size

The issue was solved as explained in 7.2.3. Mods Settings step. For the second milling try, the sizing issue was solved, but the frame milling process was incorrect as it millied a part of the circuit traces. This issue was happened because I didn’t inverted the frame exported image in mods when I produced the YMl file. frame_issue

7.3.3. Merged PCB traces.

During soldering, I discovered that there are two traces merged together becuase they are very close to each other and the milling machine didn’t mill the space between them. So, I used a cutter to make a cut between the two traces and used a digital multimeter to make sure that the cut I made is enough and the traces are no longer connected to each other.

issue

Tools used to fix the issue (cutter and digital multimeter): tools

7.3.4. Unconnected SCK pin.

While programming my circuit using arduino IDE, I got this error which implys that the SCK pin is not getting the signal. error_SCK

So, I doubled check my circuit board connection and found that I didn’t made a connection between ATtinny44 SCK pin 9 and ISP SCK pin 3. SCK

To solve this problem, I have soldered external wire between the pins and doubled check the connection using a digital multimeter. wire


⤧  Next post 8. Computer controlled machining ⤧  Previous post 6. 3D Scanning and Printing