7. Electronics design

Due Wednesday March 11 2020

Assessment Requirements

Group assignment

  1. Use the test equipment in your lab to observe the operation of a microcontroller circuit board (in minimum, check operating voltage on the board with multi-meter or voltmeter and use oscilloscope to check noise of operating voltage and interpret a data signal)
  2. document your work (in a group or individually)

Individual assignment

  1. Redraw one of the echo hello-world boards or something equivalent, add (at least) a button and LED (with current-limiting resistor) or equivalent input and output, check the design rules, make it, test it.

Learning outcomes

  1. Select and use software for circuit board design
  2. Demonstrate workflows used in circuit board design

Have you? Check Table

Have you? In Process Done
linked to the group assignment page
Documented what you have learned in electronics design
Explained problems and how you fixed them, if you make a board and it doesn’t work; fix the board (with jumper wires etc) until it does work.
Included original design files (Eagle, KiCad, - whatever)
Included a ‘hero shot’ of your board
Loaded a program and tested if your board works

FAQ

Can I modify an existing design board?

Answer: No, you have to create your board from scratch.

Do I need to create a schematic file?

Answer: Yes, at least for this week.

Can I draw my design by hand?

Answer: Yes, but you have to use EDA (Electronic Design Automation) software for this week.

After some experiments with EagleCAD I decided to try KiCad. It’s open source and runs on Linux locally. I found these two guides useful: 1. Introduction to KiCad I started the official Kicad tutorial and it’s pretty easy to follow! 2. 2019 BCN KiCad tutorial. The FAB library can be imported, so that is quite powerful. BCN: Kicad Electronics design

I am realizing that I may want to downgrade to a simpler isp programmer compared to the ARM JTAG I did during 05 Electronics Production. One of the boards suggested, with guides in the 2019 tutorials will be a better choice. Fab ISP Models compilation

KiCad on Linux

I initially KiCad version 4.0.7 installed via my package manager, and had weird graphics artifacts on Linux. I then tried the 5.1.9 Stable Release. I used the guide Install KiCad on Linux Mint. This worked and the graphics artifacts were gone.

Redraw and Customize a board

I decided to add a LED and a switch to a FabTinyISP board. To meet course requirements I re-drew the entire schematic and added my switch and led. I used KiCad Electronic Design Software to accomplish this task. Here are the steps I took:

Schematic note in upper left quadrant where I added new D7 ORG LED and Sw1. It was excellent practice to re-draw the FabTinyISP board it allowed me to get used to installing the Fab libraries in KiCad. I also greatly increased my skill level with KiCad.
Here I have laid out all the traces. Traces are .4 mm thick. Here are some additional layers turned on I will be using svg files to mill my boards using Easel CAM. I used the settings above to plot a SVG output file. The SVG files output by KiCad needed some clean up, so I used Inkscape to wrangle the files. Much better!
Well that didn’t work!
Back to Inkscape.
Hmm there a lots of tiny bits in the svg file. Traces are actually single vector lines, Easel doesn’t recognize these lines and will not generate tool paths from them. I’ll need to convert them to lines with thickness. Here I am using stroke to path in Inkscape transform the trace lines into stokes with width. Now I have used Path Union to connect all the traces.
I also needed a outline SVG, so I made one from the imported KiCad SVG.
Note my layers on the right, this will allow me to turn on and off stuff to make the svg files for the traces and outline I need to setup CAM tool paths in Easel. In Easel CAM, this shows my trace milling tool paths laid out, now to mill the board. After running tool paths and milling one board, I realized the traces were too thin and a few ripped up during milling.
Back to KiCad to increase the trace thicknesses to .6mm. However note design rule error arrows, showing traces now overlapping in pad keep outs. I’ll need to re-route those traces.
Traces re-routed! No more design rules errors!

I thought I’d try out the KiCad 3D Viewer (View, 3D Viewer). Wow it looks pretty cool. Some Fab library parts do not have 3D files. Maybe I will help out and add some of the missing 3D files to the KiCad fab library on github. KiCad SVG plot cleanup in Inkscape
Stoke to path conversion
traces unioned!

SVG ready for Easel!
Easel CAM trace tool paths
Easel CAM outline cut out.
Close up of the 2.54 mm (.10 inch) diameter taper stub end mill I used.
Trace tool paths.

I wanted to try some lube to compare to dry milling.
Lube applied, I ran a moat milling cut before applying the lube. It’s hard to see, but also applied tape to the MDF spoiler board to prevent lube from soaking into it.
Hmm looks pretty good. There was a lot less dusty chips getting thrown around using the lube.

