Electronics Design

Softwares Used

Lecture Notes (28/2/18)

Bigger wires take more current. Bigger resistors take more power. Capacitor creates relationship between voltage change and current. They are filters that block DC signas, store charge and edit timing. Rated by the voltage it can handle. Bigger capacitors are directional. Inductor is the opposite of capacitor. DC can co through, nothing else can, used to filter out high freq signals. Diode used to stop current flowing in both direction. Anode -> cathode - Current travels in aplhabetical order (a to c). A zener diode doesn't cunduct until you hit a certain voltage. It clips the voltage. LED (light emitting diode) is another kind of diode, again it is polar and therefore must be soldered in the correct way. The bar on a diode always displays the cathode. If you connect a large battery to an LED it will EXPLODE. don't just do this. current = voltage/resistance. A diode doesn't have resistance, it has a 'diode drop'. this means that the diode will pull all of the current from the supply. This is why you must add a resistor, it stops the diode from pulling all the current. Resistors are used to set the current going through a diode to stop it exploding and breaking the supply. Transistors are used to switch power supplies. Mosfet transistors are good in the 00's of volts. Regulators are placed with capacitors on either side, they regulate the current, but need more thsn their voltage to work properly. They are not good at handling current that is too high. Op Amps are analogue amplifiers which measure the differences between two voltages. You put them in circuits with feedback and you use them to regulate and multiply current, voltage etc. The microcontroller is a whole system of inputs and outputs that reacts to information you send to it. As you move to bigger circuits you have to think about power as it gives off heat, this could fry circuits powering things such as lights/sounds etc...

Octopart is a search engine for electronic components. There are loads of different variations on each specific one. Draw a schematic that states the components and then shows connections. Then export and place them on the space of the board. Then choose the route of the pcb trace. Can use a number of pcb layers in order to route different traces. TinkerCAD and Fritzing easy to use and get strted on but don't work with complex designs. Autodesk Eagle popular with makers and more complex. Lets you draw schematics and manage part librarys. Place parts on a pcb and then route the pcb traces. Eagle and Fusion work together, so you can model the board and place it within a 3D modelled object in Fusion. Fab.lbr is a library of the standard FabLab parts. KiCAD is an open source powerful tool for making very complex boards. It isn't that well integrated for going backwards if you make a mistake or want to re-design. Very powerful free tool.

Redraw and edit Neils board - Use a number of tools and the library of parts found on the MIT gitlab. Add a button and LED to pins pb2 and la7. button to ground on on pin, LED and resistor on other. Make sure traces not too close. Mill board, solder and test it. Load premade programme and make sure board talks to computer. We will then write programmes for the chip (in two weeks). l in group learn to use the voltmeter and oscilloscope, look at the internals of the board to understand what it's doing. Render board in 3D space in Fusion for extra credit. I will have to remake my programmer if I want to programme it with that one.

Equations

Design in Eagle

I have no previous experience in electronics design, so going into this week I felt quite daunted by the learning curve I faced. Lucky, as a lab, we worked on creating a group document of how to redesign the board, on this page I will state exactly what I did. The group documentation, which details components needed for the board and a lot of the torubleshooting involved, can be found here. The task for this week was to re-design Neil's Hello-World board, encorporating an LED and a switch so that we could see it communicating with a computer. As an LED is being added, so must an appropriate resistor, to stop the diode from drawing too much power.

I began by downloading Eagle and creating a new project by right clicking in the list on the home page. I made sure this was activated and then reated a new schematic and board within that project, naming each one Hello-World. I then addded the component libraries I would need for the board including theFab library (fab.lbr) and a number of librarys from Sparkfun. I had to download the fab.lbr from the MIT GitLab, to do this I just pated out the code into brackets and set the extension to .lbr, saving it in my folder for this week. I then had to tell Eagle where the library was located in my file system. The Sparkfun libraries I used (Aesthetics and connectors) were already included in Eagle's list of available libraries and I just had to set them to In Use. Sparkfun is a great site for begginners-intermediate tutorials on electronics which I used a lot this week. The one linked is a basic on how to design schematics in Eagle, however I also used tutorials that very eloquently explained the function of different components. You should be able to find them by seaching the Sparkfun site.

In order to add libraries in Eagle, you type the command add into the bar at the top of the page when in schematic view. This will open a dialogue box with a search bar that lists various components. From here you press the Open Library Manager button, after downloading the libraries they should appear in the available tab. All you then need to do is select them and press use. The component parts should then appear when you search for them within the add tool. After working out the search function of Eagle the first thing I did was to add a frame from the Sparkfun Aesthetics library, this is good practice for organisation of a project. I then added all the components I would need to build my board. I then used Neil's board as a guide for the paths that needed to be drawn between components in order for current to flow through the circuit in the correct way. I connected and double cheacked the order of my components based on Neil's board using the Net tool. This tool seems to be better than Wire, according to the majority of tutorials I looked at, including the Sparkfun one I linked above. I then had the additional parts (LED, resistor and switch) that I needed to add left over. I chose to add these to two of the spare pins of the ATTiny, going straight from here to a ground trace.


