Menu

Week 7

Electronic design

Everything is about electricity

You have on one side a electric source and on the other side a circut where you allow, on your conditions, the electricity go in your wire and do chain reaction with your component. With the pulse of it you can transform waves in a language that you will communicate with it. As you can see, I am not a expert on this field but a extreme newbee. Electronic is still magical for me and I have difficulties to understand what are these chains reactions. Here is the group assigment of this week by Francis.Thanks to him, these waves are more logical now. I read also a more on the bits and the relation ship between the up and down waves and the informations that is sending. The oscioscope it's one way to find the problem source on a board that react not has usual. This tool is similar to a stethoscope, but it's for electronic.

Creating a board from Scratch

Fab Academy suggests to create a Hello board. It's basically a little brain (Attiny 44) that can be programmable and talk to you. They give an image of how it can be connected and the part we will use. On that, you have to add at minimum a led and a swith.

Original board

The component you will need

This week we need to:

  1. Draw a schematic on Eagle
  2. Generate a board on it
  3. Create de board like in the week 5
  4. Program it and test it
Like you can see in Francis web site, we have to respect some design rules to create a PCB. First, I did some simple tutorial to understand better the use of the resistance, the capacitor, the microcontroler and the dynamic of a circut. Electronic pirate teachable and SparkFun.
Second, I did some simple tutorials to understand better Eagle and how to work with it.
  1. In this sofware, the search tool of the library for the components is terrible, so you need to set it right and know were to look at.
  2. The schematic can go quickly messy. Instead, you can keep logic electric input and input sensor to the left, microcontroller in the center and ouput at the right. You can also put some labels on wire. If you have 2 same lables, they will be connected together.
  3. When you generate the board, you have to put your design rules of the circut. These design rules will reflect the capacity of your cnc machine and tools. The rooting will be made in fonction of these rules.
  4. Autodesk Eagle tutorial

How to

1-Design a board

  1. Create a new project file in your Eagle repertory
  2. Create a new schematic in your project from the eagle interface.
  3. Download the FAB library for Eagle on the FabAcademy site
  4. Open your library management and add your library
  5. Add your electric components in your drawing by writting add in your command line
  6. Net them. (The fonction Net create connection between the components)
  7. Name or label them (creating label allow you to connect virtually net.
  8. Attribute some value to your component (we will not forgot the resistor value, or the capacitance. It will add automatically this value to your bill of material.
  9. To add a new component that you don't know, you can refere to the site Sparkfun. The vulgarisation is incredible.
  10. Here is a very useful tips: document well the schematic so you can minimize the errors, your BOM will be clearer and the hole process will be faster.
    During that part, I heard about the pull-up resistor and the pull down-resistor. After few researchs, it's sparkfun who vulgarise the best. A pull-up resistance is a pin connectec to the VCC passing true a resistance. We can than read a high state from the pin because a small amount of electricity pass true. I application it's often use with switchs. So when the MCU pin is connected to the resistance (who leads to the ground) and also to the switch (who leads to the ground if press). If the switch is press the VCC go directly to ground and it read a low state. If the resistance was not there, the vcc would have touch the ground and would short.
    I also add my led and my switch in the same way we do on a breadboard and it was not linked to the microcontroler. I connect the button just before the LED in a linear way. But then how do you program the button and the LED...oops. I changed it has Sparkfun suggest with the resistance.

Create a new schematic

Add a component

Search your component in your library

Attribute a name to the component

To export the BOM from the schematic your can click on this icon

Click on Export Bill Of Material

Here is the BOM in a .txt

Here is the LED and buttom connection

Here is the final schematic for the hello board.

3-Generate a board

  1. Place your components in the best orientation for the route.
  2. Insert your design rules for the route in DRC fonction
  3. Generate automaticaly your route with the fonction autorouter (in hight effort it generate 16 path, if you don't have a success at 100% you can run in again or move a part.
  4. When all the routing is done, change your layer for Dimension and trace your outline. It will try to snap to the grid, if you don't want you can press alt at the same time
When it's done you can click on CAM processor and take your Gerber file. This part is all documented in the week 5 because I went into this process in this week.

Generate de board

Put your design rules for your routing

Autorouter

Create your outline on your Dimension layer

Generate your gerber file

3-Mil the board and solder it

See week 5 it's all documented. Here are some other tip that I found useful.

  1. I take a little piece of double side tape and fix lightly my board to a surface.
  2. I prefer to have a very good lightning on my working surface. I have a desk light on top that you don't see plus a microscope that creates a spot light directly on the top of my board.
  3. I am a right handed so my soldering iron is at my right and the machine link to it is further at the right. I found it easier to manage the wire and minimise my chance to burn that same wire.
  4. I put the fan as close as I can because I found it not power full enough to take all the smoke generated.
  5. I change often the direction of my pcb to be easier for the direction of the soldered iron.
  6. I put flux...everywhere..in good amount...Flux is my new best friend.

Board finish milling

Ready to soldered, this is my set up.

Soldered the board. I prefer doing pads and put the component after.

When is finish, check your connection to to see if everything is fine

Wash the board with isopropyl alcohol to take off the rest of the flux.

Connect your board with a programmer. To verify if your connecter is in the right side, verify the both ground of your ATtiny 44 it should connect.

Connect both circut in your usb port

4-Test it

It's pretty similar to the week 5 but a little bit different.

  1. I download the code from the Fabacademy's site assignement, and I open a terminal in my firmware file
  2. Write Make, it creates your .outand .hexfile
  3. The Makefile from the Fabacademy's site is for all programmer but lucky me, my collegue Philippe come from that field and had already modifiy the MakerFile. I understand much more now the construction of this kind of file. I downloaded the Makerfile of Philippe and you can see the structure of a good MakerFile.
  4. You need to modify that Makerfile with the good name of your programmer. For that, write avrdude -c zzzin your terminal and find your valid name for your programmer.
  5. Replace in the Makerfile the name of your programmer. mine is usbtiny
  6. In your terminal write make fusesand make program
  7. It's the end of the programmating. Go in the IDE Arduino and click on the loop at the right of your screen to see the data.
  8. Make sure you are at the good speed (115 200 baud)
  9. Write a letter

Write Make to create a .out and a .hex file

Makerfile to change

What is the name of your programmer

Write the name of your programmer here

Make fuses

Make program

In IDE Arduino

The moral of this story

When you have a problem, you need to isolate items to understand what's happenning. In electronic, if you don't know not much like me, you will not see the problem because you don't exactly understand all the process. Working by eliminatation and comparison you can be more critical and help you to ask yourself the right question. If you are lost somewhere, there are many experts all around you (and the world) to help you understand. I am the kind of person who needs to understand everything before doing something, but it's not possible in electronic and in this kind of program. You have to ask the right question and be curious but in the sametime, you need to let it go and concentrate on the problem zone. To notice the problem zone, going by elimination or comparision is my way to process for now and I found it very useful. What a week!!! I was realy proud of myself! Files

Contact

Annie Ferlatte

ferlatte.annie@gmail.com
Montreal, QC, Canada