Final Project

A seat that produces a sound once someone sits on it

Process:

For my final project I am going to make a chair from plywood which will be cut on the CNC. There will be a sensor on the seat so when people sit on it it will make a noise, or talk a few lines. Emma suggested that I go for one sound to begin with and slowly build it up to producing more. I agreed that it would be a good place to start. I could even add more sentences after I am done with the final project! A more detailed description of the project, the rationale the cost and a bill of materials (BOM) can be found here.

Sketching, researching and explorations:

I emailed Luis and asked of whether he had any suggestions for me regarding my final project. I must admit that I didn't know that Arduino has limited capabilities when it comes to sound, which surprised me a lot. He suggested that I look into Talkie and Mozzi. In the mean time I also had a talk with Emma who had another suggestion, which was to use a sound 'shield' kit together with my input sensor from input devices week and my fabkit. That is to use my fabkit for communication instead of the Arduino. More information about the shield here. We decided to go for the 'shield' solution because it was less programming oriented and considered a to be a hardware solution. I could then connect it to my FabKit and my input device infrared sensor, but I also need to make an output device so that the deliverables of the project are all met.

I soldered the shield components on the board and got it onto the Arduino. I was a little careless when adding one of the microcontrollers so I soldered it on in the wrong direction. Removing and re-soldering it took me quite some time. The experience of working with almost 'vintage' resistors, capacitors etc was interesting to say the least. I had to keep flippng it from one side to the other which was in itself time consuming but quite fun! It was indeed very easy to solder them on. The shield was finished and the way to test it was to proceed with making it play some sound. As it has no microcontroller itself the only way to test if it is working is to make it produce sound.

It was then time to add some sound on the SD Card which thankfully arrived soon and I was able to follow the adafruit tutorial on creating suitable wav's quite well. Although it was describing processes that had to do with much older versions of MacOS X, I was able to convert it in Audacity since the instructions for that were quite clear too. I added my wav to the SD card after I formatted it to FAT32 (on a pc because sometimes formatting on a mac can make it unreadable).

During the process of initializing the card and setting it up I had to include 'the waveHC library by going through dap_hc.pde'. This means that I need to add the specific library to the Arduino IDE and I followed two steps for this. I downloaded the full package, I unzipped it and then went to Arduino/Libraries and dropped the generated file in there. The file included all the code I needed for the SD card to be initialized and produce sound.

The tricky part for me was to understand that the code described in the was basically the breakdown and very thorough explanation of the code needed for card initializattion. Once I understood that, I opened the complete code from the 'examples' menu which were already added to Arduino IDE when I added the Library. After that, I opened the Serial Monitor and I got the following message:

I proceeded to research online about the specific error and I stumbled upon a user who had the same issue… There was some information missing from the Adafruit Tutorial. Some wiring needed to be soldered in the way shown below:

As soon as I completed that, the shield was producing a serial message in the Serial Monitor which showed that the SD card was indeed being read by the Arduino, but when I connected the headphones on it I could hear nothing.

Then Emma unticked the 'Autoscroll' box which said that the .wav that I created was not supported… We converted it again through iTunes which still didn't work and in the end we used a ready-made sound from the Adafruit site. I had sound!

Later I spoke and recorded the words of my aunt through Audacity and then following the tutorial from Adafruit I transferred it to the card. What was important, was that I first needed to delete my computer's trash so that the test sound would be deleted too. It was not enough to just move it to the trash. I now have my final sound on the memory card!

I started to make some models on Rhino trying to address the issues which I highlighted in my Applications and Implications page. This was not working out too well for me because it is definitely not the way I am used to working. I needed to make some 3-D mock-ups of the chair first and then be able to design them for production on the machines. It seems that I will always need to use my hands to make a design in order to visualize it and then draw it on the computer. This might make me a little slower to the eyes of people who are used to computer design but it is also a process that I enjoy a lot and I definitely do not want to give it up. I still haven't found my final shape - it may even be a little early for that - but I am working on it! I would also like to enjoy the process of designing it and not rush things too much.

Later, I made some tests regarding the position of the proximity sensor and whether it would work when it is put right below the surface of the 8mm plywood. At first I discovered that the hole through which it will be 'seeing' needs to be about 5mm in diameter. It also appears that 8mm is too thick a distance for it and I will need to create a pocket for the whole board. If that is not done, then the readings will not vary greatly when it is covered to when it is not. At a depth of about 6mm they provide enough difference to be able to program it with an 'if/else' instance. They change from 250 to 350 and the test can be seen above.