The screen for searching and selecting components to add to a schematic. The search function isn't great but adding an asterisk to the start or end of a phrase will help.


Typing commands into the bar in Eagle is often faster than using the icons in the toolbar.


Added a frame and then inserted my name using the text tool. The rest of the information updates automatically. I placed all my components within the frame.


All the component parts for the circuit.


All the component parts connected using the net tool.


Once I got to this stage I realised I had forgotten to include a resistor for the switch. I therefore had to add one into my schematic view, before designing my traces. After doing this (as seen below), I moved on to organising the trace paths that would be present on the final board. In order to do this I had to create a 'board' file, this can be done simbly by clicking on the view switch icon in the top toolbar of Eagle. This stage proved to be a frustrating process, taking a long time to achieve a board which would work without any shorts. In order to do this I had to add a zero ohm resistor to bridge a trace between components . This can be a useful technique for achieving trace routing in a shorter amount of time. I also chose to route manually rather than with Eagle's autotrace tool. This is because it allows addition of components such as zero ohm resistors, and because the autotrace can sometimes produce boards that may not work when milled, whereas when doing it manually you can ensure that enough space is given for each trace.


The schematic after adding the resistor that I initially forgot.


The finished board design, with all the components connected, reasonable traces, the zero ohm resistor and everything packed into a space which will fit onto the material we have for milling.


The manual routing tool for traces in board view. This can be found in the side tool bar of Eagle and is often better to use than the auto-route tool as it gives you far more control over what happens.


The tool for removing traces when doing manual routing, this can also be found in the side tool bar in Eagle. I used this tool a lot to try to find the best configuration of traces.


The auto-route tool, again found in the side tool bar of board view. I did not use this tool as it allows for less control over routing. However if you do decide to use it it will WIPE ANY PREVIOUS ROUTING YOU HAVE DONE. So be careful and read the dialogue boxes it presents after clicking.


After I was happy with my routing (a few hours/days later) I made sure that the traces were a good width for milling. Mine were okay, but in order to edit this you must open up the ULP, select control change and then wire width. This then lets you set the width of the trace to be cut in mm. I chose 0.3. I then needed to export my file from Eagle. This is done by 'printing' it to a new .png file that can then be cropped and editied for input into fabmodules, which is where I will generate my .rml files for milling - as at the start of the Electronics Production week. Before exporting it I had to make sure that nothing was included in the board view other than the traces. To do this I went into Layer Settings and turned off all of them other than the top layer, leaving only this one highlighted.


Layer settings shown in the View menu of Eagle.


Make sure only the top layer is highlighted to ensure that the trace image exports correctly. This will make sure that the component labels you see above are not exported with the traces.


The traces exported as a .png file, ready for editing in Illustrator and Photoshop.


The next thing I had to do was to edit the file to make th traces white and the background black. I also needed to add a white square fairly close to the outside of the traces in as an outline for the machine to mill out of the larger material. To do this I imported the file to Photoshop, first removing the text at the bottom, and then used the black and white tool under the ... menu to turn the traces black, making sure I removed all colour values when doing so. I then inverted the image by prresseing cmd-i. After this I added a black background to the layer. I then created a new layer, made the background black and then created a white rectangle just large enough to fit around the edges of my traces. However, photoshop created a low res file as we are working at a reletively small physical size, to counteract this I had to up the export resolution of the image, however this made it far to large for the milling machine, let alone the components. To fix this I opened up Illustrator, imported both images exported form each photoshop layer and then also opened the original png. I drew a white square around the ATTiny on the original image and then copied and pasted it to the larger one. I then scaled the larger, black and white, image until the square fit exactly over the ATTiny chip on it. I then made sure to scale the square so that it matched. I then exportd from Illustrator as a correctly sized .png and went to fabmodules for conversion to .rml files. The method for this can be found in my Electronics Production weekly documentation

Milling and Soldering the Board

Instructions for zeroing the milling machine and preparing the correct tool can be found in my Electronics Production weekly documentation. This is the first thing you should do before attempting to mill anything. Once you have finished doing this, ensure that the material you are milling is large enough for your board to be milled from, open up Rolnd VPanel and inout your .rml file - do the trace first and then the outline as you may want to adhust it's size depending on the amount of room you have around the trace. After it has finished milling the traces you will need to change to tool one to mill the outline. Instructions and screenshots for the process involved can again be found here. Once finished clean the board and then start to rmove excess copper with a scalpel, this wil minimise the risk of shorting. After this you can start to solder components onto the board.


The board straight after milling.


Removing Excess copper form the board with a scalpal. When doing this you must be careful not to remove or break any traces that you do need.


The board after all of the excess copper was removed.


All the components I needed stuck next to thier names and values using double sided tape. This was it is harder to get confused about what's what!


When doing surface mount soldering it is easier to first add some solder to one of the pads and then melt it to add the first connection to a component.


Then correctly place the component on the board and add the second connection to fasten it down and continue the circuit.


My finished board with all components soldered on!


After finishing the board the next thing to do will be to programme it and get it communicating with a computer. This will be done in the Embedded Programming week.

Files