Christos Tzamos

How to Make [Almost] Anything

 Final Final Project: Self Checkout Machine  W1 Week 1: Project Proposal  W2 Week 2: Press-fit Construction  W3 Week 3: PCB Design  W4 Week 4: 3D Printing and Scanning  W5 Week 5: Make Something Big  W6 Week 6: Electronics Design  W7 Week 7: Molding and Casting  W8 Week 8: Embedded Programming  W9 Week 9: Composites  W10 Week 10: Input Devices  W11 Week 11: Output Devices  W12 Week 12: Networking

Final Project: Self Checkout Machine

- Idea

As a final project, I want to build a machine similar to the DVD checkout machines but for larger items. The motivation behind this is to have a machine that will automate the checkout process of items at my dorm.

This is a first prototype and it is my first time building something with mechanical components in it. While most of the key parts are there, the machine is far from useable in practice because of security issues. The most important missing part is a locking mechanism to prevent the door from opening while the machine is working. Also, the parts should be made from metal to make them more secure against misuse (people kicking the machine to get what they want, see https://www.youtube.com/watch?v=VBXxmISAMA8).

- Machine Design

The machine works by using a rotating tray, that brings the selected item in the front opening while keeping the rest inaccessible. The machine uses an rfid scanner for user authentication and brings him his associated locker. The rotating tray design is similar to the design of my rotating bookcase.

The machine uses a stepper motor to move the tray by a fixed number of steps to bring it in the right position. I originally wanted to place the motor in the middle of the machine and rotate the tray directly but I was afraid that the forces might not be enough to rotate it if the tray becomes very heavy. So I placed my stepper motor in my design in the side, so that I can get a larger gear ratio and gain power while losing some speed. However, for this I would need to design a gearing mechanism and that seemed like a nice challenge.

I designed the outer shell to be eptagonal so that it aligns with the compartment dividers making the other compartments inaccessible when one compartment is in front. There is an opening in the front to remove the items and a side panel where the motor and the rfid scanner is placed.

The machine is designed to be laser cut from 1/8 inch acrylic. I used a black acrylic for the sides of the outer shell and a transparent acrylic for the rest of the parts. I wanted to make the top transparent so that enough light gets into each compartment without the need of an additional lighting mechanism.

- Gearbox design & assembly

The problem with placing the motor on the side is that I needed to design the gearing mechanism. I wanted to laser cut my gears out of acrylic to simplify the process. I found a gear template online that computed exactly the shape of the gears given the number of their teeth and other parameters. This saved me a lot of thinking about how the gears should look like.

I used a 1:10 gear ratio having 6 teeth on the motor and 60 teeth on the tray. For each gear I glued two sheets of acrylic together for larger contact surface. This was needed to account for the variations in height due to the lazy suzan bearing.

I did the assembly using press fit and glueing pieces together.

- Electronics

For the electronics, I used a stepper motor I had already bought from ebay. Moreover, I used an rfid card reader that has the mifare chip rc522. This communicates via spi with the microcontroller. I milled a board for power supply and a board to control the rfid card reader and the motor.

- Bill of Materials

The most expensive parts were the acrylic sheets for the laser cutter. I used a 24x36 inch transparent acrylic sheet and a black 12x24 inch. I bought both of them from amazon.

- The result

Week 1: Project Proposal

- Motivation

As a president of the Westgate dorm, one issue that we face many times is how to distribute items among the residents and control who has what. We have many items like books, movies, video games, board games and so on, that we want to make them freely available to the residents to enjoy. However, we always get stuck in logistics since there is not an easy way to know who has what.

If we leave it freely available we risk falling into the tragedy of the commons situation where people selfishly take items they like and never return them. The way we currently deal with the issue is we give items to the front desk and people can check them out but this whole process requires a lot of effort and human labor. The ideal solution would be to have an automated system where people can check out the items they want anytime.

Motivated by this problem, I would like to create a machine that allows people to check out any of the available items automatically and keeps track of all information regarding who has what item.

- Implementation Details

One easy way to implement this system is to have a circular tray with items that are divided into different compartments and a servo motor that brings the appropriate compartment in front for pick up. There can be many trays stacked on top of each other using the same servo motor but different pick up locations.

Week 2: Press-fit Construction

- The idea

For this week's assignment, I wanted to create something that would have been really hard to construct by hand-cutting the carton so that the laser cutter can show its best. My first thought was a sphere since it is something that requires high accuracy and precision (it's really hard for me to draw a nice looking circle by hand so I would imagine a sphere would be almost impossible).

