Skip to content

5. Electronics production

This week I worked on making an in-circuit programmer that includes a microcontroller by milling and stuffing the PCB.

Group assignment

This week of group assignment, We characterize the design rules for our in-house PCB production process. Click HERE to see more detail of the group assignment.

Individual assignment

Heroshot

Debugger_blink.gif

First trial

Documents

I used Mods to generate .nc file

Step 1: Open Mods > Right click > programs > open server program > G-code: mill 2D PCB png.

select ‘mill 2D PCB svg’ if you input file type is svg.


Step 2: Select the image, and change the settings to you wanted or the machine needed, like tool diameter, cut depth, speed, offset… After all settings done, click calculate.


Step 3: Inspect the generated cut path files in the ‘view toolpath’ module at the bottom by clicking ‘view’ button.


Then I used EdytorNC for communication.

Step 4: Click Tools > Serial port send/receive.

Step 5: Click on the yellow button on the function bar, and select the correct COM port and settings.


Step 6: Test for the communication between the computer and the machine. Click the button on the left of the selection textbox. and type ‘%’ to let know machine know this is the beginning, then ‘m03’ to test is the machine do run your command. If it is ok, then ‘m05’ to stop the spindle from turning, and % for denote the end.

Command
% To denote the beginning and end
m03 To start the spindle turning clockwise
m05 To stop the spindle from turning

Here are some Chinese documents of using code on CNC machine
CNC銑床程式製作功能一覽表


The board are ready to be mill.

Step 7: Select the file and send it to the milling machine by click the paper airplane button.


Milling

week05_milling from TerryAU on Vimeo.

Then clean up the dust on the PCB board.

milling_clean.jpg

I remove the copper near the USB port in case of a short circuit.

week05_remove from TerryAU on Vimeo.

milling_remove.jpg

Soldering

All of us have this box to organize and place components. Lovely.

box.jpg

And I made a list of what we are going to solder on the board.

list.jpg

Then I use a hot plate to assemble all parts.
The reason why I used a hot plate instead of iron is the components are tiny and it’s hard to solder small things in a small board, and it’s easy to touch and melt components by accident.

solder_hot-plate.jpg

soldering.jpg

board.jpg

After soldering, I went home and try to connect to a computer and install the driver. Then, the regulator blows up with a spark. And I freaked out.

regulator_crack.jpg

Then I told it to the instructor and said because the pin on the regulator we are using isn’t the same as Neil’s. So we need to rotate it to place it in the right position.

regulator_demo.jpeg

Then I remove the cracked one with iron and replace it with a new regulator.

regulator_done.jpg

Programming

Then I try to program it and install the driver.

connect.jpg

Downloaded free_dap_d11c_mini.bin and edbg-windows-r29.exe in order to install. Open CMD and type:

edbg-windows-r29.exe -ebpv -t samd11 -f free_dap_d11c_mini.bin

In your CMD, you can use cd <dir> to change directory, mkdir <name> to make directory, ls to list what files are in the current directory.

program.jpg

Troubleshooting

As you can see the .bin file seems to installed into the chip, but the problem is the computer can’t recognise it. No COM port was shown up.

Maybe i got issues of:

  • The USB port of the computer broke (not much possible)
  • Wrong .bin file
  • edbg not support
  • Components were broke
  • Bad soldering

Second trial

Then we discussed and find out that the board we milled isn’t the programmer we want, we should use a 4pin output programmer.

Milling

So I’ve milled a new PCB board using This PCB design to try is it work to be a programmer.

USB-D11C-SWD-10 pin board components traces interior

hello.CMSIS-DAP.4.D11C.png

USB-D11C-SWD-10pin.jpg

Then I went home and solder it, but I am not sure is there any short-circuit. And I didn’t grab a multimeter at the lab so I ran to the nearest shop and bought one. It cost me around 10.6 USD.

multimeter.jpg

Soldering

solder_hot-plate_2.jpg

Because the original design of the pin holder is smaller than the one I using, so I need to do “flying wires” to try out the program.

wiring.jpg

And during soldering, I got hurt by the iron. How careless I am…
Then I saw it turn red when I am on the way to Fablab. :(

hurt_by_iron.jpg

I plug it into my pc port when I finish half of the “flying wires

connect_2.jpg

As you can see, it successfully writes in the .bin file into the chip.

program_2.jpg

Then I keep going on to the rest of the “flying wires


Programming

I connect the programmer “Debug4Terry” with the blinking board “Blink4Terry” and try to program it.

connect_3.jpg

Write in successfully!

program_3.jpg

Then I try to program it with Arduino IDE.

program_4.jpg

Third trial

Designing

But “flying wires” is fail to reach the requirement so I decided to design my own programmer with Fusion 360.

F360_debugger_schematic.jpg

F360_debugger_PCBdesign.jpg

Milling

Then rap off the copper on the head of the USB and ensure that there are no short-circuit.

board_2.jpg

Soldering

solder_hot-plate_3.jpg

Because I add too much paste and the legs(pin) are connected together, I need to clean up it.

remove_excess.jpg

Programming

connect_4.jpg

Programmer .bin file write in successfully!
And there are two different programmers shown up in the list. Yeah!

program_5.jpg

Then same as before, I connected my own programmer with the blink board and try to program it.

connect_5.jpg

program_6.jpg

program_7_port.jpg

program_7.jpg

Then turns out it works! My lovely programmer.


Last update: March 22, 2022