In this assignment I've tested, measure and analize the operating voltage with a multimeter and oscilloscope. I used a 12VDC 1A switching power supply,
my FabDuino and a couple of cables.
My FabDuino has a DC jack to energize the circuit. First, I've measured the operating voltage.
Then, I used the oscilloscope to view the signal.
The Fabduino board uses a +5V regulator to energize the microcontroller (ATmega328p), so I used the multimeter to measure the operating value for the circuit.
So, I can see the value is 5.02 Volts on the multimeter.
Oscilloscopes have much faster measurement engines and much wider measurement bandwidths than digital multimeters, but they often don't achieve the accuracy and resolution of a multimeter. Oscilloscopes typically have a resolution similar to a digital multimeter of 3,5 to 4 digits.
Now, I used the oscilloscope and checked the same value.
I used 5us DIV to view the signal.
I can see some data of the signal like Vmax is 5.17V, Vavg is 5.07V, where Vmax is the maximum voltage measured, vmin is the minimum voltage, vavg is the average voltage, and Vp is the peak voltage.
The noise of signal is very low, I'm using a switching power supply.
I made my own board based on Fab XIAO project, I mean, my board has another pinout and a UART port, in addition to the SPI and digital port.
The RGB led, the boot and reset button, are inside the XIAO itself.
Original Fab XIAO
Link: http://fabacademy.org/2020/labs/leon/students/adrian-torres/fabxiao.html
I added some features to make it more complete.
- A button on D0 digital pin
- A LED on D1 digital pin
- A Digital port on D2, D3, D4, D5 and D6
- A UART port on D6 TX and D7 RX.
- A SPI port on D8, D9 and D10.
- Some pins for GND, 3.3V and 5V
The controller used is an XIAO RP2040 QFN56, datasheet here.
RP2040 chip meaning
Overview RP2040 chip
A 4990 code of SMD resistor (499Ω) was chosen for low bright at turning on the board and the test pin D1. Datasheet 1206 led
R = (Vs - VLED) / iLED,
where:
Vs is the source voltage, measured in volts (V),
VLED is the voltage drop across the LED, measured in volts (V),
iLED is the current through the LED, measured in Amperes (Amps/A), and
R is the resistance, measured in Ohms (Ω).
R = (3.3V - 2V) / 5mA
R = 1.3 / 0.010
R = 260 Ω
A pull-down button was added too, for general purposes. The 4990 resistor value is chosen for low current flow to the microcontroller.
In the Design Rules I used the default, I mean, single layer, 8mil (0.2032mm) for wires, pads and vias.
So, We'll see the minimum dimension between pins is 0.20 mm. The value of 8mil (0.2032mm) was good.
I selected 'check' option and show no errors.
The tracks were manually routed. Manually it seems more personalized to me, I can better optimize the spaces and distances between components.
I check the ERC electrical rules, no errors on design, I mean no overlapping traces, holes.
I tried Autorouter tool in other software like Proteus, but I feel more comfortable on Eagle.
To generate the milling files I selected the CAM PROCESSOR option on the PCB Board edition.
Then, I need to configure some settings, set a filename: xiao2023.gbr (gerber extension). On the right side I checked the layers to mill. In this case I selected TOP, PADS and VIAS. Then go to process job button.
Then I selected Process Job to generate the GERBER files.
I follow thid guide to this process. Link
I consider it appropriate to place the image of the PCB board in black and white format in order to use it in some other milling program.
During this week I was testing other software like KiCAD. I realized that is easy to use, but I prefer Eagle because I have a lot of years using it.
I actually used kicad in the first instance, but I had some difficulties, so I used Eagle, the software that I mastered the most.
Share schematics and board files (sch and brd) can be downloaded here.
My XIAO PCB Board design (PNG) here
For operating the miniCNC machine I used manual and guides, links below:
MACH4 CNC Controller Operations Guide
Eagle, GERBER generating files guide
First attempt at PCB milling
I used four fasteners on the ends of the plate to improve grip
Some tracks didn't turn out as expected
Milling Path on MACH4
Previously I had some inaccuracies when milling so I decided to use another mini CNC. Where I got better precision on the plate.
MiniCNC details:
The milling tool I've used is a v-bit type, 30 degreees, 0.1mm (for paths)
And I've used a drill bit to cut the border. (1.0mm diameter)
To hold the plate on the platform, use masking tape on all edges of the plate, so that it remains static and as flat as possible to avoid any errors.
Once the tracks were milled I proceeded to cut the edge.
In the cutting configuration, leave 1.5mm spaces (gap) at the beginning and end to prevent the plate from moving in the final moments of the cut.
By applying a little cleaning with isopropyl alcohol you can see the perfect cut of the PCB board.
The next step was to solder the components to the board, being very careful not to overheat them.
Component list:
01 ATMEGA328P microcontroller SMD
01 10K ohm resistor
01 Button (reset)
02 499 ohm resistor
02 Led
02 Capacitor 0.1 uF
02 18pF Capacitor
01 pinhead (ICSP)
01 pinhead (6 pin) (port C)
01 pinhead (6 pin) (port D)
01 pinhead (6 pin) (port B)
01 pinhead (4 pin) power
01 Pinhead (6 pin) (UART port)
02 Capacitor 10uF
01 Jack 12V
01 16 MHZ crystal
01 0 ohm resistor
01 7805DT voltage regulator (5V)
So, I made some labels to identify the Fabduino pins .
To make the serial communication of my PCB board with the computer I used a USB to TTL adapter. This is connected to the Rx and Tx pins of the microcontroller.
I programmed a code for serial communication using the UART port of my Fabduino board, in such a way, specifically when writing a word, it returns as an echo.
char inByte; // incoming serial byte
void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // serial communication baud rate
}
void loop() {
// while loop begins here, continous loop:
if (Serial.available()) { // check for incoming data --> if available
inByte = Serial.read(); // store incoming data
Serial.print(inByte); // echo back the data
}
}
First, I connected the ICSP cable to ICSP port of Fabduino and FabISP. Then, I connected the USB port to your computer.
Next, I've selected the programmer USBTinyISP. (for FabISP)
Next, I've compiled the code and select the option Sketch menu, Upload using programmer.
Then, I've disconnected the USB cable and connected the USB to TTL cable (Rx and Tx pins). Next, I selected the port for serial communication and I opened the Serial Monitor in Arduino IDE.
created with
Free Website Builder .