Week 8. Electronics Design¶
In Short¶
This week I am going to deep into electronics design and try out creating my own board with a microcontroller. After the class trying to understand all basics.
Heroshots of this week¶
ATtiny1614 board and UPDI convertor
EDA - KiCad¶
- install KiCad
- install Fab lab’s component library for KiCad. KiCad Fab library
- set
fab.kicad_sym
as symbol lybrary andfab.pretty
as footprint library - set footprints for all the components
For milling in Roland SRM, we use a 1/32 mill for isolating traces, so we need to modify values accorgingly for widths about 4 mm
QuenTorres board info¶
RP2040 pins might be helpful
ATtiny1614¶
I designed a board with ATtiny1614 microcontroller. Started with inserting main components as Microcontroller, power values, voltage regulator and capacitors. A UPDI pin for programming. And some connectros related to free pins, I don’t know yet what it’s going to do.
I designed by looking at this example, and also Adrianino board and a lot of other boards to understand what they do.
My board schematic in kicad¶
Here is what I made
UPDI convertor¶
For programming I wanted to use our Quentorres buard that we made in week 4. I eplored the instruction in QT repository.
I start following the steps how to use QT as a programmer.
I draw the UDPI convertor scheme by looking at the picture
Tried to give some interesting shape in Illustrator.
Making PCBs¶
And the next steps same as sooner
- generating G-code with Mods
- milling the board
Programming¶
Steps I followed from instruction Quentorres repo.
- Reset Quentorres Board. Hold B button and then press R.
- load the uf2 file on the reseted disk
- connect boards and open Arduino
- choose ATtiny1614 board and select rigth port.
- upload ATtiny library and install MegaTinyCore.
URL: http://drazzy.com/package_drazzy.com_index.json
I used a blink program from examples, defined the LED pin
interaction with microcontroller successed.
Group assignment¶
Tasks
- Use the test equipment in your lab to observe the operation of a microcontroller circuit board:
- Send a PCB out to a board house
Test 1. Observe the currence¶
First we measured the currents on the board. to check 5V and 3.3V flows.
Measuring the flow on 5V trace. noize < 2Hz
Test 2. Toggle pin¶
A. Digital pin. Let one of the pins to toggle by giving it HIGH and LOW pinModes. And then measure the pulse with oscilloscope.
1.22381kHz
Code for toggle pin 1 of ATtiny1614
#define pin2 1
int value = 1;
void setup() {
pinMode(pin2, OUTPUT);
}
void loop() {
value = 1- value;
digitalWrite(pin2,value); // toggle pin 2
delay(50);
}
B. Analog pin
1.22429kHz
Code for fadeing LED on pin 0
#define pin2 0
int value = 1;
void setup() {
pinMode(pin2, OUTPUT);
}
void loop() {
analogWrite(pin2, value);
delay(50);
value++;
if(value >= 255) value = 0;
digitalWrite(pin3, value);
}