I thought about how to make a sphere using 2d surfaces and came up with quite a few solutions but were not really satisfying since I wanted my sphere to have an outer surface so that I can draw on it whatever I want. For that reason, I chose to create something that can be made from 2d parts and approximates well the sphere, a truncated icosahedron.

- Laser cutting the parts

Choosing to make a truncated icosahedron made the design part quite straightforward. I only needed to create a pentagon, a hexagon and two circles with different angles for hexagon to pentagon (6-5) joints and 6-6 joints. I chose to design the parts at solidworks which was totally new to me and being so simple made it quite appropriate as a starting task to get me familiar with the software.

Once I was done designing, I imported my sketch to Rhino which was already installed to the labs computer and connected to the laser cutter. I tried printing a sample piece to see if the gap in each piece is appropriate for press-fitting. It turned out that the gap of 3mm that I had computed prior to printing worked perfect and proceeded to print my actual design. I got really excited with the final result. Everything went well and the pieces were matching up perfectly.

The only issue I had was that some pieces were not cut all the way through. I looked at the carton and noticed that this was probably due to some slight curvature which was causing the laser beam to slightly get off focus at some points. However, I thought that I must have done something incorrectly since it is didn't seem that it should be so sensitive to such slight height changes.

Looking at the suggested settings for corrugated carton again, I realized that I should use 2 passes when printing and that did it. Next time I tried, I added an extra pass when it was finished cutting and then all pieces were perfectly cut. When I lifted up the sheet of carton everything stayed down! This was amazing.

- Assembling the parts

After printing enough parts of each kind, I started the assembly process. The pieces were fitting together perfectly and the small angle difference between the two different circular parts was barely noticeable. The pattern was straightforward to follow.

However, as I was getting deeper into the assembly process it started getting harder and harder as each piece had more and more neighboring pieces that were already placed making it difficult to fit an extra one. Especially for the last pentagon all five adjacent pieces were already placed which seemed to be impossible to be placed. Relaxing the pieces a bit did the trick and everything went to its place. It was great to finally see my design come to life. More than 100 pieces (20 hexagons + 12 pentagons + 90 joints) were sitting together in my truncated icosahedron ball!

- Spicing things up - Adding vinyl stickers

When I started this project, I really wanted to get to play with the vinyl cutter and create something that can combine both the laser cutter and the vinyl cutter. My original thought has been "Whouldn't it be great to have a truncated icosahedron earth ball?".

Now that I had my ball ready, it was time to start decorating it. I wanted to put stickers of all the continents on it to look like earth. But how could I create a projection onto a truncated icosahedron? It was time to use some coding and geometry!

I downloaded a shapefile that has the longitude and latitude of all the boundaries of all continents and did my math to project each path to each polygon and rotate them appropriately. The process was a bit cumbersome and buggy but in the end it worked out well.

I created an SVG with the projected paths and input them into the vinyl cutter using the fab modules that supports svg files. It cut all the paths with very high precision and then I had stickers for all the pieces I needed. At that point, I was left with a huge puzzle trying to see where everything fits, as well as a crafts project trying to put together all the different pieces and the many islands. But in the end, it was all worth it plus I improved my geography knowledge :)

Week 3: PCB Design

- The milling process

For this week's assignment, we were asked to create a programmer for avr microcontrollers. We were given some options for different board designs and we had to print our own PCB using the milling technique. Although the designs that didn't require soldering a miniUSB component appeared pretty cool at first sight, I decided to go with the standard board traces that were provided in the lecture. The main reason for that was that I had already seen the same design in the lab tutorial and I was well aware of the challenges for that particular board. Moreover, it seems that the flexibility of having a USB cable might come in handy when the time comes to program a new board.

The milling process was quite straightforward. I uploaded the design in the fab modules and imported the configuration for the traces and the interior. For the traces I used the 1/64'' end mill while for the interior the 1/32'' to cut completely through the board.

- Soldering the components

After I was done cutting the board, it was time to start soldering the components. I began by soldering the attiny44a first and then the mini USB port since those are the most difficult pieces to solder correctly. It is a good idea to start with those in case something goes wrong and you need a new board. Luckily things turned out great and I was able to solder everything properly.