Outline cut.
I also ran a isolation cut board (upper) to compare it to the fully milled board (lower). It will be interesting to compare soldering on both types of boards.

Making the board

FabTinyISP MTek Mod BOM:

Line Item Qty Symbol Count
1 ATtiny 45 1 U1 1
2 1kΩ resistors 3 R1,R6,R7 4
3 499Ω resistors 2 R2,R5 6
4 49Ω resistors 2 R3,R4 8
5 3.3v zener diodes 2 D1,D2 10
6 GRN LED 1 D3 11
7 RED LED 1 D4 12
8 ORG LED 1 D5 13
9 100nF (0.1μF) capacitor 1 C1 14
10 2x3 pin header 1 H1 15
11 Switch 1 SW1 16
12 Fabbed USB A Plug 1 J1 17

Stuffing Board


Now to place and solder the SMD parts. Hmm the first part the ATtiny 45 has legs that are longer than the pads, the pitch is correct.

Ok, so I just bend them inward and they will fit. Should the KiCad Fab Inventory be updated?

MCU soldered!
Rest of parts soldered

Testing


GND Test, continuity!
SW1 Test, switches on and off!
RED LED Test, works and installed in right direction!
GRN LED Test, Ditto!
ORG LED Test, Ditto!


Testing on power supply, looks good with orange power on LED.

Add USB A Plug


Adding USB A Plug for more reliable connections, I do this by hand with and hobby knife and a 0.8mm diameter drill held in a pin vise.

All ready to program!

Programming

To program my version of the FabTinyISP I followed the instructions at: Building the FabTinyISP. Don’t forget to solder J1 shut temporarily for programming! Here is a summary of the Linux OS steps from the link above in case that site disappears one day.

  1. Solder J1 shut
  2. sudo apt install avrdude gcc-avr avr-libc make
  3. Download the firmware source code
  4. Unzip file above and start a terminal from unzipped folder location.
  5. Run make command from that folder, you should see a fts_firmware.hex, if not something is broken.
  6. If using something other than a fabbed board with an ATtiny in it, Edit the file called Makefile, change line PROGRAMMER ?= atmelice_isp or jtag2isp or avrisp2 for other programmers.
  7. Plug your board into a short USB extension cable or a USB 2.0 hub, faster than USB 2.0 may not work.
  8. Power up the hub or plug in usb extension, red LED should light up indicating power and J1 is closed.
  9. Plug in your ISP header into the programmer and your board, make sure it’s not plugged in backwards by locating pin 1.
  10. Run make flash command
  11. Watch as avrdude erases, programs, and verifies the chip, avrdude will tell you if something is wrong.
  12. Run the make fuses command
  13. Unplug your board from the USB port and disconnect the programmer as well.
  14. Connect your ISP programmer to your board one more time
  15. Type lsusb you should see a “Multiple Vendors USBtiny” device
  16. run make rstdisbl
  17. Remove solder from J1
  18. Try programming another board with your new FabTinyISP!

See the original source link above for trouble shooting and other tips: Building the FabTinyISP

Photos of Programming steps


J1 Soldered Shut
make flash command results
make fuses command results
lsusb with new board plugged in!
make rstdisbl command results
Week 05 board programs Week 07 board!

Check Board with Oscilloscope

I used the SparkFun Electronics How to Use an Oscilloscope video to get me started with the Oscilloscope I have. I have never really used an Oscilloscope before, but I have seen others use one and understand the basic reason for using one. Specifically helpful for me to learn my Tektronix TDS 1002 oscilloscope are these documents: Really great video to help me learn all the knobs and buttons: Tektronix Oscilloscope Tutorial Part 1 The original manual for my model of oscilloscope was great too!: TDS1000- and TDS2000-Series Digital Storage Oscilloscope hosted by Neurophysics Lab at UC San Diego

Lab power supply at 5vdc
Leads for 5vdc test
O-scope reading of 5vdc from lab power supply, at this point I have learned how to zoom in on curves and move horz and vert. I am very zoomed in at 200mV per grid.
Let’s try and see if the 5vdc from this xtar 18650 USB power bank look any different.
Yep it look different a little wider 5vdc sweep, but not much more sweep at all, I am very zoomed in at 200mV per grid.
Let’s try measuring this point just after the ORG LED.
Here is the reading, I learned how to move cursor at this point. The reading is 3.28V at the cursor. What’s the voltage on the pin 2 of the MCU?
Here I learned how to move two cursors and I zoomed in to 100mV per grid section. Delta is 252mV, Max 2.92V Min 2.66V
Let’s measure the voltage at this pad on the USB Delta is 224mV, Max 2.90V Min 2.68V