It was time to migrate from the Arduino Uno to the Fabkit. Just because it had been a while since I had used my Fabkit, I burned the bootloader again to remind myself of the process and uploaded a simple led blinking program. See Input Devices week for more info. After I made sure it was still operable(!) I used the FTDI cable to load the 'File/Examples/WaveHC/daphc' Arduino code which is found in the Arduino IDE once the library is installed.

I then continued to identify which pins are used between the Arduino Uno and the Shield and proceeded to connect them to the Fabkit. Although the file for making the Fabkit which was given to us has some errors in back annotation, I was relieved that they were not important or affecting my process. More about the Attiny 328 pinout and a different Fabkit by Luis Carvao on: open3edge.

In the images above, one can see the connected wires on the Shield and on the Fabkit. An old woodworking trick is to put tape with stripes or make stripes on connections that you may be pulling apart and putting back together again often. That way, you can identify the right joint when the stripes are aligned.

So everything was set. The Fabkit was connected, the Shield was definitely working, I had soldered the speaker on the shield. Why was I not getting any sound?

The answer lied in the simple fact that the shield could get power from the Arduino through the computer USB, but the FTDI cable could only feed the Fabkit with current. I had to connect the Shield VCC and GND to the FabKit VCC and GND and I had power! By then I should be able to get my sound but I was not. I kept getting the following errors:

Basically that the card was not of the right format or that it was fragmented. I took everything apart and I put them back together on the Arduino Uno where it was working fine. I reconnected it to the fabkit and checked all routes and connections with the multi-meter. I found a pin that was not soldered and I added a little bit of solder, but that did not solve the problem.

A little bit of research online about the specific 'error: 3,0' indicated that the issue could be the SD card brand/type, so Emma gave me a new card. That one worked fine until I tried it at home when it started to produce the same errors! I believe that the mac creates some invisible files on all memory devices such as SD cards and memory sticks and I have found these to be a problem before.

I then downloaded 'Funter' which is a small app that showes up all invisible files on mac computers and I indeed found the files which were mentioned in the errors. The strange thing was that it also shows the first version of the file that I uploaded only on the first card, but not on the card which Emma gave me. On top of that when connected to the fabkit I had to open the serial monitor to get the sound to be heard.

In my frustration/desparation I switched to my first card which played immediately, and without any of the errors that it was producing before. It also played without needing to open the serial monitor. This is clearly an issue of the SD cards and this is something that it is mentioned in the adafruit documentation but it is still strange stuff! I am not even sure that I should be describing all these in so much detail but I do hope they prove hopeful to someone in the future!

To conclude for this week, I have managed to record and get my final sound on the SD card and have successfully migrated from the Arduino to the Fabkit (or so I thought). I also decided that I will use speakers which I can simply plug into the board rather than the speaker that came with the shield, because it was producing a lot of noise and volume issues despite being carefully soldered.

The next step is to proceed with the LED board and code so that the sound plays when triggered by the sensor.

The plan was to open the code that came with the Adafruit documentation and delete the 'unecessary' steps, since I already had an operating card. Yet the plan went pear-shaped because the changes that I was doing were giving me card errors so a lot of time was spent trying to figure out what the SD cards were up to… From this point onwards the SD cards became completely unreadable by fabkits and I never was able to operate one again while connected to a fabkit. This happened for no apparent reason. I formated one on a PC as FAT32 and uploaded the sound. I also formated one as FAT32 on a mac with El Capitan operating system (Yosemite and previous versions simply refused to erase and re-format the cards). Those two seemed to work, although the mac version kept all of its invisible files. Formating as exFAT on mac did not produce a usable card.

At that point, I felt the need to test and confirm that the cards were working correctly before continuning my attempts on coding. I used this tutorial and code from Arduino. By then it was very difficult to handle everything while connected to the Fabkit so I used the Arduino Uno again. I spent a good chunk of my day confirming that the cards were ok and I then stumbled upon this code, which seemed a little easier for me to understand and edit. I proceeded with that and got to a point where I thought it was reading the sensor, but not recognizing the cards…

In the end, Emma had a look and came to the conclusion that the code that I was writing was only reading the sensor values and not the card. Together we edited the initial adafruit code to one that speaks out the words when the values of the sensor are below 250. You can find the complete code at the bottom of the page and a test/teaser video of how the sensor will work below:

The next mission is to re-wire and re-connect everything to the FabKit. I have decided to go for speakers like these because they are more reliable and produce a clear, loud enough sound. As for powering the circuit I will use a powerbank like this.

I have already cut a USB cable and tested to spot the VCC and GND cables in order to solder them onto the circuit. I will also need to connect a resistor between my sensor and the power supply to reduce it to 3.3V because it heats up a lot when directly connected to 5V. On the Arduino Uno I had the ability to do that.