The whole process took several attempts since I didn't have a lot of experience soldering and I needed some time before I get the hang of it. The most helpful thing for me was to have the board steady at all times while I was soldering. Moreover, I realized that you really have to heat the surface you want to solder before applying the solder. Otherwise you end up with small balls of solder that jump over your board and don't stick. Finally, the USB board was the most tricky one since the connections are so close to each other. I ended up applying solder to all the pins and then spent half an hour trying to remove it so that pins don't touch.

- Programming the board

To test that the board was soldered correctly, I looked at it really carefully to locate any shorts and then I tested all the connections with the multimeter. I tried to program the board but the other programmer was not detecting my board properly. Reading through the instructions more carefully I realized that my board should be connected to the USB to be able to program since the programmer doesn't power the board directly.

After plugging in the board to the usb to power it up, I followed the "make hex, sudo make fuse, sudo make program" approach and the board was programed properly. Luckily, I didn't run into any other issues while programming. A resource I found very useful for all the programming steps and debugging the board is the tutorial on assembling and programming the fabISP which explains the whole process.

Lesson learned: Don't get super excited and forget to take more photos!

Week 4: 3D Printing and Scanning

- 3D scanning

For the scanning part of this week assignment, I decided to 3d-scan a small rubber duck. It is a nice curvy universally recognizable object and thought it would be cool if I could manage to make a 3d model of it.

I used the Sense 3d scanner which gave me a quite accurate representation after several attempts. The Sense scanner is quite unstable and many times confuses the background and the foreground. It also depends a lot on the lightning of the object which made it quite tricky to get it to work correctly.

Even though the sense scanner seems really impressive that it can capture a 3d model from arbitrary pictures, I was toying with the idea of having a more controlled environment when 3d scanning in a hope to have even more precise results. That is why I thought of creating my own 3d scanner out of a simple camera.

I wondered if it would be possible to create a full 3d model just from orthogonal projections into known planes without using any color information. The set up is as follows: the item to be scanned is placed on top of a base that rotates around the z-axis in fixed increments using a stepper motor. A camera takes photos from far enough to approximate orthogonal projections.

After all the photos are taken they are processed so that the background is separated from the foreground. The goal is to reconstruct the surface using only this information.

My idea is to use Solidworks where I can start from a cylinder and subtract solid parts so that the projections in each plane is the same as computed. This approach seemed a bit complicated since I would have to parse each projection as a curve and import it at Solidworks. Another approach would be to write my own code and work on each z-plane separately to reconstruct the polygons that match the projections and then obtain the 3d solid. Unfortunately due to time constraints I was not able to complete my 3d scanner this week but I am really interested to continue this idea and see what results I can achieve.

- 3d printing

For the 3d printing assignment, we had to create something that cannot be made subtractively. I wanted to make some complicated and interesting curve and then it hit me. What is more complicated complicated than a knot?

I started modeling different kind of knots using inkscape and solidworks. The process was the following:

  • Find an image of the knot and import it on inkscape.
  • Digitize the knot's curve by adding a polyline and noting the key points.
  • Export the (x,y) coordinates of the polyline to a file and add the z-dimension according to whether the curve goes up or down at a given point.

After having all the important points of the knot, I imported them to Solidworks using the create curve from XYZ option. To create a solid from a curve and give it a rope feeling I used 3 circles and swept them along the curve.

I printed my designs using the Makerbot printer. Printing was quite fast since the knots are not very tall in the z-direction and don't require a lot of material to print. My only issue was with the support material. It was quite hard to break off and the real parts of the knot were quite thin and fragile which made them break at some points as I was cleaning them up and had to glue them together. Here is the final result including the famous "Trucker's Hitch"!

Week 5: Make Something Big

- The idea

For this week's assignment, we had to make something big. I thought about making a custom furniture that fits my needs and I decided to make a rotating bookcase. It is a very useful piece of furniture for places like the corner of my desk that is hard to reach. It will make everything on my desk much more accessible!

For this task, I wanted to use a bearing that will make my bookcase rotate. I searched online and I found one called "lazy suzan bearing" that did exactly what I wanted. It was available at my local home depot so I drove there and bought it. I also bought some pieces of plywood to make my bookcase look nicer and be less rough.

- The design

