Logo academy

Inter[FACE]'s Electronics

Fab Academy 2017 at Fab Lab Barcelona By Trinidad Gomez Machuca

ELECTRONICS

When i was doing my input device assignment... I fail, but i've learned a lot about the properties of the microcontrollers. First before to choose a microcontroler, you have to know how many data you will store. In the input assignment i choosed to do a touchpad, for this you have to use capacitive senros. I you want to progam it in Arduino you will need to install the capacitive sensor library, this is the only way you can see if your sensors are giving you back in the serial port. But in the example that i was following they use a attiny44 microncontroller, a library and the code it was too much information for this attiny. So at the end i have to follow the same squematic but with other attiny. I followed Attinny44 datasheet, Attinny85 datasheet, and so many until i found the right one. For the time i want to pass directly to applied the capacitive sensor in my final board, with i will use a atmega32uf, the best one for doing a lot of task, at the beginning i wanted to used only for capacitive sensors but i realized that is a very powerful microcontroller that it will be a waste if you only used for this.

This is one of the reasons that i did all my circuit in the Arduino Board first, so i can know how many bytes i need to run all my code. You can know this information when you compile your code in Arduino, at the end it shows how many bytes you are using, so depending on this, you can choose a micro controller.

Werable

And here you can see how many bytes this microcontrollers can store, in the RAM bytes.

Werable

So before to start doing my own board for my final project i decided to do it first in the Arduino mega, So i can understand for complete how everything is connected and the also i want to understand all the code. I did not know a lot of things, like how the relays works, how to connect a nicrome wire, how to put capacitive sensors in the Arduinodirectly, etc. so it was good to do this because now I know and I think is very easy to do it, so I hope i can do it in my final board. After i finished to connect everything, I made this Fritzing/Illustrator diagram.

Fritzing

Components

For starting to design your schematic design of your microcontroller in Eagle, you need this kind of data sheet where you can see the pins and change it when you pass everything to your own board. The number of the pins always change from the arduino board to the other microcontrollers. For example if in your Arduino code and board your are using the A1, if you are using a attinny44 you should look the pin number equivalent. As you can see in this diagram, it shows the equivalent pins in Arduino.

Werable fritzing

Eagle and Fabrication

1- Here is the ATMEGA32u4

2- Here is the switch for the reset

3- Capacitors

4-Here is the system for the usb programmer

5- Here is the capacitive sensors for the pins

6-Here is for the external energy, I didn't add a voltage regulator, so here can only be 5 v, if you connect more energy, the ATMEGA can be burn.

7- Here is for connecting digital and analog pins.

8- Here is the AVRISP programmer

9- More digital pins

Schematic

Here you can see in the board how a order my components in Eagle.

Board

Here are my png files for the modella machine, The first one is going to be for to the 1/34 drill that is for traces, and the 0.01 is for the details that the ATMEGA34u2 need. First one the colors are invert, background should be black. The second one is for the holes, this one has the correct colors.

Traces holes

Here I'm using Fab modules for converting the files in c code. So here you can see how the machine is going to follow the path with the different drill bits. Here is very important to make the details with the 0.01 drill bits other wise you will have problems when you solder the Atmega because the 1/64 can not do the tiny details, the only thing that you have to do is use the same file for traces but change the settings in the Fab modules.

Traces Detail Holes

Here is the board milled, so now i will start soldering.

Milled

FAILS

Three weeks before the finals, I was trying to fabricate the Arduino Leonardo, the first one worked the milling, but not when I solder it, I couldn't do the bootloader in the Arduino, so i did it 4 more times and always something happened, the traces too thin, some were broken, or the last one it was a perfect one until it finish the holes, it went back to the start point but the drill didn't go up, so it broken all that ii was in its way, I lost one week just trying to milling, so I hope my board works in the last week of the academy.

FAILS

For the components i will need:

8 Capacitor .1 uF

2 Capacitor 18 pF

2 Leds

2 Resistor 22 ohms

2 Resistor 499 ohms

1 Resistor 10K

1 Resistor 680

4 Resistor 1M

2 Female Pin header 8x1

Crystal 16 Mhz

1 ATMEGA32u4

1 Switch

1 Female pin header 5x1

1 Male Pin Header 2x2

Componentes

A lot of people told me that soldering the ATMEGA would be difficult but for me it wasn't so complicated, I mean it was, but i had worst problems that this. When i sent my detail file, I did a wrong file and it did the details but it cut the traces that connect with the pins of the ATMEGA , so it was more difficult to do the bridges that connect again the traces than soldering the pins.

Atmega

Here is everything soldered

mi arduino

Here I'm trying to programme my board with the AVR ISP and it seems everything its ok because the light is green when i connected it

verde

Even Though the light was green, when i tried to program it in Arduino, it appears an error all the time with the clock. I researched on internet how to solve the problem but it seems it is something wrong with the programmer, the ATMEGA32u4 is not compatible with the AVR ISP. I ask to my classmates and some of them have the same problem, and they toldme they solved it only changing the AVR with the USBTiny programmer that we did before.

verde

Programming

I found this diagram in other fab academy page, where you can see the number of the pins, So now i can convert the number of the pins that I'm using now from the Arduino Mega to the pins of the atmega32u4.

Atmega

Here i could do the burnloader with the USB Tiny

verde verde verde verde

At the beginning if i want to upload a program in my Arduino Leonardo, i had to have connect the USB TINY every time i want to run a different code. Like this.

verde

Because if i disconnect the USB tiny it was impossible to upload the code, but one day before the final presentation, One of my tutors told me that this could happen because my soldering is not good in the USB component, so fix this and now it works perfectly but its own.

verde

First i programmed a LED, then my servo valve, and finally all my program for my final project.

verde

Mask working with Arduino Leonardo

SOFTWARE USED

Eagle

Photoshop

DOWNLOAD

Eagle Files


Fab Academy 2017 Fab Lab Barcelona Trinidad A. Gomez Machuca
IAAC trinidad.gomez@iaac.net