I took a little hiatus on the robotic chessboard project I have been working on to better plan out some of my methods. I decided that the sensing of the position of the chess pieces will be done by Hall sensors. I will place a Hall sensor under each square of the board. The kind I bought are essentially switches which turn when one polarity is brought towards the sensor and turns off at the presence of the other magnetic pole. I put small magnets in the bottom of each chess piece. In the first video, you can see that the chess piece activates the hall sensor, which lights the LED. I then use the opposite pole of the magnet, which I glued to a stick, to reset the sensor. (Sorry for the vertical nature of the video. One of these days, I'll remember to consistently hold the phone sideways when recording.)
For the operation of the robotic chessboard, these latching Hall sensors pose a problem. As shown in the above video, the sensors would not turn off when the pieces are removed. Hall sensors that do not latch are nearly twice as expensive at the latching kind. This adds up when 64 are needed. I solve this problem by using a digital pin on the Arduino to control the power input to the Hall sensor instead of the 5V pin. This idea comes from the comments on Sparkfun. As you can see in the second video, the sensor now detects the presence of a magnet.
The next step is learning how to control 64 inputs on the arduino with a mux chip, which allows for control of 16 hall sensors using only 4 pins on the arduino. The next update will hopefully show a full chess board which detects where the pieces are or at least progress in that direction.
It turned our really well. He decided to sand the plastic tube at the end and we put some plastic wrap at the far end to catch and diffuse some of the light there. It turned out better than the one I covered in tissue paper. Perhaps I'll redo that one when the 5 year old breaks the tube off. It's only a matter of time. Here are some pictures of the finished lightsabers.
Tonight I went to the hardware store and bought some l-brackets to attached the tube to the base of the lightsaber. The tube is made out of a plastic florescent light cover. Then, I stuffed some tissued paper in the far end and put some plastic wrap over the end. After that, I wrapped the tube in tissue paper. I have included pictures of various steps and the finished product. I also put a 9V holder in the bottom to stop it from rattling around.
I'm trying to keep my 5 year old's hands off it until Halloween because the tube is fragile and he wants to use it for his costume. We'll see how long that lasts. Devin doesn't like the look of the tissue paper so we're going to try something else with his. He's going to take some fine sandpaper to the tube to turn in cloudy and put some aluminum foil over the far end to reflect some of the light back. If that works, maybe I'll redo this lightsaber in the same way. I don't really like the wad of tissue I have glowing at the end.
Anyway, this project has been pretty fun and very simple. I'm really happy with out the handles turned out .
As I said before, my 9 year old is working on making a lightsaber for his monthly science project. Or course, whatever the 9 year old has, the 5 year old wants. I decided to assemble a light saber for the little guy tonight so I know how much work the older guy is going to have to do.
In this post, I am only showing the base of the lightsaber. It's quite straightforward. I am using four super bright LEDs from Sparkfun, two 220 ohm resistors, a 9V battery, and a switch. For the housing, I cut down some PVC pipe and bought some fittings for the end. The most expensive piece of equipment is the switch at about $4. The entire lightsaber comes in under $10.
As an exercise, I had Devin (the 9 year old) use this website, which generates a circuit and the necessary resistors for a given number of LEDs. It's a good tool and perfect for a child with very little knowledge of Algebra. I'll include a schematic of the LED circuit below. I have also included pictures from throughout the project.
After I finished James' (the 5 year old's) light saber, Devin decided to solder his up tonight too. They both turned out rather well. All that is left is attaching the tube.
My 9 year old wants to make an LED lightsaber for a science project. I quickly write an Arduino program showing an array of LED blinking patterns that I came up with on the spot. There is nothing interesting or profound here, but since I did it, I thought I'd share it. For the lightsaber, I think I'll get some high intensity LEDs.