The board can now say messages sent to it via a serial device - step 12 covers the changes I made!
This is part build-log, part how to. I hope I give you enough info to inspire you to make something similar.
Here is a video of the completed board with the lid off:
And here is a video of the completed box I had ready for Halloween 2007:
This new clip shows the serial communications link working:
Step 1: Stuff You Will Need
Some wood to suit your design. I messed up when I built mine, and used some poorly finished pine and my not so great woodworking lead to nasty corner joints, which left me needing to veneer the wood with a thin plywood... so keep this in mind, and perhaps use some nice ply to start with, and skip needing to do the annoying veneer finish. Alternatively, you could use the oldest and most worn timber, for that 'ye olde' antique look. Heck, be creative and make it your project!
Something to drive the stepper motor (I'll provide a sample circuit and the microcontroller code) but if you already have something else, or know what you are doing, then knock yourself out, you'll figure it out from the steps I have outlined....
A microswitch for the home position sensor (I got mine out of an old printer)
A power supply (12v 400ma plugpack or 12v worth of batteries if you want it cordless)
Some hookup wire
5 minute epoxy
Items I used but you can substitute with something similar: piano wire, brass tubing, a strong magnet from a broken HDD, brass shim, copper shim, brass split pins, brass box corners, rubber o-rings, scrap aluminium angle stock, screws, small piece of self adhesive felt, hotglue.
Basic tools: Pliers, cutters, soldering iron
Step 2: Building the Box
Remember, as I said before, make this step count so you don't have to do what I did and veneer it to hide the dodgy sides...
Step 3: Build the Magnet Bracket
I then drilled through them both, and used a small bolt and nut to clamp them to the belt.
Next I epoxyed a chunk of strong (neodymium?) magnet broken from a larger flat magnet pulled out of an old hard drive.
I stuck some felt on top of the magnet as a low friction surface.
A note here: you need to use a non-ferrous metal for the bracket otherwise it will cause problems with the magnets - e.g. it will get stuck somewhere, or worse will affect the magnetic field and make the magnet seem weaker.
Step 4: Mount the Motor
Step 5: Pulley Shafts
I then waited for the epoxy to set, then slipped two washers over the shaft to get the pulley to the right height - to make sure the bracket runs flush with the 'lid' of the box
Step 6: Set Up a Tension Pulley
I soldered the third shaft (from previous step) onto some scrap metal (from an old heatsink) with a hole for a pivot at one end, and a hole for a spring at the other. I then used a screw to loosely mount one end, and the other it pulled by some springs (pulled from old pens) to keep the belt tight.
The tension is not very critical at all - you just need enough to make sure it doesn't slip.
Step 7: Guide Rails and Home Switch
I also glued in the microswitch at the home position of the belt, so the controller knows when the bracket its 'home' position
Step 8: The Electronics
Attached is the schematic and PCB done in eagle cad. I also included the PCB images as a bitmap file - make sure you print them at 300dpi if you don't want to use eaglecad to print the pcb.
This is a handy board for driving any bipolar stepper motor - also known as 4 wire steppers. They are a bit more complex to drive than 6 wire ones, but come with the bonus of higher torque. Most circuits out there I could find were for 6 wire motors - one of the other reasons I wanted to 'roll my own'.
Also attached is the bascom source file, and a compiled hex file for the atmega8.
I know that the Atmega8 is pretty overpowered for this simple job, but I had some around and had been doing other work with them recently. The code uses only 14% of the flash on this controller, so there is room aplenty for more customising!
The circuit has my own ISP header - easy to figure out the pinouts for another programmer if you need to. I also added some ballast resistors suitable for my motor to run from 12v (18 Ohm 5 watt) instead of 5 volts so it had better torque and top speed.
I had no idea which direction the motor would go, nor how many steps were needed to go from one end of travel to the other, so this is what I did: I moved the bracket to the middle of the travel (so it won't jam somewhere if it goes too far), set the program to step in one direction only for 500 steps, and saw which way it went. Easy huh?
Next, I sent it 'home' - it goes back to the home microswitch and sent it forward in ever increasing number of steps until I was happy that was as far as I wanted it to go.
Then I had all the data I needed, to write the final program code. Most likely you will need to change these numbers to suit your layout, size and stepper/gear combo.
The final code has some failsafe work - if it hits the home switch unexpectedly it will recalibrate itself, and after 1000 moves it also recalibrates - just in case the stepper motor mis-steps - small errors in stepping cumulatively will add up over time, and we don't want this thing jamming up by moving too far...
Step 9: Making the Board
My original plan was to use a sheet of plexiglass or Perspex for the lid, and print out my Ouija design on some parchment looking paper and varnish/glue it on top - so there is an idea for you. I did however think that would not have looked very handcrafted at all, so I ended up doing something else...
I fired up my old soldering iron for some wood burning action. You don't want to use your good iron here as it is pretty tough on the tip. If you have a woodburner tool (which is kinda like a soldering iron) then you have better tools than me, and you'll have more fun than I did.
I still printed out my design on paper, but then transferred the design onto my plywood top with a pencil - the old scribble on back of paper with soft pencil, flip over then trace over the design I-don't-have-any-carbon-paper trick.
I then proceeded to spend an inordinate amount of time burning the design into the timber. I also got to discover that harder grain takes ages to burn into, and that my extremely el-cheapo plywood had filler in some areas - filler does not burn well!!
I then gave the lid 3 coats of stain/varnish with a light sanding between. I used a satin finish for two reasons... firstly because I wanted it to look old, and secondly I wanted the plachette to move in a slightly jerky movement (like a disembodied hand moving it) rather than just slip and slide around. The satin finish gives a bit more friction. I think matte would be too much, and would end up shiny from the sliding over time anyway. Gloss should be ok too, but the planchette movement would be much smoother.
On the bottom side of the board, I wanted to make sure the magnet bracket could slide along easily - so I used some spray glue to attach a sheet of OHP transparency film on the wood.
Step 10: Make the Planchette
I looked around for what a planchette should look like, and there are infinite variations, but a majority look like a 'stretched love heart' shape. I sketched out this shape onto some scrap 6 mm ply (left over from the base of the box) and cut it out.
Next I drilled the hole which is pretty common on the planchettes I have seen.
I then got my piece of magnet matched with the magnet on the bracket/belt in the box, and carved out a small recess on the bottom of the planchette with a knife to fit the magnet (and deep enough for the magnet to sit flush with the surface of the wood). The magnet is not centered with the planchette on purpose as it helps make the movement look less mechanical (or symmetrical). Important! Make sure you match the magnet - if you don't it will be repelled by the one on the bracket inside the box, and won't work. You need to flip over the planchette magnet and make sure it is attracted to the bracket magnet! Doubly sure the magnet is the right way up, I epoxied it into the recess on the planchette.
I then covered the planchette with brass shim, copper and used a small glass lens (also from the scanner the motor came from) to 'punk it up'. You may just want to stain the wood.
Finally, cover the bottom of the planchette with some felt, for a nice smooth base that won't scratch up your lid/board.
Step 11: Finishing Up
All you need is some finishing details.
I added some brass box corners, legs and beading trim to make it look more like a piece of furniture than just a box. All in all I think it came out pretty good... one of those satisfying projects that actually came out somewhat how I hoped!
This was my 1st instructable. I hope you enjoyed it. I was blown away by how much work is needed to do one of these - it really helps me appreciate the work everyone else has put into this site. Thanks everyone!
Considering this is my 1st instructable, I would really appreciate comments and feedback.
Step 12: Serial Communications Project Update
I have no fancy stuff like a bluetooth module, so for this step I have used my laptop to send the messages to the Ouija board.
The video is now added, it is the 3rd video in the intro step to this instructable.
The Ouija board is now functional with full capacity - it can 'carry on' as it did originally, but connecting a serial device can invoke new behavior:
The board can talk to any serial device (so if you had a fancy bluetooth module or mobile phone or something tucked away in the case) for programming messages. It has a simple command structure, such as:
(asterisk) - begin new message
# - end message
@ - repeat message over and over
(carat) - go to sleep (turn off)
! - stop moving
$ - turn off/on (toggle) random movements
(I had to type asterisk and carat as the actual characters made the text act weird in instructables!)
so, to say 'askjacob' over and over one would send the string '*@askjacob#'
if you just send '*askjacob#' , it would spell out askjacob and then go back to random movements.
if you send '$*askjacob#', it would spell out askjacob, and then stop, awaiting further instructions.
You can send stuff to the board at any time and it will not interrupt the movement - unless of course the command specifically does affect movement.
I am very happy with how it turned out. Because my original design didn't expect this capability, there are some mechanical limitations - I can't get the planchette to reach the L, M , Y or Z, but in this age of txt msgs isn't too bad... From what I have heard, messages from beyond don't always come through clearly anyway and need some 'interpretation'.
The images below are
1 - the changes to the PCB (I will upload new eagle schematics for the changes)
2 - how the serial connector goes 'outside' the box
3 - the setup with a laptop for testing
4 - soundproofing the box
5 - soundproofing the lid
Step 13: The Updated PCB and Code...
Note that this PCB and code can be recycled to be used for any project that needs to use a 4-wire stepper motor, not just a haunted Ouija board!
The L293D motor controller is a pretty handy little chip - the PCB as is can also use it to control up to 2 DC motors, both forward and in reverse. With a bit of code work, you can also have proportional speed control using PWM for the two motors, so the PCB could be handy as a robotics motor control system. Rather than just a simple control for the motors, having the Atmega8 on board means you can make it an advanced controller, leaving your robot CPU free to do other work....
If anyone wants me to develop some revisions to the code for a general motor controller let me know and I'll get on it.
the .hex file : pre compiled code for the atmega8
the .bas file: Bascom AVR source code
the .sch file: The EagleCAD light schematic file
the .pcb file: The EagleCAD light circuit board file
Cheers and Happy New Year for 2008!
Step 14: More Details for Building - Including Some Ideas for Simpler Projects
I have had a few questions around the project lately, so I feel I should add some more information to the project!
I'll be adding more information around making the PCB, as well as some thoughts on making a simpler version for those who feel this version is in the 'too hard basket'.
I'll work on the updates over the weekend!