Pages

Thursday, October 10, 2013

The Pumpkin Project: Part One

So, it has been some time since I posted. I have a big update coming. I have finally started work on my talking pumpkin project. Soon I am expect to receive the last few pieces and that will let me start the final build.

Overview:
The pumpkin project is something I dreamed up this time last year having seen the thousand's of other pumpkin projects I thought why not build my own. What I have is a PIR sensor (more on that choice later) an uno and a pi. When the PIR gets tripped the uno sends a signal to the pi and a playback of a script is started. When the playback is over the pi tells the uno to start watching the PIR again. Yep, that's right, it's another talkingnpumpkin project.

The How:
So I ended up using a pi for audio and for managing the playback of the conversations. One of the "exciting" pieces of this project was getting the pi and uno to talk via serial over USB. Getting them talking was simple enough. Realizing that python does not like serial readline to end in \r\n meant some work and time spent wondering why my if statements didn't work. On the other side of things was the uno which can output serial as ASCII but only reads in one char at a time and compares it natively as hex code. After getting the two devices actually talking and handing control to each other things went much faster.

On to the sensor, the reason I used a PIR sensor, aside from them being cheap and me having one on hand, was the space where I am setting up this year is inside a screened in porch and people will be coming up a bent staircase to get to the door. When testing the PIR and an ultrasonic sensor the ultrasonic sensor was not getting good readings through the screen and its field of vision was too narrow.

The Build Plan:
It always comes down to time and money. I was hoping to do some work with wireless but have not had the money to get that up and running. My original plan was for 3 pumpkins but we actually ended up with 5. The plan for this year is to use phone line to wire up each pumpkin. In the interest of keeping the build simple this year I went with 2 different color flicker LEDs one for idle (yellow) and one for speaking (red). In a coming post the build instructions and code. Note: that this time I choose not to have the LEDs flicker in sync with the sound this is to minimize the number of pins used for this solution, knowing that my long term plan is to use a mesh network at which point I can switch to a more advanced logic.

What's Next:
Next steps are to build this thing and get the scripts (audio) recorded. After that I will put up more detailed instructions on what I did and some video of it running. For now I have some pictures of the pumpkins.








No comments:

Post a Comment