Instructables

Piecax the Poltergeist. A Troublesome Spirit in a Box.

FeaturedContest Winner

Poltergeist : From the German for “noisy ghost”. 
A metaphysical entity which announces its presence with rapping, banging and general mischief making.


It wasn’t easy, but I’ve got one shut up in this box.  I call him Piecax.  Sometimes he will lie quietly and make you think he’s gone, then startle you with frenzied knocking.  Other times Piecax will have fun by echoing you.  Find his favourite number and he might play you a spooky tune.   Watch the video to see Piecax in action.

Thanks and credit go to JKestner whose  Knock Block gave me the inspiration for this project.
 

 
Remove these adsRemove these ads by Signing Up

Step 1: The Box


I did this first so I wouldn’t be waiting for varnish to dry once I’d built the circuitry.

I started with a cheap softwood box from a craft shop.  I clamped a rotary sander upside-down in a vice and rounded the corners and smoothed the sides, starting with a coarse sanding sheet and finishing off with fine.  A final rub over with very fine paper and I had a smooth rounded box but a bit of a boring colour.

To bring out the grain I gave it two coats of walnut woodstain  and then for the gloss, three coats of yacht varnish.  The first coat was diluted with thinners to make it soak into the wood and give it more hardness and a good base for the other coats.

A quick raid on my sons' lego sets and I had a casket fit for a ghost.

1-40 of 105Next »
beme20131 year ago
Hilarious! Love it :D
madbutler2 years ago
Hi Andy how is your scope coming along. Have you had a look at Admiral Aaron Ravensdales instructable? http://www.instructables.com/id/Poltergeist/. I have just spoted it/ His uses 2 piezo sounders, put still uses one like you did as a mic. Do you think there is a change in the 08m2's programing language that has an issue with changing it back to an output as he used a second piezo to play the sound while his code is very similar? I still would love to get this going with one piezo to cut the cost down so students can make this awesome instructable

Thanks again for this great project
Madbutler

ps Are you working on any other 08m2 inventions using this great new chip with touch capabilities and a bigger memory?
Here is my version with the latest PicAxe 08M2 Chip.
Thanks for your instruction AndyGadget...
I do some changes in the speaker / microphone section and add a flash signal durin knock!

Cheers
Admiral Aaron Ravensdale
This is fantastic! I don't know how I missed this one.
AndyGadget (author)  jessyratfink3 years ago
 
Thanks Jessy.  It needs updating as the parts list appears to have disappeared at some point and there's a problem when using  the latest version of the microcontroller, but I'm on it.
Hi I just finished my version of your poltergeist and use the 08m2 chip. I change the code a little and use a single microphone and a speaker. I also add a flash with works with the knock.
I hope i found until next week some time to post it here. But you can see it still on my website http://www.steampunk-design.de/useite.php?Klopfgeist pls change into english language!

cheers
Can I possibly get the code and diagram for the change made to get this going with the 08m2 chip.
Here is my version with the latest PicAxe 08M2 Chip.
Thanks for your instruction AndyGadget...
botronics2 years ago
I built a box "Don't Open Till Doomsday" based on the Outer Limits episode with the same name.I shorten the program just to do the knocking and change the port I/O.  Added a opamp to boost the signal from the piezo.  Works very well. Thanks for sharing. I still need to make "the creature" that lives inside using Sculpey III. Photos at this link.
doomsday.jpg
madbutler3 years ago
Does anyone know how to get this going with the new 08m2 chip, I have changed the names to c.4 etc and mic input but it does not work nothing happens? I have students that love making the knock box at my school but new chips wont work.
AndyGadget (author)  madbutler3 years ago
 
It shouldn't be a problem - I thought the PE accepted the old pin syntax for the 08m2 as well as the new and the old code should have worked as well as your version.  I'm off to work now but will swap mine for a 08m2 later and investigate.
It's great that you're using this as a school trainer.  That's what the PicAxe was primarily for.
It does program the chip with the old code but the piezo does not respond. I changed the pin names and the input further down the code and does the same thing. I also tried it in second knock box with a bs270 mosfet and the mosfet got extremely hot you could smell it cooking, yet changing it back to the old chip it worked fine. Dont know if this information helps you with any problem solving. Thanks for your time
AndyGadget (author)  madbutler3 years ago
 
Thanks for the extra information.
What you describe is very strange.  I'll definitely look into it.  
I didn't get a chance to try this tonight - Should do tomorrow though.

AndyGadget (author)  AndyGadget3 years ago
 
