Skip to content

5. Electronics production

1. Weekly Brief Summary

  • This is the first step for making electronic circuit board.
  • I learned how to use mods and SRM-20, for milling circuit.

2. Weekly Assignment Requirement

  • Group assignment
    • Characterize the design rules for your PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.
    • document your work (in a group or individually)
  • Individual assignment
    • Make an in-circuit programmer by milling and stuffing the PCB, test it, then optionally try other PCB fabrication process.

3. Group Assignment

img01

FabLab KAMAKURA 2021 Lab site / Electronics Production

I wrote File Preparation in Mods part mainly, and paste it on my personal page.

4. Make files with mods

Right Click > program > open server program → SRM-20 / PCB-PNG

img02 img03

read png - click「select png files」to load board image.

img04

Roland SRM-20 milling machine

  • Origin x, y, z → 0mm
  • jog height → default(2mm) is OK, and can change 1mm(jun-san) 〜 12mm(Tsuchiyama-san). This number means height when moving without cutting

img05

Right click > modules > open server module > Add save node. Also have to connect outputs’ file to inputs’ file(objects) by click each node.

img06 img07

set PCB defaults - select mill traces(1/64) for trace, mill outline(1/32) to interior.

img08

mill raster 2D - click calculate to make .rml file. Parameters are changed automatically by select mill traces(1/64) or mill outline(1/32). You can see rml image by clicking view, but this view is not comfortable to check.

img09

view toolpath - Click view to open toolpath window. This view shows 3D path.

img10 img11

5. Mill boards with SRM-20

There is official tutorial, and get png file from Embedded Programming class page, hello.serial-UPDI and hello.USB-serial.FT230X.

Turn on SRM-20, and connect to PC, Run VPanel for SRM-20. Move cursor to safety place. Check that there is enough space for the board to be made, and set the XY origin.

img12

Attach 1/64 bit for trace, 1/32 bit for interior. Then, Lower the head slightly and loosen a mill to make contact with the companion. Finally, set Z-origin.

img13

Move to Setup, load .rml file, click Output to start milling. CAUTION :If there are multiple files, SRM-20 process them in order from the top. I think it’s safe to process 1 file at a time.

img14

After milling interior, loosen SRM-20 stage and pick it out. Pour solvent to dissolve the adhesive tape. Use cutter or knife to pick your board. CAUTION: Be careful not to damage the surface of the board with the blade. In some cases, it will change the circuit.

img15

Fine debris and unwanted copper should be removed using an ultrasonic cutter. Steel wool can be used to remove scraps from the surface.

img16

6. Soldering

  • Apply flux to make it easier to solder.
  • Use masking tape to fix the parts to a board or something to prevent them from moving.
  • Set the temperature to about 320 degrees Celsius.

serial-UPDI

  • 6 pin connector(serial communication)
  • 2 pin connector(UPDI communication)
  • 499Ω resistor

img17

USB-serial.FT230X

  • FTX230XS(IC)
  • 6 pin connector(serial communication)
  • 1uF capacitor
  • 10pF capacitor * 2
  • 49Ω resistor * 2 → I used 47Ω resistor instead.

img18

After or on the way of soldering, use multi tester to check that the circuit is well connected. See components board image cafefully. It may seem tedious, but you can reduce errors by checking frequently.

img19

7. Programming

serial-UPDI board convert serial signals to UPDI. USB-serial.FT230X contains FT230X chip(made by FTDI, Future Technology Devices International Ltd), which convert serial signals to USB. Connect 2 board to USB-Serial-UPDI communication.

img20

At first, check serial-UPDI board by using commercial FTDI USB-Seriacl converter.

If USB device is detected, we can see it on macOS’s system report. Click Apple logo > About This Mac > System Report > Hardware > USB.

img21

You can also check USB devices by using lsusb command, which can be installed via homebrew, brew install lsusb.

ATtiny Arduino Programming

There are many examples, sufficient number of pins, and no need to firmware programming, so I decided to use ATtiny3216. Read lab’s tutorial, and start to program.

Open Arduino IDE, select tool bar menu > Arduino > Preferences > add http://drazzy.com/package_drazzy.com_index.json in Additional Boards Manager URL.

Tools > Board > Manegers, search magetinycore and install it. CAUTION : latest version is 2.2.7, but it didn’t work in my situation. I recommend to choose 2.2.6.

img22

serial-UPDI board

img23

for checking my serial-UPDI board, I used three more Lab’s equipments. One is USB-Serial converter, One includes ATtiny3216, and last one is used for power supply on ATtiny3216 board.

Let’s get hello.t3216.echo.ino (Arduino code), and open it in Arduino IDE. You need to check Arduino IDE settings as follows…

  • Tools > Board > MegaTinyCore > ATtiny3216/1616/1606/816/806/416/406
  • Tools > Chip > ATtiny3216
  • Tools > Programmer > Serial Port and 4.7k (pyupdi style)
  • Tools > Serial Port > (Your USB-Serial converter’s port)

Finally, Check and upload the skecth.

Pinging device...
Ping response: 1E9521
Setting fuse 0x2=0x2
Writing literal values...
Verifying literal values...
Setting fuse 0x6=0x4
Writing literal values...
Verifying literal values...
Setting fuse 0x8=0x0
Writing literal values...
Verifying literal values...
Finished writing fuses.
Chip/Bulk erase,
Memory type eeprom is conditionally erased (depending upon EESAVE fuse setting)
Memory type flash is always erased
Memory type internal_sram is always erased
Memory type lockbits is always erased
...
Erased.
Writing from hex file...
Writing flash...
[==================================================] 17/17
Verifying flash...
OK
Verifying...
Verify successful. Data in flash matches data in specified hex-file

It looks successfully uploaded. Open serial monitor and type charcters. CAUTION : baudrate must be 115200 bps.

img24

USB-serial.FT230X board

Let’s replace commercial board with my own. However, my USB-serial.FT230X board could not be detected from my PC. It looks that circuit has no problem, and problem is caused by bad contact. So I tried…

  • Solder on the contact area of the USB connector.
  • Use tight USB extension cable.

img25 img20 img26

Thus, I found my board ! But programming doesn’t work well. I got some error messages below.

img27

pymcuprog.pymcuprog_errors.PymcuprogError: Error with st_ptr_inc16
termios.error: (22, 'Invalid argument')

Searched with error messages, but cannot find good solution. I suspected there might be a problem with the program version, so I changed megaTinyCore version 2.2.7 → 2.2.6, and upload succeeded !

UPDI communication is only to write programs to the ATtiny3216, and no need to use for checking its program. I changed the connection pattern, connect directly USB-serial.FT230X board to ATtiny3216 board, check behavior from Arduino’s serial monitor via USB.

img28

8. Learning Outcome

img28

What I felt

I was not very good at electronic boards, but thanks to the tutor’s help, I managed to do it. I’ll be happy if I can manage to enjoy it by imagining the whole thing and the future.

Files

Links


Last update: July 11, 2021