Week 7 - Electronics design

Week 7 - Electronics design

home

Group assignment assignment

use the test equipment in your lab to observe the operation of a microcontroller circuit board. This includes oscilliscope (look at the signals), signal generator (), multimeter (measure voltages to check that the supply voltage is correct), bench power supply (to set the voltage and then dial up the current).

Here is a link to our lab's page which includes links to all our group assignments.

Assignment summary

what I achieved/learned this week:

Individual assignment for this week

redraw the echo hello-world board, add (at least) a button and LED (with current-limiting resistor) check the design rules, make it, and test it. Extra credit: simulate its operation extra credit: render it

To summarise the key aspects of electronics design I found:

It is worth showing this up front. I found this sparkfun page on pull-up resistors to be incredibly helpful. It took me a while to get my head around these, but this page explains everything very well including what they do, how they work and how to calculate their values. The take home messages are:

pinMode(5, INPUT_PULLUP); // Enable internal pull-up resistor on pin 5

pull-up resistors schematic from sparkfun site

I used Eagle to design my circuit (free download here, and after some initial frustrations found it to be ok, although to some extent I was flying blind, at each step not really knowing about the next. I found the tutorials by Sparkfun to be quite good in general - both for creating the schematic in Eagle, and for creating the board layout to be milled> but also for using test equipment (multimeters, power supplies, oscilliscopes, signal generators). They may not be the best, but their quick, consistent format makes for easy digestion. These videos are embedded a bit further below for reference.

Anyways, here is the original trace that we needed to create.

original traces on Neil's design for Hello World board

and here's how these pins relate to the Attiny chips.

and here are the original components on Neil's board.

components on Neil's board

Here is my early schematic in a Frame. There were a few problems with this. The connections at the C1 were not quite right, so I had to redo these. I found this out in the traces diagram where there were no connections! Also, I got the naming for J1 and J2 around the wrong way, so I needed to rename these. Also there was a connection missing from the J2, so I needed to redo that.

my early schematic

I struggled early to get the traces not to cross. In the end, I used a few 0 Ohm resistors, but that felt like cheating. I realise that you can use boards with multiple layers, but I didn't want to do that in the first instance.

I also used the default 10mil trace width which really is very small, so I updated these to 16mil all round. Here's the early crossover challenges shown with the old trace width (10mil).

early crossover issues

I used resistors that were too big, so I need to update these. Here's the original traces diagram with the polygon border which I then used to create 'copper ground pour' to fill the board with copper so it won't be milled later on.

polygon border and my traces

Here is the board with the copper fill too.

copper pour for ground

Then I adjusted the schematic to include some 0 Ohm resistors. I wasn't sure if the tracks would fit underneath the connectors, so I thought using 0 Ohm resistors was the best option.

my next schematic with 0 Ohm resistors

Then I found out that some of the components that I had selected from the library wen't compatible - then I actually found out about the fab library which was quite frustrating. I had to redo quite a few connections and this took a bit of time. Anyway, here's the updated schematic.

my next schematic some components updated

And the updated board design.

the latest design

Then I heard that printing a paper version of the PCB was a good idea to check that the scale was right using the chip to check. Here's the printout..it looks so small in real life!

checking the scale with a paper version before milling

Then I transferred the high res png file (1000 dpi) to Illustrator, using the EXPORT option as PNG, and making sure the MONOCHROME option was checked. Before I exported the image, I also turned off the display of the pad/signal names (options/misc). Then I cropped it in Illustrator, checked the size (sometimes the sizes aren't right), then I made an outline on a different layer and saved out the two layers (outline.png and outline.png - as outlined in our group milling tutorial. Then I uploaded the traces.png file to fabmodules.org and milled the board (making sure the scale was right and the image was inverted). Then I uploaded the outline.png and milled this (making sure I changed the tool diameter to 1mm).

checking with 4 offsets

Here's the board milling, it didn't take too long, perhaps 5 minutes?

the milling process

Here's the board as milled. It came out quite nicely, although there are some slivers that I'd like to design out in the next iteration.

the complete board milled and ready to go!

I am trying to be more organised with my soldering this time, so here are all the parts laid out ready to go. I need to check though, I think the 0 Ohm resistors in the lab 1R0 are actually 1Ohm resistors...I wonder if that is sufficiently low to be acceptable?

the components ready to be mounted

Ok, so ready to solder everything up.

and here it is soldered and ready to go! I used these white jumper leads as we only had 1R0 resistors, not real 0 Ohm resistors, so I thought I'd use these just in case and test them then do some calculations to see if the system would be sensitive enough to deal with the 1 Ohm resistor...that can come later.

so then I installed the arduino IDE and the library for the ATTiny boards. Then, allocating the board, processor and programmer to the correct chips (all in TOOLS menu), I then did BURN BOOTLEGGER to get things happening. It was a dissappointing end...there were errors.

So doing some debugging with Luiz, we realised that one of my 0 Ohm links wasn't there... I'd completely missed it! I had also connected the J1 ISP the wrong way on the programmer board. After connecting the last 0 ohm, it worked! Oh so happy!!!!

Then after redoing the 0 ohm resistors (doing them properly this time)

I managed to then integrate the PCB design in Eagle with a basic part in Fusion. First I checked the rectangular dimensions of the board I created in Illustrator in order to create the correct size envelope. I used a good tutorial to take me through step by step, here tis:

Latest files to download

traces.png

outline.png

eagle board

eagle schematic

Still some things to do though:

Here are those handy videos from Sparkfun I mentioned earlier. How to use a...

Multimeter

Benchtop power supply

Oscilloscope

Function or Signal generator

I did quite a bit of work to produce our group page showing how to generate the HelloWorld board in Eagle.

Here is a link to our lab's page which includes links to all our group assignments.

NOTES FOR MYSELF TO TIDY UP later... a good example watch video again!! describe what the components do and what they're used for (and symbol...USE EXAMPLE BASIC CIRCUITS TO DESCRIBE WHAT THE COMPONENTS ARE DOING: resistors: limit the flow of current. They are used to protect the circuit from high currents, e.g. current limiting resistor is a term often used. voltage: difference in potential. Analogies include capacitor: inductor: crystal resonator diode zener diode LED can blow LED with power supply (ie not with small battery with high internal resistance, but not with good power supply) transistor bipolar vs mosfets Mosfets are good up to a few hundred volts: we use these to switch power. note: RDS (resistance between drain and source), you want this to be very low. op amps: analogue amplifiers, used to amplify voltage or current or to filter. Microcontrollers now have that capacity built into them. Microcontrollers: 1. draw a schematic circuit to define what components are needed and how they are connected. Note that I will need a library of the parts before I get started. 2. draw position where they go on the board 3. route how the traces make the connections (can be done by hand or automatically called autorouting) 4. fabricate it on the mill design rules: - how skinny traces can be - how close they can be - number of layers needed the header is where we load the programme. capacitor is filter to clean up the power there's a lot of inductance in the board FTDI connector - RTS (or RTR)- ready to send CTS - Transmit pin Receive pin Resonator to tell time can pour a ground plane (to connect everything to ground) Can use Fusion for CAD and have this synchronised with Eagle circuit design software. Similar there's Solidworks PCB integration (Altium). I should try both packages, and another e.g. fritzing or other entry level version. There are programming languages for circuit design! e.g. verilog. how to good example of documentation: http://archive.fabacademy.org/archives/2016/fablabbcn2016/students/4/exercise06.html

Back to top