I designed all the parts of my bookcase as plane sketches in an assembled view so that I can see how everything fits together. Once I was satisfied with what I had, I needed to lay down all the designs flat and import them to Rhino so that I can go ahead and mill them. To do that I created a solidworks drawing where I pasted all the different curves of my design and then exported as dxf. This process was manual, I am not sure whether there is a direct way to do this at solidworks but luckily it didn't take too long.

Once I had my design ready, I set up a meeting with David Costanza (one of the TAs) to help me cut my design using mastercam on the Onsrud router. We created all the paths properly and started cutting. Unfortunately near the end of the process, the router lifted my plywood board and made a complete mess so I had to stop the process. The reason for that was that my piece of plywood was very thin and light and had slightly curved from the process of carrying it from the store and putting it in the car. This was not an issue at the beginning since the air pressure of the pump was very high and was holding the pieces down but once the board was cut in many pieces the air pressure dropped significantly which led to the pieces flying around.

- Cutting the OSB

With my plywood board destroyed, I decided to use my OSB board instead. For that however I had to update the design with the thickness of the new board. Luckily, with the help of David, I was able to do that very quickly and send my final design for cutting.

This time everything run smoothly and I got all my pieces cut properly. The whole process used 5 passes over all. The first two passes were used for cutting the interior (one rough and one for finer details). The next two passes were used for cutting the exterior (one rough and one for finer details). However the rough pass the second time didn't go all the way through. This was to keep all the pieces together and so that the pump pressure stays high during the whole time. The final pass is rough cut of the outline that is used to completely separate pieces from the rest of the board. With all the pieces cut, it was time to assemble everything.

- Assembling the bookcase

Assembling the bookcase was a quite straightforward pressfit process. However, although, I had computed the thickness of the board pretty accurately, the assembly was quite painful since the pieces were hard to push and I turned to using the hammer for pushing some of them. I think that leaving some extra gaps in the design would make the whole process much easier.

Finally for placing the bearing, I decided to not use screws since I read that screws don't work well with the OSB board and because I would have to screw it in both sides which would be extremely hard. So instead I finally decided to glue the bearing on both sides. I used a Gorilla glue which appeared to be very strong from the reviews I read online. It seems to hold the pieces very strongly.

After finishing the assembly, I was very excited to have my first custom furniture. I loaded it up with my books and placed it in my hard to reach corner of my desk. You can see it rotating below in its full usefulness.

- Rotating the bookcase

Week 6: Electronics Design

- The idea

For this week's assignment, we had to redraw the hello world board to add a button and an led. I didn't want to use those surface mount buttons in the pcb as they are quite small and hard to press! So instead I decided to use the buttons from an SNES game controller I had lying around since those buttons are designed to be very convenient.

The next natural thought that came to my mind was why not make an actual game controller since I am already using those buttons anyway. All I need is a TFT display and I am all set. I had already purchased a pretty cheap 2.2'' color display from eBay which would be ideal for this project.

- The design

The buttons of the SNES consist of 3 parts. One part is just copper on the board. One part is a rubber with a conductive material at the bottom that when is pressed makes a short in the circuit allowing current to flow so the controller can know it is pressed. And the last part is the hard plastic button that makes it much more convenient to push instead of pushing the rubber directly.

I drew my PCB board on eagle after many iterations familiarizing myself with it. I wanted to use 8 buttons (the directional buttons plus extra four) but the attiny44 wouldn't have enough pins to connect them in. The solution was to have a shift register to convert parallel to serial so that I can only use 1 pin. I didn't have time to order one such part so I instead used the one that was inside the controller which has internal pullups already.

The button design is really important. The right ones are designed so that there is a curly line between the two sides. This is to maximize the contact and make sure that the button registers whenever it is pressed. On the other hand, the same design cannot be used for the directional pad since the whole piece is a single plastic part which would make it for example register both right up and left whenever up is pressed. The chosen design is used by most controller to avoid exactly this problem.

- Milling and Stuffing the board

Once I was done with the design in eagle, I milled a board in the Rolland Modela and stuffed it using all the components. The process was very similar to week 3. The parts that were mostly different was desoldering the shift register and finding a way to connect the screen to the board.

To desolder the shift register I used the heat gun where I pointed to the SNES board and slowly pushed the part to come off. I made sure that the orientation matched my design and I soldered the part on my board.

For connecting the screen, I had to remove the old connector that it had and solder a new header that is parallel to the board. I also mounted the matching part in my board. The part for the board was surface mounted while the part for the screen was dipped in.

