Fab Academy 2017 at Fab Lab Barcelona By Trinidad Gomez Machuca
Demonstrate workflows used in circuit board design and fabrication.
Implement and interpret programming protocols.
For this assignment I want to learn how to do a touchpad, I would like to explore how this sensors works because for my final project i want to integrate this to trigger some of my outputs with this logic. The capacitive sensors works like this, the resistors plays as a components that measure the conductive amount of a object that has the properties that is conductive, in this case our body plays as a ground so allow to close the circuit.
Example of a Touchpad
First I want to do a Touchpad, So I followed the project from Matt Blackshaw, so I did all the proces for making my board in the modela.
After adding all the components I started doing the board design
My final board design with some problems
I check everything is ok with the DRC
I exported to EPS to keep the real scale
And finally I did my Traces and Outlines
I prepared the two files in the Fab Modules with the correct settings
Milling my board in the modela machine
For this board i needed the following components
COMPONENTS
Attiny 44
1 Capacitors 1uf
8 Resistors 1M
1 Resistor 10k
3 Four Pin Header
1 Six Pin Header
1 Six Pin Header
Here I started the soldering part
I had the same problem of Matt Blackshaw so i fixed like him, with two horribles wires, but it worked perfectly.
As I said before I followed the Matt Blackshaw`s Touchpad files and when i started to programed, it appears some errors
As you can see it doesn't have the .MAKE extension
I was trying to program my microcontroler but it never worked so I decided to open that file with the help of my tutor Arnau. He explained me how a make file works, so we read it and we realized that besides the problem with the extention, the information was wrong, this code was for a Attiny 45 and also it was set that this microcontroler was going to be programed with the AVRISP
I followed the loading Step Response
I changed the information type of the microcontroller for the Attiny44 and the AVRISP and also I have changed extension
After fixing this now it worked!!!!
Thank you Arnau!!!!for the help in in this step of the process
For my final project i'm trying to do a mask, i want to active it with the touch pad. I divided it in 8 parts(every part is an input) so everytime you touch one part, you can see in the computer the one that you touched and besides you can trigger a servomor or a LED, etc.
The touch pad from the Example of Matt Blackshaw with 8 inputs
Circuit in the vinyl cutter
After pass through the all the process of design and fabrication the touchpad, I wasn't able to make it work. My tutor Xavi was traying to help me but we never make it work with the code from the example and for me was very complicated to undestand it because the code was in java, and I only know Arduino code. I was researching how to visualize the data in Arduino and the common process is installing the capacitive sensor library, plus the library of Serial port, I tried to do this but after i read the data sheet of the Attiny 44, this was too much information for a small microprocessor, So at the end I decided to integrate in my final electronics, in this case I will use the Arduino Leonardo, In this board I'm pretty sure it will work because I'm gonna use a very powerful microprocessor, the ATMEGA32u4. Wish me luck!. Until I finish, I let this video here, where you can see I've programed in Arduino and processing.
Here you can see in the Code how I added a library of capacitive sensors, then i defined wich digital pins will be receivers and senders from my Arduino Leonardo, then I stored in a variable because after i need to compare the information that is reading from this sensors in real time and then if the sentence is true i want to trigger something.
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.
And here you can see how many bytes this microcontrollers can store, in the RAM bytes.
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.
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.
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
Here you can see in the board how a order my components in Eagle.
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.
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.
Here is the board milled, so now i will start soldering.
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.
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
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.
Here is everything soldered
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
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.
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.
Here i could do the burnloader with the USB Tiny
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.
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.
First i programmed a LED, then my servo valve, and finally all my program for my final project.
Mask working with Arduino Leonardo
//Eagle
//Terminal
//Illustrator
//Photoshop
Fab Academy 2017 | Fab Lab Barcelona | Trinidad A. Gomez Machuca |
IAAC | trinidad.gomez@iaac.net | |