CONCEPT: In America, we like to personify our pets. We have a strange relationship with them. In many ways, we are in control of our pets: we can dress them in costumes for Halloween, we can paint their nails pink (I know people who actually do this), name them embarrassing names that we wouldn't name our children, and even spray paint or dye their hair (people actually do this too). It is quite a strange relationship we have with them, and I would like to comment on this dynamic. When we personify our pets and place expectations on them, what happens? Is it for our benefit in feeling superior and powerful over another life force? To be funny? To boost our image in the form of an animal that represents us? These are the questions I would like to raise with my final project.
After discussing the ethical (Animal Rights issues with the University of Florida in testing animals) and practical issues involved with the pulse sensor with Charlie Cummings. I will now instead be using the SEN-09836 Sparkfun Triple Axis Accelerometer (also called: ADXL345).
I will first be using the following fritzing diagram to set up my accelerometer:
I am using the Bildr tutorial linked on the Sparkfun website. The fritzing diagram for this tutorial is shown above. I was getting a couple error messages before I realized that I needed to download and include both of these libraries:
Here, with the Bildr code and tutorial found at http://bildr.org/2011/03/adxl345-arduino/ I have a working accelerometer that prints to the Serial Monitor, the coordinates of the accelerometer. Below is a screenshot from the Serial Monitor with the accelerometer simply sitting on my desk. These numbers will range from -150~ to +150~ according to this code. Though, I have been working with others that range to around -250 and +250.
I was able to get the accelerometer working properly as you can see from above.
Here is a video showing you this working.
I realized that my wave shield problems were due to the fact that I had not soldered properly. I bought a new wave shield kit online and reconstructed the wave shield.
I asked Erica to help me with formatting my SD card. The wave shield was still not working. Fortunately Charlie and Erica figured out that the weskit I downloaded the WaveHC library from put the files in separate folders that prevented the libraries from properly working. I was finally able to have a working wave shield for my project. I used a text to speech website to upload a female robotic narrator saying "I would like a treat now" which would play when my dog is sitting.
These are the chosen text to speech .wav files:
This is "I would like a treat now" playing on the wave shield which is titled "4.treat.wav" This will play when Piper is in a sitting position, with a high (appx 90) y axis coordinate.
The other ones will play when the coordinates for jumping, standing and leaning, and spinning around are activated. I felt that these were very specific positions and wouldn't be triggered unless intentionally.
I downloaded several of these files with text to speech phrases from a website that will be the phrases my dog will "speak" upon certain activities. I had to convert them from mp3 to wav files which was very easy. I will need to name these .wav files with less than 8 characters since I may run into problems if I do not, as explained on several forums. I tested just one of the phrases with the wave shield, and once I got it working well, I soldered the speaker into the wave shield. I have also wrapped electrical tape around the wires so ensure their stability over the next week or so, so that it does not break easily.
Charlie directed me to this website that had the set up for the pins on the accelerometer. He said I could figure out how to work around the wave shield and accelerometer using the same pins if I referred to this.
Suddenly, two days ago, my wave shield was no longer working and I couldn't figure out why. I asked Charlie if I had soldered too much and if that was what was preventing it from working and he said yes. So, I desoldered the speaker some, cut off the wires, desoldering them from the wave shield and reattaching new wires. I also soldered in a battery for power so that the wave shield could be transported around, worn on my dog.
I have been trying again and again with no errors in the actual code, which seems to be working perfectly, but the wave shield is no longer playing. I tried two different speakers, so I don't think it is an issue with the speakers or code for that matter. I can hear the spinning volume switch click on and off, so I know that it should be playing and active. I also checked the SD card to make sure that the file names were named properly and transferred into the code with the same names, also being sure that they were actually .wav files and not .mp3. I have no idea why this is happening.
The next step to getting a final working prototype are to write the code in which the accelerometer coordinates (triple axis so x, y, and z) can determine which clips play from the wave shield's SD card. However, I am going to have a hard time writing this code and testing it if I do not have a working wave shield that happens to not be playing anything at all at the moment.
This would be the ideal baseline position with the X axis, Y axis, and Z axis all being very low numbers. Although, I am not particularly paying attention to the X axis (left-right) for this project except for spinning around.
This is my dog's "standing and leaning" position where the wave shield will play "hello it's nice to meet you." This is a very specific coordinate that she does anytime she meets someone new. (See below):
"Hello, it's nice to meet you"
"Hello, it's nice to meet you"
"I'm so happy"
When my dog jumps, she jumps straight upward, so the defining coordinates I would anticipate would be a high y and z coordinate (close to 100 each).
This project was certainly feasible. However, with the last minute change to an accelerometer, as well as taking so many other classes, I was unfortunately unable to unify the accelerometer, working code, and wave shield into a working project.
Here are some images of my dog's vest:
I had to sew on the small piece of plastic I made from a scrap piece.
I also spray painted the vest (I retouched this, but this is the photo I have).
I drilled small holes in the sides to sew into the vest. With several shake tests I performed at home, the sewing and command strip-attached materials stood on the vest fine, with the exception of the arduino. So to add extra adhesive to the arduino, I fed the needle through the inside between the wave shield and the arduino through to the other side, so that it was sown on additionally and separately. After this I did not have any issues with any components falling off.
The acrylic served as a platform for the arduino, wave shield, speaker, battery and breadboard. Charlie mentioned that if I were to revisit this project, it might be easier to use a micro-arduino since my dog is quite a small dog (18 lbs). Ernie added that it would have been nice to have added a casing or shield to the top of it, rather than leaving it exposed, so that the device could be weather-proof.
I remember you mentioning that it would be nice to have the handheld waveshield, or for the speaker to display in the hand, however, I felt that one self-contained unit was a better option to push my concept toward putting "personalities" onto our dogs, physically, and representing them to the world in our own image.