Hero shot


This is my complete FabTinyISP DMeyer Mod, with functional power switch and Orange power LED. I learned a lot re-drawing this board in KiCad and adding my own simple circuit components. I am much more comfortable using KiCad to make and layout boards. I’m ready to attempt my own custom board desing and fabrication.

Here is a comparison of the FabTinyISP DMeyer Mod with my original FabTinyISP’s I made in Week 05 Electronics Production

CAD files

Board Traces and Outline SVG
FabTinyISPDMeyerModR3.svg

KiCad PCB files:
FabTinyISPwPowerLED.pro
FabTinyISPwPowerLED.kicad_pcb
FabTinyISPwPowerLED.sch

Assessment self check

Have you? Done
Group assignment No
Individual Assignment Yes
Documented what you have learned in electronics design Yes
Explained problems and how you fixed them Yes
Included original design files Yes
Hero Shot Yes
Loaded a program and tested if your board works Yes

Need to complete

  1. Use oscilloscope to check noise of operating voltage and interpret a data signal
  2. Does my FabTinyISP DMeyer Mod meet assessment requirements with a switch, LED and resistor? Do I need to make a board that can control the LED with a MCU? If I so I will need to design a new board :(

Archive

Eagle CAD on Linux

I got the following error after trying to run Eagle:

~/Apps/eagle-9.5.2$ ./eagle run<

Resulted in:
./eagle: symbol lookup error: /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0: undefined symbol: xcb_dri3_get_supported_modifiers<

So I searched online for a solution and found: EAgle Forums: libGLX_mesa.so.0: undefined symbol: xcb_dri3_get_supported_modifiers
So I tried it:

~/Apps/eagle-9.5.2$ rm libxcb-dri3.so.0<

It worked and EAGLE launched! Thanks angelblizard! However the licensing nature of installing Autodesk products and the requirement of an account is bull****. I am now using KiCad as my main electronics design software.

Notes

I was a bit freaked out by this weeks assignment, I haven’t done any electronics CAD design before except for modifying existing eagle designs. Oddly I have fabricated a milled 555 timer circuit for a circuit bending workshop led by Patrick McCarthy back in 2011. Our 555 timer circuit was designed and fabbed hacker style skipping eagle or other circuit design software completely by using the following steps:

  1. Hand draw circuit based on point to point wiring of 555 timer circuit used in previous circuit bending workshops
  2. 3D modeling this circuit in SolidWorks (which allowed easy graphic customization)
  3. Exporting the 3D CAD file to a 3D DXF file
  4. Importing the 3D DXF file into Modela MDX-20 carving software (on Windows XP or 7?)
  5. Milling the circuit on the Modela as if it were a regular milling job.
  6. Milling a total of 20x boards for our Circuit Bending workshops.

Fast forward 9 years later and my goals for Electronics Design in our Fab Lab is motivated by:

  1. Open source software design and fabrication process flow
  2. Easy 1st and 2nd electronics design experience for students who have just learned Tinkercad
  3. Simplify the design process, but still learn concepts for advanced electronics cad (Kicad or eagle cad)
  4. Make the process of milling a board easy (X-Carve or MDX-20)
  5. Keep the design to fab time 1 hour max (with support from fab lab staff for the 1st board yellow belt level)
  6. Keep the design to fab time for second board to 2 hrs max (orange or green)

Could I use some of the techniques above for this weeks work? It has always seemed over kill to use eagle to make single sided circuit boards. I do think that milling circuit boards is pretty fun, but the design process and electronics design software has been a steep learning curve for me and may be for my students. This week I want to explore how to scaffold learning of electronics design. I would prefer to go from hand drawn sketches to a milled board in way that still allows students to learn the concepts needed for more advanced electronics design later.

Looking at 2019 Fab Academy students work revealed that others have followed similar processes. I found the following student pages the most informative via the google custom search on Neil Gershenfeld’s The Fab Academy site

  1. Diego Santa: Cruz Electronics Design
  2. Samiul Hoque: Electronics Design

Eagle CAD Tutorial 3. 2019 Eagle CAD Tutorial

Back to Home Page