- Building an enclosure

The problem with the SNES buttons is that they are useless without something to hold them. For that reason, I decided to make an enclosure using acrylic sheets cut with the laser cutter.

I measured the dimensions of the buttons designed in solidworks different layers of acrylic that I can glue together to make the enclosure. For this I used 2 layers of 1/8'' acrylic plus one layer on 1/16'' acrylic. Those layers appeared to be perfect for the buttons and allowed them to move freely as in the original SNES enclosure. In the picture one of the successful attempts is shown where the parts are assembled and tested.

- Final Result

Week 7: Molding and Casting

- The idea

For this week's assignment, we had to make a mold out of silicon rubber (oomoo) and then cast an object that is either plastic or cement. To make the mold we had to pour the oomoo in a machinable wax that had to be machined to create the two positive parts of the item we wanted.

For this task, I decided to create a replica of the Phaistos Disc which is disc containing hieroglyph scripts on both sides that are possibly written in Linear A. The disc is from the Minoan palace of Phaistos on the Greek island of Crete dating to the middle or late Minoan Bronze Age (2nd millennium BC). It is still one of the greatest challenges to decipher its meaning and while many decipherment claims have been made, we don't know for sure its true meaning.

- The design

Since most people were using the shopbot for this assignment and the queue was pretty long, I decided to use the Roland modela, which was quite straightforward to use and didn't require setting up a meeting with a TA. I used exactly the same process I used for milling the PCB circuits, cutting 2d layers of material using the fab modules.

I designed each of my layers in inkscape. The first 3 layers were used to set up the working space, add the registration points and create the disc. I used a 1/8'' endmill for those layers. For the details of the disc and adding the hieroglyphs, I used the 1/64'' endmill to be very precise. While the first 3 layers took less than a minute each, the fine details of the hieroglyphs took more than an hour. For all the layers I used the wax roughcut option since I didn't need very fine details in the z-dimension. Each time I specified the starting and the end depth properly and changed the settings for how many passes to do depending on the tool.

- Creating the mold

Once the modela finished milling the wax it was time to pour the oomoo inside. I did some preprocessing steps to get the shape exactly as I wanted it to be. I had to clean some of the cuts since they were very thin and wax was trapped in there although it was cut. Moreover, I wanted to roughen the edges of my disc so that it looks closer to the original that is worn out, so I removed some of the wax manually to give this feeling.

To create the oomoo mix, I mixed the part A and B by volume. I used 2 small cups since I didn't need a lot of material and then I matched their heights. I stirred carefully not to create any bubbles and then I poured the oomoo in the wax. I added some extra oomoo even after it reached the top just to be sure and that ended up making the two parts of my mold connected. This turned out to be quite useful since I could just fold the two pieces to cast the materials, so I decided not to cut it.

- Casting the materials

The resulting mold was very detailed reflecting accurately all the parts that I milled even if they were as thin as 1/64''. I didn't want to lose all this detail so I decided to use plastic (the 305 by smooth-on) to cast my model since I imagined it would have similar accuracy as the oomoo.

The plastic consists of 2 parts as is the case of the oomoo which need to be mixed by volume. Since my mold was still drying at that point and it was getting pretty late, I decided to pour each of the parts in a small plastic cup and take them home to continue after the mold gets ready. This wasn't such a great idea since the parts for the plastic are toxic and managed to burn the bottom of the plastic cup by the time I got home getting spilled over my floor and making a mess.

I went back to the lab the next day and mixed the plastic properly. The process of making it was quite interesting chemically. The parts for the plastic are completely liquid and they becomes solid pretty fast, within ten minutes. Starting from the fifth minute the whole mix starts to become very hot by the two materials reacting with each other. I pressed the two parts of the mold together and poured in the liquid watching it become plastic right in front of me. Since the whole process was pretty fast it was very easy to repeat so I made 3 copies in total within around 40 minutes.

- Final result

Here is the final result after painting with nail polish to give it an antique feeling and making it a small necklace. Turns out that the leftover plastic from the hole I made to pour the plastic was quite useful as a hanger!

Week 8: Embedded Programming

- Compiling the code

For this week's assignment, we had to program the board from week 8 using different methods. I used the libraries from high-low tech to add the attiny boards as targets in the arduino IDE.

Compilation and uploading was quite straightforward once I had everything installed. One thing that seemed a bit wasteful is that the arduino added its library which has a large memory footprint (~2KB) which is almost half of the available memory on the attiny and doesn't leave much space for complex programs.

