Motorized Spider

Halloween is quickly approaching, and what better way to prepare than making a decoration of our own? And what better decoration to make than a spider climbing from the its web? So, in this video we will be finding the best way to make this spider, and setting it up to spook up my house for halloween. It will be so scary that no one will dare trick or treat here again.

First, I needed an actual spider to use for this decoration. I drove to the store and bought a bunch of them, and a pair of skeleton hands as well. Spooky. Anyway, we now need a way for the spider to climb up its own web, which is the hard part.

Obviously we need string for the spider to climb, so I choose this white yarn to construct the web. To make the spider climb this string, I got a pack of cheap motors to control the spider. Basically, the motors will wind and unwind the string that the spider will be attached to, making it seem like the spider is moving by itself. I setup a quick test using my power supply and a dummy to see if my idea would work. And as we can see, it does. We simply switch the polarity to change which way the motor spins and, therefore, we can bring the spider both up and down.

There are still two big problems we need to address though. First, we need a way to automatically control the movement of the spider so that it can act by itself. Second, we need a way to identify when the spider reaches the top, so that we don’t keep winding it unneccesarily.

The first problem is easy to solve. We can just use a microcontroller to run the motor. In this case it will be an attiny85, so that we can save space. The only problem is that we can’t directly power the motor from the pins of the microcontroller.

That’s where this very popular L298N motor driver board comes in. This board is a perfect fit for this project. It has an h-bridge driver, meaning that we can drive the motor in both directions. It has a pwm input so we can also control the speed of the motor. And finally, it has a 5v regulator on board, meaning that we can have a supply of up to 12 volts, and have a 5v output to power the microcontroller with. The use of the board really makes the circuit required for the rest of the project really quite trivial.

The second major problem we need to overcome is detecting when the spider reaches the top. I came up with this simple mechanical solution. To make it I first cut this long piece of wood into two smaller rectangles. Then, I put them both under the drill press and made three holes. I made sure the holes were big enough by fitting some m4 screws through. I then put tinfoil on the bottom layer. The tinfoil was directly touching one screw, but not the other. However, it was lined up to touch the nut when lifted. This basically means that when the platform is lifted, the two screws are electrically connected. This essentially forms a big button that the spider will press when it reaches the top.

As for the software portion of this project, it really isn’t that complicated. The first problem I faced was that the motor couldn’t move itself starting with low speeds. So I gave it a startup section where it ran at full speed and then slowed down afterwards. To make the whole system work at start-up, we reset the spider by pulling it up until it pushes the button. We then slowly drop it and then bring it back up. The speed is controlled by the PWM output from the timer on the microcontroller. We can completely stop the motor from spinning by stopping the PWM and replacing it with a low signal. Inversely, we can have the motor move at full speed by writing a high signal.

To make this work properly for halloween, I soldered everything together on top of a perfboard. However, when I went to test this thing off camera, it failed. As you can see from the aftermath, the string gets extremely tangled to the point that the spider won’t be able to go back down without manual intervention. This was caused by two things: one, the motor spins too fast, despite my efforts to slow it down. And two, the string is not of the best quality to be spooled.

To solve this I got four additions to the project. First, I got this really small and really slow DC motor to replace the first motor. It spins at about 35 rpm. This also eliminates the need for a PWM signal in the microcontroller, simplifying the code a bit. I then elevated this motor using a small cut of wood.

As for the string wrapping up, I got this bobbin and thread. The thread doesn’t twist and tangle as easily as the yarn, and the bobbin keeps the thread in line. I also put a cut of pool noodle in the hole of the bobbin so that the smaller shaft of the motor could fit inside. Also, to route the thread correctly, I put a small nail and wrapped the string around it so that it would easily reach the spool.

And one more thing to make this perfect: I needed to make it battery powered. So, I grabbed this nine volt battery. The only problem was that I needed a 9v connector, so I made one with this old battery that expired back in 2013. You can make a connector like this too. Just take another 9v battery, ideally one that is dead, and pry the outer casing off of it. Once it is off, you can take this top connector bit off. Now you have a recycled 9v connector. Now I can place the spider anywhere without needing to worry about connecting it to power.

With these modifications, the contraption works perfectly. The spider can go up and down. It does move quite slowly, so if you are making this for yourself and want it to move faster, you can get a motor exactly like this at a higher RPM on places like aliexpress.

I hope you enjoyed this video, and found some inspiration for your spooky season. The project today wasn’t too electronically complicated, but it sure was a mechanical challenge. If you did enjoy, please consider subscribing so that you can see the other videos that I make. Have a good one. Happy Hallowee!