I spent some time on this tonight and there is something strangely different with the 08m2.  I didn't get the transistor heating you were seeing, but I couldn't get it to respond to the piezo knocks.  If I manually took the input high it would only produce one knock no matter how many times I triggered it.  I'll continue at the weekend.  (Maybe it's haunted #;¬)
Thanks for the time you are spending on this. I have been looking at different things. I added an led to the piezo and it flashes when the piezo is tapped each time, so it seems to pick up the knocks, but not record them. I dont know too much about programming but is the memory allocation different on the m2 chips and the m2 information notes mention some command replacements but I cannot see any in the script that needs changed. It also mentions peek commands but this means nothing to me (yet)

thanks again
AndyGadget (author)  madbutler3 years ago
 
The 08m2 has more memory for peek and poke, but the addresses I used in the original are part of that, so not the problem.  The weird thing is that it's not recording the knocks.  I can see the input on my 'scope (as you're doing with the LED) and the levels are there.  I'll get it sorted at the weekend - It's one of those annoying things which should work . . . but isn't.
AndyGadget (author)  AndyGadget3 years ago

It looks as though the PIC the 08m2 is based on is a bit fussier when it comes to it's inputs (although the levels I'm seeing with a 'scope should be triggering it). A bit of signal conditioning is needed to get this working again, rather than the 'it works so I'll leave it as it is' approach I used initially. The code timings are also different between the 08m and 08m2 so the loops need adjusting. I'm working on this.

A bit of tidying up in in order though.
Add the lines :-
LOW Knock
LOW 1
immediately after the declarations section, at the top of the man code.
This will sort your FET heating problem and also grounds a pin which was floating as an input before. It would have overflowed the memory on the 08m. Also tie physical pin 4 (I3) of the chip to ground. 
(The 'LOW knock' is a quick fix.  The gate should really be pulled down via 1K or so to keep the FET turned off when the pin is an input.)

I'll let you know when I've sorted it.
I have been experimenting I added a readadc on the pin and assigned it to b9 and changed the mic to b9 to see if it would play something back. it does but irrigular to taps given to the piezo. Reading through the manual the 08m2 has a calibadc where the variable receives the adc reading i dont know if this can be used instead to read the mic pulses as it does on the readadc. There is also a Count pulses on an input pin command but I guess this would just count them and not give the same rhythm back. You are such a knowledgable chap this info is probably miles off track.

AndyGadget (author)  madbutler3 years ago
 
Readadc may be the way to go, but I'm still trying to work out why the existing code isn't detecting the good high level on the input pin.  I had a setback today when my 'scope started fizzing and the display collapsed - EHT breakdown, which it occasionally does on humid days. 
I'm away for a couple of days but will pick this up on Wednesday - It's bugging me!
Just wondering if you got back to looking at this? I don't blame you if you put this in the too hard basket. Its been bugging me too.

With my limited electronic knowledge I added a transistor to boost the signal, but this made it over sensitive (recorded knocks and every other vibration) and then you cant play it back through the piezo. Tried even a capacitor with similar luck. It seems it needs just a little stronger signal but my lack of knowledge to do this lets me down.
AndyGadget (author)  madbutler3 years ago
 
I intend to get to the bottom of this as I can see no reason it shouldn't work, but my problem at the mo is that my 'scope made a final "fzzzzzt POP!" the other day.  I'll definitely let you know once I've got this sorted and found a fix.
mischka3 years ago
LOL, you made my day, boy!
Love the project! Just wondering if you have a supplies list or something like that so i know what to get. Thanks.
AndyGadget (author)  project dude3 years ago

Now that is strange - I'm sure that step 2 used to have a whole chunk of text including notes on the electronics and a parts list.  It looks like the Instructables editor may have eaten it.  (Strange things have been happening with the recent 'upgrades'.)
Closest thing is the graphic or PDF of the schematic in step 2.  The piezo is just a standard disc type.  The motor is a cheap 3V one (although I found this started to stick after a while so it's been replaced with a solenoid).  The FET is any logic-level switching N channel enhancement MOSFET.
All the Picaxe stuff is explained in step 5.
Thanks a bunch for the reply! I viewed this before and I seem to remember a parts list, but i couldn't remember what was on it. Thanks for the reply. :)
I need one of these! Love the idea, and you have explained it very well. Thank you! Can you program a "call and response?" In other words, can the box answer your "Shave and a haircut" knock with "two bits?" I have never tried programming a microprocessor like this. Oh boy, a new hobby!
AndyGadget (author)  stringstretcher3 years ago
 
Thanks for the nice words.
There's 4 bytes of program space left so no room for more features without sacrificing existing ones.  You could very easily replace either the random knocking or the "spooky tune" with a "Two Bits" response for 5 knocks by changing just a couple of lines of code.
Have a look back through the other comments for how some others have implemented this idea.
The PicAxe is one of the easiest microcontrollers to get into. It's not as fast as the AVR or Arduino gang, but it's got an excellent programming environment and great support from the main forum.  I'm using the simplest one here but the range goes up to a 40 pin one which runs at 64MHz.


Tedfi3 years ago
I would like to go to Michaels and look for the box. Does anyone know what size this one is?
AndyGadget (author)  Tedfi3 years ago
 
The box is 23/8 x 21/4 x 37/8 (HxWxL) outside dimensions.
Take 1/2" off each for internal.
Go bigger by all means, but smaller would be tricky.

Mine came from a UK store called Hobbycraft (and they don't stock them anymore), but I'm sure you can find similar in the US.
Dear AndyGadget,

My friend is helping me build this but neither of us can program in basic. What do we do now? Is there a way around it?

Thanks,
Ted
AndyGadget (author)  Tedfi3 years ago
You do not have to do any programming as I have included the code (program) in the Instructable - Piecax.bas. What you DO need is the programming lead and a PicAxe 08m which I refer to in the final step.
Dear AndyGadget,

I gave him your reply and he says that he does not have a basic program to do the programming. He says that when he plugs the cable in he will need a program like basic. He does not understand and I am totally illiterate. What do I tell him... S O R R Y for being so stupid.
AndyGadget (author)  Tedfi3 years ago
 
It sounds like he's missing the Programming Editor - He can download it HERE. This will allow him to transfer the program to the device via the programming cable.
Amazing. Period!
madbutler3 years ago
excellent project I have built this with a 8m chip and the kids love it.

Any idea about how to adapt this to an picaxe 18m2 chip as it has more memory to add more songs to different knocks etc and pins can be set to in/out. I know how to change knock amounts and tunes, but I do not know how to change the first part to get it working. Ive been experimenting on a breadboard with no luck. Any help would be appreciated.
I have set up:
pin 1 = pin 14
Pin 2 = pin 3
pin 3 = pin 10
Pin 5 = Pin 6
Pin 7 = Pin 2
Pin 9 = Pin 5

MadButler
AndyGadget (author)  madbutler3 years ago
Hi Madbutler, I haven't had a chance to play with the 18M2 yet, but pin addressing is similar to the X2 range where you address a pin as (port).(pin), so chip pin 1 is C.2 - Refer to the pinout diagrams in manual 1. I/O pins will automatically be an input until you perform an output command on them. Also, make sure you don't get mixed up with physical pin numbers and the logical pin assignments (e.g. 08M chip pin 4 is Input3).

Sooo . . .  I haven't tested this but if you use the top 3 RHS pins on the chip, I think this would work :-

#picaxe 18m2              'Put at the top - Tells the prog. edit. which chip we're using

symbol mic = pinc.1    'Chip pin 18 - Microphone input (can also be output)
symbol knock = c.0     'Chip pin 17 - Knock motor output
symbol led = c.7          'Chip pin 16 - Indicator LED for testing
(further down)
input c.1                          'Define mic as input to detect knocks



Thanks for that info, im a few steps closer to getting it going but it does some weird things, like when i tap on the piezo sounder the light flashes and only if the led stays on the motor pulses twice and waits 4-5 seconds and pulses again and keeps doing this until i tap it again. I had a scan through the script and cant see anything there that might confuse the program.

by the way your instructables are really awsome, hope to see more cool things to do with the picaxe chips. i will be having a go at the tic tac instructable once i hunt down a slide resistor
pbecker833 years ago
I used a vibrating pager motor like the one seen here (http://www.radioshack.com/product/index.jsp?productId=2914700) . I glued it to the bottom circuit board and let the hole thing lay free inside the casket. Looking forward to any future makes. Starting to eyeball your "TicTacTunes".

Patrick
AndyGadget (author)  pbecker833 years ago
I didn't think of using a pager motor - Nice one!
pbecker833 years ago
Finally got around to building my own called "Terminal" The Haunted Mummy. Awesome build Andygadget. Love it.

Video
http://www.youtube.com/watch?v=u81YIyu9GEE

Pictures
http://www.flickr.com/photos/55301458@N03/


1-40 of 105Next »