For this reason, I also experimented using the avr-gcc and upload using the avrdude. The arduino IDE had already installed these software so I wanted to use them directly. I had a small issue with avrdude requiring a configuration file which was in a different folder, but I ended up looking at the commands that arduino uses and worked on adjesting them for my needs.

- Programming the board

Programming the board, although straightforward from the software side using avrdude, was a quite painfully process on the hardware side. I programmed my board using the fabISP but the only way I could connect the fabISP to my board was removing the screen and mapping all the pins of the fabISP to my board. This made it really difficult to make changes since I had to reconnect everything everytime.

I programmed my board to use the screen and let me know how many buttons were pressed. Having the screen made it really easy to debug problems since I could print out directly logging information without requiring a serial communication to the computer. After, I finished programming test programs that let me test that all the hardware works properly, I wanted to create a small game. I was thinking of creating something like the game 2048 since it doesn't require a lot of memory to hold the state and it is just printing numbers on the screen.

Unfortunately, in the process of continuously removing the screen to program it and test it, I must have fried my attiny. The reason for that was that the lcd display requires 3.3V inputs so whenever I was testing it I was using a 3.3v power source, but whenever I was programming it I was using a 5V powersource to match the fabISP. At one point I forgot to switch my power supply from 3.3V to 5V and the fabISP was providing 5V input to the MOSI pin. That must have caused some current reversal and made my attiny non-functional. I didn't have time to replace the component but I plan to change it and continue with this project.

Week 9: Composites

- The idea

For this week's assignment, we had to make something using composite materials. The idea is that combining two materials, natural fibers (burlap) and epoxy resin in this case, we can achieve very good structural properties. I wanted to take advantage of this fact and make a flat surface that needs to be sturdy and robust. So my idea for this week was to make a small snowsled board that you can hop on and slide in the snow.

I created my design in solidworks. I drew some guiding curves and then asked it to do a surface loft to fit a smooth surface in my curves. Once I was satisfied with the result I went on to machine the surface onto the blue foam.

- Machining the foam

I machined the foam using the Onshrud router and used MasterCam to create the toolpaths. Since my design was rather big, I decided to scale it down from 4x6 feet to something that fits in 2x2 area. This way I would avoid a lot of complications (like stitching pieces of foam together or creating a custom vacuum bag).

The design came out really nice and smooth, and once I had the piece of foam that I needed I glued it to a wooden board so that it doesn't break and covered it with epoxy to give it a strong surface finish. I let it dry for the night and called it a day.

- Casting the composite

With my foamy mold in place I was ready to cast my composite. The steps I made were the following: I first waxed the surface and sprayed it with mold release. This was so that I don't need to use any layers of plastic sheets between my composite and the mold.

Then, I cut 7 layers of burlap in approximately the right size and spread epoxy on them one by one. I had to cut two small holes on each side to release the pressure and make the burlap take the double curvature. Finally, I placed the 7 layers of burlap on top of my mold, together with a breather and several layers of cotton to absorb the extra resin and put it in the vaccum bag. I was careful not to put the amount of resin necessary to cover all the parts that I am interested in.

In the interest of time, we placed 3 different projects all together in one bag at the same time with the help of David (the TA). We left it for 4 hours and then came back to pick up our composites!

- The result

The resulting board is very sturdy and strong. One problem I had was that it got stuck in the foam and it was very hard to remove it. I think the reason is probably that I used the clear resin to cover the foam which wasn't completely cured by the time I made my composite so it stuck to the burlap making it impossible to remove it.

In order to remove it, I had to separate the foam from the wood with a saw. I tried to remove the blue foam by hand but it was really hard. What did the trick was using a bottle of acetone. Acetone makes a reaction with the blue foam making it disappear. All I had to do at that point is wipe out all the remains with a napkin and I had a pretty clean surface.

Week 10: Input Devices

- Capacitative Touch

For this week's assignment, I wanted to play around with step response and create a capacitative touch keypad. It seems exciting that you can create a keypad with so high sensitivity using only a resistor and copper.

To get used to the idea, I saw Neil's examples and worked through previous year's assignments. I tried it out by building a general ftdi board and connecting two pads of aluminium foil and measure its capacitance.

