-
Electronics
This week's assignment was to redesign the USB to FTDI programmer and add an UPDI to it. For reference I used the hello.USB-UPDI.FT230X from fab academy and UPDI adapter for that from Adrián Torres's Adrianino project. For the second and third versions of the board I also used Antti Mäntyniemi's design as a reference.Fab academy FTDI board on the left and Adrián's UPDI adapter on the right -
KiCad setup
Before I started designing, I downloaded a new version of KiCad and the Fab Lab library for it. I later noticed that I had completely skipped or made a mistake in the custom 3D shapes setup. To fix that I just followed the library installation guide.
In the KiCad I made a new project called programmer. After I had made a mistake that broke my PCB file I also decided to use Git for version control. -
KiCad Eeschema
KiCad relies heavily on the hotkeys so I googled a cheat sheet. Here are some of the useful ones in the schematic editor:
A
Add components
W
Add wire
V
Change value
L
Add Label
R
Rotate
M
Move
G
Move but keep the wires connected. Works only with one component and wires can get messy.
TAB
Same asG
but for selected area.
First version of the schematic Connector_Generic
library. Somehow I had completely forgotten theVCC
andGND
symbols and had wired the voltages directly to the USB connector. I wired everything, did the annotation and theelectrical rules check
. I had forgotten to place theNo connection
flags to the unused pins. I flagged the unused pins and the check was clear. Then I could generate the netlist move on to the PCB design.
I made the schematic again with theVCC
andGND
symbols. I also added TX and RX LEDs. This turned out to be stupid idea and I will talk about it more in the PCB part. I also changed the FTDI connector to normal 1x6 header so I could change the order of the pins. This was done after discussing about it in our course.LED version of the schematic assign PCB footprints to schematic symbols
menu. There I changed FT230XS chips footprint to regular SSOP footprint because I had a lot of trouble trying to mill the narrower pads that were used in the fab lab library. I also added a footprint to the jumper connector. I used a SMD vertical pin header.Final version of the schematic Run Pcbnew to layout printed circuit board
button to open the layout editor and it imports the circuit from the schematic. -
KiCad Pcbnew
Some useful hotkeys:
R
Rotate
M
Move
X
Route tracks
W
Increase track width
Shift + W
Decrease track width
N
Decrease grid size
Shift + N
Increase grid size
B
Update/fill filled areas
Control + B
Unfill filled areas
One of the early version of the layout LED version of the layout Final version of the layout
The only real differences in my design are the wider tracks for the FT230XS chip and the labeling of the TX and RX pins. -
Preparing the toolpaths from SVG's
WebSocket device module needs to be replaced with file save module. The origin in the Roland SRM-20 milling machine module needs to be changed to 0, 0, 0 mm. programs, open server program, Roland, mill, SRM-20, PCB SVG
. The mill we were going to use was Roland SRM-20. When it was open, I deleted theWebSocket device
module since I wasn't going to send the job directly to the milling machine. I added a new module to save the filemodule, open server module, file, save
. I didn't connect it yet to theRoland SRM-20 milling machine
module because I didn't want to save all the iterations that I had to do. Then I changed the origin in the Roland SRM-20 milling machine module to 0 mm in every axis. Then I opened the copper layer SVG with theread SVG
module. I inverted it in theconvert SVG image
module.
I usedset PCB defaults
module to define that I want to cut traces. The only setting that matters to my knowledge is the option between themill traces
andmill outline
options. It sets at least the offset number to correct value, I don't know if there are any invisible values affected. In Fab Lab Oulu 0.2-0.5 mm millimeter V-bit is used to cut the traces. You want to have as largetool diameter
inmill raster 2D
module as possible. You can see the traces I wanted in the SVG image below and the first iteration below that. I had to use 0.20 mm tool diameter to get the cuts I wanted. Now I could connect thesave file
module and save the RML.Traces in SVG. Actual SVG I used was black and white, this is red just for documentation. Milling modules in MODS -
PCB milling
I had a lot of trouble trying to mill the PCB but after a few changes in design and a new day I got a good result from the first blank.Roland VPanel is used to control the mill Continue
step mode to move the X- and Y-axis near the bottom left of my blank. Then I changed to thex100
mode to move the milling bit closer to the blank so I could see the milling bits position better. I then adjusted my X- and Y-axis to the origin and set it withSet Origin Point
X/Y
button.
Then I moved the Z-axis close to the blank. After that I held the milling bit with one hand and loosened the chuck with other hand. Then I gently lowered the bit so it touched the surface of the blank. I set the Z-axis origin and after that I raised it 0.2 mm. The cut depth in MODS was set to 0.1016 mm so this was too high but it is better to be too high than too low. Then with the
Cut
button I deleted the old files and added my own. With theOutput
button the cutting started.
As I said before the Z-origin was too high for the cutting depth, so I canceled the cut and lowered the Z-axis origin by 0.2 mm. I used theView
button to move the milling bit so it wasn't over anything and then used theTo Origin Z
button to get the Z-axis to a know position where I could lower it. This was maybe too much or maybe I didn't stick the blank to the mill firmly enough but the blank separated from the mill and I had to cancel the cut. After this I started to lower the Z-axis only 0.02-0.04 mm per time.PCB that I knew I could fix with knife. You can see that even here the trace under FT230XS is almost broken. PCB that I used to assemble the programmer Weird stepover behavior
After discussing about this in the feedback session, I wanted to test if the higher DPI would help. I generated two NC files in mods, one with 500 dpi which is the default and one with 2000 dpi. I used NCViewer to view these toolpaths. There was a huge difference in the generated toolpaths.Toolpaths when using 500 dpi which was the default Toolpaths using 2000 dpi -
Assembly
FT230XS soldered to the board Assembled board -
Testing and using the programmer
When I plugged the programmer in to the PC it recognized it as an USB serial port but I couldn't get the programmer to send or receive anything. I first tested it by just shorting the TX and RX pins but I didn't get any response in the PuTTY where I had opened the serial port. I tested the connections between the chip and the pins multiple times with the beeper and they seemed fine. Then I connected the board to my commercial USB-UART device and got it to receive messages but not to send anything. Then I thought that maybe when I was measuring the connection I applied pressure to the pins and that's why the beeper would show connection but there could still be a loose connection when using the programmer. I checked the chips solder joint under macro lens and there seemed to be a bit dry solder joint so I reflowed them and got the board finally working as intended.
I added the megaTinyCore to the Arduino IDEs additional board manager URLs which can be found underFile
->Preferences
. I installed the megaTinyCore fromTools
->Boards
->Boards Manager...
.Settings for the UPDI and AT412 Uploading the code in Arduino IDE and serial communication in PuTTY -
Downloads
Programmer
Download programmer4.sch
Download programmer4.kicad_pcb
Download programmer4-traces.svg
Download programmer4-outline.svg
Echo
Download t412_echo.sch
Download t412_echo.kicad_pcb
Download t412_echo-traces.svg
Download t412_echo-outline.svg -
Electronics Production Group Work
I used linetest.png and generated the toolpaths for SRM-20 in Mods. For the milling I would use a two fluted 0.2-0.5mm V-bit.Mods Vacuum table prototype Linetest results Bit Feed Speed Stepdown Cutting depth Traces 0.2-0.5mm V-bit 240 mm/min 8400 rpm 0.1 0.1 Edge Cut 1mm contour 240 mm/min 8400 rpm 0.6mm 1.7mm -
Electronics Design Group Work
I used oscilloscope to measure ATtiny412 echohello boards UART transit line. I was just sending it a's and it was responding with" hello.t412.echo: you typed "a"".ATtiny412 RX line ATtiny412 RX line Ripple -
Final project
FTDI to RS-232
I had designed and manuafactured a quick FTDI to RS-232 board so I could quickly test if my final project was going to work at all.
FTDI to RS-232 schema FTDI to RS-232 PCB There wasn't much to it. I used MAX3221EAE and used the information from the datasheet to configure it to stay always on. A nice design feature of this chip is that it only needs 0.1 µF capacitors so assembly is really hard to mess up. I put some test points on the board so I could probe or attach bodge wires more easily. Agilent 54622D user manual has the DB9 pin out on page 6-10.
Downloads
Download FTDI-to-RS232.sch
Download FTDI-to-RS232.kicad_pcb
Download FTDI-to-RS232-traces.svg
Download FTDI-to-RS232-outline.svg
ESP32 RS-232 board
First schematic
- Memory card pins from ESP32 GRBL board. Memory card is just future proofing or extra at this point but since it took so little to implement it I put it on the schematic
- I wanted to use headphone jack for the external button
- Barrel jack for power since I'm taking the power straight from the oscilloscopes printer power output
- Even though both of them are in the Fab Lab inventory, they weren't in Fab electronics component library for KiCad
- I dowloaded and installed snapEDA plugin for KiCad and downloaded the jacks from there
- I'm pretty sure that the snapEDA plugin messed up my paths so I had to manually set them again
- Now I'm just hoping that I got all the six TX and RX the right wayHorizontal PCB directly on the connector Second schematic Second schematic without copper fills visible While milling the board I had two problems. First was that I messed something up and the "plated holes" weren't drilled at all. I was bit distracted and noticed this only after fully removing the board so I couldn't fix it anymore. Second problem was that someone had closed the menu that allows you to jog the machine. This meant that when it was time to flip the board and locate the ficiduals I couldn't jog the machine to locate those. The program didn't allow me to turn that menu on during machining so I had to abort the whole process.
I milled the second board and that went smoothly. I used unplated mounting holes in the PCB desing and that caused a bit of a wierd tool path while milling. First the holes were drilled and then milled to the correct size. After that when the end mill was used to clear bigger areas from the copper, it also milled over the mounting holes. Which meant that the machine was just milling the air since the holes were already there.
MAX3221 and some of the vias soldered I left the SD card socket and button unpopulated. When it was time to solder the SD card socket I had already returned the flux to the Fab Lab and the Fab Lab was closed. With the button I thought that I wouldn't use the on board button anyways so I left it out. I also soldered just the ground pin of the FTDI-header because if I wouldn't mess up the boot.py file I could update the program through WebREPL after the first programming.
Programming the board I powered the board first time at home and I don't have a current limited power source but noticed that the regulator was getting quite warm. So I plugged a current meter between the power source and the board. It was consuming something like 350 mA. Which was ~100 mA more than I was expecting but not crazy amounts. While doing visual and touch testing I noticed that the MAX3221 IC was hot.
One capacitor shorted to ground