I soldered the USB VCC and GND cables to the Fabkit and I had power on it through the powerbank. I later understood that this could possibly create a lot of issues since the VCC and GND paths were very near the wires and I could easily have a short. I soldered two male headers and used the connectors instead! (D'oh! as Homer Simpson would put it)

I also soldered a 330 Ohm resistor on the input sensor VCC cable so that it would not get a direct current on 5V and heat up.

I was all set to migrate to the fabkit once again. I loaded the code, everything seemed to be working fine and in the end I got the dreaded card error message. Just to be sure, I took everything apart, connected them to the Arduino UNO and I tested both cards. They are working fine. The issue is the communication between the fabkit and the SD cards.

Quite disappointed I decided to leave that and proceed to milling my LED board. In this case, I succeded to mill the paths but the Modela refused to drill holes or cut the board all the way through. Quite an uneventful Friday. At least I can try to preserve the Friday feeling!

In the end the issue with milling the board was related to fabmodules and it seemed to solve itself just because it was Monday again. I was able to mill and stuff the LED board easily. I also tested to be sure whether it would need a resistor to work with 3.3V current or not. It turned out that it could, so I only added a 0Ohm resistor.

I decided to leave the electronics for a while and concentrate on designing the chair. After a gin and tonic or two I had a pretty clear image in my head of how it would all come together. I then started to draw and 3d model it on Rhino. It was a challenging experience as it had been a long time since I had used it. The plan was that I was going to use 8mm pywood and cut multiple similar components to create a decent thickness for the legs. The front legs would have their two outer layers 8mm shorter than the two in the middle, to create a joint for the seat. Similar ones would accommodate for the seat on the back legs. The front and back legs would be cut in one piece to provide stability for the whole construction and create a 'nest' for a second 'seat' underneath. That is where the electronics will be fixed.

Although I quite enjoy working on Rhino I often lose my orientation and forget things that I would not have if I was working with my hands. A reason why I joined the Fab Academy. Nevertheless, there really is nothing like having real working models at hand. It helps me understand the issues a lot better, so I proceeded to create some on the laser cutter as soon as possible.

The first issue was immediately apparent as I drew the seats separatedly from the rest of the construction. The chair would not come together! I needed to extract them from the top view… That was when I realised that the way I had designed it, I could not have a round top. It would have to be oval, or some other kind of irregular shape because the width of the back legs was not the same as the width of the front legs. Back to the drawing board.

Since I was returning to the drawing-board (or in this case the drawing-screen) I made sure I fixed some careless issues that also became apparent once I had a real model in my hands. I guess that stress is really not a constructive ally in the case of designing and deadlines. These issues I had already dealt with, but they got lost in the process and in-between all the Rhino files I was creating… Note to self: Try not to create too many drawings but keep working on developing one well.

I finally had a scaled model of the exact chair that I intended to make, but it was extremely wobbly. I needed to add stretchers.

Full of confidence, I proceeded to add them and cut again on the laser. As I was watching the laser in operation it occured to me that they would of course not go together. The stretcher would get in the way of the rail and vice versa.

By then I really needed to go back to my roots and I experimented with actual tools and foam-board in the workshop in search of a solution. It had been a while since I had this much fun and I wish I had time to experiment with this a lot more.

At the moment it seems that the solution is the one pictured above. The plan is to make a cut in the two middle pieces of the four layered legs, which will then allow me to fix them in place with a little screw, if need be. Removing the screw will allow me to pull the chair apart when I need to flat-pack it. The position of this cut, however, is weakening the construction, although it may feel more sturdy on the full size chair. If I have time, I may still experiment with it, but I really need to draw the line somewhere and mill the actual chair on the ShopBot.

The final laser model is ready. I now have some serious figuring out to do about its back. I would like something more organic and away from the plain typical laser-cut plywood furniture aesthetic.

I also prepared the file for milling and tested that the electronics boards which I want to add on the seat have enough room. I also designed a pocket for the input and output pcb's and drill holes from where I want the sensor to be reading. I allowed enough room for the led to be sticking out of the seat too.

Since I had some time I gave electronics some attention. I mentioned the issue I have with the fabkit not recognizing the SD card to Zaerc, who said that the problem might be that I made a Fabkit with a resonator instead of a crystal. Emma seemed to agree that the clock gives a rhythm that is incompatible to the SD Card. After the discussion with Emma, I burned the bootloader again using an 'Arduino Uno' configuration and reloaded the code, but the issue remained the same. I also changed the code to play with 8MHz instead of 4MHz but still the situation was the same. I disconnected everything and connected back to the Arduino only to confirm once again that there is nothing wrong with the card. Internet searches provide no solutions since there are not many people who have connected a FabKit to an Adafruit shield.

I decided to make a different FabKit with the crystal. I milled and stuffed the 'Satshakit' which was programmable at first attempt and I loaded the bootloader. It was a little tricky to use since it had a completely different pin layout than the previous version I was using. What was frustrating as well was that it was full of male headers and no sockets for direct connection to the FTDI cable. I could have predicted that and soldered female headers.

To cut a long story short, I connected everything, I programmed it and I tried to play the sound. I got the same message as I did all previous times and I have pictures of above. I was greatly disappointed - to say the least. The cards seem to be recognized only by the Arduino.

So after Emma's suggestion I attempted to connect the shield to a FabKit through only one pin. The shield would be reading the card and sending the audio as output to the Fabkit. I wrote the codes that you can see above (the first is an edit on the code that came with the shield tutorial) but the only thing I could read was the sensor. No indication of reading the SD card and strangely enough no card errors at all. After consulting with Emma, I wrote to Luis to ask if I can use the Arduino alone and connect the sensor and LED directly on them…

It was time to jump back to the making of the chair while waiting for a response. On Wednesday afternoon during Neil's lecture, I instinctively decided to make a modest stool because I could see that the electronics were going to use up more of my time than I thought. I modified my drawing and I was ready for the shopbot the next day. This was not something that made me very happy since I wanted to experiment with its form and backrest. I had been imagining of patterns on fabrics colourful strings.

ShopBot day proved to be a VERY long day. During the past few days I had a talk with one of the interns of the FabLab who confused me about how the X and Y axes are set. Although I had correctly documented in my website I decided not to trust myself so I begun to mill without actually telling the machine where to start from. So it started from its own setup. This was not directly apparent as I had firstly milled a pocket and done the drill job. I figured it out only when it started to cut the legs… I then had two choices. I was either going to buy another piece of plywood or try to re-position my components. So I firstly set the X/Y where it should be and then I started re-positioning the elements of the stool. I also tried to take out the components which were already milled correctly in order to keep them safe from mis-calculations. This whole process was very time-consuming and at parts I did make wrong calculations and ended up with lines on the stool legs. Although I could hide them I chose to leave them showing just like on Persian carpets! Mistakes on them are easily noticable because only the works of god are perfect!

Another mistake which happened twice was that I had accidentally left a border on my drawing. It was the rectangle that I had drawn so as to know where to place the components on the piece of wood. As a result I was choosing to mill "outside", but the Shopbot was milling "inside". I ended up with joints that didn't fit together and I had to mill again.

At the end of this very long day, I had a lot of fun putting the whole thing together. The joints were a little tight, I must admit, but I preferred this to them being too loose. I applied glue between the layers which where supposed to become one and I put the whole stool together to make sure that they would still fit even after its parts became thicker.

I sanded and waxed it to give it a more finished look. Time to return to electronics - something that I was not looking forward to at all.

At home I tried to make the code between the two boards work, but I ended up spending two hours trying to get a correct response from the sensor! It was playing the sound over and over without me being able to understand why. After trying two Arduinos and two Fabkits I simply realised that the room was too bright and I only needed to change the value of it in the 'if' statement to 100! Now the LED and sensor board were working fine while on the Arduino, but I damaged my LED board trying to make a video.

So far I have the videos above which brought me a lot of excitement! The plan now is to try one more card with the fabkit and if that does not work I will proceed with the Arduino since Luis has said that this is ok. I thought of buying another couple of cards, but there is no guarantee that they will continue to play even if they do for the first few times, as experience has shown. I will hopefully mill a new LED board in the morning and I will have everything finished by tomorrow… The plan is to fix the components in place with Sugru.

Which wasn't a very good plan! I realised I should have given this a lot more thought because the electronics are not placed very tidily or securely under the seat. I can't connect them easily and in general I would have liked a more 'clean' installation of my boards. Sugru seemed to not be a very good solution for keeping the elements connected to the base either because it kept getting detached from the plywood.

Despite all that I do have a talking stool and I look forward to developing it further into a chair that speaks more sentences. Please see 19. Project Development for evaluation and reflection on the final outcome.

______________________________________________________________________________________________________ 'Angelou' by Eva Korae is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons License
______________________________________________________________________________________________________

Stool Design

Infrared and Sound Code

LED Schematic

LED Board

LED Path

LED Cut

Infrared Sensor Schematic

Infrared Sensor Board

Infrared Sensor Path

Infrared Sensor Cut

______________________________________________________________________________________________________

Final Assessment Video

Project Development Lecture

Back to Weekly Assignments

Home