I programmed the board to send through serial every quarter of a second the state of the two pads. The state is just a number that shows if the button is pressed. This is done by comparing the value of the analog measurement to a set threshold. In the video, you can see it responding to my button presses.

The aluminium foil was taped to a plastic sheet to minimize interference. The cool thing is that it even detects presses on the other side of the plastic sheet.

- Building a Capacitative Slider

After getting this simple example to work, I wanted to try something more complicated. I saw that last year Akash Badshah had created a pretty cool capacitative slider and it seemed interesting that by carefully overlapping different pieces of copper you are able to measure accurately the position of the hand.

I milled the same design in the Roland Modela. As you can see the board come out a bit rough on one side probably because it wasn't taped properly or because the bed wasn't perfectly levelled. This didn't seem to be a problem, however I realized after stuffing it (a little too late) that the MOSI line under the Attiny was connected to the ground which made it impossible to program. I'll try to remove the Attiny and cut the line if possible or mill a new board from scratch.

Week 11: Output Devices

- Persistence of vision display

For this week we had connect our microcontrollers with an output device. Since I am already familiar, with motors and lcds (see week 4 and week 8), I wanted to try something different. I thought about making a persistence of vision display using a led array that will be moved fast by hand to give the illusion of a 2d screen displaying a message.

To make this, I looked up the LED drivers from Texas Instruments. I really liked two of their parts. One is the TLC5916 which is basically a shift register with constant current output that is able to drive up to 8 normal leds. And the other part is a TLC5947, which is the same for RGB leds. It has an internal timer and does the PWM automatically to get any color you want. I ordered them to try them out. The plan is to use them together with the accelerometer to know the direction and speed of movement so that I can adjust what is printed to the leds.

- Designing PCBs

While waiting for my parts to arrive, I wanted to design my circuit in Eagle. I got really frustrated having to connect so many lines everytime and spending so much time to design a single board that I wanted to invest some time to simplify the design process for future boards I will make.

I started working on a graphical user interface and an algorithm to automatically connect all the pins together without requiring a lot of work from the user while finding a quite efficient solution. I created a first working version here. It still needs a lot of work but it should be able to handle moderately complex boards with a little effort.

It works by arranging all elements in a grid and automatically adding connections between them. It has the option of generating the black and white image for the fab modules. The resolution is 400dpi.

Playing around with the components, I designed my final board with the leds. I included an accelerometer and a voltage regulator at 3.3V for it to work and the led driver together with the attiny44.

This was the first time trying the PCBdesigner so I was excited to see that all the parts were the right dimensions and everything fit perfectly.

- Testing the board

After milling the board, I started stuffing it with all the different components. Unfortunately we run out of 2-axis accelerometers in my section so I didn't use one. My milled board could run fine even without it.

One issue I had was that in my design I accidentally connected the RST pin of the Attiny to the GND instead of the Vcc which made it not want to start and took me some time to debug. After removing the resistor that connected it to the GND the board was running properly.

I programmed the board and included a 8x6 font for my leds to display when moving. I tested it and it was a bit hard to see and try to align with the movement of my hand. I'll try to solder an accelerometer and to make it measure the beginning of the movement as well as the direction.

Week 12: Networking

- USB communications

For this week, I wanted to make my board communicate with the computer via USB. I wanted to do this ever since I attended the tutorial session on V-USB.

Since attiny44 doesn't have hardware usb support, the idea was to use the V-USB library that implements it in software and talk to the computer the same way the FabISP does.

For this week, I milled the same board as the FabISP since it has all the necessary parts for USB communication including the 3.3v zener diodes and the 20MHz crystal.

- Programming

I programmed my board using one of the USB example codes that talks HID to the computer and simulates a mouse and a keyboard. The HID protocol seemed very interesting because it is already supported by all computers and doesn't need any special drivers.

One way to pass data to the computer is to simulate a keyboard and type the appropriate messages to the screen everytime. In general I spent a lot of the time this week learning how usb works and trying to implement that using my attiny. I learned a lot and was surprised to see that I got it working so nicely. Since this weeks purpose was to have at least two attiny's communicate with each other, I thought that a good way is to communicate via CAPS LOCK NUM LOCK and SCROLL LOCK presses since those are send to all the connected keyboards. I tested the communication by using my keyboard and sending messages to the board by pressing CAPS LOCK but I didn't use more than one boards communicating because of time. I'll try to mill a board in the next couple of days and get my experiment working!