Skip to content

5. Electronics production

Tasks of the week:

  • Make an in-circuit programmer that includes a microcontroller by milling and stuffing the PCB, test it to verify that it works.

▶Individual assignment:

Make an in-circuit programmer that includes a microcontroller by milling and stuffing the PCB, test it to verify that it works.

● Milling Machine (Roland SRM-20)

User’s manual

  • First of all make sure that you have the software installed in your computer , if not you have to install it from Here.

  • Turn on the milling Machine (be sure its connect with the computer) the software will open directly (VPanel for SRM-20).

  • Prepare the Sacrificial Surface

  • Set the X/Y/Z access

Set the X/Y by Vpanel after you Decide where you set the board.

✦ Red part: Coordinates and Feed buttons

● The current position of a cutting tool is displayed. The change of mm or inch can be performed. ● Clicking these buttons moves the spindle head or table. Holding down the buttons performs continuous movement.

✦ Blue part: X/Y / Z

● Sets the current XY position to the base point. ● Sets the current Z position to the base point.

✦ Orange part: Cursor step and Spindle Speed

● Specify how much the cutting tool should move every time you single-click the [X]/[Y]/[Z] button Be sure if you want to Move [Z] make it (x10) to don’t poke the cutting tool accidentally. ● Sets the current Z position to the base point.

✦ Green part: Move

View

Moves the spindle head to the center and moves the table to the very front. This position is called [View position]. Use this button when you want to change the cutting tool or the cutting material.

X Y / Z

Moves the cutting tool to the XY origin point.

Moves the cutting tool to the Z origin point.

Stop

Stops the cutting tool at that point when it is moving.

● PCB Fabrication

  • Download the PNG files for the traces and the board outline Here.

  • Now open MODS Here.

  • Right click anywhere and select PROGRAMS > OPEN SERVER PROGRAM ROLAND > MILL > SMR20-MDX20.

  • To Save the file automatically we need to Add another module. So we need to look for the program/component that outputs the file. In this case Roland SRM-20 milling machine

  • Now connect the elements by clicking OUTPUT and INPUT .

✦ Traces (1/64)

  • Follow the steps

Speed - 4 or 3 mm/s

X/Y/Z - 0

✦ Outcut/Holes (1/32)

  • Follow the steps

Speed - 4 or 3 mm/s

X/Y/Z - 0

Then set the Setting Up the Ronald srm_20 milling machine ,and mounted the plate to be milled like I explained in top, prepared your cutting tools.

fix the board to the machine by applying double stick tape

Move the Z axis down until the mill almost touches the board, then loosen the cut tool and let it drop on the board (you can hear the drop sound), now tight it and set Z origin in VPanel this way better than using paper to check Z axis attached the board.

Now choose the Trace File

Cut > add > Output

The Machine will start the engraving work

Now change the cutting tool by move the Z to up and replace the cutting tool by 1/32 cutting tool.

and press X/Y and Z to origin.

Now choose the Cut File

Cut > add > Output

The Machine will start the cutting work

● Soldering

I solder my components by following The board image from Brian’s webpage Brian’s webpage.

This is my first time touching a soldering iron I try my best to be stable but nothing goes well, my hand was extremely shaking and I can’t control anything

so I try different way =) actually it works

!

!

Here I find a good way to soldering and its works very WELL

!

~ Final result ~

!

● Programming

I followed this tutorial Using Software Installation on Windows 10 since my operation system is windows 10

STEP 1 Install Git

!

I have already done it before in Project Management week

STEP 2 Install the Atmel GNU Toolchain

!

Download the Atmel AVR Toolchainfor Windows from Atmel’s site and run the installer. When asked where to extract the files, click the “…” button and navigate to C:\Program Files, then click Extract.

STEP 3 Install GNU Make

Download Gnu Make and launch the installer. Accept the default location for the installation. You can choose whether or not you want an icon in your start menu.

!

STEP 4 Install avrdude

Download avrdude.

Unzip the archive, and copy the archive inside to C:\Program Files.

STEP 5 Update your PATH

Now we need to tell Windows where to locate all of the tools you’ve just installed when you type their names on the command line. Go to the Start menu and open the Control Panel, then go to System. From the left pane, choose “Advanced System Settings”. Under the Advanced tab, click the “Environment Variables” button.

!!!

Under User variables, select “Path” and click the Edit button. If you don’t already have a variable called “Path”, click the New button to create it, enter “Path” without the name, and fill out the value as described below.

!!

The three values to add are:

  • C:\Program Files\avr8-gnu-toolchain\bin
  • C:\Program Files (x86)\GnuWin32\bin
  • C:\Program Files\avrdude

!

Click OK on all of the windows you’ve opened.

STEP 6 Install Drivers for your Programmer

Here I followed the step from the ( Brian’s original webpage ) carefully.

his tutorial assumes you are going to use a FabISP, FabTinyStarISP, or other USBtiny-based programmer.

Download Zadig and launch it. Plug in your programmer, and select the “USBtinySPI” device in the list. (If it doesn’t show up, go to the Options menu and click “List All Devices”. The driver you want to install (to the right of the green arrow) is either libusb-win32 or libusb0. Click the “Install Driver” button. You should only have to do this once.

USBtinyiSP didn’t show up from the drag down window even when I clicked list all Devices

! !

STEP 7 Sanity Check.

Here I followed the step from the ( Brian’s original webpage ) carefully.

Everything is now installed. Let’s check that it all works.

Go to the start menu and search for “Git Bash” and start it. When you see instructions telling you to open your terminal in other tutorials, this is the terminal window you should use.

Check to make sure that the commands we installed work okay:

make

Type make -v and press enter. You should see: GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. … and so on.

avr-gcc Type avr-gcc –version and press enter. You should see: avr-gcc.exe (AVR_8_bit_GNU_Toolchain_3.5.4_1709) 4.9.2 … and so on.

avrdude

Type avrdude To See if its installed in your system it should return the version of avrdude

I get a “command not found” error,I go to check the installation of the Atmel toolchain and the path variable setting then I type again avrdude but I get the same error I decide to try to go to other step and type avrdude -c usbtiny -p t45

( avrdude -c usbtiny -p t45 )vafter I click enter nothing happens at this point my instructor advised me to use Arduino

● programming with Arduino as ISP

Plug the wires

Upload the sketch

By following Program an ATtiny44/45/84/85 With Arduino.

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

1- > open File > Preferences > Additional Boards Manager URLs > copy and paste > https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json >and then click OK

2- > Tools > Board > Board Manager > Arduino Uno

3- > Tools > Board > Board Manager > Scroll down to the bottom choose “ATtiny”

4- > File > Examples > ArduinoISP.

Open the sketch and upload it to your Arduino.

5- > Select ATtiny from Tools > Board.

Select the specific ATtiny you are using (44/45/84/85).

6- > Tools > Clock 8 MHz (Internal)”

7- > Tools select “Burn Bootloader”.

Error “Duple check connection and try again”

I check all the connections everything looks good until I realize there is Anode and cathode in LED and a diode I didn’t know about so I should remove it and solder it again

unfortunately when I try to correct the led orientation my circuit is break so I have to do it again

HERE I can complete my work and see the result I upload my code and finally the LED ON

✦ Final Result ✦

Group assignment ✌


Last update: July 20, 2022