Skip to content

5. Electronics production

Instruction

Group Assignment

Individual Assignment

  • make an in-circuit programmer that includes a microcontroller:
  • extra credit: customize the design
  • mill and stuff the PCB
  • test it to verify that it works
  • extra credit: try other PCB processes

What I did in Week4

  1. Set up milling environment → Group Assignment
  2. PCB Test production → Group Assignment
  3. Make and Produce in-circuit programmer → In this page

Make In-Circuit Programmer : hello.D11C.serial.5V.1.1

• Mill in-circuit programmer for AVR-1

In-circuit Programmer :

hello.D11C.serial.5V.1.1.interior.png

convert path from svg file by mods

スクリーンショット 2022-02-20 14.37.22.png

スクリーンショット 2022-02-20 14.36.00.png

import to gSender and Start to engrave the PBC board

スクリーンショット 2022-02-20 14.43.20.png

Mill the interior and outline in the same way

IMG_3031.jpg

Complete

IMG_3036.jpeg

Make Adapter board : Serial UPDI-3

Adapter board :

hello.serial-UPDI.3.traces.png

hello.serial-UPDI.3.interior.png

hello.serial-UPDI.3.traces.png

hello.serial-UPDI.3.interior.png

In the same as the in-circuit board, mods → gSender → Mill.

Complete

IMG_3036 2.jpeg

Soldering boards

Collecting the parts of in-circuit programmer and adapter board

  • hello.D11C.serial.5V.1.1
  • serial-UPDI 3

IMG_20220220_154612.jpg

IMG_3034.jpg

Soldering

IMG_20220220_163617.jpg

Complete

  • In circuit Board : hello.D11C.serial.5V.1.1
  • Adaptor board : serial-UPDI 3

IMG_3040.jpg

IMG_3041.jpg

Set up programming environment

Reference Kannai site

Install Raspberry Pi manager

Download Raspberry Pi Imager

スクリーンショット 2022-02-20 17.33.13.png

Install Ubuntu to micro SD

other general purpose os > ubuntu > ubuntsu server 21.10(R Pi2/3/4/400)

スクリーンショット 2022-02-21 14.38.36.png

SSH

ssh ubuntsu@192.168.1.158

スクリーンショット 2022-02-20 19.22.26.png

pass: raspberry

  • connect Xiao to USB of Raspberry Pi

  • connect SAMD usbc 11 serial to USB of Raspberry Pi to be able to edit Raspberry pi

Install edbg

edbg enables the user to debug the target device without an external debugger.

installed edbg

スクリーンショット 2022-02-20 19.23.33.png

$ sudo ./edbg -l

スクリーンショット 2022-02-20 19.27.03.png

Seeeduino Xiao

Install the DAPLink Arduino Libraries (Mac/PC)

  • Seeed_Arduino_DAPLink -> Code -> Download ZIP -> Seeed_Arduino_DAPLink-master .zip
  • Open the Arduino IDE, and click sketch -> Include Library -> Add .ZIP Library, and choose Downloads/Seeed_Arduino_DAPLink-master.zip

Install the Adafruit_TinyUSB_Arduino Library

  • Adafruit TinyUSB Library for Arduino -> Code -> Download ZIP -> Adafruit_TinyUSB_Arduino-master.zip
  • Open the Arduino IDE, and click sketch -> Include Library -> Add .ZIP Library, and choose Downloads/Adafruit_TinyUSB_Arduino-master.zip

Setup Xiao in Arduino

  • Preference -> Additional Boards Manager URLs https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
  • Tool -> Boards -> Boards manager -> Search Xiao
  • Install Seeed SAMD Boards

Untitled

Open the sketch

  • Unzip Seeed_Arduino_DAPLink-master.zip
  • Open Seeed_Arduino_DAPLink-master/examples/simple_daplink/simple_daplink.ino

Upload the sketch to Xiao

  • connect PC and seeeduino xiao

  • set usb stack as tyny usb

  • set port to xiao

  • Click Upload(compile)

  • However, error message was displayed

スクリーンショット 2022-02-20 18.38.58.png

  • Downgrade tiny usb library to 0.10.5

スクリーンショット 2022-02-20 18.38.21.png

  • try to compile again

→done

  • Upload the sketch to Xiao
    • LEDs on Xiao one green -> two blue

Burn Bootloader

your PC —(WiFi, SSH)—> Pi4—(USB)—> Xiao—(jumper wiers)—> hello.D11C.serial.5V.1.1_board

スクリーンショット 2022-02-22 21.16.54.png

IMG_3043.jpeg

download sam_ba_Generic_D11C14A_SAMD11C14A.bin

$ sudo ./edbg -b -t samd11 -epv -f sam_ba_Generic_D11C14A_SAMD11C14A.bin -s 0

【writing the boot loader using SAMD with the number 0 writing machine.】

スクリーンショット 2022-02-20 19.27.38.png

$ lsusb

スクリーンショット 2022-02-20 19.29.02.png

Done. Now that the bootloader has been written, we can confirm that SAMD is recognized by the Raspy as a device, and SAMD is ready to write USB - Serial. Recognized in ubuntu

On mac terminal

After that, Connect SAMD to Mac and check if samd is recognized in mac

スクリーンショット 2022-02-20 19.39.40.png

Upload SAMD11Cserial into hello.D11C.serial.5V.1.1

Download SAMD11Cserial

Code -> Download ZIP

% cd Downloads % unzip SAMD11C_serial-main.zip % ls SAMD11C_serial-main.zip SAMD11C_serial-main % cd SAMD11C_serial-main % ls SAMD11C_serial SAMD21E_serial % cd SAMD11C_serial % ls SAMD11C_serial.ino % open .

Double click to open it in Arduino

Setup

File -> PreferencesAdditional Board Manager URLs: https://www.mattairtech.com/software/arduino/package_MattairTech_index.json

Boards Manager

Tools -> Board -> Board Manager to find mattairtech SAM D|L|C core for Arduino

スクリーンショット 2022-02-20 19.47.07.png

Upload

Program 3216 board

  • your PC —(USB)—> D11C.serial—>UPDI_Adapter—>3216_board

References : Arduino IDE

Add File -> PreferencesAdditional Board Manager URLs:

http://drazzy.com/package_drazzy.com_index.json

Boards Manager

Set the preference

3216_setting.png

Connect : Mac - [USB - serial] - [serial-updi] - updi programmer

IMG_3045.jpeg

Upload

Compile and test

reference: Program AVR 1-seriese from UPDI

file > example >basic>blink

スクリーンショット 2022-02-20 20.00.48.png

  • Connect the UPDI board to Breadboard ( LED, R )

IMG_3046.jpeg

  • Setting as “mega tiny core”

スクリーンショット 2022-02-20 20.04.16.png

movie

Completed.

What I learn in this week

[Group + Individual Assignment]

  • Since this was my complete first experience with electronic circuit design, I still don’t understand the significance of each step-by-step operation.
  • However, I was impressed that I was able to build the base from scratch, solder the microcomputer, write the program, and light the LEDs!
  • I want to deepen my understanding of the meaning of each component and the content of the design through my own input.

file

hello.D11C.serial.5V.1.1.traces.png

hello.D11C.serial.5V.1.1.interior.png

Acknowledgement

Mr.Tamiya and Ms.Kamei as supportive instructors in Fablab Kannai

and YOU!


Last update: June 2, 2022